diff -Nru strace-4.11/aclocal.m4 strace-4.12/aclocal.m4 --- strace-4.11/aclocal.m4 2015-12-21 23:24:00.000000000 +0000 +++ strace-4.12/aclocal.m4 2016-05-31 11:35:53.000000000 +0000 @@ -1183,6 +1183,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_code_coverage.m4]) m4_include([m4/ax_prog_cc_for_build.m4]) m4_include([m4/mpers.m4]) m4_include([m4/warnings.m4]) diff -Nru strace-4.11/affinity.c strace-4.12/affinity.c --- strace-4.11/affinity.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/affinity.c 2016-01-07 02:11:55.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002-2004 Roland McGrath - * Copyright (c) 2009-2015 Dmitry V. Levin + * Copyright (c) 2009-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,56 +27,82 @@ */ #include "defs.h" +#include + +static unsigned int +get_cpuset_size(void) +{ + static unsigned int cpuset_size; + + if (!cpuset_size) { + pid_t pid = getpid(); + cpuset_size = 128; + while (cpuset_size && + sched_getaffinity(pid, cpuset_size, NULL) == -1 && + EINVAL == errno) { + cpuset_size <<= 1; + } + if (!cpuset_size) + cpuset_size = 128; + } + + return cpuset_size; +} static void print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int len) { - unsigned long w; - const unsigned int size = len * sizeof(w); - const unsigned long end = addr + size; - unsigned long cur, abbrev_end; + const unsigned int max_size = get_cpuset_size(); + const unsigned int umove_size = len < max_size ? len : max_size; + const unsigned int size = + (umove_size + current_wordsize - 1) & -current_wordsize; + const unsigned int ncpu = size * 8; + void *cpu; if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || - !addr || !len || size / sizeof(w) != len || end < addr) { + !addr || !len || !(cpu = calloc(size, 1))) { printaddr(addr); return; } - if (abbrev(tcp)) { - abbrev_end = addr + max_strlen * sizeof(w); - if (abbrev_end < addr) - abbrev_end = end; - } else { - abbrev_end = end; - } - - tprints("["); - for (cur = addr; cur < end; cur += sizeof(w)) { - if (cur > addr) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; + if (!umoven_or_printaddr(tcp, addr, umove_size, cpu)) { + int i = 0; + const char *sep = ""; + + tprints("["); + for (;; i++) { + i = next_set_bit(cpu, i, ncpu); + if (i < 0) + break; + tprintf("%s%d", sep, i); + sep = " "; } - if (umove_or_printaddr(tcp, cur, &w)) - break; - tprintf("%lx", w); + if (size < len) + tprintf("%s...", sep); + tprints("]"); } - tprints("]"); + + free(cpu); } SYS_FUNC(sched_setaffinity) { - tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); - print_affinitylist(tcp, tcp->u_arg[2], tcp->u_arg[1]); + const int pid = tcp->u_arg[0]; + const unsigned int len = tcp->u_arg[1]; + + tprintf("%d, %u, ", pid, len); + print_affinitylist(tcp, tcp->u_arg[2], len); return RVAL_DECODED; } SYS_FUNC(sched_getaffinity) { + const int pid = tcp->u_arg[0]; + const unsigned int len = tcp->u_arg[1]; + if (entering(tcp)) { - tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + tprintf("%d, %u, ", pid, len); } else { print_affinitylist(tcp, tcp->u_arg[2], tcp->u_rval); } diff -Nru strace-4.11/aio.c strace-4.12/aio.c --- strace-4.11/aio.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/aio.c 2016-05-07 22:40:06.000000000 +0000 @@ -154,52 +154,54 @@ } } -SYS_FUNC(io_submit) +static bool +print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - long nr = tcp->u_arg[1]; - /* if nr <= 0, we end up printing just "[]" */ - tprintf("%lu, %ld, [", tcp->u_arg[0], nr); - { - long i; - long iocbs = tcp->u_arg[2]; - - for (i = 0; i < nr; ++i, iocbs += current_wordsize) { - unsigned long iocbp; - struct iocb cb; - - if (i) - tprints(", "); - - if (umove_ulong_or_printaddr(tcp, iocbs, &iocbp)) { - /* - * No point in trying to read the whole array - * because nr can be ridiculously large. - */ - break; - } + unsigned long addr; + struct iocb cb; - tprints("{"); - if (!umove_or_printaddr(tcp, iocbp, &cb)) - print_iocb(tcp, &cb); - tprints("}"); - } + if (elem_size < sizeof(long)) { + addr = * (unsigned int *) elem_buf; + } else { + addr = * (unsigned long *) elem_buf; } - tprints("]"); + + tprints("{"); + if (!umove_or_printaddr(tcp, addr, &cb)) + print_iocb(tcp, &cb); + tprints("}"); + + return true; +} + +SYS_FUNC(io_submit) +{ + const long nr = widen_to_long(tcp->u_arg[1]); + const unsigned long addr = tcp->u_arg[2]; + unsigned long iocbp; + + tprintf("%lu, %ld, ", tcp->u_arg[0], nr); + + if (nr < 0) + printaddr(addr); + else + print_array(tcp, addr, nr, &iocbp, current_wordsize, + umoven_or_printaddr, print_iocbp, 0); + return RVAL_DECODED; } -static int -print_io_event(struct tcb *tcp, const long addr) +static bool +print_io_event(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - struct io_event event; + struct io_event *event = elem_buf; - if (umove_or_printaddr(tcp, addr, &event)) - return -1; tprintf("{data=%#" PRIx64 ", obj=%#" PRIx64 ", res=%" PRId64 ", res2=%" PRId64 "}", - (uint64_t) event.data, (uint64_t) event.obj, - (int64_t) event.res, (int64_t) event.res2); - return 0; + (uint64_t) event->data, (uint64_t) event->obj, + (int64_t) event->res, (int64_t) event->res2); + + return true; } SYS_FUNC(io_cancel) @@ -215,7 +217,10 @@ } tprints(", "); } else { - print_io_event(tcp, tcp->u_arg[2]); + struct io_event event; + + if (!umove_or_printaddr(tcp, tcp->u_arg[2], &event)) + print_io_event(tcp, &event, sizeof(event), 0); } return 0; } @@ -224,26 +229,14 @@ { if (entering(tcp)) { tprintf("%lu, %ld, %ld, ", - tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]); + tcp->u_arg[0], + widen_to_long(tcp->u_arg[1]), + widen_to_long(tcp->u_arg[2])); } else { - if (tcp->u_rval == 0) { - tprints("[]"); - } else { - struct io_event *events = (void *)tcp->u_arg[3]; - long i, nr = tcp->u_rval; - - for (i = 0; i < nr; i++, events++) { - if (i == 0) - tprints("["); - else - tprints(", "); - - if (print_io_event(tcp, (long)events)) - break; - } - tprints("], "); - } - + struct io_event buf; + print_array(tcp, tcp->u_arg[3], tcp->u_rval, &buf, sizeof(buf), + umoven_or_printaddr, print_io_event, 0); + tprints(", "); /* * Since the timeout parameter is read by the kernel * on entering syscall, it has to be decoded the same way diff -Nru strace-4.11/alpha.c strace-4.12/alpha.c --- strace-4.11/alpha.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/alpha.c 2016-04-25 23:52:03.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef ALPHA + +static int +decode_getxxid(struct tcb *tcp, const char *what) +{ + if (entering(tcp)) + return 0; + + long rval = getrval2(tcp); + if (rval == -1) + return 0; + static const char const fmt[] = "%s %ld"; + static char outstr[sizeof(fmt) + 3 * sizeof(rval)]; + snprintf(outstr, sizeof(outstr), fmt, what, rval); + tcp->auxstr = outstr; + return RVAL_STR; +} + +SYS_FUNC(getxpid) +{ + return decode_getxxid(tcp, "ppid"); +} + +SYS_FUNC(getxuid) +{ + return decode_getxxid(tcp, "euid"); +} + +SYS_FUNC(getxgid) +{ + return decode_getxxid(tcp, "egid"); +} + +SYS_FUNC(osf_statfs) +{ + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printaddr(tcp->u_arg[1]); + tprints(", "); + tprintf("%lu", tcp->u_arg[2]); + return RVAL_DECODED; +} + +SYS_FUNC(osf_fstatfs) +{ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printaddr(tcp->u_arg[1]); + tprints(", "); + tprintf("%lu", tcp->u_arg[2]); + return RVAL_DECODED; +} + +#endif /* ALPHA */ diff -Nru strace-4.11/block.c strace-4.12/block.c --- strace-4.11/block.c 2015-08-18 16:15:33.000000000 +0000 +++ strace-4.12/block.c 2016-05-26 14:44:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,16 +27,16 @@ */ #include "defs.h" + +#include DEF_MPERS_TYPE(struct_blk_user_trace_setup) +#include DEF_MPERS_TYPE(struct_blkpg_ioctl_arg) +#include DEF_MPERS_TYPE(struct_blkpg_partition) + #include #include -#include - -/* ioctls <= 114 are present in Linux 2.4. The following ones have been - * added since then and headers containing them may not be available on - * every system. */ #define BLKTRACE_BDEV_SIZE 32 -struct blk_user_trace_setup { +typedef struct blk_user_trace_setup { char name[BLKTRACE_BDEV_SIZE]; /* output */ uint16_t act_mask; /* input */ uint32_t buf_size; /* input */ @@ -43,10 +44,21 @@ uint64_t start_lba; uint64_t end_lba; uint32_t pid; -}; +} struct_blk_user_trace_setup; + +typedef struct blkpg_ioctl_arg struct_blkpg_ioctl_arg; +typedef struct blkpg_partition struct_blkpg_partition; + +#include MPERS_DEFS + +/* + * ioctl numbers <= 114 are present in Linux 2.4. The following ones have been + * added since then and headers containing them may not be available on every + * system. + */ #ifndef BLKTRACESETUP -# define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) +# define BLKTRACESETUP _IOWR(0x12, 115, struct_blk_user_trace_setup) #endif #ifndef BLKTRACESTART # define BLKTRACESTART _IO(0x12,116) @@ -84,13 +96,16 @@ #ifndef BLKZEROOUT # define BLKZEROOUT _IO(0x12,127) #endif +#ifndef BLKDAXGET +# define BLKDAXGET _IO(0x12,129) +#endif #include "xlat/blkpg_ops.h" static void -print_blkpg_req(struct tcb *tcp, const struct blkpg_ioctl_arg *blkpg) +print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg) { - struct blkpg_partition p; + struct_blkpg_partition p; tprints("{"); printxval(blkpg_ops, blkpg->op, "BLKPG_???"); @@ -100,7 +115,7 @@ if (!umove_or_printaddr(tcp, (long) blkpg->data, &p)) { tprintf("{start=%lld, length=%lld, pno=%d, devname=", - p.start, p.length, p.pno); + (long long) p.start, (long long) p.length, p.pno); print_quoted_string(p.devname, sizeof(p.devname), QUOTE_0_TERMINATED); tprints(", volname="); @@ -111,8 +126,8 @@ tprints("}"); } -int -block_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *tcp, + const unsigned int code, const long arg) { switch (code) { /* take arg as a value, not as a pointer */ @@ -121,13 +136,6 @@ tprintf(", %lu", arg); break; - /* take a signed int */ - case BLKROSET: - case BLKBSZSET: - tprints(", "); - printnum_int(tcp, arg, "%d"); - break; - /* return an unsigned short */ case BLKSECTGET: case BLKROTATIONAL: @@ -142,8 +150,13 @@ case BLKBSZGET: case BLKSSZGET: case BLKALIGNOFF: + case BLKDAXGET: if (entering(tcp)) return 0; + /* fall through */ + /* take a signed int */ + case BLKROSET: + case BLKBSZSET: tprints(", "); printnum_int(tcp, arg, "%d"); break; @@ -191,29 +204,12 @@ case BLKSECDISCARD: case BLKZEROOUT: tprints(", "); - printpair_int64(tcp, arg, "%" PRIx64); + printpair_int64(tcp, arg, "%" PRIu64); break; /* More complex types */ - case HDIO_GETGEO: - if (entering(tcp)) - return 0; - else { - struct hd_geometry geo; - - tprints(", "); - if (!umove_or_printaddr(tcp, arg, &geo)) - tprintf("{heads=%u, sectors=%u, " - "cylinders=%u, start=%lu}", - (unsigned)geo.heads, - (unsigned)geo.sectors, - (unsigned)geo.cylinders, - geo.start); - } - break; - case BLKPG: { - struct blkpg_ioctl_arg blkpg; + struct_blkpg_ioctl_arg blkpg; tprints(", "); if (!umove_or_printaddr(tcp, arg, &blkpg)) @@ -223,7 +219,7 @@ case BLKTRACESETUP: if (entering(tcp)) { - struct blk_user_trace_setup buts; + struct_blk_user_trace_setup buts; tprints(", "); if (umove_or_printaddr(tcp, arg, &buts)) @@ -236,51 +232,23 @@ buts.end_lba, buts.pid); return 1; } else { - struct blk_user_trace_setup buts; + struct_blk_user_trace_setup buts; - if (syserror(tcp)) { - tprints("}"); - break; - } - tprints(", "); - if (umove(tcp, arg, &buts) < 0) { - tprints("???}"); - break; + if (!syserror(tcp) && !umove(tcp, arg, &buts)) { + tprints(", name="); + print_quoted_string(buts.name, sizeof(buts.name), + QUOTE_0_TERMINATED); } - tprints(", name="); - print_quoted_string(buts.name, sizeof(buts.name), - QUOTE_0_TERMINATED); tprints("}"); break; } -#ifdef FITRIM - /* First seen in linux-2.6.37 */ - case FITRIM: { - struct fstrim_range fstrim; - - tprints(", "); - if (!umove_or_printaddr(tcp, arg, &fstrim)) - tprintf("{start=%#" PRIx64 ", " - "len=%#" PRIx64 ", " - "minlen=%#" PRIx64 "}", - (uint64_t) fstrim.start, - (uint64_t) fstrim.len, - (uint64_t) fstrim.minlen); - break; - } -#endif - /* No arguments */ case BLKRRPART: case BLKFLSBUF: case BLKTRACESTART: case BLKTRACESTOP: case BLKTRACETEARDOWN: -#ifdef FIFREEZE - case FIFREEZE: - case FITHAW: -#endif break; default: return RVAL_DECODED; diff -Nru strace-4.11/bpf.c strace-4.12/bpf.c --- strace-4.11/bpf.c 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/bpf.c 2016-05-16 21:47:09.000000000 +0000 @@ -83,7 +83,7 @@ printfd(tcp, attr.map_fd); tprintf(", key=%#" PRIx64 ", value=%#" PRIx64 ", flags=", attr.key, attr.value); - printxval(bpf_map_update_elem_flags, attr.flags, "BPF_???"); + printxval64(bpf_map_update_elem_flags, attr.flags, "BPF_???"); tprints("}"); } diff -Nru strace-4.11/btrfs.c strace-4.12/btrfs.c --- strace-4.11/btrfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/btrfs.c 2016-05-27 08:53:44.000000000 +0000 @@ -0,0 +1,1354 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args) +#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args) +#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args) + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; + +#endif /* HAVE_LINUX_BTRFS_H */ + +#include MPERS_DEFS + +#ifdef HAVE_LINUX_BTRFS_H + +#include + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_FIRST_FREE_OBJECTID +# define BTRFS_FIRST_FREE_OBJECTID 256ULL +#endif + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_ctl_cmds.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_replace_cmds.h" +#include "xlat/btrfs_dev_replace_results.h" +#include "xlat/btrfs_dev_replace_state.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" +#include "xlat/btrfs_qgroup_ctl_cmds.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_qgroup_status_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_tree_objectids.h" + +static inline char +prnibble(char v) +{ + if (v >= 10) + return 'a' + (v - 10); + return '0' + v; +} + +/* 8-4-4-4-12 = 36 characters */ +#define UUID_STRING_SIZE 36 + +/* Formats uuid, returns 0 if it's all zeroes */ +static int +btrfs_unparse_uuid(unsigned char *uuid, char *out) +{ + int i; + int ret = 0; + for (i = 0; i < BTRFS_UUID_SIZE; i++) { + if (i == 4 || i == 6 || i == 8 || i == 10) + *out++ = '-'; + *out++ = prnibble(uuid[i] >> 4); + *out++ = prnibble(uuid[i] & 0xf); + if (uuid[i]) + ret = 1; + } + *out = '\0'; + return ret; +} + +static void +print_u64(const char *name, uint64_t value) +{ + tprintf(", %s=%" PRIu64, name, value); + if (value == UINT64_MAX) + tprints(" /* UINT64_MAX */"); +} + +#define print_member_u64(obj, name) print_u64(#name, obj->name) + +static void +btrfs_print_balance_args(const char *name, const struct btrfs_balance_args *bba) +{ + tprintf(", %s={profiles=", name); + printflags64(btrfs_space_info_flags, bba->profiles, + "BTRFS_BLOCK_GROUP_???"); + print_member_u64(bba, usage); + print_member_u64(bba, devid); + print_member_u64(bba, pstart); + print_member_u64(bba, pend); + print_member_u64(bba, vstart); + print_member_u64(bba, vend); + print_member_u64(bba, target); + tprints(", flags="); + printflags64(btrfs_balance_args, bba->flags, "BTRFS_BALANCE_ARGS_???"); + tprints("}"); +} + +static void +btrfs_print_balance(struct tcb *tcp, const long arg, bool out) +{ + struct btrfs_ioctl_balance_args balance_args; + + if (umove_or_printaddr(tcp, arg, &balance_args)) + return; + + tprints("{flags="); + printflags64(btrfs_balance_flags, balance_args.flags, + "BTRFS_BALANCE_???"); + if (out) { + tprints(", state="); + printflags64(btrfs_balance_state, balance_args.state, + "BTRFS_BALANCE_STATE_???"); + } + + if (balance_args.flags & BTRFS_BALANCE_DATA) + btrfs_print_balance_args("data", &balance_args.data); + if (balance_args.flags & BTRFS_BALANCE_METADATA) + btrfs_print_balance_args("meta", &balance_args.meta); + if (balance_args.flags & BTRFS_BALANCE_SYSTEM) + btrfs_print_balance_args("sys", &balance_args.sys); + tprints("}"); +} + +static void +btrfs_print_features(const struct btrfs_ioctl_feature_flags *flags) +{ + tprints("{compat_flags="); + printflags64(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + tprints(", compat_ro_flags="); + printflags64(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + tprints(", incompat_flags="); + printflags64(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + tprints("}"); +} + +static void +btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim) +{ + tprints("{flags="); + printflags64(btrfs_qgroup_limit_flags, lim->flags, + "BTRFS_QGROUP_LIMIT_???"); + tprintf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 "}", + lim->max_rfer, lim->max_excl, + lim->rsv_rfer, lim->rsv_excl); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + tprintf("%u", type); + if (str) + tprintf(" /* %s */", str); +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + tprintf("%" PRIu64, objectid); + if (str) + tprintf(" /* %s */", str); +} + +static void +btrfs_print_data_container_header(const struct btrfs_data_container *container) +{ + tprintf("{bytes_left=%u, bytes_missing=%u" + ", elem_cnt=%u, elem_missed=%u, val=", + container->bytes_left, container->bytes_missing, + container->elem_cnt, container->elem_missed); +} + +static void +btrfs_print_data_container_footer(void) +{ + tprints("}"); +} + +static bool +print_btrfs_data_container_logical_ino(struct tcb *tcp, void *elem_buf, + size_t elem_size, void *data) +{ + const uint64_t *const record = elem_buf; + + tprintf("{inum=%" PRIu64 ", offset=%" PRIu64 ", root=%" PRIu64 "}", + record[0], record[1], record[2]); + + return true; +} + +static void +btrfs_print_logical_ino_container(struct tcb *tcp, + const uint64_t inodes_addr) +{ + struct btrfs_data_container container; + + if (umove_or_printaddr(tcp, inodes_addr, &container)) + return; + + btrfs_print_data_container_header(&container); + + if (abbrev(tcp)) { + tprints("..."); + } else { + const uint64_t val_addr = + inodes_addr + offsetof(typeof(container), val); + uint64_t record[3]; + print_array(tcp, val_addr, container.elem_cnt / 3, + record, sizeof(record), + umoven_or_printaddr, + print_btrfs_data_container_logical_ino, 0); + } + + btrfs_print_data_container_footer(); +} + +static bool +print_btrfs_data_container_ino_path(struct tcb *tcp, void *elem_buf, + size_t elem_size, void *data) +{ + const uint64_t *const offset = elem_buf; + const uint64_t *const val_addr = data; + + printpath(tcp, *val_addr + *offset); + + return true; +} + +static void +btrfs_print_ino_path_container(struct tcb *tcp, + const uint64_t fspath_addr) +{ + struct btrfs_data_container container; + + if (umove_or_printaddr(tcp, fspath_addr, &container)) + return; + + btrfs_print_data_container_header(&container); + + if (abbrev(tcp)) { + tprints("..."); + } else { + uint64_t val_addr = + fspath_addr + offsetof(typeof(container), val); + uint64_t offset; + print_array(tcp, val_addr, container.elem_cnt, + &offset, sizeof(offset), + umoven_or_printaddr, + print_btrfs_data_container_ino_path, &val_addr); + } + + btrfs_print_data_container_footer(); +} + +static bool +print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + tprintf("%" PRIu64, * (uint64_t *) elem_buf); + + return true; +} + +static void +btrfs_print_qgroup_inherit(struct tcb *tcp, const uint64_t qgi_addr) +{ + struct btrfs_qgroup_inherit inherit; + + if (umove_or_printaddr(tcp, qgi_addr, &inherit)) + return; + + tprintf("{flags="); + printflags64(btrfs_qgroup_inherit_flags, inherit.flags, + "BTRFS_QGROUP_INHERIT_???"); + tprintf(", num_qgroups=%" PRI__u64 ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64 ", lim=", + inherit.num_qgroups, inherit.num_ref_copies, + inherit.num_excl_copies); + + btrfs_print_qgroup_limit(&inherit.lim); + + tprints(", qgroups="); + + if (abbrev(tcp)) { + tprints("..."); + } else { + uint64_t record; + print_array(tcp, qgi_addr + offsetof(typeof(inherit), qgroups), + inherit.num_qgroups, &record, sizeof(record), + umoven_or_printaddr, print_uint64, 0); + } + tprints("}"); +} + +static void +print_key_value_internal(struct tcb *tcp, const char *name, uint64_t value) +{ + if (value) { + tprintf(", %s=%" PRIu64, name, value); + if (value == UINT64_MAX) + tprints(" /* UINT64_MAX */"); + } +} +#define print_key_value(tcp, key, name) \ + print_key_value_internal((tcp), #name, (key)->name) + +static void +btrfs_print_tree_search(struct tcb *tcp, struct btrfs_ioctl_search_key *key, + uint64_t buf_addr, uint64_t buf_size, bool print_size) +{ + if (entering(tcp)) { + tprintf("{key={tree_id="); + btrfs_print_objectid(key->tree_id); + + if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID || + !abbrev(tcp)) { + tprints(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + + if (key->max_objectid != BTRFS_LAST_FREE_OBJECTID || + !abbrev(tcp)) { + tprints(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + + print_key_value(tcp, key, min_offset); + print_key_value(tcp, key, max_offset); + print_key_value(tcp, key, min_transid); + print_key_value(tcp, key, max_transid); + + tprints(", min_type="); + btrfs_print_key_type(key->min_type); + tprints(", max_type="); + btrfs_print_key_type(key->max_type); + tprintf(", nr_items=%u}", key->nr_items); + if (print_size) + tprintf(", buf_size=%" PRIu64, buf_size); + tprints("}"); + } else { + tprintf("{key={nr_items=%u}", key->nr_items); + if (print_size) + tprintf(", buf_size=%" PRIu64, buf_size); + tprints(", buf="); + if (abbrev(tcp)) + tprints("..."); + else { + uint64_t i; + uint64_t off = 0; + tprints("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header sh; + uint64_t addr = buf_addr + off; + if (i) + tprints(", "); + if (i > max_strlen || + umove(tcp, addr, &sh)) { + tprints("..."); + break; + } + tprintf("{transid=%" PRI__u64 ", objectid=", + sh.transid); + btrfs_print_objectid(sh.objectid); + tprintf(", offset=%" PRI__u64 ", type=", sh.offset); + btrfs_print_key_type(sh.type); + tprintf(", len=%u}", sh.len); + off += sizeof(sh) + sh.len; + + } + tprints("]"); + } + tprints("}"); + } +} + +static bool +print_objectid_callback(struct tcb *tcp, void *elem_buf, + size_t elem_size, void *data) +{ + btrfs_print_objectid(* (uint64_t *) elem_buf); + + return true; +} + +static bool +print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf, + size_t elem_size, void *data) +{ + const struct btrfs_ioctl_space_info *info = elem_buf; + + tprints("{flags="); + printflags64(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + tprintf(", total_bytes=%" PRI__u64 ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + + return true; +} + +MPERS_PRINTER_DECL(int, btrfs_ioctl, + struct tcb *tcp, const unsigned int code, const long arg) +{ + switch (code) { + /* Take no arguments; command only. */ + case BTRFS_IOC_TRANS_START: + case BTRFS_IOC_TRANS_END: + case BTRFS_IOC_SYNC: + case BTRFS_IOC_SCRUB_CANCEL: + case BTRFS_IOC_QUOTA_RESCAN_WAIT: + /* + * The codes for these ioctls are based on each accepting a + * vol_args but none of them actually consume an argument. + */ + case BTRFS_IOC_DEFRAG: + case BTRFS_IOC_BALANCE: + break; + + /* takes a signed int */ + case BTRFS_IOC_BALANCE_CTL: + tprints(", "); + printxval(btrfs_balance_ctl_cmds, arg, "BTRFS_BALANCE_CTL_???"); + break; + + /* returns a 64 */ + case BTRFS_IOC_START_SYNC: /* R */ + if (entering(tcp)) + return 0; + /* fall through */ + /* takes a u64 */ + case BTRFS_IOC_DEFAULT_SUBVOL: /* W */ + case BTRFS_IOC_WAIT_SYNC: /* W */ + tprints(", "); + printnum_int64(tcp, arg, "%" PRIu64); + break; + + /* u64 but describe a flags bitfield; we can make that symbolic */ + case BTRFS_IOC_SUBVOL_GETFLAGS: { /* R */ + uint64_t flags; + + if (entering(tcp)) + return 0; + + tprints(", "); + + if (umove_or_printaddr(tcp, arg, &flags)) + break; + + printflags64(btrfs_snap_flags_v2, flags, "BTRFS_SUBVOL_???"); + break; + } + + case BTRFS_IOC_SUBVOL_SETFLAGS: { /* W */ + uint64_t flags; + + tprints(", "); + + if (umove_or_printaddr(tcp, arg, &flags)) + break; + + printflags64(btrfs_snap_flags_v2, flags, "BTRFS_SUBVOL_???"); + break; + } + + /* More complex types */ + case BTRFS_IOC_BALANCE_V2: /* RW */ + if (entering(tcp)) { + tprints(", "); + btrfs_print_balance(tcp, arg, false); + return 0; + } + + if (syserror(tcp)) + break; + + tprints(" => "); + btrfs_print_balance(tcp, arg, true); + break; + case BTRFS_IOC_BALANCE_PROGRESS: /* R */ + if (entering(tcp)) + return 0; + + tprints(", "); + btrfs_print_balance(tcp, arg, true); + break; + + case BTRFS_IOC_DEFRAG_RANGE: { /* W */ + struct btrfs_ioctl_defrag_range_args args; + + tprints(", "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{start=%" PRIu64 ", len=", (uint64_t)args.start); + + tprintf("%" PRIu64, args.len); + if (args.len == UINT64_MAX) + tprints(" /* UINT64_MAX */"); + + tprints(", flags="); + printflags64(btrfs_defrag_flags, args.flags, + "BTRFS_DEFRAG_RANGE_???"); + tprintf(", extent_thresh=%u, compress_type=", + args.extent_thresh); + printxval(btrfs_compress_types, args.compress_type, + "BTRFS_COMPRESS_???"); + tprints("}"); + break; + } + + case BTRFS_IOC_DEV_INFO: { /* RW */ + struct btrfs_ioctl_dev_info_args args; + char uuid[UUID_STRING_SIZE+1]; + int valid; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + tprints("{"); + + valid = btrfs_unparse_uuid(args.uuid, uuid); + if (entering(tcp)) { + tprintf("devid=%" PRI__u64, args.devid); + if (valid) + tprintf(", uuid=%s", uuid); + tprints("}"); + return 0; + } + if (valid) + tprintf("uuid=%s, ", uuid); + tprintf("bytes_used=%" PRI__u64 + ", total_bytes=%" PRI__u64 ", path=", + args.bytes_used, args.total_bytes); + print_quoted_string((const char *)args.path, sizeof(args.path), + QUOTE_0_TERMINATED); + tprints("}"); + break; + } + + case BTRFS_IOC_DEV_REPLACE: { /* RW */ + struct_btrfs_ioctl_dev_replace_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + tprints("{cmd="); + printxval64(btrfs_dev_replace_cmds, args.cmd, + "BTRFS_IOCTL_DEV_REPLACE_CMD_???"); + if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_START) { + const char *str; + tprintf(", start={srcdevid=%" PRIu64 + ", cont_reading_from_srcdev_mode=%" PRIu64 + ", srcdev_name=", + (uint64_t) args.start.srcdevid, + (uint64_t) args.start.cont_reading_from_srcdev_mode); + + str = (const char*) args.start.srcdev_name; + print_quoted_string(str, + sizeof(args.start.srcdev_name), + QUOTE_0_TERMINATED); + tprints(", tgtdev_name="); + str = (const char*) args.start.tgtdev_name; + print_quoted_string(str, + sizeof(args.start.tgtdev_name), + QUOTE_0_TERMINATED); + tprints("}"); + + } + tprints("}"); + return 0; + } + + tprints("{result="); + printxval64(btrfs_dev_replace_results, args.result, + "BTRFS_IOCTL_DEV_REPLACE_RESULT_???"); + if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) { + char buf[sizeof("HH:MM:SS") + 1]; + time_t time; + tprints(", "); + printxval64(btrfs_dev_replace_state, + args.status.replace_state, + "BTRFS_IOCTL_DEV_REPLACE_STATE_???"); + tprintf(", progress_1000=%" PRIu64 " /* ", + (uint64_t) args.status.progress_1000); + if (args.status.progress_1000 <= 1000) + tprintf("%" PRIu64 ".%.2" PRIu64 "%%", + (uint64_t) args.status.progress_1000 / 10, + (uint64_t) args.status.progress_1000 % 10); + else + tprints("???"); + tprints(" */ ,"); + + time = args.status.time_started; + strftime(buf, sizeof(buf), "%T", + localtime(&time)); + tprintf("time_started=%" PRIu64" /* %s */, ", + (uint64_t) args.status.time_started, buf); + + time = args.status.time_stopped; + strftime(buf, sizeof(buf), "%T", + localtime(&time)); + tprintf("time_stopped=%" PRIu64" /* %s */, ", + (uint64_t) args.status.time_stopped, buf); + + tprintf("num_write_errors=%" PRIu64 + ", num_uncorrectable_read_errors=%" PRIu64, + (uint64_t) args.status.num_write_errors, + (uint64_t) args.status.num_uncorrectable_read_errors); + } + tprints("}"); + break; + } + + case BTRFS_IOC_GET_FEATURES: { /* R */ + struct btrfs_ioctl_feature_flags flags; + + if (entering(tcp)) + return 0; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &flags)) + break; + + btrfs_print_features(&flags); + break; + } + + case BTRFS_IOC_SET_FEATURES: { /* W */ + struct btrfs_ioctl_feature_flags flarg[2]; + + tprints(", "); + + if (umove_or_printaddr(tcp, arg, &flarg)) + break; + + tprints("["); + btrfs_print_features(&flarg[0]); + tprints(", "); + btrfs_print_features(&flarg[1]); + tprints("]"); + break; + } + + case BTRFS_IOC_GET_SUPPORTED_FEATURES: { /* R */ + struct btrfs_ioctl_feature_flags flarg[3]; + + if (entering(tcp)) + return 0; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &flarg)) + break; + + tprints("[ /* supported */ "); + btrfs_print_features(&flarg[0]); + + tprints(", /* safe to set */ "); + btrfs_print_features(&flarg[1]); + + tprints(", /* safe to clear */ "); + btrfs_print_features(&flarg[2]); + tprints("]"); + + break; + } + + case BTRFS_IOC_FS_INFO: { /* R */ + struct btrfs_ioctl_fs_info_args args; + char uuid[UUID_STRING_SIZE+1]; + uint32_t nodesize, sectorsize, clone_alignment; +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE + __u32 *reserved32; +#endif + + if (entering(tcp)) + return 0; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + +#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE + nodesize = args.nodesize, + sectorsize = args.sectorsize, + clone_alignment = args.clone_alignment; +#else + reserved32 = (__u32 *)args.reserved; + nodesize = reserved32[0]; + sectorsize = reserved32[1]; + clone_alignment = reserved32[2]; +#endif + btrfs_unparse_uuid(args.fsid, uuid); + + tprints("{"); + tprintf("max_id=%" PRI__u64 ", num_devices=%" PRI__u64 + ", fsid=%s, nodesize=%u, sectorsize=%u" + ", clone_alignment=%u", + args.max_id, args.num_devices, uuid, + nodesize, sectorsize, clone_alignment); + tprints("}"); + break; + } + + case BTRFS_IOC_GET_DEV_STATS: { /* RW */ + struct btrfs_ioctl_get_dev_stats args; + uint64_t i; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{"); + + if (entering(tcp)) + tprintf("devid=%" PRI__u64 ", ", args.devid); + + tprintf("nr_items=%" PRI__u64 ", flags=", args.nr_items); + printflags64(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + + if (entering(tcp)) { + tprints("}"); + return 0; + } + + /* + * The structure has a 1k limit; Let's make sure we don't + * go off into the middle of nowhere with a bad nr_items + * value. + */ + tprints(", ["); + for (i = 0; i < args.nr_items; i++) { + if (i) + tprints(", "); + if (i >= ARRAY_SIZE(args.values)) { + tprints("..."); + break; + } + const char *name = xlookup(btrfs_dev_stats_values, i); + if (name) + tprintf("/* %s */ ", name); + tprintf("%" PRI__u64, args.values[i]); + } + tprints("]}"); + break; + } + + case BTRFS_IOC_INO_LOOKUP: { /* RW */ + struct btrfs_ioctl_ino_lookup_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + /* Use subvolume id of the containing root */ + if (args.treeid == 0) + /* abuse of auxstr to retain state */ + tcp->auxstr = (void *)1; + else + tcp->auxstr = NULL; + + tprints("{treeid="); + btrfs_print_objectid(args.treeid); + tprints(", objectid="); + btrfs_print_objectid(args.objectid); + tprints("}"); + return 0; + } + + tprints("{"); + if (tcp->auxstr) { + tcp->auxstr = NULL; + tprints("treeid="); + btrfs_print_objectid(args.treeid); + tprints(", "); + } + + tprints("name="); + print_quoted_string(args.name, sizeof(args.name), + QUOTE_0_TERMINATED); + tprints("}"); + break; + } + + case BTRFS_IOC_INO_PATHS: { /* RW */ + struct btrfs_ioctl_ino_path_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{"); + + if (entering(tcp)) { + tprintf("inum=%" PRI__u64 ", size=%" PRI__u64, + args.inum, args.size); + tprintf(", fspath=0x%" PRI__x64 "}", args.fspath); + return 0; + } + + tprints("fspath="); + btrfs_print_ino_path_container(tcp, args.fspath); + + tprints("}"); + break; + } + + case BTRFS_IOC_LOGICAL_INO: { /* RW */ + struct btrfs_ioctl_logical_ino_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{"); + + if (entering(tcp)) { + tprintf("logical=%" PRI__u64 ", size=%" PRI__u64, + args.logical, args.size); + tprintf(", inodes=0x%" PRI__x64 "}", args.inodes); + return 0; + } + + tprints("inodes="); + btrfs_print_logical_ino_container(tcp, args.inodes); + + tprints("}"); + break; + } + + case BTRFS_IOC_QGROUP_ASSIGN: { /* W */ + struct btrfs_ioctl_qgroup_assign_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{assign=%" PRI__u64 ", src=%" PRI__u64 + ", dst=%" PRI__u64 "}", + args.assign, args.src, args.dst); + break; + } + + case BTRFS_IOC_QGROUP_CREATE: { /* W */ + struct btrfs_ioctl_qgroup_create_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{create=%" PRI__u64 ", qgroupid=%" PRI__u64 "}", + args.create, args.qgroupid); + break; + } + + case BTRFS_IOC_QGROUP_LIMIT: { /* R */ + struct btrfs_ioctl_qgroup_limit_args args; + + if (entering(tcp)) + return 0; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{qgroupid=%" PRI__u64 ", lim=", args.qgroupid); + btrfs_print_qgroup_limit(&args.lim); + tprints("}"); + break; + } + + case BTRFS_IOC_QUOTA_CTL: { /* W */ + struct btrfs_ioctl_quota_ctl_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + printxval64(btrfs_qgroup_ctl_cmds, args.cmd, + "BTRFS_QUOTA_CTL_???"); + tprints("}"); + + break; + } + + case BTRFS_IOC_QUOTA_RESCAN: { /* W */ + struct btrfs_ioctl_quota_rescan_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{flags=%" PRI__u64 "}", args.flags); + break; + } + + case BTRFS_IOC_QUOTA_RESCAN_STATUS: { /* R */ + struct btrfs_ioctl_quota_rescan_args args; + + if (entering(tcp)) + return 0; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprintf("{flags=%" PRI__u64 ", progress=", args.flags); + btrfs_print_objectid(args.progress); + tprints("}"); + break; + } + + case BTRFS_IOC_SET_RECEIVED_SUBVOL: { /* RW */ + struct_btrfs_ioctl_received_subvol_args args; + char uuid[UUID_STRING_SIZE+1]; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + btrfs_unparse_uuid((unsigned char *)args.uuid, uuid); + tprintf("{uuid=%s, stransid=%" PRIu64 + ", stime=%" PRIu64 ".%u, flags=%" PRIu64 + "}", uuid, (uint64_t) args.stransid, + (uint64_t) args.stime.sec, args.stime.nsec, + (uint64_t) args.flags); + return 0; + } + tprintf("{rtransid=%" PRIu64 ", rtime=%" PRIu64 ".%u}", + (uint64_t) args.rtransid, (uint64_t) args.rtime.sec, + args.rtime.nsec); + break; + } + + case BTRFS_IOC_SCRUB: /* RW */ + case BTRFS_IOC_SCRUB_PROGRESS: { /* RW */ + struct btrfs_ioctl_scrub_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + tprintf("{devid=%" PRI__u64, args.devid); + if (code == BTRFS_IOC_SCRUB) { + tprintf(", start=%" PRI__u64 ", end=", + args.start); + tprintf("%" PRI__u64, args.end); + if (args.end == UINT64_MAX) + tprints(" /* UINT64_MAX */"); + tprints(", flags="); + printflags64(btrfs_scrub_flags, args.flags, + "BTRFS_SCRUB_???"); + } + tprints("}"); + return 0; + } + tprintf("{data_extents_scrubbed=%" PRI__u64 + ", tree_extents_scrubbed=%" PRI__u64 + ", data_bytes_scrubbed=%" PRI__u64 + ", tree_bytes_scrubbed=%" PRI__u64 + ", read_errors=%" PRI__u64 + ", csum_errors=%" PRI__u64 + ", verify_errors=%" PRI__u64 + ", no_csum=%" PRI__u64 + ", csum_discards=%" PRI__u64 + ", super_errors=%" PRI__u64 + ", malloc_errors=%" PRI__u64 + ", uncorrectable_errors=%" PRI__u64 + ", corrected_errors=%" PRI__u64 + ", last_physical=%" PRI__u64 + ", unverified_errors=%" PRI__u64 "}", + args.progress.data_extents_scrubbed, + args.progress.tree_extents_scrubbed, + args.progress.data_bytes_scrubbed, + args.progress.tree_bytes_scrubbed, + args.progress.read_errors, + args.progress.csum_errors, + args.progress.verify_errors, + args.progress.no_csum, + args.progress.csum_discards, + args.progress.super_errors, + args.progress.malloc_errors, + args.progress.uncorrectable_errors, + args.progress.corrected_errors, + args.progress.last_physical, + args.progress.unverified_errors); + break; + } + + case BTRFS_IOC_TREE_SEARCH: { /* RW */ + struct btrfs_ioctl_search_args args; + uint64_t buf_offset; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + buf_offset = offsetof(struct btrfs_ioctl_search_args, buf); + btrfs_print_tree_search(tcp, &args.key, arg + buf_offset, + sizeof(args.buf), false); + if (entering(tcp)) + return 0; + break; + } + + case BTRFS_IOC_TREE_SEARCH_V2: { /* RW */ + struct btrfs_ioctl_search_args_v2 args; + uint64_t buf_offset; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) { + if (tcp->u_error == EOVERFLOW) { + tprints(" => "); + tcp->u_error = 0; + if (!umove_or_printaddr(tcp, arg, &args)) + tprintf("{buf_size=%" PRIu64 "}", + (uint64_t)args.buf_size); + tcp->u_error = EOVERFLOW; + } + break; + } else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + buf_offset = offsetof(struct btrfs_ioctl_search_args_v2, buf); + btrfs_print_tree_search(tcp, &args.key, arg + buf_offset, + args.buf_size, true); + if (entering(tcp)) + return 0; + break; + } + + case BTRFS_IOC_SEND: { /* W */ + struct_btrfs_ioctl_send_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{send_fd="); + printfd(tcp, args.send_fd); + tprintf(", clone_sources_count=%" PRIu64 ", clone_sources=", + (uint64_t) args.clone_sources_count); + + if (abbrev(tcp)) + tprints("..."); + else { + uint64_t record; + print_array(tcp, (unsigned long) args.clone_sources, + args.clone_sources_count, + &record, sizeof(record), + umoven_or_printaddr, + print_objectid_callback, 0); + } + tprints(", parent_root="); + btrfs_print_objectid(args.parent_root); + tprints(", flags="); + printflags64(btrfs_send_flags, args.flags, + "BTRFS_SEND_FLAGS_???"); + tprints("}"); + break; + } + + case BTRFS_IOC_SPACE_INFO: { /* RW */ + struct btrfs_ioctl_space_args args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{"); + if (entering(tcp)) { + tprintf("space_slots=%" PRI__u64 "}", args.space_slots); + return 0; + } + + tprintf("total_spaces=%" PRI__u64, args.total_spaces); + + if (args.space_slots == 0 && args.total_spaces) { + tprints("}"); + break; + } + + tprints(", spaces="); + + if (abbrev(tcp)) + tprints("..."); + else { + struct btrfs_ioctl_space_info info; + print_array(tcp, arg + offsetof(typeof(args), spaces), + args.total_spaces, + &info, sizeof(info), umoven_or_printaddr, + print_btrfs_ioctl_space_info, 0); + } + tprints("}"); + break; + } + + case BTRFS_IOC_SNAP_CREATE: + case BTRFS_IOC_RESIZE: + case BTRFS_IOC_SCAN_DEV: + case BTRFS_IOC_ADD_DEV: + case BTRFS_IOC_RM_DEV: + case BTRFS_IOC_SUBVOL_CREATE: + case BTRFS_IOC_SNAP_DESTROY: + case BTRFS_IOC_DEVICES_READY: { /* W */ + struct btrfs_ioctl_vol_args args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{fd="); + printfd(tcp, args.fd); + tprints(", name="); + print_quoted_string(args.name, sizeof(args.name), + QUOTE_0_TERMINATED); + tprints("}"); + break; + } + + case BTRFS_IOC_SNAP_CREATE_V2: + case BTRFS_IOC_SUBVOL_CREATE_V2: { /* code is W, but is actually RW */ + struct btrfs_ioctl_vol_args_v2 args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + tprints("{fd="); + printfd(tcp, args.fd); + tprints(", flags="); + printflags64(btrfs_snap_flags_v2, args.flags, + "BTRFS_SUBVOL_???"); + if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + tprintf(", size=%" PRI__u64 ", qgroup_inherit=", + args.size); + + btrfs_print_qgroup_inherit(tcp, + (unsigned long)args.qgroup_inherit); + } + tprintf(", name="); + print_quoted_string(args.name, sizeof(args.name), + QUOTE_0_TERMINATED); + tprints("}"); + return 0; + } + tprintf("{transid=%" PRI__u64 "}", args.transid); + break; + } + + case BTRFS_IOC_GET_FSLABEL: /* R */ + if (entering(tcp)) + return 0; + /* fall through */ + case BTRFS_IOC_SET_FSLABEL: { /* W */ + char label[BTRFS_LABEL_SIZE]; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &label)) + break; + print_quoted_string(label, sizeof(label), QUOTE_0_TERMINATED); + break; + } + + case BTRFS_IOC_CLONE: /* FICLONE */ + case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */ +#endif + /* + * FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as + * btrfs ioctls and the code was kept for the generic + * implementations. We use the BTRFS_* names here because + * they will be available on older systems. + */ + return file_ioctl(tcp, code, arg); + + default: + return RVAL_DECODED; + }; + return RVAL_DECODED | 1; +} +#endif /* HAVE_LINUX_BTRFS_H */ diff -Nru strace-4.11/cacheflush.c strace-4.12/cacheflush.c --- strace-4.11/cacheflush.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/cacheflush.c 2016-05-16 21:47:09.000000000 +0000 @@ -81,9 +81,9 @@ /* start addr */ printaddr(tcp->u_arg[0]); /* length */ - tprintf(", %ld, ", tcp->u_arg[1]); + tprintf(", %lu, ", tcp->u_arg[1]); /* flags */ - printxval(cacheflush_flags, tcp->u_arg[1], "?CACHE"); + printxval(cacheflush_flags, tcp->u_arg[2], "?CACHE"); return RVAL_DECODED; } diff -Nru strace-4.11/ChangeLog strace-4.12/ChangeLog --- strace-4.11/ChangeLog 2015-12-21 23:24:36.000000000 +0000 +++ strace-4.12/ChangeLog 2016-05-31 11:36:29.000000000 +0000 @@ -1,3 +1,5586 @@ +2016-05-31 Dmitry V. Levin + + Prepare for 4.12 release. + * NEWS: Update for 4.12 release. + * debian/changelog: 4.12-1. + * strace.spec: 4.12-1. + + 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-30 Dmitry V. Levin + + Mpersify hdio.c. + * defs.h (hdio_ioctl): Remove. + * hdio.c: Mpersify struct hd_geometry. + (hdio_ioctl): Mpersify. + +2016-05-29 Dmitry V. Levin + + loop.c: decode LOOP_SET_DIRECT_IO. + * loop.c (loop_ioctl) [LOOP_SET_DIRECT_IO] : Handle LOOP_SET_DIRECT_IO. + + 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. + + loop.c: fix printing of structure members' names. + * loop.c (decode_loop_info, decode_loop_info64): Do not strip "lo_" + prefix from printed names. + + 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-28 Dmitry V. Levin + + tests/ioctl_evdev.c: check EVIOCGUNIQ decoding. + * tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding. + + tests/ioctl_mtd.c: fix build with musl. + * tests/ioctl_mtd.c: Include . + + 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. + + Mpersify mtd.c. + * defs.h (mtd_ioctl): Remove. + * mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers. + (mtd_ioctl): Mpersify. + + mtd.c: refactor. + * mtd.c (mtd_ioctl): Move parsers of structures to separate functions. + + 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. + + 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. + + 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. + + 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. + + evdev.c: fix printing of EV_PWR's argument. + * evdev.c (bit_ioctl): Fix printing of comma before EV_PWR's argument. + + evdev.c: fix indentation. + * evdev.c: Fix indentation of print formats. + + 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. + + evdev.c: fix EVIOCGVERSION decoding. + * evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument + using #x format. + + evdev.c: fix EVIOCGMTSLOTS decoding. + * evdev.c (mtslots_ioctl): Use umove_or_printaddr. + + evdev.c: fix bitset decoding. + * evdev.c (decode_bitset): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_id. + * evdev.c (getid_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_keymap_entry. + * evdev.c (keycode_V2_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of EVIOCGKEYCODE/EVIOCSKEYCODE. + * evdev.c (keycode_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_absinfo. + * evdev.c (abs_ioctl): Use umove_or_printaddr. + + 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. + + evdev.c: fix printing of struct ff_envelope.fade_level. + * evdev.c (decode_envelope): Print struct ff_envelope.fade_level + using #x format. + + evdev.c: fix decoding of EVIOCGRAB and EVIOCREVOKE. + * evdev.c (evdev_write_ioctl): Print argument of EVIOCGRAB + and EVIOCREVOKE as unsigned long. + + evdev.c: fix EVIOCRMFF decoding. + * evdev.c (evdev_write_ioctl): Print EVIOCRMFF's argument as int. + + evdev.c: move handling of EVIOCGBIT to a separate function. + * evdev.c (evdev_read_ioctl): Move EVIOCGBIT handling to ... + (bit_ioctl): ... new function. + +2016-05-28 Dmitry V. Levin + + 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. + +2016-05-28 Dmitry V. Levin + + 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. + + evdev.c: fix indentation of preprocessor directives. + * evdev.c: Fix indentation of preprocessor directives. + Move inclusion of into [HAVE_LINUX_INPUT_H]. + +2016-05-28 Jeff Mahoney + + 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. + +2016-05-27 Dmitry V. Levin + + ioctl.c: fix typo in decoding of EVIOCSABS's parameter. + * ioctl.c (evdev_decode_number): Fix typo in printxval default value. + +2016-05-27 Jeff Mahoney + + 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. + + 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. + + 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. + + 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. + +2016-05-26 Jeff Mahoney + + 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. + +2016-05-26 Fabien Siron + + Fix -yy documentation. + * strace.c (usage): Fix description of -yy option. + * strace.1: Likewise. + +2016-05-26 Dmitry V. Levin + + 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. + + tests/btrfs.c: check basic decoding of read-only ioctls. + * tests/btrfs.c (btrfs_test_read_ioctls): New function. + (main): Use it. + + 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. + + 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. + + block.c: optimize decoding of paired ioctls. + * block.c (block_ioctl): Optimize decoding of commands that return + a signed int. + + block.c: fix printing of uint64_t pairs. + * block.c (block_ioctl): Print uint64_t values using PRIu64 format. + + 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. + + 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'. + + Move parser of HDIO_* ioctls to a separate file. + * hdio.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * block.c: Do not include . + (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. + + 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. + + 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. + +2016-05-25 Dmitry V. Levin + + 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. + + 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. + + rtc.c: fix decoding of struct rtc_wkalrm. + * rtc.c (decode_rtc_wkalrm): Print field name of struct rtc_wkalrm.time. + + 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. + + 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. + + rtc.c: decode RTC_PLL_GET and RTC_PLL_SET. + * rtc.c (rtc_ioctl): Decode RTC_PLL_GET and RTC_PLL_SET + + 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. + + block.c: handle BLKDAXGET. + * block.c [!BLKDAXGET] (BLKDAXGET): Define. + (block_ioctl): Handle it. + + 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. + +2016-05-24 Dmitry V. Levin + + tests/vhangup.c: diassociate from the controlling terminal first. + * tests/vhangup.c (main): Call setsid before vhangup. + +2016-05-24 Fei Jie + + 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. + +2016-05-24 Dmitry V. Levin + + NEWS: Prepare for 4.12 release. + +2016-05-24 Gleb Fotengauer-Malinovskiy + + tests/btrfs.c: fix build on x32. + * tests/btrfs.c (btrfs_test_ino_path_ioctls): Fix printing of st_ino. + +2016-05-24 Dmitry V. Levin + + 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". + + 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. + + 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. + + 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. + + 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. + + 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. + + tests/btrfs.c: fix indentation. + * tests/btrfs.c: Fix indentation of preprocessor directives + and function prototypes. + + tests/btrfs.c: sort included headers. + * tests/btrfs.c: Sort included headers. + + tests/btrfs.c: do not use alloca. + * tests/btrfs.c: Don't include . + (btrfs_test_subvol_ioctls): Allocate + struct btrfs_ioctl_vol_args_v2.qgroup_inherit using tail_alloc. + + tests/btrfs.c: fix build on systems without or + * tests/btrfs.c: Include "tests.h" first. + Skip the test if [!HAVE_LINUX_BTRFS_H]. Skip parts of the test + that use struct fiemap if [!HAVE_LINUX_FIEMAP_H]. + +2016-05-24 Jeff Mahoney + + tests: add testing for btrfs ioctls. + * tests/btrfs.c: New file. + * tests/btrfs.test: New test. + * tests/btrfs-v.test: Likewise. + * tests/.gitignore: Add btrfs. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add btrfs.test and btrfs-v.test. + +2016-05-24 Dmitry V. Levin + + tests/file_ioctl.c: use tail_alloc. + * tests/file_ioctl.c (main): Allocate struct fiemap using tail_alloc. + + tests/file_ioctl.c: fix build on systems without + * tests/file_ioctl.c: Include "tests.h" first. + Skip the test if [!HAVE_LINUX_FIEMAP_H]. + +2016-05-24 Jeff Mahoney + + tests: add testing for FS_IOC_FIEMAP. + This is limited to FIEMAP. FICLONE* and FIDEDUPERANGE originated in + btrfs and will be tested there. + + * tests/file_ioctl.c: New file. + * tests/file_ioctl.test: New test. + * tests/.gitignore: Add file_ioctl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add file_ioctl.test. + +2016-05-24 Dmitry V. Levin + + Mpersify btrfs.c. + * btrfs.c: Mpersify 3 arch-specific structures + and corresponding ioctl numbers. + (btrfs_ioctl): Mpersify. + * defs.h (btrfs_ioctl): Remove. + + btrfs.c: use print_array. + * btrfs.c (print_btrfs_data_container_logical_ino, + print_btrfs_data_container_ino_path, print_uint64, + print_btrfs_ioctl_search_header, print_objectid_callback, + print_btrfs_ioctl_space_info): New functions. + (btrfs_print_logical_ino_container, btrfs_print_ino_path_container): + Rewrite printers of struct btrfs_data_container.val array + using print_array. + (btrfs_print_qgroup_inherit): Rewrite printer of + struct btrfs_qgroup_inherit.qgroups array using print_array. + (btrfs_print_tree_search): Rewrite printer of + struct btrfs_ioctl_search_header array using print_array. + (btrfs_ioctl): Rewrite printer of + struct btrfs_ioctl_send_args.clone_sources and + struct btrfs_ioctl_space_args.spaces using print_array. + + btrfs.c: simplify BTRFS_IOC_GET_FSLABEL parser. + * btrfs.c (btrfs_ioctl): Share code of parser of BTRFS_IOC_SET_FSLABEL + with parser of BTRFS_IOC_GET_FSLABEL only on BTRFS_IOC_GET_FSLABEL's + entering. + + btrfs.c: fix BTRFS_IOC_TREE_SEARCH_V2 output. + * btrfs.c (btrfs_ioctl): Fix BTRFS_IOC_TREE_SEARCH_V2 output + in case of EOVERFLOW and failed umove. + + btrfs.c: cleanup use of tcp->auxstr. + * btrfs.c (btrfs_ioctl): Reset tcp->auxstr only if it is set. + + btrfs.c: cleanup struct btrfs_ioctl_get_dev_stats.nr_items check. + * btrfs.c (btrfs_ioctl): Cleanup check of iterator of + btrfs_ioctl_get_dev_stats.values array. + + btrfs.c: do not use BTRFS_SUBVOL_NAME_MAX. + * btrfs.c [BTRFS_SUBVOL_NAME_MAX]: Remove. + (btrfs_ioctl): Use sizeof(struct btrfs_ioctl_vol_args_v2.name) + instead of BTRFS_SUBVOL_NAME_MAX + 1. + + btrfs.c: mark some function arguments as const. + * btrfs.c (btrfs_print_balance_args, btrfs_print_features, + btrfs_print_qgroup_limit, btrfs_print_data_container_header, + btrfs_print_logical_ino_container, btrfs_print_ino_path_container, + btrfs_print_qgroup_inherit): Mark some function arguments as const. + + btrfs.c: use umove instead of umoven. + * btrfs.c: Use umove instead of umoven and umove_or_printaddr + instead of umoven_or_printaddr. + + btrfs.c: remove unused variable. + * btrfs.c (btrfs_ioctl): Remove "ret" variable. + + btrfs.c: use printxval/printxval64 instead of printxvals. + * btrfs.c (btrfs_ioctl): Do not call printxvals directly, + use printxval/printxval64 wrappers that do the right thing. + + btrfs.c: fix indentation. + * btrfs.c: Fix indentation of preprocessor directives and print formats. + + xlat/btrfs_dev_stats_values.in: cleanup. + * xlat/btrfs_dev_stats_values.in: Remove HAVE_DECL_* defines, + use #unconditional instead. + + file_ioctl.c: use print_array. + * file_ioctl.c (file_ioctl): Rewrite printers of + struct file_dedupe_range_info and struct fiemap_extent arrays + using print_array. + + file_ioctl.c: fix indentation. + * file_ioctl.c: Fix indentation of preprocessor directives + and print formats. + +2016-05-24 Dmitry V. Levin + + file_ioctl.c: include instead of + Being a wrapper around , brings + no benefits for this parser. + + * file_ioctl.c: Include instead of . + +2016-05-24 Dmitry V. Levin + + file_ioctl.c: fix build on systems without + * configure.ac (AC_CHECK_HEADERS): Add linux/fiemap.h. + * file_ioctl.c: Do not include and xlat/fiemap_*.h + if [!HAVE_LINUX_FIEMAP_H]. + (file_ioctl): Do not parse FS_IOC_FIEMAP if [!HAVE_LINUX_FIEMAP_H]. + + ioctl.c: fix build. + * ioctl.c (ioctl_decode): Move definition of "ret" variable + to [ALPHA || POWERPC] case. + [ALPHA || POWERPC]: Fix syntax error. + +2016-05-24 Jeff Mahoney + + ioctl: add decoding for FS_IOC_FIEMAP. + * file_ioctl.c: Include , "xlat/fiemap_flags.h", + and "xlat/fiemap_extent_flags.h". + (file_ioctl): Handle FS_IOC_FIEMAP. + * ioctl.c (ioctl_decode): Use file_ioctl for decoding 'f' code ioctls. + +2016-05-24 Dmitry V. Levin + + Add xlat/fiemap_flags.in and xlat/fiemap_extent_flags.in. + * xlat/fiemap_flags.in: New file. + * xlat/fiemap_extent_flags.in: Likewise. + +2016-05-24 Jeff Mahoney + + ioctl: add decoding support for btrfs ioctls. + * btrfs.c: New file. + * file_ioctl.c: Likewise. + * Makefile.am (strace_SOURCES): Add them. + * configure.ac (AC_CHECK_HEADERS): Add linux/btrfs.h. + (AC_CHECK_MEMBERS): Add struct btrfs_ioctl_feature_flags.compat_flags, + struct btrfs_ioctl_fs_info_args.nodesize, + struct btrfs_ioctl_defrag_range_args.start, + and struct btrfs_ioctl_search_args_v2.buf_size. + (AC_CHECK_DECLS): Add BTRFS_COMPRESS_* enums. + * defs.h (btrfs_ioctl, file_ioctl): New prototypes. + * ioctl.c (ioctl_decode) [HAVE_LINUX_BTRFS_H]: Use btrfs_ioctl. + * xlat/btrfs_balance_args.in: New file. + * xlat/btrfs_balance_ctl_cmds.in: Likewise. + * xlat/btrfs_balance_flags.in: Likewise. + * xlat/btrfs_balance_state.in: Likewise. + * xlat/btrfs_compress_types.in: Likewise. + * xlat/btrfs_defrag_flags.in: Likewise. + * xlat/btrfs_dev_replace_cmds.in: Likewise. + * xlat/btrfs_dev_replace_results.in: Likewise. + * xlat/btrfs_dev_replace_state.in: Likewise. + * xlat/btrfs_dev_stats_flags.in: Likewise. + * xlat/btrfs_dev_stats_values.in: Likewise. + * xlat/btrfs_features_compat.in: Likewise. + * xlat/btrfs_features_compat_ro.in: Likewise. + * xlat/btrfs_features_incompat.in: Likewise. + * xlat/btrfs_key_types.in: Likewise. + * xlat/btrfs_qgroup_ctl_cmds.in: Likewise. + * xlat/btrfs_qgroup_inherit_flags.in: Likewise. + * xlat/btrfs_qgroup_limit_flags.in: Likewise. + * xlat/btrfs_qgroup_status_flags.in: Likewise. + * xlat/btrfs_scrub_flags.in: Likewise. + * xlat/btrfs_send_flags.in: Likewise. + * xlat/btrfs_snap_flags_v2.in: Likewise. + * xlat/btrfs_space_info_flags.in: Likewise. + * xlat/btrfs_tree_objectids.in: Likewise. + +2016-05-24 Gleb Fotengauer-Malinovskiy + + x32: update ioctl entries from linux 4.6. + * linux/x32/ioctls_inc0.h: Update from linux v4.6 using ioctls_gen.sh. + +2016-05-24 Dmitry V. Levin + + tests/attach-f-p.c: sleep a bit more to let the tracer catch up. + On noticeably lagging systems, the parent process may invoke its chdir + call before the tracer gets notified about completion of its last child + process. Add extra sleep in the parent process to win the race. + + * tests/attach-f-p.c (main): Change timerid into a static array. + Arm a timer in the parent process and wait for it. + +2016-05-23 Dmitry V. Levin + + tests/attach-p-cmd-cmd.c: fix potential errno clobbering. + * tests/attach-p-cmd-cmd.c (main): Call getpid before chdir. + + tests/net-yy-netlink.c: robustify against libc specific issues. + * tests/net-yy-netlink.c (main): Use getsockname instead of recvmsg + as the latter has notible implementation differences that make + the test unreliable. + + tests/net-yy-netlink.c: robustify against os specific issues. + * tests/net-yy-netlink.c (main): Pass a pointer to a real struct msghdr + as NULL doesn't work well on some systems. + + tests/net-yy-{inet,netlink}.test: cleanup. + * tests/net-yy-inet.test: Do not pass arguments to net-yy-inet + as the latter does not accept them. + * tests/net-yy-netlink.test: Do not pass arguments to net-yy-netlink + as the latter does not accept them. + +2016-05-22 Jeff Mahoney + + tests: define PRI__[dux]64 macros to print __s64 and __u64 values. + Rather than cast every __u64 or __s64 before printing, + define printing helpers for those types directly. + + This complements commit 1f3482bedad505a41caf1d61b3a4e7e09a2f4330. + + * tests/tests.h (PRI__d64, PRI__u64, PRI__x64): New macros. + +2016-05-22 Dmitry V. Levin + + tests: remove manual creation of memory mapping holes. + We used to call tail_alloc(1) to create memory mapping holes around + regular tail_alloc allocations. This is no longer needed since regular + tail_alloc allocations create additional memory mapping holes. + + * tests/clock_adjtime.c (main): Remove creation of memory mapping holes + using tail_alloc(1). + * tests/futimesat.c (main): Likewise. + * tests/get_mempolicy.c (print_nodes, main): Likewise. + * tests/getgroups.c (main): Likewise. + * tests/getresugid.c (main): Likewise. + * tests/ioctl_uffdio.c (main): Likewise. + * tests/ioctl_v4l2.c (main): Likewise. + * tests/move_pages.c (main): Likewise. + * tests/net-icmp_filter.c (main): Likewise. + * tests/ptrace.c (test_peeksiginfo, main): Likewise. + * tests/pwritev.c (main): Likewise. + * tests/set_mempolicy.c (print_nodes): Likewise. + * tests/setgroups.c (main): Likewise. + * tests/umovestr3.c (main): Likewise. + * tests/utimes.c (main): Likewise. + * tests/xattr.c (main): Likewise. + +2016-05-22 Dmitry V. Levin + + tests: make tail_alloc create additional memory mapping holes. + * tests/tail_alloc.c (tail_alloc): Create additional memory mapping + holes before and after the allocated memory. + +2016-05-21 Dmitry V. Levin + + mpers: add support of conditionally compiled printers. + We used to declare and define all printers marked with + MPERS_PRINTER_DECL, including ifdef'ed ones. That approach left us + no way to conditionally compile mpersified printers, which was not + a problem until btrfs ioctls appeared on the horizon. + + With this change, those mpersified printers that are not going + to be compiled are also won't be declared and won't be added to + struct_printers. + + This is implemented by filtering all source files containing + MPERS_PRINTER_DECL markers through CPP. As a nice side effect, this + also lifts an ugly requirement of writing all MPERS_PRINTER_DECL + declarations in a single line. + + * README-mpers: Update description of MPERS_PRINTER_DECL syntax. + * defs.h [IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into + a recursive variadic macro. + [!IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into a variadic macro. + All callers changed. + * Makefile.am (mpers_preproc_files, mpers_printer_decl_pattern): + New variables. + (CLEANFILES): Add $(mpers_preproc_files). + (%.c.mpers.i): New rule. + (printers.h, %_printer_decls.h, %_printer_defs.h): Use + mpers_preproc_files instead of srcdir_mpers_source_files, + use mpers_printer_decl_pattern. + * .gitignore: Add /*.mpers.i. + +2016-05-20 Dmitry V. Levin + + Remove redundant declaration of v4l2_ioctl. + There is no need to declare mpers printers in defs.h because + they are already declared in printers.h or native_printer_decls.h. + + This complements commit 1e56814f77594a22a74ddee629639eb0bb7edf3a. + + * defs.h (v4l2_ioctl): Remove. + +2016-05-21 Dmitry V. Levin + + Fix one more code pattern that might break gcc strict aliasing rules. + * socketutils.c (receive_responses): Turn static buffer into a union + to avoid breaking of gcc strict aliasing rules. + * tests/netlink_inet_diag.c (check_responses): Likewise. + * tests/netlink_netlink_diag.c (check_responses): Likewise. + * tests/netlink_unix_diag.c (check_responses): Likewise. + +2016-05-21 Fabien Siron + + tests: add check for netlink protocol decoding with -yy option. + * tests/netlink_netlink_diag.c: New file. + * tests/net-yy-netlink.c: New file. + * tests/net-yy-netlink.test: New test. + * tests/.gitignore: Add net-yy-netlink and netlink_netlink_diag + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add net-yy-netlink.test. + +2016-05-18 Fabien Siron + + Add netlink domain sockets support to socketutils. + * linux/netlink_diag.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + * socketutils.c: Include it and "xlat/netlink_protocols.h". + (netlink_send_query, netlink_parse_response, netlink_print): New + functions. + (print_sockaddr_by_inode): Hook up netlink_print. + +2016-05-18 Dmitry V. Levin + + tests/pread64-pwrite64.c: robustify against os specific issues. + Do not assume that pwrite64 syscall fails when only part of the + specified memory buffer is accessible. With some kernels, one + accessible byte at the end of page is enough for pwrite64 syscall + to return 1. + + * tests/pread64-pwrite64.c (main): Tweak the test that can lead + to a partial write. + +2016-05-18 Dmitry V. Levin + + tests/read-write.c: robustify against os specific issues. + Do not assume that write syscall fails when only part of the specified + memory buffer is accessible. With some kernels, one accessible byte + at the end of page is enough for write syscall to return 1. + + * tests/read-write.c (main): Tweak the test that can lead to a partial + write. + +2016-05-18 Dmitry V. Levin + + umovestr3.test: extend test coverage. + * tests/umovestr3.c: Include . + (main): Test with each number between PATH_MAX-1 and 0. + + tests/timer_create.c: robustify against os specific issues. + * tests/timer_create.c (main): Do not assume any specific error code + returned by timer_create, print whatever it is. + + Fix some compilation warnings on older systems. + * print_statfs.c (print_statfs_flags): Define only + for [HAVE_STRUCT_STATFS_F_FLAGS || HAVE_STRUCT_STATFS64_F_FLAGS]. + * tests/inet-cmsg.c (print_origdstaddr): Define only + for [IP_ORIGDSTADDR]. + + Update generic ioctl entries from linux 4.6. + * linux/64/ioctls_inc.h: Update from linux v4.6 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + * NEWS: Mention this. + + maint: update for linux 4.6. + * maint/ioctls_sym.sh: Update workarounds for linux/kvm.h. + + Update SOL_* constants. + * xlat/socketlayers.in: Add SOL_KCM. + + Update MSG_* constants. + * xlat/msg_flags.in: Add MSG_BATCH. + + Update AF_* constants. + * xlat/addrfams.in: Add AF_KCM. + +2016-05-17 Fei Jie + + tests: add brk.test. + * tests/brk.c: New file. + * tests/brk.test: New test. + * tests/.gitignore: Add brk. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add brk.test. + +2016-05-17 Dmitry V. Levin + + Fix printing of invalid arguments of term ioctls. + * term.c (term_ioctl): Print arguments of TCXONC and TCFLSH ioctls + using printxval_long. + + mips: fix printing of invalid operations argument of sysmips syscall. + * sysmips.c (SYS_FUNC(sysmips)): Print 1st argument of syscall using + printxval_long. + + bfin: fix printing of invalid flags argument of sram_alloc syscall. + * sram_alloc.c (SYS_FUNC(sram_alloc)): Print 2nd argument using + printflags_long. + +2016-05-16 Dmitry V. Levin + + Fix printing of invalid arguments of prctl syscall. + * prctl.c (SYS_FUNC(prctl)): Print 2nd syscall argument + of PR_CAPBSET_DROP, PR_CAPBSET_READ, PR_CAP_AMBIENT, PR_MCE_KILL, + and PR_SET_SECCOMP using printxval_long. + Print 2nd syscall argument of PR_SET_SECUREBITS using printflags_long. + Print 3rd syscall argument of PR_CAP_AMBIENT and PR_MCE_KILL using + printxval_long. + * tests/prctl-seccomp-strict.c (main): Update. + + Fix printing of invalid flags argument of perf_event_open syscall. + * numa.c (SYS_FUNC(perf_event_open)): Print 5th argument of syscall + using printflags_long. + + or1k: fix printing of invalid 1st argument of or1k_atomic syscall. + * or1k_atomic.c (SYS_FUNC(or1k_atomic)): Print 1st argument using + printxval_long. + + Fix printing of invalid flags argument of get_mempolicy syscall. + * numa.c (SYS_FUNC(get_mempolicy)): Print 5th argument of syscall + using printxval_long. + + Fix printing of invalid mode argument of mbind syscall. + * numa.c (SYS_FUNC(mbind)): Print 3rd argument of syscall + using printxval_long. + * tests/mbind.c (main): Update. + + Fix printing of invalid argument of MTDFILEMODE ioctl. + * mtd.c (mtd_ioctl): Print 3rd argument of MTDFILEMODE ioctl + using printflags_long. + + Fix printing of invalid flags argument of mount syscall. + * mount.c (SYS_FUNC(mount)): Print 1st argument using printflags_long. + + Fix printing of invalid arguments of memory mapping related syscalls. + * mem.c (print_mmap): Print 3rd and 4th arguments of syscall + using printflags_long. + (SYS_FUNC(mprotect)): Print 3rd argument of syscall using + printflags_long. + (SYS_FUNC(mremap)): Print 4th argument of syscall using printflags_long. + (SYS_FUNC(remap_file_pages)): Print 3rd and 4th arguments of syscall + using printflags_long. + * tests/remap_file_pages.c (main): Update. + + Fix printing of invalid flags argument of kexec_load and kexec_file_load + * kexec.c (SYS_FUNC(kexec_load), SYS_FUNC(kexec_file_load)): Print + flags argument using printflags_long. + + Fix printing of invalid 3rd argument of fcntl/fcntl64 syscall. + * fcntl.c (print_fcntl): Print 3rd argument of F_NOTIFY, F_SETLEASE, and + F_ADD_SEALS operations using printflags_long. + + Fix printing of invalid flags argument of unshare syscall. + * clone.c (SYS_FUNC(unshare)): Print 1st argument using printflags_long. + + Introduce printflags_long and printxval_long. + * defs.h (printflags_long, printxval_long): New static inline functions. + + Fix printing of invalid struct xfs_dqblk.d_flags. + * quota.c (decode_cmd_data): Explicitly cast struct xfs_dqblk.d_flags + to uint8_t to avoid potential sign-extension bug when printing + invalid struct xfs_dqblk.d_flags. + + Fix printing of invalid struct ubi_mkvol_req.vol_type. + * mtd.c (ubi_ioctl): Explicitly cast struct ubi_mkvol_req.vol_type + to unsigned short to avoid potential sign-extension bug when printing + invalid struct ubi_mkvol_req.vol_type. + +2016-05-16 Dmitry V. Levin + + Fix decoding of prctl/arch_prctl operation argument. + Consistently treat operation argument of prctl/arch_prctl syscalls + as int to match the kernel behaviour. + + * prctl.c (SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): Assign 1st argument + of syscalls to a variable of type unsigned int and use it in all + subsequent checks and lookups. + +2016-05-16 Dmitry V. Levin + + Fix printing of struct sched_attr.sched_flags. + * sched.c (print_sched_attr): Print sched_flags using printflags64. + + Fix printing of struct statfs.f_flags. + * print_statfs.c (print_statfs_flags): Print flags using printflags64. + + Fix printing of invalid struct ifreq.ifr_flags. + * sock.c (print_ifreq): Explicitly cast struct ifreq.ifr_flags + to unsigned short to avoid potential sign-extension bug when printing + invalid struct ifreq.ifr_flags. + + Fix printing of invalid struct pollfd.events. + * poll.c (print_pollfd): Explicitly cast struct pollfd.events + to unsigned short to avoid potential sign-extension bug when printing + invalid struct pollfd.events. + + Fix printing of invalid struct sembuf.sem_flg. + * ipc_sem.c (print_sembuf): Explicitly cast struct sembuf.sem_flg + to unsigned short to avoid potential sign-extension bug when printing + invalid struct sembuf.sem_flg. + + Fix printing of invalid l_type and l_whence in fcntl/fcntl64 syscalls. + * fcntl.c (print_struct_flock64): Explicitly cast l_type and l_whence + fields to unsigned short to avoid potential sign-extension bug when + printing invalid l_type or l_whence fields. + + Fix printing of fanotify_mark mask argument. + * fanotify.c (SYS_FUNC(fanotify_mark)): Print mask using printflags64. + +2016-05-16 Dmitry V. Levin + + Fix decoding of epoll_ctl operation argument. + Consistently treat operation argument of epoll_ctl syscall as int + to match the kernel behaviour. + + * epoll.c (SYS_FUNC(epoll_ctl)): Assign 2nd argument of syscall + to a variable of type unsigned int and use it in all subsequent + checks and lookups. + * tests/epoll_ctl.c (invoke_syscall): New function. + (main): Use it. + +2016-05-16 Dmitry V. Levin + + Fix printing of invalid d_type in getdents syscall. + * dirent.c (SYS_FUNC(getdents)): Treat d_type as unsigned char to avoid + potential sign-extension bug when printing invalid d_type. + + bfin: fix decoding of cacheflush syscall. + * cacheflush.c (SYS_FUNC(cacheflush)): Print 2nd argument + using %lu format. Print 3rd argument as flags. + + Fix decoding of BPF_MAP_UPDATE_ELEM flags. + * bpf.c (bpf_map_update_elem): Print attr.flags using printxval64. + +2016-05-16 Dmitry V. Levin + + Fix decoding of fcntl/fcntl64 operation argument. + Consistently treat operation argument of fcntl/fcntl64 syscalls as int + to match the kernel behaviour. + + * fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Assign + 2nd argument of syscall to a variable of type unsigned int + and use it in all subsequent checks and lookups. + * tests/struct_flock.c (invoke_test_syscall): New function. + (test_flock_einval, test_flock): Use it. + * tests/fcntl.c (test_flock64_einval): Use it. + * tests/fcntl64.c (test_flock64_einval, test_flock64): Use it. + +2016-05-15 Dmitry V. Levin + + Rename sprintflags64 to sprintflags. + * defs.h (sprintflags): Remove. + (sprintflags64): Rename to sprintflags. + * util.c (sprintflags64): Rename to sprintflags. + + Prepare for transition from sprintflags64 to sprintflags. + * fcntl.c (print_fcntl): Cast 3rd argument of sprintflags + to unsigned long. + * membarrier.c (SYS_FUNC(membarrier)): Likewise. + * prctl.c (SYS_FUNC(prctl)): Likewise. + * poll.c (decode_poll_exiting): Cast 3rd argument of sprintflags + to unsigned short. + +2016-05-14 Dmitry V. Levin + + Rename xlookup64 to xlookup. + * defs.h (xlookup): Remove. + (xlookup64): Rename to xlookup. + * util.c (xlookup64): Rename to xlookup. + + Prepare for transition from xlookup64 to xlookup. + * fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): + Cast 2nd argument of xlookup to unsigned long. + * prctl.c (SYS_FUNC(prctl)): Likewise. + * sched.c (SYS_FUNC(sched_getscheduler)): Likewise. + * time.c (do_adjtimex): Likewise. + * ioprio.c (sprint_ioprio): Change type of the argument + and local variables from int to unsigned int. + * keyctl.c (print_keyring_serial_number): Cast 2nd argument + of xlookup to unsigned int. + * net.c (tprint_sock_type): Change type of the argument to unsigned int. + * printmode.c (sprintmode): Likewise. + * printsiginfo.c (printsigval): Change type of si_code argument + to unsigned int. + +2016-05-14 Dmitry V. Levin + + v4l2: fix build with old kernel headers. + Prior to v2.6.25-rc3, didn't include all + required headers, resulting to omission of V4L2_* constants. + + This issue doesn't arise in v4l2.c and tests/ioctl_v4l2.c files + because they already include all necessary headers themselves. + + * configure.ac (AC_CHECK_DECLS): Include , , + and before . + +2016-05-13 Dmitry V. Levin + + configure.ac: do not check for sys/ioctl.h and ioctls.h. + Since sys/ioctl.h is included unconditionally when needed + and ioctls.h doesn't exist, these checks are redundant. + + * configure.ac (AC_CHECK_HEADERS): Remove ioctls.h and sys/ioctl.h. + +2016-05-13 Dmitry V. Levin + + sock.c: include instead of or + Include for on alpha, sh, and sh64 + architectures because their use _IOR and _IOW macros + but don't include anything that would define these macros. + + Being a wrapper around , brings + no benefits in this case. simply doesn't exist. + + * sock.c [ALPHA || SH || SH64]: Include + instead of or . + +2016-05-13 Dmitry V. Levin + + v4l2: include instead of + Being a wrapper around , brings + no benefits for parser of VIDIOC_* ioctls. + + * v4l2.c: Include instead of . + +2016-05-13 Dmitry V. Levin + + printsiginfo: remove "verbose" argument. + Remove erroneous use of verbose(tcp) as a printing limit + for already fetched members of siginfo_t structure. + + * printsiginfo.h (printsiginfo): Remove boolean argument. + * printsiginfo.c (printsigval): Remove boolean argument, print + si_int and si_ptr members unconditionally. All callers changed. + (print_si_info): Remove boolean argument, print si_utime and si_stime + members unconditionally. All callers changed. + (printsiginfo): Remove boolean argument. All callers changed. + +2016-05-13 Dmitry V. Levin + + tests/ptrace.c: tweak magic constants to make the test more reliable. + * tests/ptrace.c (main): Change bad_request and bad_data to make they + lower 32-bit parts closer to -1U. + +2016-05-13 Dmitry V. Levin + + tests/ioctl_v4l2.c: fix build on older systems. + Fix build on systems without HAVE_DECL_V4L2_CTRL_TYPE_STRING or + V4L2_CTRL_CLASS_CAMERA. + + * tests/ioctl_v4l2.c (main) [VIDIOC_S_EXT_CTRLS]: Disable part of the + test if [!HAVE_DECL_V4L2_CTRL_TYPE_STRING]. + Replace V4L2_CTRL_CLASS_CAMERA with V4L2_CTRL_CLASS_USER. + +2016-05-13 Dmitry V. Levin + + Do not use htole32 function. + htole32 function is not portable enough. + + * v4l2.c (print_pixelformat): Rewrite initialization of pixel format + union without using of htole32. + * tests/ioctl_v4l2.c (main): Likewise. + +2016-05-13 Dmitry V. Levin + + tests/ioctl_v4l2.c: fix typo. + * tests/ioctl_v4l2.c (main) + [!HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE]: Fix typo in expected + output string. + + tests: check decoding of ptrace syscall. + * tests/ptrace.c: New file. + * tests/ptrace.test: New test. + * tests/.gitignore: Add ptrace. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ptrace. + +2016-05-13 Dmitry V. Levin + + ptrace: decode data argument of PTRACE_PEEKSIGINFO request. + The data argument of PTRACE_PEEKSIGINFO request is a pointer + to siginfo_t array. + + * printsiginfo.c (print_siginfo_t): New function. + (print_siginfo_array): New mpers printer. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_PEEKSIGINFO request using print_siginfo_array. + +2016-05-13 Dmitry V. Levin + + ptrace: decode data argument of PTRACE_SECCOMP_GET_FILTER request. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SECCOMP_GET_FILTER request on exiting using print_seccomp_fprog. + + ptrace: decode argument of PTRACE_GETEVENTMSG request. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_GETEVENTMSG request on exiting using printnum_ulong. + + ptrace: decode arguments of PTRACE_[GS]ETSIGMASK requests. + * process.c (SYS_FUNC(ptrace)): Print arguments of PTRACE_GETSIGMASK + and PTRACE_SETSIGMASK requests using print_sigset_addr_len. + + ptrace: return RVAL_DECODED for requests decoded on entering. + * process.c (SYS_FUNC(ptrace)): Return RVAL_DECODED on entering for all + ptrace requests except those that are partially decoded in exiting, + +2016-05-12 Dmitry V. Levin + + ptrace: print PTRACE_O_* flags using printflags64. + As flags argument has a long integer type, print it using printflags64 + because printflags takes unsigned int argument. + + * process.c (SYS_FUNC(ptrace)): Print PTRACE_O_* flags + using printflags64. + +2016-05-12 Dmitry V. Levin + + ptrace: print data argument of PTRACE_SEIZE et al requests as flags. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SEIZE and PTRACE_OLDSETOPTIONS as PTRACE_O_* flags. + + ptrace: print data argument of PTRACE_SINGLEBLOCK et al requests as signo + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SINGLEBLOCK, PTRACE_SYSEMU, and PTRACE_SYSEMU_SINGLESTEP requests + as a signal number. + +2016-05-12 Dmitry V. Levin + + ptrace: decode addr argument of PTRACE_PEEKSIGINFO request. + The addr argument of PTRACE_PEEKSIGINFO request is a pointer to + a struct ptrace_peeksiginfo_args. + + * process.c: Include "xlat/ptrace_peeksiginfo_flags.h". + (SYS_FUNC(ptrace)): Print addr argument of PTRACE_PEEKSIGINFO request + as a struct ptrace_peeksiginfo_args. + * xlat/ptrace_peeksiginfo_flags.in: New file. + +2016-05-12 Dmitry V. Levin + + ptrace: fix printing addr argument of PTRACE_GETSIGMASK et al requests. + For PTRACE_GETSIGMASK and PTRACE_SETSIGMASK requests, addr argument + contains the size of the buffer pointed to by data argument. + For PTRACE_SECCOMP_GET_FILTER request, addr argument contains + an offset counter. + + * process.c (SYS_FUNC(ptrace)): Print addr argument of + PTRACE_GETSIGMASK, PTRACE_SETSIGMASK, and PTRACE_SECCOMP_GET_FILTER + requests using %lu format. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print data argument of some requests on sparc. + On sparc, kernel ignores data argument of PTRACE_GETREGS, + PTRACE_SETREGS, PTRACE_GETFPREGS, and PTRACE_SETFPREGS requests. + + * process.c (SYS_FUNC(ptrace)) [SPARC || SPARC64]: Return RVAL_DECODED + right after printing addr argument if request is one of PTRACE_GETREGS, + PTRACE_SETREGS, PTRACE_GETFPREGS, or PTRACE_SETFPREGS. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print addr and data arguments of PTRACE_ATTACH-like requests + As kernel ignores addr and data arguments of PTRACE_ATTACH, + PTRACE_INTERRUPT, PTRACE_KILL, and PTRACE_LISTEN request, + we do not print them either. + + * process.c (SYS_FUNC(ptrace)): After printing pid argument, return + RVAL_DECODED if request is one of PTRACE_ATTACH, PTRACE_INTERRUPT, + PTRACE_KILL, or PTRACE_LISTEN. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print arguments of PTRACE_TRACEME request. + As kernel ignores arguments of PTRACE_TRACEME request, + we do not print them either. + + * process.c (SYS_FUNC(ptrace)): If request is PTRACE_TRACEME, + return early with RVAL_DECODED. + +2016-05-12 Dmitry V. Levin + + ptrace: print request using printxval64. + As first argument of ptrace syscall has a long integer type, print + it using printxval64 because printxval takes unsigned int argument. + + * process.c (SYS_FUNC(ptrace)): Change type of "request" variable + from "long" to "unsigned long", print it using printxval64 instead + of printxval. + +2016-05-12 Dmitry V. Levin + + Do not sign-extend siginfo_t.si_syscall. + * printsiginfo.c (print_si_info): Explicitly cast si_syscall member + of siginfo_t that has type "int" to "unsigned int", to avoid sign + extension when passed to syscall_name function. + + Export print_seccomp_fprog for further use in parser of ptrace syscall. + * defs.h (print_seccomp_fprog): New prototype. + * seccomp.c (print_seccomp_fprog): Remove "static" keyword. + Move printing of struct seccomp_fprog fields ... + (print_seccomp_filter): ... here. + +2016-05-11 Fei Jie + + tests: add munlockall.test. + * tests/munlockall.c: New file. + * tests/munlockall.test: New test. + * tests/.gitignore: Add munlockall. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add munlockall.test. + + tests: add link.test. + * tests/link.c: New file. + * tests/link.test: New test. + * tests/.gitignore: Add link. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add link.test. + +2016-05-11 Dmitry V. Levin + + tests: check decoding and dumping of preadv2 and pwritev2 syscalls. + * tests/preadv2-pwritev2.c: New file. + * tests/preadv2-pwritev2.test: New test. + * tests/.gitignore: Add preadv2-pwritev2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add preadv2-pwritev2. + + Implement decoding of preadv2 and pwritev2 syscalls. + * io.c: Include "xlat/rwf_flags.h". + (do_preadv, do_pwritev, SYS_FUNC(preadv2), SYS_FUNC(pwritev2)): + New functions. + (SYS_FUNC(preadv)): Use do_preadv. + (SYS_FUNC(pwritev)): Use do_pwritev. + * linux/32/syscallent.h (preadv2, pwritev2): New entries. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/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/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * syscall.c (dumpio): Handle SEN_preadv2 and SEN_pwritev2. + * xlat/rwf_flags.in: New file. + * NEWS: Mention parsers of new syscalls. + +2016-05-10 Dmitry V. Levin + + tests: extend test coverage of xattr family syscalls. + * tests/xattr.c: Check decoding of all xattr family syscalls. + * tests/xattr.test: Use run_strace_match_diff. + * tests/xattr.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + + tests: add print_quoted_memory function to libtests. + * tests/print_quoted_string.c (print_quoted_memory): New function. + (print_quoted_string): Use it. + * tests/tests.h (print_quoted_memory): New prototype. + + Fix corner cases of xattr family syscalls decoding. + * xattr.c (print_xattr_val): Do not take insize into account, print it + as unsigned long. + Do not decode xattr values of size larger than XATTR_SIZE_MAX. + Use static buffer for fetching xattr values. + (print_xattr_list): Do not decode string when size is zero. + +2016-05-10 Dr. David Alan Gilbert + + userfaultfd: Add ioctl tests. + * tests/ioctl_uffdio.c: New file. + * tests/ioctl_uffdio.test: New test. + * tests/.gitignore: Add ioctl_uffdio. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_uffdio.test. + +2016-05-10 Dr. David Alan Gilbert + + Decode UFFDIO_* ioctls. + Decode the ioctls associated with the userfaultfd fd. + Note that they tend to read from and also return result in it's data + structure. + + * configure.ac (AC_CHECK_HEADERS): Add linux/userfaultfd.h. + * userfaultfd.c [HAVE_LINUX_USERFAULTFD_H]: Add ioctl decoder. + * defs.h (uffdio_ioctl): New prototype. + * ioctl.c (ioctl_decode) [HAVE_LINUX_USERFAULTFD_H]: Wire in + uffdio_ioctl. + * xlat/uffd_*.in: Create flag xlat for all the IOCTLs. + +2016-05-10 Dmitry V. Levin + + Update AX_CODE_COVERAGE. + * m4/ax_code_coverage.m4: Update to serial 16. + * Makefile.am (CODE_COVERAGE_LCOV_OPTIONS): Remove. + (CODE_COVERAGE_GENHTML_OPTIONS): Update, add prefix. + (CODE_COVERAGE_BRANCH_COVERAGE): Set to 1. + + strace-ff.test: fix race condition. + * tests/strace-ff.test: Wait for completion of PR_SET_PTRACER command. + + tests/epoll_pwait.c: fix for x32. + * tests/epoll_pwait.c (main): Explicitly cast last syscall argument + to kernel_ulong_t. + + strace-S.test: check "-S name" + * tests/strace-S.test: Add a check for "-c -S name" output. + + Fix NULL dereference in "-S name" when syscall table has holes. + * count.c (syscall_cmp): Do not pass NULL to strcmp. + + strace-S.test: cleanup. + * tests/strace-S.test: Rewrite using sed. + +2016-05-09 Fei Jie + + tests: add strace-S.test. + * tests/strace-S.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + strace-ff.test: check that -ff does not create unexpected output files. + * tests/strace-ff.expected: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/strace-ff.test: Use it. Check that no other output files + have been created. + +2016-05-09 Fei Jie + + tests: add strace-ff.test. + * tests/strace-ff.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + strace-V.test: cleanup. + * tests/strace-V.test: Move config.h parser to a function. + Rename $OUT to $EXP, swap arguments passed to match_diff. + +2016-05-09 Fei Jie + + tests: add strace-V.test. + * tests/strace-V.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + tests: check decoding of epoll_pwait syscall. + * tests/epoll_pwait.c: New file. + * tests/epoll_pwait.test: New test. + * tests/.gitignore: Add epoll_pwait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_pwait.test. + +2016-05-09 Dmitry V. Levin + + Assume that sys/epoll.h exists. + This header file was added in glibc-2.3.2, + so it's safe to assume its availability. + + * configure.ac (AC_CHECK_HEADERS): Remove sys/epoll.h. + * epoll.c: Include unconditionally. + Compile [HAVE_SYS_EPOLL_H] code unconditionally. + * tests/epoll_ctl.c: Do not check for HAVE_SYS_EPOLL_H. + * tests/epoll_wait.c: Likewise. + +2016-05-08 Fabien Siron + + Factorize send_query functions. + * socketutils.c (send_query): New function. + (inet_send_query, unix_send_query): Use it. + +2016-05-08 Dmitry V. Levin + + tests: relax timings. + Allow nanosleep(2) to spend 10% more time to make the test suite + more reliable on slow systems. + + * tests/count.test: Treat 1.1 seconds as valid output. + * tests/strace-T.expected: Likewise. + * tests/strace-r.expected: Likewise. + +2016-05-07 Dmitry V. Levin + + tests/attach-f-p.c: increase timeouts. + Increase timeouts to make the test more reliable on slow systems. + + * tests/attach-f-p.c (its): Increase timeouts to 1, 2, and 3 seconds, + respectively. + +2016-05-07 Dmitry V. Levin + + Remove unused functions. + * defs.h (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): + Remove. + * util.c (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): + Likewise. + + v4l2.c: use print_array function. + * v4l2.c (print_v4l2_ext_control, umoven_or_printaddr_ignore_syserror): + New functions. + (print_v4l2_ext_controls): Use them via print_array. + + uid.c: use print_array function. + * uid.c (print_gid): New function. + (print_groups): Use it via print_array. + + seccomp.c: use print_array function. + * seccomp.c (decode_filter, decode_seccomp_fprog): Remove. + (print_bpf_filter): New function. + (print_seccomp_fprog): Use it via print_array. + * tests/seccomp-filter-v.c (main): Update. + + scsi.c: use print_array function. + * scsi.c (print_uchar): New function. + (print_sg_io_buffer): Use it via print_array. + + poll.c: use print_array function. + * poll.c (print_pollfd): Change for use as print_array callback. + (decode_poll_entering): Use print_array. + * tests/poll.c: Update. + * tests/poll.test: Update. + + numa.c: use print_array function. + * numa.c (print_node): New function. + (print_nodemask): Use it via print_array. + (print_page_array, print_int_array): Remove. + (print_addr): New function. + (print_status, print_int): Change for use as print_array callback. + (SYS_FUNC(move_pages)): Use print_addr, print_int, and print_status + via print_array. + * tests/move_pages.c: Update. + * tests/set_mempolicy.c: Likewise. + * tests/set_mempolicy.test: Likewise. + + mem.c: use print_array function. + * mem.c [POWERPC] (print_protmap_entry): New function. + [POWERPC] (SYS_FUNC(subpage_prot)): Use it via print_array. + + kexec.c: use print_array function. + * kexec.c (print_seg): Change for use as print_array callback. + (print_kexec_segments): Use print_array. + + ipc_sem.c: use print_array function. + * ipc_sem.c (tprint_sembuf): Rename to print_sembuf, change signature + for use as print_array callback. + (tprint_sembuf_array): Use print_array. + + io.c: use print_array function. + * io.c (print_iovec_config): New structure. + (print_iovec): New function. + (tprint_iov_upto): Use print_array. + * tests/preadv.c (main): Update. + * tests/pwritev.c (print_iovec, main): Likewise. + + epoll.c: use print_array function. + * epoll.c (print_epoll_event): Change signature for use as print_array + callback, all users updated. + (print_epoll_event_array): Remove. + (epoll_wait_common): Change to use print_array instead + of print_epoll_event_array. + + aio.c: use print_array function. + * aio.c (print_iocbp): New function. + (SYS_FUNC(io_submit)): Use it via print_array. Use widen_to_long + to process long int argument. + (print_io_event): Change to print struct io_event fetched elsewhere. + (SYS_FUNC(io_cancel)): Update use of print_io_event. + (SYS_FUNC(io_getevents)): Use print_io_event via print_array. + Use widen_to_long to print long int arguments. + * tests/aio.c (main): Check decoding of io_submit with negative "nr". + + Introduce print_array function for consistent decoding of arrays. + * defs.h (print_array): New prototype. + * util.c (print_array): New function. + +2016-05-06 Dmitry V. Levin + + Fix corner cases of ICMP_FILTER decoding. + * net.c (print_icmp_filter): Print icmp_filter for any positive length. + * tests/net-icmp_filter.c: New file. + * tests/net-icmp_filter.test: New test. + * tests/.gitignore: Add net-icmp_filter. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add net-icmp_filter.test. + +2016-05-05 Dmitry V. Levin + + xlat: do not strip "1<<" prefix from xlat strings. + * xlat/gen.sh (cond_xlat, gen_header): Do not strip "1<<" prefix + from xlat strings to fix incorrect output. + * tests/caps.awk: Update. + + Reported-by: Dr. David Alan Gilbert + +2016-05-05 Dmitry V. Levin + + tests/xstatfsx.c: fix mips o32 support. + mips o32 differs from all other 32-bit architectures by defining + __kernel_fsid_t structure as an array of long ints. + + * tests/xstatfsx.c (print_statfs): Explicitly cast elements + of PRINT_F_FSID array to unsigned int. + +2016-05-05 Dmitry V. Levin + + Mpersify VIDIOC_* ioctl parser. + * v4l2.c: Mpersify arch-specific structures. + (v4l2_ioctl): Mpersify. + * tests/ioctl_v4l2.c: New file. + * tests/ioctl_v4l2.test: New test. + * tests/.gitignore: Add ioctl_v4l2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_v4l2.test. + +2016-05-05 Dmitry V. Levin + + Mpersify ioctl macros. + As values of some ioctl macros differ between personalities, these + personality specific ioctl macros should be properly defined for + mpersified code. Implement this by redefining personality specific + ioctl macros from ioctlent*.h for each file that includes MPERS_DEFS. + + * Makefile.am (ioctl_macros_h): New variable. + (ioctl_macros%.h): New rule. + (BUILT_SOURCES, CLEANFILES): Add $(ioctl_macros_h). + (m%_type_defs.h): #include MPERS_$(mpers_PREFIX)IOCTL_MACROS. + * defs.h [HAVE_M32_MPERS] (MPERS_m32_IOCTL_MACROS): New macro. + [HAVE_MX32_MPERS] (MPERS_mx32_IOCTL_MACROS): Likewise. + + Acked-by: Elvira Khabirova + +2016-05-05 Dmitry V. Levin + + Fix decoding of VIDIOC_* ioctls. + * v4l2.c: Fix numerous bugs in decoding of VIDIOC_* ioctls. + * tests/ioctl.c (main): Update. + +2016-05-05 Dmitry V. Levin + + nsyscalls.test: add mips o32 support. + Out-of-range syscalls looks differently on mips o32. + + * tests/nsyscalls.c (main): Handle LINUX_MIPSO32. + * tests/nsyscalls.test: Trace syscall called "syscall" on mips. + +2016-04-29 Dmitry V. Levin + + Remove initialization of big holes in syscallent.h files. + There is no need to explicitly initialize big holes after conversion + of syscallent.h files to use designated initializers. For architectures + that have some data at the end of syscallent.h this initialization of + big holes is no-op, for others it just inflates the table unnecessarily. + + * linux/arc/syscallent.h: Remove initialization of arch specific block + at the end of table. + * linux/metag/syscallent.h: Likewise. + * linux/nios2/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + * linux/arm/syscallent.h: Remove explicit initialization of a big hole + before socket subcalls. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/mips/syscallent-n32.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/mips/syscallent-compat.h: Remove explicit initialization + of big holes between different mips ABIs. + * linux/mips/syscallent-n64.h: Remove explicit initialization + of big holes before socket subcalls and between different mips ABIs. + * linux/mips/syscallent-o32.h: Likewise. + +2016-04-29 Dmitry V. Levin + + xlat: make "1< + +2016-04-29 Dmitry V. Levin + + Fix typo in XLAT_TYPE_PAIR. + * xlat.h (XLAT_TYPE_PAIR): Take "type" parameter. + + Reported-by: Dr. David Alan Gilbert + +2016-04-29 Dmitry V. Levin + + Fix decoding of move_pages syscall. + * numa.c (print_page_array, print_status, print_int, print_int_array): + New functions. + (SYS_FUNC(move_pages)): Rewrite using these functions. + * tests/move_pages.c: New file. + * tests/move_pages.test: New test. + * tests/.gitignore: Add move_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add move_pages.test. + + tests: check decoding of mbind syscall. + * tests/mbind.c: New file. + * tests/mbind.test: New test. + * tests/.gitignore: Add mbind. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mbind.test. + +2016-04-29 Jeff Mahoney + + Change type of struct xlat.val to uint64_t. + Some ioctls have flags fields that are 64-bit. A 32-bit val means + these flags will never be matched or printed. + + * xlat.h: Include . + (struct xlat): Change type of val to uint64_t. + +2016-04-29 Dmitry V. Levin + + xlat: extend syntax with #val_type directive. + When #val_type directive is encountered, gen.sh starts using + XLAT_TYPE/XLAT_TYPE_PAIR macros instead of XLAT/XLAT_PAIR, + with #val_type's argument as a type. + + For example, "#val_type uint64_t" means values of type uint64_t. + + * xlat/gen.sh (gen_header, print_xlat, print_xlat_pair): + Add val_type support. + +2016-04-29 Dmitry V. Levin + + xlat/gen.sh: prepare for adding #val_type directive support. + This is essentially a no-op change that makes the following change + easier to read. + + * xlat/gen.sh (print_xlat, print_xlat_pair): New functions. + (cond_xlat, gen_header): Use them. + +2016-04-29 Dmitry V. Levin + + Introduce XLAT_TYPE and XLAT_TYPE_PAIR macros. + * xlat.h (XLAT_TYPE): New macro, similar to XLAT but casts + to the specified type instead of unsigned int. + (XLAT_TYPE_PAIR): New macro, similar to XLAT_PAIR but casts + to the specified type instead of unsigned int. + +2016-04-29 Dmitry V. Levin + + xlat: generate xlat pairs using new XLAT_PAIR macro. + Before this change there were two forms of xlat entries: those that use XLAT + or XLAT_END macros, and others verbatim entries. This change converts + the latter to use new XLAT_PAIR macro. + + This is necessary for the upcoming change of xlat.val type. + + * xlat.h (XLAT_PAIR): New macro. + * xlat/gen.sh (cond_xlat, gen_header): Use it. + +2016-04-29 Dmitry V. Levin + + Explicitly cast argument of XLAT macro to unsigned int. + This is necessary for the upcoming change of xlat.val type. + + * xlat.h (XLAT): Cast the argument to unsigned int. + +2016-04-29 Dmitry V. Levin + + Change type of {s,t}print_open_modes's argument to unsigned. + As "flags" argument of sprint_open_modes and tprint_open_modes is + involved only in bit operations, change its type to unsigned. + + * defs.h.c (sprint_open_modes, tprint_open_modes): Change type + to unsigned int. + * open.c (sprint_open_modes, tprint_open_modes): Likewise. + +2016-04-28 Dmitry V. Levin + + tests/remap_file_pages.c: fix for the upcoming change of xlat.val type. + The "flags" argument of remap_file_page syscall has type "unsigned + long", so it is not correct to load most significant bits with garbage + ans assume they are going to be ignored. + + * tests/remap_file_pages.c (main): Remove artificial garbage from flags. + +2016-04-28 Dmitry V. Levin + + Introduce printflags64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printflags): Rename to printflags64, change type of integer + argument to uint64_t. + (printflags): New static inline function. + * util.c (printflags): Rename to printflags64, change type of integer + argument to uint64_t. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce sprintflags64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (sprintflags): Rename to sprintflags64, change type of integer + argument to uint64_t. + (sprintflags): New static inline function. + * util.c (sprintflags): Rename to sprintflags64, change type of integer + argument to uint64_t. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + printxvals: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of printxvals are already prepared for this change. + + * defs.h (printxvals): Change type of integer argument to uint64_t. + * util.c (printxvals): Likewise. Print it using PRIx64 format. + Patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + xlat_search: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of addflags are already prepared for this change. + + * defs.h (xlat_search): Change type of integer argument to uint64_t. + * util.c (xlat_search): Likewise. Pass it by pointer. + (xlat_bsearch_compare): Treat first argument as a pointer. + Patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce xlookup64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (xlookup): Rename to xlookup64, change type of integer argument + to uint64_t. + (xlookup): New static inline function. + * util.c (xlookup): Rename to xlookup64, change type of integer + argument to uint64_t. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + addflags: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of addflags are already prepared for this change. + + * defs.h (addflags): Change type of integer argument to uint64_t. + * util.c (addflags): Likewise. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce printxval64 wrapper. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printxval64): New static inline function. + +2016-04-28 Dmitry V. Levin + + Turn printxval macro into a static inline function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printxval): Change to static inline function. + +2016-04-28 Dmitry V. Levin + + tests: check decoding of migrate_pages syscall. + * tests/migrate_pages.c: New file. + * tests/migrate_pages.test: New test. + * tests/.gitignore: Add migrate_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add migrate_pages.test. + + Fix decoding of migrate_pages syscall. + * numa.c (SYS_FUNC(migrate_pages)): Print syscall arguments + in the right order. + + tests: check decoding of set_mempolicy syscall. + * tests/set_mempolicy.c: New file. + * tests/set_mempolicy.test: New test. + * tests/.gitignore: Add set_mempolicy. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add set_mempolicy.test. + + tests: check decoding of get_mempolicy syscall. + * tests/get_mempolicy.c: New file. + * tests/get_mempolicy.test: New test. + * tests/.gitignore: Add get_mempolicy. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add get_mempolicy.test. + + numa: fix decoding of nodemask arrays. + * numa.c (get_nodes): Rewrite an rename to print_nodemask. + All callers updated. + (SYS_FUNC(mbind), SYS_FUNC(set_mempolicy), SYS_FUNC(get_mempolicy)): + Print a delimiter before nodemask argument. + +2016-04-27 Dmitry V. Levin + + Fix decoding of policy argument of get_mempolicy syscall. + * numa.c (SYS_FUNC(get_mempolicy)): Print policy argument in square + brackets to indicate indirect access. + + Fix decoding of pid_t argument of migrate_pages syscall. + * numa.c (SYS_FUNC(migrate_pages)): Print pid_t syscall + argument using %d format. + + tests: add printxval function to libtests. + * tests/tests.h (printxval): New prototype. + * tests/printxval.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + tests: check decoding of remap_file_pages syscall. + * tests/remap_file_pages.c: New file. + * tests/remap_file_pages.test: New test. + * tests/.gitignore: Add remap_file_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add remap_file_pages.test. + +2016-04-27 Fei Jie + + tests: add pause.test. + * tests/pause.c: New file. + * tests/pause.test: New test. + * tests/.gitignore: Add pause. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add pause.test. + + tests: add kill.test. + * tests/kill.c: New file. + * tests/kill.test: New test. + * tests/.gitignore: Add kill. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add kill.test. + +2016-04-27 Dmitry V. Levin + + Fix decoding of pid_t arguments of kill and tgkill syscalls. + * signal.c (SYS_FUNC(kill), SYS_FUNC(tgkill)): Print pid_t syscall + arguments using %d format. + +2016-04-27 Fei Jie + + tests: add mlock.test. + * tests/mlock.c: New file. + * tests/mlock.test: New test. + * tests/.gitignore: Add mlock. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mlock.test. + +2016-04-27 Dmitry V. Levin + + Move parsers of NUMA related syscalls to numa.c. + * mem.c (get_nodes, SYS_FUNC(mbind), SYS_FUNC(set_mempolicy), + SYS_FUNC(get_mempolicy), SYS_FUNC(migrate_pages), SYS_FUNC(move_pages)): + Move ... + * numa.c: ... here. + * Makefile.am (strace_SOURCES): Add numa.c + + tests/umovestr3.c: robustify against os specific issues. + * tests/umovestr3.c (main): Create extra gap before unreadable page. + + tests: extend test coverage of umovestr short read condition. + * tests/umovestr3.c: New file. + * tests/umovestr3.test: New test. + * tests/.gitignore: Add umovestr3. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add umovestr3.test. + + tests: check decoding of out-of-range syscalls. + * tests/nsyscalls.c: New file. + * tests/nsyscalls.test: New test. + * tests/.gitignore: Add nsyscalls. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add nsyscalls.test. + +2016-04-26 Dmitry V. Levin + + Fix decoding of 3rd argument of getdents/getdents64 syscalls. + * dirent.c (SYS_FUNC(getdents)): Always print 3rd syscall argument + as unsigned int. + * dirent64.c (SYS_FUNC(getdents64)): Likewise. + * tests/getdents.c (main): Check it. + * tests/getdents64.c (main): Likewise. + + Fix decoding of LINUX_REBOOT_CMD_RESTART2 argument. + * reboot.c (SYS_FUNC(reboot)): Cast numeric arguments to unsigned int. + +2016-04-26 Dmitry V. Levin + + .travis.yml: raise sleep delay. + Previous sleep delay value seems to be not enough nowadays. + + .travis.yml (SLEEP_A_BIT): Raise sleep delay. + +2016-04-26 Dmitry V. Levin + + Move definitions of MPOL_* constants to xlat files. + * mem.c (MPOL_DEFAULT, MPOL_PREFERRED, MPOL_BIND, MPOL_INTERLEAVE): + Move to xlat/policies.in. + (MPOL_F_NODE, MPOL_F_ADDR): Move to xlat/mempolicyflags.in. + (MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Move + to xlat/mbindflags.in. + + tests: check decoding of renameat2 syscall. + * tests/renameat2.c: New file. + * tests/renameat2.test: New test. + * tests/.gitignore: Add renameat2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add renameat2.test. + + Add default values for RENAME_* constants. + * xlat/rename_flags.in: Add default values. + + tests: check decoding of utimes syscall. + * tests/utimes.c: New file. + * tests/utimes.test: New test. + * tests/.gitignore: Add utimes. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add utimes.test. + + tests: check decoding of futimesat syscall. + * tests/futimesat.c: New file. + * tests/futimesat.test: New test. + * tests/.gitignore: Add futimesat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add futimesat.test. + + tests: extend test coverage of mknod syscall. + * mknod.c (main): Check more corner cases of mode_t parser. + * mknod.test: Update. + +2016-04-26 Fei Jie + + tests: add sched_yield.test. + * tests/sched_yield.c: New file. + * tests/sched_yield.test: New test. + * tests/.gitignore: Add sched_yield. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sched_yield.test. + + tests: add sync.test. + * tests/sync.c: New file. + * tests/sync.test: New test. + * tests/.gitignore: Add sync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sync.test. + + tests: add mknodat.test. + * tests/mknodat.c: New file. + * tests/mknodat.test: New test. + * tests/.gitignore: Add mknodat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mknodat.test. + + tests: add unlink.test. + * tests/unlink.c: New file. + * tests/unlink.test: New test. + * tests/.gitignore: Add unlink. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unlink.test. + + tests: add reboot.test. + * tests/reboot.c: New file. + * tests/reboot.test: New test. + * tests/.gitignore: Add reboot. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add reboot.test. + +2016-04-26 Dmitry V. Levin + + Fix decoding of statfs family syscalls. + Fix decoders of fstatfs, fstatfs64, statfs, and statfs64 syscalls + by rewriting them using mpers infrastructure. + + * fetch_struct_statfs.c: New file. + * fstatfs.c: Likewise. + * fstatfs64.c: Likewise. + * print_statfs.c: Likewise. + * statfs.h: Likewise. + * statfs64.c: Likewise. + * statfs.c: Remove everything except SYS_FUNC(statfs). + * configure.ac: Remove the check for struct statfs64 in . + Add checks for struct statfs and struct statfs64 in . + Add checks for f_frsize and f_flags members of these structures. + * defs.h (struct strace_statfs): New forward declaration. + (print_struct_statfs, print_struct_statfs64): New prototypes. + * Makefile.am (libstrace_a_SOURCES): Add fstatfs.c, fstatfs64.c, + statfs.c, and statfs64.c. + (strace_SOURCES): Add fetch_struct_statfs.c, print_statfs.c, + and statfs.h. + * NEWS: Mention this fix. + * tests/fstatfs.c: New file. + * tests/fstatfs64.c: Likewise. + * tests/statfs64.c: Likewise. + * tests/xstatfs.c: Likewise. + * tests/xstatfs64.c: Likewise. + * tests/xstatfsx.c: Likewise. + * tests/fstatfs.test: New test. + * tests/fstatfs64.test: Likewise. + * tests/statfs64.test: Likewise. + * tests/statfs.c: Rewrite using xstatfs.c. + * tests/statfs.test: Update. + * tests/.gitignore: Add fstatfs, fstatfs64, and statfs64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fstatfs.test, fstatfs64.test, and statfs64.test. + (EXTRA_DIST): Add xstatfs.c, xstatfs64.c, and xstatfsx.c. + +2016-04-26 Dmitry V. Levin + + tests: add printflags function to libtests. + * tests/printflags.c: New file. + * tests/tests.h (printflags): New prototype. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-04-26 Dmitry V. Levin + + Move definition of struct xlat to a separate header file. + Define struct xlat in a separate file so that it could be used later by + tests without inclusion of defs.h header file. + + * defs.h (struct xlat, XLAT, XLAT_END): Move ... + * xlat.h: ... here. + * Makefile.am (strace_SOURCES): Add xlat.h. + +2016-04-25 Dmitry V. Levin + + alpha: decode osf_statfs64 and osf_fstatfs64 syscalls. + * linux/alpha/syscallent.h (osf_statfs64, osf_fstatfs64): Set nargs + and handler. + +2016-04-25 Dmitry V. Levin + + alpha: fix decoding of osf_statfs and osf_fstatfs syscalls. + Do not attempt to print struct osf_statfs as if it was the same as + struct statfs. Since struct osf_statfs has never been decoded properly, + it is probably too late to implement a decoder, so let's just print the + pointer. + + * statfs.c [ALPHA] (SYS_FUNC(osf_statfs), SYS_FUNC(osf_fstatfs)): Move ... + * alpha.c: ... here. Replace printstatfs with printaddr. + +2016-04-25 Dmitry V. Levin + + statfs: print f_flags field only when ST_VALID flag is set. + * statfs.c (print_statfs_flags): New function. + (printstatfs, printstatfs64, printcompat_statfs64): Use it. + * xlat/statfs_flags.in (ST_VALID): Move to the head of the list. + * tests/statfs.expected: Update. + +2016-04-25 Fei Jie + + tests: add symlink.test. + * tests/symlink.c: New file. + * tests/symlink.test: New test. + * tests/.gitignore: Add symlink. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add symlink.test. + + tests: add rmdir.test. + * tests/rmdir.c: New file. + * tests/rmdir.test: New test. + * tests/.gitignore: Add rmdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add rmdir.test. + + tests: add setdomainname.test. + * tests/setdomainname.c: New file. + * tests/setdomainname.test: New test. + * tests/.gitignore: Add setdomainname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setdomainname.test. + + tests: add sched_rr_get_interval.test. + * tests/sched_rr_get_interval.c: New file. + * tests/sched_rr_get_interval.test: New test. + * tests/.gitignore: Add sched_rr_get_interval. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sched_rr_get_interval.test. + +2016-04-25 Dmitry V. Levin + + statfs: decode f_flags field of struct statfs. + * xlat/statfs_flags.in: New file. + * statfs.c: Include "xlat/statfs_flags.h". + (printstatfs) [_STATFS_F_FLAGS]: Print statbuf.f_flags as flags. + (printstatfs64) [_STATFS_F_FLAGS]: Likewise. + (printcompat_statfs64): Likewise. + * tests/statfs.expected: Update. + +2016-04-25 Zev Weiss + + statfs: don't quote f_type macro names. + * statfs.c (sprintfstype): Don't add double-quotes to fs magic macros. + * tests/statfs.expected: Remove double-quotes. + +2016-04-25 Dmitry V. Levin + + tests/shmxt.c: robustify against arch specific issues. + Do not treat failed shmat(SHM_RND) as a test failure. + This change partially reverts commit + bea707377d2ee3e1950bfa43537ef928163a5fa6. + + * tests/shmxt.c (main): Use SHM_RND in the second shmat call, + do not treat its potential error as a test failure. + +2016-04-23 Dmitry V. Levin + + Rename PRI__s64 to PRI__d64. + As PRI__*64 macros mirror PRI*64 macros from inttypes.h, follow the + principle of least astonishment and name these macros the same way. + + * defs.h (PRI__s64): Rename to PRI__d64. + +2016-04-23 Dmitry V. Levin + + Fix old_mmap output when mmap arguments are unfetchable. + * mem.c (SYS_FUNC(old_mmap)): Use umove_or_printaddr instead of umoven + to fetch mmap arguments, return RVAL_DECODED when umove_or_printaddr + fails. + * tests/old_mmap.c (main): Check it. + +2016-04-22 Dmitry V. Levin + + aarch64: fix old_mmap output for arm personality. + * mem.c (SYS_FUNC(old_mmap)) [AARCH64]: Fetch mmap arguments + as 32-bit integers. + + Define old_mmap parser only on architectures that use it. + * mem.c (SYS_FUNC(old_mmap)): Define only on AARCH64, ARM, I386, X86_64, + X32, M68K, S390, and S390X. + +2016-04-22 Dmitry V. Levin + + tests: extend test coverage of mmap syscall. + Check decoding of "old mmap" edition of mmap syscall + on those architectures that define it. + + * tests/old_mmap.c: New file. + * tests/old_mmap.test: New test. + * tests/.gitignore: Add old_mmap. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add old_mmap.test. + +2016-04-22 Dmitry V. Levin + + tests: extend test coverage of mincore syscall. + * tests/mincore.c (print_mincore): New function. + (test_mincore): Use it. Check mincore with invalid vec address. + Check mincore with length argument not a multiple of the page size. + (main): Check with DEFAULT_STRLEN pages. + +2016-04-22 Dmitry V. Levin + + Move parsers of sync_file_range and sync_file_range2 syscalls to libstrace + For each given architecture only one of these two syscalls has a + syscallent entry. When each parser is placed into a separate file, + moving to libstrace ensures that only one of them that is need + is linked into strace executable. + + * sync_file_range.c (SYS_FUNC(sync_file_range2)): Move ... + * sync_file_range2.c: ... here. + * Makefile.am (strace_SOURCES): Move sync_file_range.c ... + (libstrace_a_SOURCES): ... here. Add sync_file_range2.c. + (strace_SOURCES_c): Add filtered libstrace_a_SOURCES. + +2016-04-22 Dmitry V. Levin + + tests: check decoding of clock_adjtime syscall. + * tests/clock_adjtime.c: New file. + * tests/clock_adjtime.test: New test. + * tests/.gitignore: Add clock_adjtime. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add clock_adjtime.test. + +2016-04-21 Dmitry V. Levin + + tests: do not include unnecessarily. + Automatically change tests/*.c files using the following script: + + for f in tests/*.c; do + grep -q '\/d' "$f" + done + +2016-04-21 Dmitry V. Levin + + tests: do not include unnecessarily. + Automatically change tests/*.c files using the following script: + + for f in tests/*.c; do + grep -Fv errno.h "$f" | + grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' || + sed -i '/# *include */d' "$f" + done + +2016-04-21 Dmitry V. Levin + + tests/xetpriority.c: print syscall() result using %ld format. + + tests/xetpgid.c: print syscall() result using %ld format. + + tests/xchownx.c: use errno2name. + + tests/userfaultfd.c: stop using assert. + + tests/unlinkat.c: print syscall() result using %ld format. + + tests/umount.c: use errno2name. + + tests/truncate64.c: cleanup. + * tests/truncate64.c (main): Use errno2name, stop using assert. + + tests/truncate.c: cleanup. + * tests/truncate.c (main): Use errno2name, stop using assert. + + tests/tee.c: stop using assert. + + tests/syslog.c: use errno2name. + + tests/sync_file_range2.c: stop using assert. + + tests/sync_file_range.c: stop using assert. + + tests/symlinkat.c: cleanup. + + tests/swap.c: cleanup. + * tests/swap.c (error_msg): Remove. + (main): Use errno2name. + + tests/splice.c: stop using assert. + + tests/setugid.c: cleanup. + + tests/sethostname.c: use errno2name. + + tests/setgroups.c: use errno2name. + * tests/setgroups.c (errno2str): Remove. + (main): Use errno2name. + + tests/seccomp-strict.c: cleanup. + * tests/seccomp-strict.c (main): Use errno2name, stop using assert. + + tests/seccomp-filter.c: cleanup. + * tests/seccomp-filter.c (main): Use errno2name, stop using assert. + + tests/sched_xetscheduler.c: print syscall() result using %ld format. + + tests/sched_xetparam.c: print syscall() result using %ld format. + + tests/renameat.c: print syscall() result using %ld format. + + tests/rename.c: print syscall() result using %ld format. + + tests/readv.c: cleanup. + + tests/pwritev.c: use errno2name. + + tests/preadv-pwritev.c: cleanup. + + tests/prctl-seccomp-strict.c: cleanup. + * tests/prctl-seccomp-strict.c (main): Use errno2name, + stop using assert. + + tests/openat.c: use errno2name. + + tests/open.c: use errno2name. + + tests/mlockall.c: cleanup. + + tests/mlock2.c: stop using assert. + + tests/mknod.c: print syscall() result using %ld format. + + tests/mkdirat.c: print syscall() result using %ld format. + + tests/lseek.c: cleanup. + * tests/lseek.c (main): Use errno2name, stop using assert. + + tests/llseek.c: cleanup. + * tests/llseek.c (main): Use errno2name, stop using assert. + + tests/linkat.c: print syscall() result using %ld format. + + tests/iopl.c: use errno2name. + + tests/ioperm.c: use errno2name. + + tests/getgroups.c: use errno2name. + * tests/getgroups.c (errno2str): Remove. + (main): Use errno2name. + + tests/ftruncate64.c: cleanup. + * tests/ftruncate64.c (main): Use errno2name, stop using assert. + + tests/ftruncate.c: cleanup. + * tests/ftruncate.c (main): Use errno2name, stop using assert. + + tests/fsync.c: print syscall() result using %ld format. + + tests/flock.c: print syscall() result using %ld format. + + tests/file_handle.c: use errno2name. + + tests/fdatasync.c: print syscall() result using %ld format. + + tests/fchownat.c: use errno2name. + + tests/fchmodat.c: use errno2name. + + tests/fchmod.c: use errno2name. + + tests/faccessat.c: print syscall() result using %ld format. + + tests/epoll_wait.c: print syscall() result using %ld format. + + tests/epoll_ctl.c: print syscall() result using %ld format. + + tests/epoll_create1.c: cleanup. + * tests/epoll_create1.c (main): Use errno2name, stop using assert. + + tests/epoll_create.c: print syscall() result using %ld format. + + tests/dup3.c: print syscall() result using %ld format. + + tests/dup2.c: print syscall() result using %ld format. + + tests/dup.c: cleanup. + + tests/creat.c: stop using sys/stat.h. + + tests/copy_file_range.c: stop using assert. + + tests/chroot.c: use errno2name. + + tests/aio.c: use errno2name. + + tests: cleanup acct.test. + * tests/acct.c (main): Use errno2name, stop using assert, + change sample file name. + * tests/acct.test: Update. + + tests: use errno2name() + Automatically change tests/*.c files using the following sed regexp: + sed -i 's/errno == E[[:alnum:]]\+ ? "E[[:alnum:]]\+" : "E[[:alnum:]]\+"/errno2name()/g' + + tests/dup.c: include "tests.h" + This is going to be necessary for the following commit. + +2016-04-21 Fei Jie + + tests: add getpgrp.test. + * tests/getpgrp.c: New file. + * tests/getpgrp.test: New test. + * tests/.gitignore: Add getpgrp. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getpgrp.test. + + tests: add access.test. + * tests/access.c: New file. + * tests/access.test: New test. + * tests/.gitignore: Add access. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add access.test. + + tests: add fchdir.test. + * tests/fchdir.c: New file. + * tests/fchdir.test: New test. + * tests/.gitignore: Add fchdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchdir.test. + + tests: add mkdir.test. + * tests/mkdir.c: New file. + * tests/mkdir.test: New test. + * tests/.gitignore: Add mkdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mkdir.test. + + tests: add getsid.test. + * tests/getsid.c: New file. + * tests/getsid.test: New test. + * tests/.gitignore: Add getsid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getsid.test. + +2016-04-21 Dmitry V. Levin + + tests: add errno2name function to libtests. + Add a simple translator of errno to its name, so one could + simply use errno2name() instead of complex expressions like + errno == EINVAL ? "EINVAL" : "EFAULT". + + * tests.h (errno2name): New prototype. + * errno2name.c: New file. + * Makefile.am (libtests_a_SOURCES): Add it. + +2016-04-20 Dmitry V. Levin + + hppa: rename ECANCELLED to ECANCELED. + hppa seems to be the only architecture that defines ECANCELLED synonym + for ECANCELED constant, other architectures just define ECANCELED. + Change the way how this constant is printed on hppa to be in line + with other architectures. + + * linux/hppa/errnoent.h [253]: Rename ECANCELLED to ECANCELED. + +2016-04-20 Dmitry V. Levin + + Remove parser of unimplemented timerfd syscall. + timerfd syscall was introduced in v2.6.22-rc1, but in v2.6.25-rc1 + it was replaced by timerfd_* syscall family. + + * linux/avr32/syscallent.h (timerfd): Fix nargs. + * linux/dummy.h (sys_timerfd): Add stub alias. + * time.c (SYS_FUNC(timerfd)): Remove. + +2016-04-20 Dmitry V. Levin + + tests: workaround kernel bugs in seccomp-strict.test and prctl-seccomp-strict.test + If kernel implementation of strict seccomp mode is buggy, test programs + will be killed by SIGKILL. This is a known problem at least on + x32 and mips. Skip affected tests if this is the case. + + This change partially revert commit 9c1a72cd3f3d52d573876ce474b620a5f141fb1b. + + * tests/seccomp-strict.c (main): Remove workaround for x32. + * tests/prctl-seccomp-strict.c: Likewise. + * tests/seccomp-strict.test: Skip the test if the test program + has been killed by SIGKILL. + * tests/prctl-seccomp-strict.test: Likewise. + +2016-04-20 Dmitry V. Levin + + tests/shmxt.c: do not use SHM_RND, it is unreliable. + * tests/shmxt.c (main): Do not set SHM_RND flag. + + tests/rt_sigpending.c: fix for systems where _NSIG > 16 * sizeof(long) + * tests/rt_sigsuspend.c (iterate): Do not assume that size will be less + than sizeof(long) on the second iteration. + + prctl-seccomp-strict.test: robustify against unrelated prctl invocations + * tests/prctl-seccomp-strict.test: Filter out PR_GET_* prctl calls. + +2016-04-20 Dmitry V. Levin + + tests: adjust rt_sigpending to older kernels. + With linux kernels older than v3.9-rc1, compat rt_sigpending syscall + could fail with EFAULT in cases where on later kernels it succeeds. + Adjust the test to handle both cases properly. + + * tests/rt_sigpending.c (iterate): Stop iterations if rt_sigpending + failed with EFAULT. + +2016-04-20 Dmitry V. Levin + + tests: adjust readv/writev and preadv/pwritev tests to older kernels. + With linux kernels older than v3.16-rc1, iovec based compat syscalls may + return EINVAL in some cases where on later kernels they return EFAULT. + Adjust tests to handle both cases properly. + + * tests/preadv-pwritev.c: Include . + (main): Print either "EINVAL" or "EFAULT" depending on errno. + * tests/pwritev.c: Likewise. + * tests/readv.c: Likewise. + +2016-04-20 Dmitry V. Levin + + tests: remove obsolete non-strict uid tests. + Recently added strict tests for uid/gid related syscalls + made old uid tests obsolete. + + * tests/uid.awk: Remove. + * tests/uid.c: Remove. + * tests/uid.test: Remove. + * tests/uid16.c: Remove. + * tests/uid16.test: Remove. + * tests/uid32.c: Remove. + * tests/uid32.test: Remove. + * tests/.gitignore: Remove uid, uid16, and uid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Remove uid.test, uid16.test, and uid32.test. + (EXTRA_DIST): Remove uid.awk. + +2016-04-20 Dmitry V. Levin + + tests: extend test coverage of getuid/getgid family syscalls. + Add strict tests for getuid, getuid32, getgid, getgid32, geteuid, + geteuid32, getegid, and getegid32 syscalls. + + * tests/getegid.c: New file. + * tests/getegid.test: New test. + * tests/getegid32.c: New file. + * tests/getegid32.test: New test. + * tests/geteuid.c: New file. + * tests/geteuid.test: New test. + * tests/geteuid32.c: New file. + * tests/geteuid32.test: New test. + * tests/getgid.c: New file. + * tests/getgid.test: New test. + * tests/getgid32.c: New file. + * tests/getgid32.test: New test. + * tests/getuid.c: New file. + * tests/getuid.test: New test. + * tests/getuid32.c: New file. + * tests/getuid32.test: New test. + * tests/.gitignore: Add getuid, getuid32, getgid, getgid32, geteuid, + * geteuid32, getegid, and getegid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getegid.test, getegid32.test, geteuid.test, + geteuid32.test, getgid.test, getgid32.test, getuid.test, + and getuid32.test. + +2016-04-20 Dmitry V. Levin + + tests: extend test coverage of getresgid32 syscall. + * tests/getresgid32.c: New file. + * tests/getresgid32.test: New test. + * tests/.gitignore: Add getresgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresgid32.test. + + tests: extend test coverage of getresgid syscall. + * tests/getresgid.c: New file. + * tests/getresgid.test: New test. + * tests/.gitignore: Add getresgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresgid.test. + + tests: extend test coverage of getresuid32 syscall. + * tests/getresuid32.c: New file. + * tests/getresuid32.test: New test. + * tests/.gitignore: Add getresuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresuid32.test. + + tests: extend test coverage of getresuid syscall. + * tests/getresugid.c: New file. + * tests/getresuid.c: New file. + * tests/getresuid.test: New test. + * tests/.gitignore: Add getresuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresuid.test. + (EXTRA_DIST): Add getresugid.c. + +2016-04-20 Fei Jie + + tests: add symlinkat.test. + * tests/symlinkat.c: New file. + * tests/symlinkat.test: New test. + * tests/.gitignore: Add symlinkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add symlinkat.test. + + tests: add iopl.test. + * tests/iopl.c: New file. + * tests/iopl.test: New test. + * tests/.gitignore: Add iopl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add iopl.test. + +2016-04-20 Dmitry V. Levin + + mips o32, powerpc, powerpc64: fix decoding of iopl syscall. + * linux/mips/syscallent-o32.h (iopl): Fix nargs. + * linux/powerpc/syscallent.h (iopl): Fix nargs and sys_func. + * linux/powerpc64/syscallent.h (iopl): Likewise. + +2016-04-20 Fei Jie + + tests: add ioperm.test. + * tests/ioperm.c: New file. + * tests/ioperm.test: New test. + * tests/.gitignore: Add ioperm. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioperm.test. + +2016-04-20 Dmitry V. Levin + + Fix corner cases of getgroups and setgroups syscall decoders. + * uid.c (print_groups): New function. + (SYS_FUNC(setgroups), SYS_FUNC(getgroups)): Use it. + Print first syscall argument using %u format. + * tests/getgroups.c: New file. + * tests/getgroups.test: New test. + * tests/getgroups32.c: New file. + * tests/getgroups32.test: New test. + * tests/setgroups.c: New file. + * tests/setgroups.test: New test. + * tests/setgroups32.c: New file. + * tests/setgroups32.test: New test. + * tests/.gitignore: Add getgroups, getgroups32, setgroups, + and setgroups32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getgroups.test, getgroups32.test, + setgroups.test, and setgroups32.test. + + Cleanup setfsuid syscall decoder. + * uid.c (SYS_FUNC(setfsuid)): Remove redundant check. + + tests: check decoding of setfsgid32 syscall. + * tests/setfsgid32.c: New file. + * tests/setfsgid32.test: New test. + * tests/.gitignore: Add setfsgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsgid32.test. + + tests: check decoding of setfsgid syscall. + * tests/setfsugid.c: New file. + * tests/setfsgid.c: New file. + * tests/setfsgid.test: New test. + * tests/.gitignore: Add setfsgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsgid.test. + (EXTRA_DIST): Add setfsugid.c. + + tests: check decoding of setfsuid32 syscall. + * tests/setfsuid32.c: New file. + * tests/setfsuid32.test: New test. + * tests/.gitignore: Add setfsuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsuid32.test. + + tests: check decoding of setfsuid syscall. + * tests/setfsugid.c: New file. + * tests/setfsuid.c: New file. + * tests/setfsuid.test: New test. + * tests/.gitignore: Add setfsuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsuid.test. + (EXTRA_DIST): Add setfsugid.c. + + tests: extend test coverage of setresgid32 syscall. + * tests/setresgid32.c: New file. + * tests/setresgid32.test: New test. + * tests/.gitignore: Add setresgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresgid32.test. + + tests: extend test coverage of setresgid syscall. + * tests/setresgid.c: New file. + * tests/setresgid.test: New test. + * tests/.gitignore: Add setresgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresgid.test. + + tests: extend test coverage of setresuid32 syscall. + * tests/setresuid32.c: New file. + * tests/setresuid32.test: New test. + * tests/.gitignore: Add setresuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresuid32.test. + + tests: extend test coverage of setresuid syscall. + * tests/setresugid.c: New file. + * tests/setresuid.c: New file. + * tests/setresuid.test: New test. + * tests/.gitignore: Add setresuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresuid.test. + (EXTRA_DIST): Add setresugid.c. + + tests: extend test coverage of setregid32 syscall. + * tests/setregid32.c: New file. + * tests/setregid32.test: New test. + * tests/.gitignore: Add setregid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setregid32.test. + + tests: extend test coverage of setregid syscall. + * tests/setregid.c: New file. + * tests/setregid.test: New test. + * tests/.gitignore: Add setregid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setregid.test. + + tests: extend test coverage of setreuid32 syscall. + * tests/setreuid32.c: New file. + * tests/setreuid32.test: New test. + * tests/.gitignore: Add setreuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setreuid32.test. + + tests: extend test coverage of setreuid syscall. + * tests/setreugid.c: New file. + * tests/setreuid.c: New file. + * tests/setreuid.test: New test. + * tests/.gitignore: Add setreuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setreuid.test. + (EXTRA_DIST): Add setreugid.c. + + tests: extend test coverage of setgid32 syscall. + * tests/setgid32.c: New file. + * tests/setgid32.test: New test. + * tests/.gitignore: Add setgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setgid32.test. + + tests: extend test coverage of setgid syscall. + * tests/setgid.c: New file. + * tests/setgid.test: New test. + * tests/.gitignore: Add setgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setgid.test. + + tests: extend test coverage of setuid32 syscall. + * tests/setuid32.c: New file. + * tests/setuid32.test: New test. + * tests/.gitignore: Add setuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setuid32.test. + + tests: extend test coverage of setuid syscall. + * tests/setugid.c: New file. + * tests/setuid.c: New file. + * tests/setuid.test: New test. + * tests/.gitignore: Add setuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setuid.test. + (EXTRA_DIST): Add setugid.c. + +2016-04-20 Fei Jie + + tests: add shmxt.test. + * tests/shmxt.c: New file. + * tests/shmxt.test: New test. + * tests/.gitignore: Add shmxt. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add shmxt.test. + +2016-04-20 Dmitry V. Levin + + alpha: fix decoding of shmat syscall. + On alpha, shmat syscall is known as osf_shmat. + + * linux/alpha/syscallent.h (osf_shmat): Fix sys_flags and sys_func. + +2016-04-20 Fei Jie + + tests: add semop.test. + * tests/semop.c: New file. + * tests/semop.test: New test. + * tests/.gitignore: Add semop. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add semop.test. + +2016-04-18 Dmitry V. Levin + + prctl-seccomp-filter-v.test: robustify against unrelated prctl invocations + * tests/prctl-seccomp-filter-v.test: Filter out PR_GET_* prctl calls. + + Reported-by: Steve McIntyre + +2016-04-18 Dmitry V. Levin + + tests/pselect6.c: fix potential output mismatch. + * tests/pselect6.c (main): In the last case of printing pselect6 + syscall, print the last argument the same way as in other cases. + + Reported-by: Steve McIntyre + +2016-04-18 Dmitry V. Levin + + tests: check decoding of fchown32 syscall. + * tests/fchown32.c: New file. + * tests/fchown32.test: New test. + * tests/.gitignore: Add fchown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchown32.test. + + tests: check decoding of fchown syscall. + * tests/fchown.c: New file. + * tests/fchown.test: New test. + * tests/.gitignore: Add fchown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchown.test. + + tests: check decoding of lchown32 syscall. + * tests/lchown32.c: New file. + * tests/lchown32.test: New test. + * tests/.gitignore: Add lchown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add lchown32.test. + + tests: check decoding of lchown syscall. + * tests/lchown.c: New file. + * tests/lchown.test: New test. + * tests/.gitignore: Add lchown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add lchown.test. + + tests: check decoding of chown32 syscall. + * tests/chown32.c: New file. + * tests/chown32.test: New test. + * tests/.gitignore: Add chown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chown32.test. + + tests: check decoding of chown syscall. + * tests/chown.c: New file. + * tests/chown.test: New test. + * tests/xchownx.c: New file. + * tests/.gitignore: Add chown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chown.test. + (EXTRA_DIST): Add xchownx.c. + + Fix decoding of 16-bit uid_t/git_t. + * uid.c (printuid): Always cast value to uid_t. + +2016-04-18 Dmitry V. Levin + + tests: move kernel uid overflow check to libtests. + This code used in two different places, so move it to the library. + + * tests/overflowuid.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/tests.h (check_overflowuid, check_overflowgid): New prototypes. + * tests/uid.c (main): Use check_overflowuid. + * tests/uid16.c (main): Likewise. + +2016-04-12 Dmitry V. Levin + + tests: skip seccomp-strict.test and prctl-seccomp-strict.test on x32. + As x86_64 kernel does not support x32 syscall numbers in + SECCOMP_MODE_STRICT, skip affected tests on x32. + + * tests/seccomp-strict.c (main) [__x86_64__ && __ILP32__]: Bail out + using error_msg_and_skip. + * tests/prctl-seccomp-strict.c: Likewise. + +2016-04-12 Dmitry V. Levin + + tests: add seccomp-filter.test. + * tests/seccomp-filter.c: New file. + * tests/seccomp-filter.test: New test. + * tests/.gitignore: Add seccomp-filter. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-filter.test. + +2016-04-12 Dmitry V. Levin + + seccomp: fix decoding of sock_fprog and sock_filter structures. + Always print struct sock_fprog.len. + Fix printing of unfetchable elements in sock_filter array. + Fix printing of large sock_filter arrays. + + * seccomp.c (decode_fprog): Rewrite into decode_seccomp_fprog and + print_seccomp_fprog. + (print_seccomp_filter): Replace decode_fprog with print_seccomp_fprog. + * tests/prctl-seccomp-filter-v.c (main): Update. + * tests/seccomp-filter-v.c: New file. + * tests/seccomp-filter-v.test: New test. + * tests/.gitignore: Add seccomp-filter-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-filter-v.test. + +2016-04-11 Dmitry V. Levin + + seccomp: print SECCOMP_* and BPF_* constants in a more compact way. + * seccomp.c (decode_bpf_code, decode_bpf_stmt): Replace " | " with "|". + * tests/prctl-seccomp-filter-v.c: Update. + + tests: rename seccomp.test to prctl-seccomp-filter-v.test. + * tests/.gitignore: Replace seccomp with prctl-seccomp-filter-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Replace seccomp.test with prctl-seccomp-filter-v.test. + * tests/seccomp.c: Rename to tests/prctl-seccomp-filter-v.c. + * tests/seccomp.test: Rename to tests/prctl-seccomp-filter-v.test. + + tests: add seccomp-strict.test. + * tests/seccomp-strict.c: New file. + * tests/seccomp-strict.test: New test. + * tests/.gitignore: Add seccomp-strict. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-strict.test. + + tests: add prctl-seccomp-strict.test. + * tests/prctl-seccomp-strict.c: New file. + * tests/prctl-seccomp-strict.test: New test. + * tests/.gitignore: Add prctl-seccomp-strict. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-seccomp-strict.test. + + tests: bring lists back to the sorted order. + +2016-04-10 Dmitry V. Levin + + tests/epoll_create1.c: extend for the case of ENOSYS. + * epoll_create1.c: Make the test work in case of epoll_create1 + returning ENOSYS. + + tests/epoll_ctl.c: extend epoll_ctl coverage. + * tests/epoll_ctl.c (main): Check EPOLL_CTL_DEL decoding. Check + decoding of long int descriptors and NULL struct epoll_event pointer. + +2016-04-09 Dmitry V. Levin + + tests: add mlockall.test. + * tests/mlockall.c: New file. + * tests/mlockall.test: New test. + * tests/.gitignore: Add mlockall. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mlockall.test. + +2016-04-08 Fei Jie + + tests: add epoll_wait.test. + * tests/epoll_wait.c: New file. + * tests/epoll_wait.test: New test. + * tests/.gitignore: Add epoll_wait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_wait.test. + + tests: add epoll_ctl.test. + * tests/epoll_ctl.c: New file. + * tests/epoll_ctl.test: New test. + * tests/.gitignore: Add epoll_ctl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_ctl.test. + + tests: add epoll_create.test. + * tests/epoll_create.c: New file. + * tests/epoll_create.test: New test. + * tests/.gitignore: Add epoll_create. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_create.test. + +2016-04-08 Dmitry V. Levin + + tests/pread64-pwrite64.c: minor cleanup. + * tests/pread64-pwrite64.c: Do not include . + +2016-04-07 Dmitry V. Levin + + Fix decoding of swapon flags. + * swapon.c (SYS_FUNC(swapon)): Print priority regardless + of SWAP_FLAG_PREFER flag being set. + * tests/swap.c (error_msg): Handle EINVAL. + (main): Check decoding of swapon flags. + + tests/unlinkat.c: check AT_* decoding. + * tests/unlinkat.c (main): Check decoding of AT_* constants. + + tests/linkat.c: check AT_* decoding. + * tests/linkat.c (main): Check decoding of AT_* constants. + +2016-04-06 Elliott Hughes + + Improve decoding of Android's PR_SET_VMA prctl. + Before: + + prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096, + "atexit handlers") = 0 + + After: + + prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096, + "atexit handlers") = 0 + + * prctl.c (SYS_FUNC(prctl)) [__ANDROID__]: Do not define PR_SET_VMA. + * Hard-code PR_SET_VMA_ANON_NAME, the only current sub-option. + * xlat/prctl_options.in: Add PR_SET_VMA. + +2016-04-06 Fei Jie + + tests: add mkdirat.test. + * tests/mkdirat.c: New file. + * tests/mkdirat.test: New test. + * tests/.gitignore: Add mkdirat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mkdirat.test. + + tests: add swap.test. + * tests/swap.c: New file. + * tests/swap.test: New test. + * tests/.gitignore: Add swap. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add swap.test. + + tests: add unlinkat.test. + * tests/unlinkat.c: New file. + * tests/unlinkat.test: New test. + * tests/.gitignore: Add unlinkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unlinkat.test. + + tests: add linkat.test. + * tests/linkat.c: New file. + * tests/linkat.test: New test. + * tests/.gitignore: Add linkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add linkat.test. + +2016-04-06 Dmitry V. Levin + + tests: add sync_file_range.test and sync_file_range2.test. + * configure.ac (AC_CHECK_FUNCS): Add sync_file_range. + * tests/sync_file_range.c: New file. + * tests/sync_file_range2.c: Likewise. + * tests/sync_file_range.test: New test. + * tests/sync_file_range2.test: Likewise. + * tests/.gitignore: Add sync_file_range and sync_file_range2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sync_file_range.test and sync_file_range2.test. + +2016-04-05 Dmitry V. Levin + + Add default values for SYNC_FILE_RANGE_* constants. + * xlat/sync_file_range_flags.in: Add default values. + +2016-04-05 Elliott Hughes + + Fix sync_file_range2 output. + Before: + + sync_file_range2(3SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| + SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0, ) + + After: + + sync_file_range2(3, SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| + SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0) + + * sync_file_range.c (SYS_FUNC(sync_file_range2)): Output the ", " + in the right place. + +2016-04-04 Dmitry V. Levin + + Replace PF_* constants with AF_* + AF_* constants appear to be more standardized, and in practice there's + always a one to one relationship between AF_* and PF_*, so let's + use AF_* instead of PF_*. + + * xlat/domains.in: Remove. + * net.c: Do not define PF_UNSPEC. Stop including "xlat/domains.h". + Replace PF_* with AF_*. Replace domains with addrfams. + * tests/inet-cmsg.c: Replace PF_INET with AF_INET. + * tests/net-yy-inet.c: Likewise. + * tests/netlink_inet_diag.c: Likewise. + * tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL. + * tests/net-y-unix.c: Likewise. + * tests/net-yy-unix.c: Likewise. + * tests/netlink_unix_diag.c: Likewise. + * tests/net.expected: Replace PF_ with AF_. + +2016-04-03 Dmitry V. Levin + + tests: add read-write.test. + * tests/read-write.c: New file. + * tests/read-write.test: New test. + * tests/.gitignore: Add read-write. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add read-write.test. + +2016-04-02 Dmitry V. Levin + + tests/pread64-pwrite64.test: extend dumpio coverage. + * tests/pread64-pwrite64.c (dump_str, print_hex, test_dump): + New functions. + (main): Use them to test dumping of various data. + * tests/pread64-pwrite64.test: Update. + + tests: add hexdump_memdup function to libtests. + * tests/hexdump_strdup.c (hexdump_memdup): New function. + (hexdump_strdup): Use it. + * tests/tests.h (hexdump_memdup): New prototype. + + tests: add fchownat.test. + * tests/fchownat.c: New file. + * tests/fchownat.test: New test. + * tests/.gitignore: Add fchownat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchownat.test. + + tests: add fchmodat.test. + * tests/fchmodat.c: New file. + * tests/fchmodat.test: New test. + * tests/.gitignore: Add fchmodat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchmodat.test. + + Fix printing of negative offsets in pread64 and pwrite64 syscalls. + * io.c (SYS_FUNC(pread), SYS_FUNC(pwrite)): Print offset + using %lld format string. + * tests/pread64-pwrite64.c: New file. + * tests/pread64-pwrite64.test: New test. + * tests/.gitignore: Add pread64-pwrite64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (pread64_pwrite64_CPPFLAGS): New variable. + (DECODER_TESTS): Add pread64-pwrite64. + + tests/hexdump_strdup.c: add support for longer strings. + * tests/hexdump_strdup.c (hexdump_strdup): Output extra space character + before hexdumping of the 9th symbol. + + tests/preadv-pwritev.c: fix typo in error diagnostics. + * tests/preadv-pwritev.c (main): Fix typo in error message. + +2016-04-01 Fei Jie + + tests: add chroot.test. + * tests/chroot.c: New file. + * tests/chroot.test: New test. + * tests/.gitignore: Add chroot. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chroot.test. + + tests: add fdatasync.test. + * tests/fdatasync.c: New file. + * tests/fdatasync.test: New test. + * tests/.gitignore: Add fdatasync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fdatasync.test. + + tests: add fsync.test. + * tests/fsync.c: New file. + * tests/fsync.test: New test. + * tests/.gitignore: Add fsync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fsync.test. + + tests: add sethostname.test. + * tests/sethostname.c: New file. + * tests/sethostname.test: New test. + * tests/.gitignore: Add sethostname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sethostname.test. + +2016-04-01 Dmitry V. Levin + + Consistently handle unsigned arguments of mmap* and remap_file_pages. + Explicitly declare first 4 arguments of mmap* and all remap_file_pages + arguments as unsigned to avoid potential sign extension issues. + + * mem.c (print_mmap, SYS_FUNC(remap_file_pages)): Assign syscall + arguments to local variables of appropriate types. + +2016-04-01 Dmitry V. Levin + + Consistently handle 2nd and 3rd arguments of [gs]etsockopt as unsigned. + The second (level) and third (optname) arguments of getsockopt and + setsockopt syscalls are enums, so treat them consistently as enums: + use "unsigned int" type to avoid potential sign extension issues. + + * net.c (print_sockopt_fd_level_name, print_getsockopt, + print_setsockopt): Change type of "level" and "name" arguments + from "int" to "unsigned int". + +2016-04-01 Dmitry V. Levin + + Add sentinel attribute to printxvals. + * gcc_compat.h (ATTRIBUTE_SENTINEL): New macro. + * defs.h (printxvals): Add ATTRIBUTE_SENTINEL. + + Cleanup parser of ptrace syscall. + * process.c (print_user_offset_addr): New function for printing offset + address in the tracee's USER area. + (SYS_FUNC(ptrace)): Assign syscall arguments to local variables with + appropriate types. Print pid argument as int. Use switch statement + in the code that handles address argument. Use print_user_offset_addr + to print address in PTRACE_PEEKUSER and PTRACE_POKEUSER requests. + +2016-03-31 Jeff Mahoney + + Define PRI__[uxs]64 macros to print __s64 and __u64 values. + Rather than cast every __u64 or __s64 before printing, + define printing helpers for those types directly. + + * defs.h (PRI__s64, PRI__u64, PRI__x64): New macros. + +2016-03-31 Dmitry V. Levin + + Implement dumping of preadv and pwritev syscalls. + * syscall.c (dumpio): Add SEN_preadv and SEN_pwritev. + * NEWS: Mention this. + * tests/preadv-pwritev.c: New file. + * tests/preadv-pwritev.test: New test. + * tests/.gitignore: Add preadv-pwritev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (preadv_pwritev_CPPFLAGS): New variable. + (DECODER_TESTS): Add preadv-pwritev. + +2016-03-30 Dmitry V. Levin + + Fix decoding of preadv syscall in case of short read. + * io.c (SYS_FUNC(preadv)): Call tprint_iov_upto instead + of tprint_iov and specify syscall return value as a data size limit. + * NEWS: Mention it. + * tests/preadv.c (main): Add a test case for preadv short read. + + Fix printing of negative offsets in preadv and pwritev syscalls. + * io.c (print_llu_from_low_high_val): Rename to + print_lld_from_low_high_val, all callers changed. + Print value as a signed integer. + * tests/preadv.c: New file. + * tests/preadv.test: New test. + * tests/pwritev.c: New file. + * tests/pwritev.test: New test. + * tests/.gitignore: Add preadv and pwritev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (preadv_CPPFLAGS, pwritev_CPPFLAGS): New variables. + (DECODER_TESTS): Add preadv.test and pwritev.test. + + Fix printing of unreadable struct iovec. + * io.c (tprint_iov_upto): If the first element of iovec array is + unreadable, print its address without array markup. + * tests/readv.c (main): Check it. + + tests: factor out a part common to many simply organized test scripts. + * tests/init.sh (run_strace_match_diff): New function. + * tests/acct.test: Rewrite using run_strace_match_diff. + * tests/aio.test: Likewise. + * tests/alarm.test: Likewise. + * tests/chmod.test: Likewise. + * tests/clock_nanosleep.test: Likewise. + * tests/clock_xettime.test: Likewise. + * tests/copy_file_range.test: Likewise. + * tests/creat.test: Likewise. + * tests/dup.test: Likewise. + * tests/dup2.test: Likewise. + * tests/dup3.test: Likewise. + * tests/epoll_create1.test: Likewise. + * tests/execveat-v.test: Likewise. + * tests/execveat.test: Likewise. + * tests/fchmod.test: Likewise. + * tests/fcntl.test: Likewise. + * tests/file_handle.test: Likewise. + * tests/flock.test: Likewise. + * tests/fork-f.test: Likewise. + * tests/ftruncate.test: Likewise. + * tests/ftruncate64.test: Likewise. + * tests/getcwd.test: Likewise. + * tests/getdents.test: Likewise. + * tests/getdents64.test: Likewise. + * tests/getrandom.test: Likewise. + * tests/getrusage.test: Likewise. + * tests/getxxid.test: Likewise. + * tests/inet-cmsg.test: Likewise. + * tests/init.sh: Likewise. + * tests/membarrier.test: Likewise. + * tests/mincore.test: Likewise. + * tests/mknod.test: Likewise. + * tests/mlock2.test: Likewise. + * tests/mmsg.test: Likewise. + * tests/nanosleep.test: Likewise. + * tests/open.test: Likewise. + * tests/openat.test: Likewise. + * tests/pselect6.test: Likewise. + * tests/readdir.test: Likewise. + * tests/readlink.test: Likewise. + * tests/readv.test: Likewise. + * tests/recvmsg.test: Likewise. + * tests/rename.test: Likewise. + * tests/renameat.test: Likewise. + * tests/rt_sigpending.test: Likewise. + * tests/rt_sigprocmask.test: Likewise. + * tests/rt_sigqueueinfo.test: Likewise. + * tests/rt_sigsuspend.test: Likewise. + * tests/rt_sigtimedwait.test: Likewise. + * tests/rt_tgsigqueueinfo.test: Likewise. + * tests/sched_get_priority_mxx.test: Likewise. + * tests/sched_xetaffinity.test: Likewise. + * tests/sched_xetparam.test: Likewise. + * tests/sched_xetscheduler.test: Likewise. + * tests/seccomp.test: Likewise. + * tests/select.test: Likewise. + * tests/sendfile.test: Likewise. + * tests/sendfile64.test: Likewise. + * tests/splice.test: Likewise. + * tests/statx.sh: Likewise. + * tests/sysinfo.test: Likewise. + * tests/syslog.test: Likewise. + * tests/tee.test: Likewise. + * tests/time.test: Likewise. + * tests/timer_create.test: Likewise. + * tests/timer_xettime.test: Likewise. + * tests/timerfd_xettime.test: Likewise. + * tests/times-fail.test: Likewise. + * tests/times.test: Likewise. + * tests/truncate.test: Likewise. + * tests/truncate64.test: Likewise. + * tests/umask.test: Likewise. + * tests/umount.test: Likewise. + * tests/umount2.test: Likewise. + * tests/userfaultfd.test: Likewise. + * tests/vmsplice.test: Likewise. + * tests/xet_robust_list.test: Likewise. + * tests/xetitimer.test: Likewise. + * tests/xetpgid.test: Likewise. + * tests/xetpriority.test: Likewise. + * tests/xettimeofday.test: Likewise. + + tests: introduce $NAME. + * tests/init.sh (NAME): New variable, defined to ${ME_%.test}. + (run_prog, match_awk, match_diff, match_grep): Replace ${ME_%.test} + with $NAME. + * tests/fcntl.test: Likewise. + * tests/fstat.test: Likewise. + * tests/mmap.test: Likewise. + * tests/net-y-unix.test: Likewise. + * tests/net-yy-inet.test: Likewise. + * tests/net-yy-unix.test: Likewise. + * tests/open.test: Likewise. + * tests/openat.test: Likewise. + * tests/poll.test: Likewise. + * tests/ppoll.test: Likewise. + * tests/readlink.test: Likewise. + * tests/select.test: Likewise. + * tests/statx.sh: Likewise. + * tests/uname.test: Likewise. + +2016-03-30 Dmitry V. Levin + + tests: move definitions of $OUT and $ERR to init.sh. + As virtually every test defines either one or both of OUT and ERR + variables and these definitions are exactly the same, move definitions + of these variables from individual tests to init.sh. + + * tests/init.sh (OUT, ERR): New variables. + * tests/ipc.sh: Remove initialization of OUT variable. + * tests/statx.sh: Likewise. + * tests/*.test: Remove initialization of OUT and ERR variables. + +2016-03-29 Dmitry V. Levin + + tests: simplify sendfile.test and sendfile64.test. + Use the executable itself for input by default. + + * tests/sendfile.c (main): Use av[0] instead of av[1] for input. + * tests/sendfile64.c (main): Likewise. + * tests/sendfile.test: Invoke run_prog without arguments. + * tests/sendfile64.test: Likewise. + +2016-03-29 Dmitry V. Levin + + open.test, openat.test: lift /proc requirement. + While -P option needs /proc to match descriptors, it does not use + /proc to match pathnames. As these tests do not need descriptor + match, the /proc requirement can be safely lifted. + + * tests/open.test: Lift /proc/self/fd/ requirement. + * tests/openat.test: Likewise. + +2016-03-29 Dmitry V. Levin + + quotactl: add decoding of Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA. + * quota.c (if_nextdqblk): New structure. + (decode_cmd_data): Handle Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA. + + Update Q_* constants. + * xlat/quotacmds.in: Add Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA introduced + by linux kernel commits v4.6-rc1~65^2~9^2~5 and v4.6-rc1~65^2~9^2~6. + + Update CLONE_* constants. + * xlat/clone_flags.in: Rename CLONE_STOPPED to CLONE_NEWCGROUP. + The former was removed by linux kernel commit v2.6.38-rc1~217. + The latter was introduced by linux kernel commit v4.6-rc1~67^2~8. + + Update BPF_MAP_TYPE_* constants. + * xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERCPU_HASH, + BPF_MAP_TYPE_PERCPU_ARRAY, and BPF_MAP_TYPE_STACK_TRACE introduced by + linux kernel commits v4.6-rc1~91^2~326^2~5, v4.6-rc1~91^2~326^2~4, and + v4.6-rc1~91^2~212^2~1, respectively. + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_CNX_ADVICE introduced by linux kernel + commit v4.6-rc1~91^2~176. + + Update SEGV_* constants. + * xlat/sigsegv_codes.in: Add SEGV_PKUERR introduced by linux kernel + commit v4.6-rc1~68^2~23. + + avr32: wire up copy_file_range syscall. + * linux/avr32/syscallent.h [325]: Add copy_file_range entry. + +2016-03-28 JayRJoshi + + tests/uname.test: check abbreviated output, use print_quoted_string. + * tests/uname.c (main): Use print_quoted_string to print + utsname members. Add abbrev check. + * tests/uname.test: Add abbrev check. + +2016-03-28 Dmitry V. Levin + + faccessat.test: robustify against libcs invoking faccessat syscall on their own + * tests/faccessat.c (TMP_FILE): Rename to sample, change its value + to "faccessat.sample". + * tests/faccessat.test: Rewrite using openat.test. + + openat.test: robustify against libcs invoking openat syscall on their own + * tests/openat.c (main): Rename fname to sample, change its value + to "openat.sample". + * tests/openat.test: Use -P option to filter out openat syscalls + made by libc and dynamic linker. + + tests: add open.test. + * tests/open.c: New file. + * tests/open.test: New test. + * tests/.gitignore: Add open. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add open.test. + +2016-03-27 Dmitry V. Levin + + Update generic ioctl entries from linux 4.5. + * linux/64/ioctls_inc.h: Update from linux v4.5 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + * NEWS: Mention this. + +2016-03-26 Dmitry V. Levin + + maint: update for linux 4.5. + * maint/ioctls_sym.sh: Update workarounds for drm/*_drm.h files. + Add workarounds for xen/gntdev.h and net/nfc/nci_core.h files. + Update path of saa6588.h and exynos-fimc.h files. + +2016-03-25 Dmitry V. Levin + + Fix decoding of device numbers in mknod and mknodat syscalls. + * mknod.c (decode_mknod): Treat device number argument as unsigned int. + * tests/mknod.c: Include or + for definition of makedev macro. + (main): Add a check for a character special file. + +2016-03-25 Dmitry V. Levin + + sparc64: fix decoding of mknod and mknodat syscalls for sparc personality + Remove remnants of solaris personality support in mknod parser + that resulted to sparc personality being decoded as old solaris + personality. This complements commit v4.10-45-gdf4dd8b and fixes + commit v4.10-46-g588a90f. + + * mknod.c (decode_mknod) [SPARC || SPARC64]: Remove. + +2016-03-25 Katerina Koukiou + + tests: add openat.test. + * tests/openat.c: New file. + * tests/openat.test: New test. + * tests/.gitignore: Add openat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add openat.test. + +2016-03-25 Fei Jie + + tests: add renameat.test. + * tests/renameat.c: New file. + * tests/renameat.test: New test. + * tests/.gitignore: Add renameat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add renameat.test. + + tests: add faccessat.test. + * tests/faccessat.c: New file. + * tests/faccessat.test: New test. + * tests/.gitignore: Add faccessat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add faccessat.test. + + tests: add creat.test. + * tests/creat.c: New file. + * tests/creat.test: New test. + * tests/.gitignore: Add creat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add creat.test. + + tests: add mknod.test. + * tests/mknod.c: New file. + * tests/mknod.test: New test. + * tests/.gitignore: Add mknod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mknod.test. + + tests: add syslog.test. + * tests/syslog.c: New file. + * tests/syslog.test: New test. + * tests/.gitignore: Add syslog. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add syslog.test. + +2016-03-23 JayRJoshi + + tests/scm_rights-fd.test: fix pathname regex. + Pathname containing >, }, or non-printable characters was resulting + in failing of the test. + + * tests/scm_rights-fd.test: Fix pathname regex and simplify things. + +2016-03-24 Dmitry V. Levin + + tests: add strace-r.test. + * tests/strace-r.expected: New file. + * tests/strace-r.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + (EXTRA_DIST): Add strace-r.expected. + + tests: add strace-ttt.test. + * tests/strace-ttt.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-tt.test. + * tests/strace-tt.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-t.test. + * tests/strace-t.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-T.test. + * tests/strace-T.expected: New file. + * tests/strace-T.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + (EXTRA_DIST): Add strace-T.expected. + +2016-03-23 Dmitry V. Levin + + tests: split out tests of specific decoders. + Split TESTS into three groups: tests of specific decoders, libunwind + tests, and all other tests. + + * tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test, + bexecve.test, count-f.test, count.test, detach-running.test, + detach-sleeping.test, detach-stopped.test, dumpio.test, + filter-unavailable.test, fork-f.test, ksysent.test, opipe.test, + pc.test, qual_syscall.test, redirect.test, restart_syscall.test, + strace-f.test, and vfork-f.test to MISC_TESTS. + Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS. + Add $(DECODER_TESTS) and $(MISC_TESTS). + +2016-03-23 JayRJoshi + + tests: add getcwd.test. + * tests/getcwd.c: New file. + * tests/getcwd.test: New test. + * tests/.gitignore: Add getcwd. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add getcwd.test. + + tests: add print_quoted_string function to libtests. + * tests/tests.h (print_quoted_string): New prototype. + * tests/print_quoted_string.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-03-17 Fei Jie + + tests: add xetpriority.test. + * resource.c (SYS_FUNC(getpriority), SYS_FUNC(setpriority)): Print + the second syscall argument using %d format. + * tests/xetpriority.c: New file. + * tests/xetpriority.test: New test. + * tests/.gitignore: Add xetpriority. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add xetpriority.test. + +2016-03-15 Fei Jie + + tests: add flock.test. + * tests/flock.c: New file. + * tests/flock.test: New test. + * tests/.gitignore: Add flock. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add flock.test. + + tests: add sched_xetscheduler.test. + * tests/sched_xetscheduler.c: New file. + * tests/sched_xetscheduler.test: New test. + * tests/.gitignore: Add sched_xetscheduler. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_xetscheduler.test. + +2016-03-15 Dmitry V. Levin + + alpha: fix SOCK_DIAG_BY_FAMILY tests. + This complements commit v4.9-368-g301c65c. + + * tests/netlink_inet_diag.c (check_responses): Align "buf" + on sizeof(long) boundary. + * tests/netlink_unix_diag.c (check_responses): Likewise. + +2016-03-14 Dmitry V. Levin + + Update EPOLL* constants. + * xlat/epollevents.in: Add EPOLLWAKEUP and EPOLLEXCLUSIVE. + +2016-03-12 Dmitry V. Levin + + tests: add count-f.test. + * tests/count-f.c: New file. + * tests/count-f.expected: Likewise. + * tests/count-f.test: New test. + * tests/.gitignore: Add count-f. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (count_f_LDADD): New variable. + (EXTRA_DIST): Add count-f.expected. + (TESTS): Add count-f.test. + +2016-02-21 Dmitry V. Levin + + hppa: wire up copy_file_range syscall. + * linux/hppa/syscallent.h [346]: Add copy_file_range entry. + +2016-03-11 Fei Jie + + tests: filter strace output in uname test. + * tests/uname.test: Use uniq to filter strace output. + +2016-03-10 Fei Jie + + tests: add sched_xetparam.test. + * tests/sched_xetparam.c: New file. + * tests/sched_xetparam.test: New test. + * tests/.gitignore: Add sched_xetparam. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_xetparam.test. + + tests: add sched_get_priority_mxx.test. + * tests/sched_get_priority_mxx.c: New file. + * tests/sched_get_priority_mxx.test: New test. + * tests/.gitignore: Add sched_get_priority_mxx. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_get_priority_mxx.test. + + tests: add dup.test, dup2.test, and dup3.test. + * tests/dup.c: New file. + * tests/dup.test: New test. + * tests/dup2.c: New file. + * tests/dup2.test: New test. + * tests/dup3.c: New file. + * tests/dup3.test: New test. + * tests/.gitignore: Add dup, dup2, and dup3. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add dup.test, dup2.test, and dup3.test. + +2016-03-10 Fabien Siron + + tests: add fchmod.test. + * tests/fchmod.c: New file. + * tests/fchmod.test: New test. + * tests/.gitignore: Add fchmod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add fchmod.test. + +2016-03-09 Fei Jie + + tests: add acct.test. + * tests/acct.c: New file. + * tests/acct.test: New test. + * tests/.gitignore: Add acct. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add acct.test. + +2016-03-07 Anchit Jain + + tests: add chmod.test. + * tests/chmod.c: New file. + * tests/chmod.test: New test. + * tests/.gitignore: Add chmod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add chmod.test. + +2016-03-05 Nahim El Atmani + + Reduce memory usage while managing tcbs allocation. + * strace.c (init): Remove initial memory allocation for tcbtab. + (expand_tcbtab): Do initial memory allocation when tcbtabsize == 0. + + Reviewed-By: Gabriel Laskar + Reported-by: haris iqbal + +2016-03-01 Fei Jie + + tests: add umask.test. + * tests/umask.c: New file. + * tests/umask.test: New test. + * tests/.gitignore: Add umask. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add umask.test. + + tests: add rename.test. + * tests/rename.c: New file. + * tests/rename.test: New test. + * tests/.gitignore: Add rename. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rename.test. + + tests: add uname.test. + * tests/uname.c: New file. + * tests/uname.test: New test. + * tests/.gitignore: Add uname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add uname.test. + +2016-02-20 Dmitry V. Levin + + mips: wire up copy_file_range syscall. + * linux/mips/syscallent-n32.h [6324]: Add copy_file_range entry. + * linux/mips/syscallent-n64.h [5320]: Likewise. + * linux/mips/syscallent-o32.h [4360]: Likewise. + +2016-02-19 Dmitry V. Levin + + tests: add rt_sigsuspend.test. + * tests/rt_sigsuspend.c: New file. + * tests/rt_sigsuspend.test: New test. + * tests/.gitignore: Add rt_sigsuspend. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigsuspend.test. + + Print pid_t arguments of rt_sigqueueinfo and rt_tgsigqueueinfo as int. + * signal.c (SYS_FUNC(rt_sigqueueinfo)): Print first syscall argument + using %d format. + (SYS_FUNC(rt_tgsigqueueinfo)): Print first and second syscall arguments + using %d format. + * tests/rt_tgsigqueueinfo.c: New file. + * tests/rt_tgsigqueueinfo.test: New test. + * tests/.gitignore: Add rt_tgsigqueueinfo. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_tgsigqueueinfo.test. + + getrusage.test: fix build on x32. + * tests/getrusage.c: Include + (main): Print members of struct timeval using %ju format. + +2016-02-19 Dmitry V. Levin + + getrusage.test: check that getrusage parser does not access extra memory + Place struct rusage at the end of an allocated memory page followed by + an inaccessible page. + + * tests/getrusage.c (main): Use tail_alloc. + +2016-02-19 Fei Jie + + tests: add getrusage.test. + * tests/getrusage.c: New file. + * tests/getrusage.test: New test. + * tests/.gitignore: Add getrusage. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add getrusage.test. + +2016-02-19 Dmitry V. Levin + + Print rt_sigtimedwait return value as a signal name. + * signal.c (SYS_FUNC(rt_sigtimedwait)): Decode return value. + * tests/rt_sigtimedwait.c: New file. + * tests/rt_sigtimedwait.test: New test. + * tests/.gitignore: Add rt_sigtimedwait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigtimedwait.test. + + tests: add rt_sigprocmask.test. + * tests/rt_sigprocmask.c: New file. + * tests/rt_sigprocmask.test: New test. + * tests/.gitignore: Add rt_sigprocmask. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigprocmask.test. + + Fix corner cases of rt_sigpending syscall decoder. + * signal (print_sigset_addr_len_limit): New function, cloned from + print_sigset_addr_len with added minimal length argument. + Treat length less than minimal length or greater than NSIG/8 as invalid. + Do not align length to 4-byte boundary. Align destination buffer + to 4-byte boundary and initialize it with zeroes so that subsequent + call to sprintsigmask_n will not access uninitialized data. + (print_sigset_addr_len): Turn into a wrapper around + print_sigset_addr_len_limit with current_wordsize + as a minimal length argument. + (SYS_FUNC(rt_sigpending)): Call print_sigset_addr_len_limit + instead of print_sigset_addr_len with 1 as a minimal length argument. + * tests/rt_sigpending.c: New file. + * tests/rt_sigpending.test: New test. + * tests/.gitignore: Add rt_sigpending. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigpending.test. + +2016-02-19 Dmitry V. Levin + + Change unix_diag requests back to use full dump instead of exact match. + Unfortunately, 64-bit linux kernel has a bug in matching inode numbers + greater than INT_MAX, so unix_diag exact match is not reliable. + + This partially reverts commit 69bfc89770152033d4aa0bc5673fc46e65d89838. + + * socketutils.c (unix_send_query): Add NLM_F_DUMP to nlmsg_flags, + remove initialization of udiag_cookie. + * tests/netlink_unix_diag.c (send_query): Remove "inode" argument, + add NLM_F_DUMP to nlmsg_flags, remove initialization of udiag_ino + and udiag_cookie. + (check_responses): Remove "inode" argument and its use. + (main): Remove invocation of inode_of_sockfd and passing of listening + socket inode to send_query and check_responses. + +2016-02-19 Michael Shigorin + + tests: avoid using cpp -dD. + -dD is less portable across some peculiar preprocessors. + + tests/Makefile.am (ksysent.h): Use cpp -dM instead of cpp -dD. + +2016-02-16 Dmitry V. Levin + + tests: add poll.test. + * tests/poll.c: New file. + * tests/poll.test: New test. + * tests/.gitignore: Add poll. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add poll.test. + + Fix abbreviated output of poll and ppoll decoders. + * poll.c (decode_poll_entering, decode_poll_exiting): Fix corner cases + of abbreviated output. + * tests/ppoll-v.expected: Update. + * tests/ppoll.expected: Update. + * tests/ppoll.test: Update. + + Print unfetchable address in poll and ppoll decoders. + * poll.c (decode_poll_entering): Replace umove call with + umove_or_printaddr. + (decode_poll_exiting): Print unfetchable address when umove call fails. + + Print offsets in lseek and _llseek syscalls as signed integers. + * lseek.c (SYS_FUNC(lseek)): Print offset using %lld format. + (SYS_FUNC(llseek)): Likewise. Treat high and low components of offset + as unsigned long integers. + * tests/llseek.c (main): Check that negative offset is printed properly. + * tests/lseek.c (main): Likewise. + +2016-02-14 Dmitry V. Levin + + tests: add xetpgid.test. + * tests/xetpgid.c: New file. + * tests/xetpgid.test: New test. + * tests/.gitignore: Add xetpgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add xetpgid.test. + + tests: add alarm.test. + * tests/alarm.c: New file. + * tests/alarm.test: New test. + * tests/.gitignore: Add alarm. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add alarm.test. + + Replace printargs_lu and printargs_ld with printargs_u and printargs_d. + * defs.h (printargs_lu): Rename to printargs_u. + (printargs_ld): Rename to printargs_d. + * syscall.c (printargs_lu): Rename to printargs_u. Replace %lu with %u. + (printargs_ld): Rename to printargs_d. Replace %ld with %d. + * linux/dummy.h (sys_getpgrp): Change to printargs. + (sys_alarm): Change to printargs_u. + (sys_getpgid, sys_getsid, sys_nice, sys_setpgid, sys_setpgrp, + sys_timer_delete, sys_timer_getoverrun): Change to printargs_d. + + Change printargs_lu and printargs_ld to return RVAL_DECODED. + * syscall.c (printargs_lu, printargs_ld): Return RVAL_DECODED. + + redirect.test: fix the way how strace output is discarded. + * tests/redirect.test: Disable tracing of syscalls, signals, + and exit status instead of redirecting strace output to /dev/null. + + tests: extend coverage of struct iovec arrays. + * tests/readv.c (main): Check decoding of empty, inaccessible, + and partially inaccessible iovec arrays. + * tests/readv.test: Update. + + Implement dumping of vmsplice syscall. + * syscall.c (dumpio): Add SEN_vmsplice. + * NEWS: Mention this. + * tests/vmsplice.c: New file. + * tests/vmsplice.test: New test. + * tests/.gitignore: Add vmsplice. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add vmsplice.test. + + tests: add tee.test. + * tests/tee.c: New file. + * tests/tee.test: New test. + * tests/.gitignore: Add tee. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add tee.test. + + Fix printing of negative offsets in splice syscall. + * io.c (SYS_FUNC(splice)): Use PRId64 instead of PRIu64 for printing + offsets. + * tests/splice.c: New file. + * tests/splice.test: New test. + * tests/.gitignore: Add splice. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add splice.test. + + Implement copy_file_range syscall decoding. + * copy_file_range.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/32/syscallent.h (copy_file_range): New entry. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * pathtrace.c (pathtrace_match): Add SEN_copy_file_range. + * NEWS: Mention new syscall parser. + * tests/copy_file_range.c: New file. + * tests/copy_file_range.test: New test. + * tests/.gitignore: Add copy_file_range. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add copy_file_range.test. + + Update fs *_MAGIC constants. + * xlat/fsmagic.in: Add CGROUP2_SUPER_MAGIC and OVERLAYFS_SUPER_MAGIC. + + Update IPV6_* constants. + * xlat/sockipv6options.in: Add IPV6_HDRINCL. + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_ATTACH_REUSEPORT_CBPF + and SO_ATTACH_REUSEPORT_EBPF. + + Update MADV_* constants. + * xlat/madvise_cmds.in: Add MAD_FREE. + +2016-02-13 Dmitry V. Levin + + tests: robustify execve and execveat tests. + * tests/execve.c (main): Use one page gap between two mapped regions + for an address that is more likely to be not yet mapped. + * tests/execveat.c (main): Likewise. + + tests: simplify execve test. + * tests/execve.c (main): Simplify the test assuming that execve syscall + never returns ENOSYS. + +2016-02-13 Dmitry V. Levin + + Fix numbers of syscall arguments in syscall tables. + This semi-automatic change brings syscall tables in sync with kernel's + include/linux/syscalls.h file. + + * linux/aarch64/syscallent.h (recv): Fix nargs. + * linux/alpha/syscallent.h (sigaltstack, init_module, + sched_getscheduler, settimeofday): Likewise. + * linux/arm/syscallent.h (signal, pciconfig_iobase, msgrcv, msgctl, + shmat, shmdt, shmctl, semtimedop, get_mempolicy, set_mempolicy, + timerfd_create): Likewise. + * linux/bfin/syscallent.h (signal, delete_module): Likewise. + * linux/hppa/syscallent.h (init_module, munlockall, sched_getscheduler, + io_cancel, set_tid_address, listxattr, llistxattr, flistxattr, + removexattr, lremovexattr, fremovexattr): Likewise. + * linux/i386/syscallent.h (signal, mmap): Likewise. + * linux/ia64/syscallent.h (init_module, readv, writev, + sched_getscheduler): Likewise. + * linux/m68k/syscallent.h (signal, request_key): Likewise. + * linux/microblaze/syscallent.h (signal, clone, fstatfs64, vmsplice): + Likewise. + * linux/mips/syscallent-n32.h (getpgid, statfs, fstatfs, init_module, + delete_module): Likewise. + * linux/mips/syscallent-n64.h (getpgid, statfs, fstatfs, init_module, + delete_module): Likewise. + * linux/mips/syscallent-o32.h (signal, statfs, fstatfs, ioperm, + fstatfs64): Likewise. + * linux/powerpc/syscallent.h (signal, spu_run, spu_create): Likewise. + * linux/powerpc64/syscallent.h (signal, pread64, pwrite64, readahead, + fadvise64, lookup_dcookie, spu_run, spu_create, sync_file_range2, + fallocate, preadv, pwritev, fanotify_mark): Likewise. + * linux/s390/syscallent.h (signal, mmap, lookup_dcookie, ipc): Likewise. + * linux/s390x/syscallent.h (signal, ipc): Likewise. + * linux/sh/syscallent.h (signal, ipc, munlockall, fstatfs64, vmsplice): + Likewise. + * linux/sh64/syscallent.h (signal, ipc, msgrcv, msgctl, shmat, shmdt, + shmctl, fstatfs64, vmsplice): Likewise. + * linux/sparc/syscallent.h (ptrace, dup, signal, ipc): Likewise. + * linux/sparc64/syscallent.h (ptrace, dup, signal, pread64, pwrite64, + readahead, lookup_dcookie, fadvise64, fadvise64_64, ipc, + sync_file_range, fallocate, preadv, pwritev, fanotify_mark): Likewise. + * linux/x32/syscallent.h (64:recvmsg): Likewise. + * linux/xtensa/syscallent.h (mremap, futex, reboot, init_module, + delete_module, request_key, getcpu, ioprio_set, ioprio_get, utimensat, + futimesat, fchmodat, faccessat): Likewise. + * NEWS: Mention this fix. + +2016-02-13 Dmitry V. Levin + + s390: decode fadvise64 and fadvise64_64. + * linux/s390/syscallent.h (fadvise64): Set sys_func. + (fadvise64_64): Set nargs and sys_func. + + mips n64: use the most optimal parser for fadvise64 syscall. + * linux/mips/syscallent-n64.h (fadvise64): Replace SEN(fadvise64_64) + with SEN(fadvise64). + + ia64: decode fstatfs64 and statfs64. + * linux/ia64/syscallent.h (fstatfs64, statfs64): Set nargs and sys_func. + +2016-02-13 Dmitry V. Levin + + alpha, ia64, mips, sh, sh64: fix the number of pipe syscall arguments. + On alpha, ia64, mips, sh, sh64, sparc, and sparc64 architectures + pipe syscall does not take arguments. + + * linux/alpha/syscallent.h (pipe): Change nargs to 0. + * linux/ia64/syscallent.h (pipe): Likewise. + * linux/mips/syscallent-n32.h (pipe): Likewise. + * linux/mips/syscallent-n64.h (pipe): Likewise. + * linux/mips/syscallent-o32.h (pipe): Likewise. + * linux/sh/syscallent.h (pipe): Likewise. + * linux/sh64/syscallent.h (pipe): Likewise. + +2016-02-13 Dmitry V. Levin + + alpha, ia64, mips, sh*, sparc*: fix error path decoding of pipe syscall. + * net.c (do_pipe) [HAVE_GETRVAL2]: Remove. + Always call decode_pair_fd on exiting. + (SYS_FUNC(pipe)) [HAVE_GETRVAL2]: Call printpair_fd instead of do_pipe. + + Fix pathtrace match for pipe2 syscall. + * pathtrace.c (pathtrace_match): As pipe2 syscall has no descriptors + or paths to test, move SEN_pipe2 to the appropriate category. + + avr32: wire up missing syscalls. + * linux/avr32/syscallent.h [322..324]: Add userfaultfd, membarrier, + and mlock2 entries. + +2016-02-12 Dmitry V. Levin + + tests: check decoding of madvise, mlockall, mremap, and msync syscalls. + * tests/mmap.c (main): Change output format from regexp to verbatim. + Add tests for madvise, mlockall, mremap, and msync syscalls. + * tests/mmap.test: Convert from match_grep to match_diff. + Add madvise, mlockall, mremap, and msync syscalls to syscall filter. + +2016-02-11 Dmitry V. Levin + + Simplify decoding of waitpid and wait4 syscalls. + * wait.c (printwaitn): Replace "n" and "bitness" integer arguments + with a single print_rusage function pointer. All callers updated. + + waitid: print pid argument as int. + * wait.c (SYS_FUNC(waitid)): As the type of second syscall argument + in the kernel is pid_t, print it as int. + + waitid: always print 5th argument. + * wait.c (SYS_FUNC(waitid)): Do not check for tcp->s_ent->nargs + as waitid syscall has 5 arguments. + + socketutils: add const qualifier to variables. + * socketutils.c (cache_and_print_inode_details): Make "details" + parameter const. + (print_sockaddr_by_inode_cached): Make "e" variable const. + (inet_send_query): Make struct nlmsghdr and struct inet_diag_req_v2 + members const. Make "msg" variable const. + (inet_parse_response): Make "data" parameter and diag_msg variable const. + (receive_responses): Make "h" and "rc" variables const. + (unix_send_query): Make struct nlmsghdr and struct unix_diag_req + members const. Make "msg" variable const. + (unix_print): Make all parameters const. + (print_sockaddr_by_inode): Make proto_name parameter const. + + print_sockaddr_by_inode: cleanup protocol lookup. + * socketutils.c (tcp_v4_print, udp_v4_print, tcp_v6_print, + udp_v6_print): New functions. + (print_sockaddr_by_inode): Make "protocols" array static, replace + "family" and "protocol" members with "print" in its underlying + structure. Iterate through protocols array when the protocol name + is specified. + +2016-02-09 Dmitry V. Levin + + tests: check that -f -p attaches to threads properly. + Check that -f -p attaches and follows all threads of the given pid. + + * tests/attach-f-p.c: New file. + * tests/attach-f-p.test: New test. + * tests/.gitignore: Add attach-f-p. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (attach_f_p_LDADD): New variable. + (TESTS): Add attach-f-p.test. + +2016-02-09 Dmitry V. Levin + + Introduce libstrace.a for potentially conditional compilation units. + Some files are used conditionally depending on architecture and + configuration. Create a library for the purpose of keeping such + compilation units. + + * Makefile.am (strace_LDADD, noinst_LIBRARIES): Add libstrace.a. + (libstrace_a_CPPFLAGS): New variable, set to $(strace_CPPFLAGS). + (libstrace_a_CFLAGS): New variable, set to $(strace_CFLAGS). + (libstrace_a_SOURCES): New variable, set to upeek.c. + * util.c (upeek): Move ... + * upeek.c: ... here. + +2016-02-08 Dmitry V. Levin + + travis-ci: pass more gcov arguments to codecov. + + tests: extend coverage of struct itimerspec. + * tests/timer_xettime.c (main): Check decoding of NULL struct itimerspec + pointer. + + tests: extend coverage of utimensat syscall. + * tests/utimensat.c (main): Check decoding of NULL struct timespec + pointer. + + tests: extend coverage of time syscall. + * tests/time.c (main): Check decoding of NULL time_t pointer. + + tests: extend coverage of struct sigevent. + * tests/timer_create.c (main): Check decoding of NULL struct sigevent + pointer. Check decoding of invalid sigev_notify value. + +2016-02-08 Dmitry V. Levin + + tests: extend coverage of execve and execveat syscalls. + Check decoding of inaccessible or partially inaccessible arrays. + + * tests/execve-v.c: New file. + * tests/execveat-v.c: Likewise. + * tests/execve-v.test: New test. + * tests/execveat-v.test: Likewise. + * tests/execve.c: Rewrite. + * tests/execveat.c: Likewise. + * tests/execve.test: Likewise. + * tests/execveat.test: Likewise. + * tests/execve.expected: Remove. + * tests/execve-v.expected: Likewise. + * tests/execveat.expected: Likewise. + * tests/execveat-v.expected: Likewise. + * tests/.gitignore: Add execve-v and execveat-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add execve-v.test and execveat-v.test. + (EXTRA_DIST): Remove execve.expected, execve-v.expected, + execveat.expected, and execveat-v.expected. + +2016-02-08 Dmitry V. Levin + + Fix decoding of execve and execveat syscalls with invalid input. + * execve.c (printargv): Fix decoding of inaccessible or partially + inaccessible array. + (printargc): Diagnose inaccessible or partially inaccessible array. + (decode_execve, SYS_FUNC(execv)): Update printargv and printargc callers. + + tests: extend coverage of capget syscall. + * tests/caps.c (main): Check decoding of inaccessible cap_user_header_t + and/or cap_user_data_t. + * tests/caps.awk: Update match patterns. + * tests/caps.test: Update. + + tests: extend coverage of sched_getaffinity syscall. + * tests/sched_xetaffinity.c (main): Check decoding of pointer + to inaccessible cpu_set_t. + + tests: extend coverage of utime syscall. + * tests/utime.c (main): Check decoding of NULL struct utimbuf pointer. + Check decoding of struct utimbuf located at the end of page boundary. + * tests/utime.test: Update. + + tests: extend coverage of sysinfo syscall. + * tests/sysinfo.c (main): Check decoding of NULL struct sysinfo pointer. + Check decoding of struct sysinfo located at the end of page boundary. + * tests/sysinfo.test: Update. + + tests: extend coverage of adjtimex syscall. + * tests/adjtimex.c (main): Check decoding of NULL struct timex pointer. + Check decoding of struct timex located at the end of page boundary. + * tests/adjtimex.test: Update. + + tests: check that strace does not retain stdin and stdout descriptors. + * tests/redirect.test: New test. + * tests/Makefile.am (TESTS): Add it. + + Create a dummy pipe descriptor instead of opening /dev/null. + * strace.c (open_dev_null): Rename to open_dummy_desc. All callers + changed. Create a pipe and return its first descriptor instead of + opening /dev/null. + +2016-02-08 Denys Vlasenko + + If stdin/stdout aren't open on startup, open them to /dev/null. + Otherwise, -oLOGFILE may end up using one of them. This conflicts + with the previous change, which closes stdin/out in strace. + + * strace.c (init): If fcntl(F_GETFD) fails on stdin or stdout, + sanitize them: open /dev/null and dup it until fds 0,1,2 + are all used up. + +2016-02-08 Denys Vlasenko + + Close stdin/out after child is forked. + Testcase: + + { sleep 1; yes | head -n99999; } | strace -o/dev/null sh -c 'exec <&-; sleep 9' + + The writer (head) will be able to perform writes to write end of the pipe. + With strace call removed, head will immediately get SIGPIPE. + + This change fixes this: now writer immediately gets SIGPIPE with strace too. + + * strace.c (startup_child): Close stdin/out and reopen them to /dev/null. + +2016-02-05 Dmitry V. Levin + + tests: add opipe.test. + Check that -o |pipe_command works. In particular, check that + strace waits for completion of piped command. + + * tests/opipe.test: New test. + * tests/Makefile.am (TESTS): Add it. + +2016-02-05 Keith Owens + + strace-graph: print the pid in the graph. + * strace-graph: Prefix each command with its pid. + + strace-graph: cope with clone immediately followed by exit. + * strace-graph: A clone() followed by exit() with no intervening fork + or execve resulted in the new pid having no seq key. That breaks when + trying to use seq as an array reference. Ensure that clone populates + the new pid with an empty seq entry. + + strace-graph: handle recent strace output. + * strace-graph: Fix regex for --SIG. Ignore '+++ exited with +++' + lines. Handle exit_group syscall as well as _exit. + + strace-graph: handle strace -T. + * strace-graph: Ignore extra ' ' field added by strace -T. + + strace-graph: use "strict" and "warnings" pragmas. + * strace-graph: Set "use strict" and "use warnings" options. Fix errors + detected by strict/warnings. $result is really a string, it can be "-1" + followed by an error text. + +2016-02-04 Dmitry V. Levin + + Add README.md file with links to build status and test coverage. + + travis-ci: prepare and submit test coverage report. + + tests: extend readlink and readlinkat coverage. + * tests/readlink.c (PREFIX, TARGET, LINKPATH): New macros. + (main): Allocate memory for string and buffer passed to the syscall + being tested using tail_alloc mechanism. Create and cleanup test + symlink. Test syscall error path output. Print hexquoted strings + using hexquote_strndup. + * tests/readlinkat.c: Likewise. + * tests/readlink.test: Remove creation and cleanup of test symlinks. + + tests: add hexquote_strndup function to libtests. + * tests/tests.h (hexquote_strndup): New prototype. + * tests/hexquote_strndup.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + readlinkat.test: use readlink.test. + * tests/readlink.test (syscall): Initialize from $0. + * tests/readlinkat.test: Source readlink.test. + +2016-02-04 Gabriel Laskar + + Add configure --enable-code-coverage option. + * m4/ax_code_coverage.m4: New file. + * configure.ac: Use AX_CODE_COVERAGE. + * Makefile.am: Add @CODE_COVERAGE_RULES@. + (CODE_COVERAGE_LCOV_OPTIONS, CODE_COVERAGE_GENHTML_OPTIONS, + CODE_COVERAGE_IGNORE_PATTERN): New variables. + (strace_CPPFLAGS): Add $(CODE_COVERAGE_CPPFLAGS). + (strace_CFLAGS): Add $(CODE_COVERAGE_CFLAGS). + (strace_LDADD): Add $(CODE_COVERAGE_LDFLAGS). + * .gitignore: Add *.gcda and *.gcno. + +2016-02-03 Dmitry V. Levin + + Makefile.am: introduce strace_CFLAGS and derivatives. + * Makefile.am (strace_CFLAGS): New variable, set to $(AM_CFLAGS). + (libmpers_CFLAGS): New variable, set to $(strace_CFLAGS). + (libmpers_m32_a_CFLAGS, libmpers_mx32_a_CFLAGS): New variables, + set to $(libmpers_CFLAGS). + + Makefile.am: use strace_CPPFLAGS consistently. + * Makefile.am (libmpers_CPPFLAGS): Replace $(AM_CPPFLAGS) + with $(strace_CPPFLAGS). + +2016-02-03 Dmitry V. Levin + + tests: replace net-fd.test with net-y-unix.test. + Unlike the former test that was based on match_grep, + the new one uses match_diff and does more rigorous testing. + + * tests/net-y-unix.c: New file. + * tests/net-y-unix.test: New test. + * tests/net-fd.test: Remove. + * tests/net-fd.expected: Remove. + * tests/.gitignore: Add net-y-unix. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace net-fd.test with net-y-unix.test. + (net-fd.log): Remove. + (EXTRA_DIST): Remove net-fd.expected. + +2016-02-03 Dmitry V. Levin + + Implement caching of print_sockaddr_by_inode. + As -yy parser, compared to -y, needs to do at least 5 extra syscalls + (getxattr, socket, sendmsg, recvmsg, close) to print socket details, + caching results of netlink conversations between strace and kernel + noticeably reduces amount of system time spent by strace. + + The caching is safe since sockets do not change their addresses after + successful bind or connect syscall. + + * defs.h (string_quote, print_sockaddr_by_inode_cached): New prototypes. + * socketutils.c (cache_entry): New type. + (CACHE_SIZE, CACHE_MASK): New macros. + (cache): New static array. + (cache_and_print_inode_details): New static function. + (print_sockaddr_by_inode_cached): New function. + (inet_parse_response, unix_parse_response): Use + cache_and_print_inode_details. + * util.c (printfd): Use string_quote and print_sockaddr_by_inode_cached. + (string_quote): Remove static qualifier. + * NEWS: Mention this improvement. + * tests/unix-yy.c (main): Update. + +2016-02-03 Dmitry V. Levin + + Change unix_diag requests to use exact match instead of full dump. + * socketutils.c (unix_send_query): Remove NLM_F_DUMP from nlmsg_flags, + initialize udiag_cookie. + * tests/netlink_unix_diag.c (send_query): Remove "family" and "proto" + arguments, add "inode" argument, remove NLM_F_DUMP from nlmsg_flags, + initialize udiag_ino and udiag_cookie. + (check_responses): Add "inode" argument, check inode match. + (main): Pass listening socket inode to send_query and check_responses. + + Robustify netlink response parsers. + * socketutils.c (inet_parse_response, unix_parse_response): Change + return type from bool to int, return -1 on all parse errors except + inode mismatch. + (receive_responses): Stop on the first nlmsg_type that is not + SOCK_DIAG_BY_FAMILY, also stop when the parser returns -1. + * tests/netlink_inet_diag.c (check_responses): Stop on short messages, + on first nlmsg_type that is not SOCK_DIAG_BY_FAMILY, print more verbose + diagnostics for NLMSG_ERROR. + * tests/netlink_unix_diag.c (check_responses): Likewise. + + inet_parse_response: add a safety check. + * socketutils.c (inet_parse_response): Check that netlink message + is large enough to contain a inet_diag_msg structure. + + receive_responses: avoid potential hangup. + * socketutils.c (receive_responses): Pass MSG_DONTWAIT to recvmsg after + the first recvmsg call to avoid potential hangup. + +2016-02-03 Dmitry V. Levin + + tests: replace net-yy.test with net-yy-inet.test. + Unlike the former test that was based on match_awk, + the new one uses match_diff and does more rigorous testing. + + * tests/net-yy-inet.c: New file. + * tests/net-yy-inet.test: New test. + * tests/net-yy.test: Remove. + * tests/net-yy-accept.awk: Remove. + * tests/net-yy-connect.awk: Remove. + * tests/inet-accept-connect-send-recv.c: Remove. + * tests/.gitignore: Replace inet-accept-connect-send-recv + with net-yy-inet. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace net-yy.test with net-yy-inet.test. + (EXTRA_DIST): Remove net-yy-accept.awk and net-yy-connect.awk. + +2016-02-03 Dmitry V. Levin + + tests: replace unix-yy.test with net-yy-unix.test. + Unlike the former test that was based on match_awk, + the new one uses match_diff and does more rigorous testing. + + * tests/net-yy-unix.c: New file. + * tests/net-yy-unix.test: New test. + * tests/unix-yy.test: Remove. + * tests/unix-yy-accept.awk: Remove. + * tests/unix-yy-connect.awk: Remove. + * tests/.gitignore: Add net-yy-unix. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace unix-yy.test with net-yy-unix.test. + (EXTRA_DIST): Remove unix-yy-accept.awk and unix-yy-connect.awk. + +2016-02-02 Dmitry V. Levin + + tests: add inode_of_sockfd function to libtests. + * tests/tests.h (inode_of_sockfd): New prototype. + * tests/inode_of_sockfd.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + unix_parse_response: add a safety check. + * socketutils.c (unix_parse_response): Check that netlink message + is large enough to contain a unix_diag_msg structure. + +2016-01-29 Dmitry V. Levin + + Fixed decoding of mincore syscall's last argument. + * mem.c (SYS_FUNC(mincore)): Print only those bytes of the vector + that were written by the kernel. + * NEWS: Mention this fix. + * tests/mincore.c: New file. + * tests/mincore.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add mincore. + (TESTS): Add mincore.test. + * tests/.gitignore: Add mincore. + +2016-01-23 Dmitry V. Levin + + Move fallback -yy socket print from printfd to print_sockaddr_by_inode. + * util.c (printfd): In -yy mode, move fallback print of proto:[inode] ... + * socketutils.c (to print_sockaddr_by_inode): ... here. + +2016-01-22 Dmitry V. Levin + + Implement simultaneous use of -p option and tracing of a command. + * strace.c (init): Allow -p option along with a command. + (startup_child): In -D mode, record the parent of the tracer process + as strace_child. + (startup_attach): Save trace_tracer_pid before -D mode fork. + When tracing a command in -f mode, do not check for the command's + threads as it has no threads at this moment. + Never attach to the tracer process. + In -D mode, never attach to the parent of the tracer process, + terminate that process only once at the end of startup_attach, + and reset strace_child. + * strace.1: Document that -p option can be used along with tracing + of a command. + * NEWS: Mention it. + * tests/attach-p-cmd-cmd.c: New file. + * tests/attach-p-cmd-p.c: Likewise. + * tests/attach-p-cmd.test: New test. + * tests/.gitignore: Add attach-p-cmd-cmd and attach-p-cmd-p. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add attach-p-cmd.test. + + This fixes Debian bug #549942. + +2016-01-22 Dmitry V. Levin + + strace.1: fix format of -P description. + * strace.1 (-P): Write trailing using regular font. + +2016-01-21 Dmitry V. Levin + + tests: use local nanosleep based sleep utility replacement. + * tests/sleep.c: New file. + * tests/.gitignore: Add sleep. + * tests/Makefile.am (check_PROGRAMS): Likewise. + * tests/count.test: Use it instead of system sleep utility. + + tests: add error_msg_and_fail function to libtests. + * tests/tests.h (error_msg_and_fail): New prototype. + * tests/error_msg.c (error_msg_and_fail): New function. + +2016-01-20 Dmitry V. Levin + + Fix dumping of recvmmsg syscall in case of short read. + * net.c (dumpiov_in_mmsghdr): Call dumpiov_upto instead of dumpiov, + pass data size limit to dumpiov_upto. + * NEWS: Mention this fix. + * tests/mmsg.c (main): Update. + + Fix dumping of recvmsg syscall in case of short read. + * defs.h (dumpiov_in_msghdr): Add unsigned long argument. + * net.c (dumpiov_in_msghdr): Add data_size argument. Call dumpiov_upto + instead of dumpiov, pass data_size to dumpiov_upto. + * syscall.c (dumpio): Pass data size limit to dumpiov_in_msghdr. + * NEWS: Mention this fix. + * tests/recvmsg.c: New file. + * tests/recvmsg.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add recvmsg. + (TESTS): Add recvmsg.test. + * tests/.gitignore: Add recvmsg. + + Fix decoding and dumping of readv syscall in case of short read. + * defs.h (dumpiov_upto): New prototype. + (dumpiov): Change to a wrapper around dumpiov_upto. + * util.c (dumpiov): Rename to dumpiov_upto, add and check data_size + argument. + * io.c (SYS_FUNC(readv)): Call tprint_iov_upto instead + of tprint_iov and specify syscall return value as a data size limit. + * syscall.c (dumpio): In case of SEN_readv, call dumpiov_upto instead + of dumpiov and specify syscall return value as a data size limit. + * NEWS: Mention this fix. + * tests/readv.c: New file. + * tests/readv.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add readv. + (TESTS): Add readv.test. + * tests/.gitignore: Add readv. + + tests/tests.h: add ARRAY_SIZE and LENGTH_OF macros. + * tests/tests.h (ARRAY_SIZE, LENGTH_OF): New macros. + * tests/aio.c (ARRAY_SIZE): Remove. + * tests/mmsg.c (LENGTH_OF): Remove. + + tests: add hexdump_strdup function to libtests. + * tests/tests.h (hexdump_strdup): New prototype. + * tests/hexdump_strdup.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + tests: add tprintf function to libtests. + * tests/tests.h (tprintf): New prototype. + * tests/tprintf.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/mmsg.c: Use tprintf. + +2016-01-19 Dmitry V. Levin + + quotactl: add Q_XGETQSTATV command decoding. + * quota.c (fs_qfilestatv, fs_quota_statv): New structures. + (decode_cmd_data): Handle Q_XGETQSTATV case. + + quotactl: add decoding of if_dqinfo.dqi_flags constants. + * xlat/if_dqinfo_flags.in: New file. + * quota.c: Include "xlat/if_dqinfo_flags.h". + (decode_cmd_data): Print struct if_dqinfo.dqi_flags using printflags. + + quotactl: consistenly decode all write and unknown commands on entering. + * quota.c (decode_cmd_data): Change return type to int. + Return 0 on entering Q_GETQUOTA, Q_V1_GETQUOTA, Q_V2_GETQUOTA, + Q_XGETQUOTA, Q_GETFMT, Q_GETINFO, Q_V2_GETINFO, Q_V1_GETSTATS, + Q_V2_GETSTATS, and Q_XGETQSTAT commands, return RVAL_DECODED + for any other command. + (SYS_FUNC(quotactl)): On entering, print third argument of any command. + For any command except Q_QUOTAON and Q_V1_QUOTAON, call decode_cmd_data + and forward its return value. + + quotactl: fix Q_QUOTAON command decoding. + * quota.c (SYS_FUNC(quotactl)): Print Q_QUOTAON 4th argument as a path. + + quotactl: print third argument as unsigned int. + * quota.c (SYS_FUNC(quotactl)): Consistently print the third + argument using "%u" format. + + quotactl: fix Q_XQUOTAOFF command decoding. + * quota.c (decode_cmd_data): Print xfs quota flags argument. + + quotactl: fix Q_GETFMT and Q_XQUOTAON commands decoding. + * quota.c (decode_cmd_data): As quota format value and xfs quota flags + are in-memory constants, print it like an array of one element instead + of a structure. + +2016-01-17 Dmitry V. Levin + + Update quotactl constants. + * xlat/quota_formats.in: Add QFMT_OCFS2 and QFMT_VFS_V1. + * xlat/quotacmds.in: Add Q_XGETQSTATV. + * xlat/quotatypes.in: Add PRJQUOTA. + * xlat/xfs_quota_flags.in: Add FS_QUOTA_PDQ_ACCT and FS_QUOTA_PDQ_ENFD. + +2016-01-19 Dmitry V. Levin + + Replace u_int{8,16,32,64} with uint{8,16,32,64} + * util.c: Replace u_int{32,64} with uint{32,64}. + * quota.c: Replace u_int{8,16,32,64} with uint{8,16,32,64}. + + Move definitions of quotactl constants to xlat files. + * quota.c (Q_*): Move to xlat/quotacmds.in. + (USRQUOTA, GRPQUOTA): Move to xlat/quotatypes.in. + (QFMT_VFS_OLD, QFMT_VFS_V0): Move to xlat/quota_formats.in. + (XFS_QUOTA_*): Move to xlat/xfs_quota_flags.in. + (XFS_*_QUOTA): Move to xlat/xfs_dqblk_flags.in. + (QIF_*): Move to xlat/if_dqblk_valid.in. + (IIF_*): Move to xlat/if_dqinfo_valid.in. + +2016-01-15 Dmitry V. Levin + + llseek.test: robustify against libcs invoking _llseek syscall on their own + * tests/llseek.test: Filter out _llseek calls made with non-negative + descriptor arguments. + + lseek.test: robustify against libcs invoking lseek syscall on their own. + * tests/lseek.test: Filter out lseek calls made with non-negative + descriptor arguments. + +2016-01-14 Dmitry V. Levin + + mmsg.test: fix regression introduced by commit v4.11-138-g6e815ce. + This fixes the test on platforms where both __NR_sendmmsg and + HAVE_SENDMMSG are defined but the former is not implemented by the + kernel and the second is implemented as an indirect syscall. + + * tests/mmsg.c (LENGTH_OF): New macro. + (send_mmsg, recv_mmsg): Print expected output in case of ENOSYS. + (main): Redirect stdout to a new descriptor. Use LENGTH_OF. + Print expected output. + * tests/mmsg.test: Update. + * tests/mmsg.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove mmsg.expected. + +2016-01-13 Dmitry V. Levin + + aio.test: check memory access by aio decoders. + * tests/aio.c (main): Place all objects passed to io_* syscalls + at the end of memory pages followed by inaccessible pages. + +2016-01-13 Dmitry V. Levin + + s390, s390x: fix printing of syscalls unknown to the kernel. + On s390/s390x, syscalls with NR up to 255 can be implemented + directly using "svc NR", for NR >= 256 "svc 0" with %r1=NR is used. + The latter method is allowed for NR < 256, too. + + When the syscall number specified directly or indirectly is recognized + by the kernel, i.e. it is less than its NR_syscalls value, it is stored + in %r2 and is available to arch_get_scno via s390_regset.gprs[2]. + For syscall numbers >= NR_syscalls this register is set to 0, + but %r1 remains unchanged and could be used by arch_get_scno + via s390_regset.gprs[1] to decide what the syscall number is. + + * linux/s390/get_scno.c (arch_get_scno): If s390_regset.gprs[2] is zero, + take syscall number from s390_regset.gprs[1]. + * NEWS: Mention this fix. + + This fixes Debian bug #485979 and Fedora bug #1298294. + +2016-01-13 Dmitry V. Levin + + s390, s390x: print all syscall arguments for syscall number 0. + * linux/s390/syscallent.h [0]: Set nargs to MA. + * linux/s390x/syscallent.h: Likewise. + + mips o32: alias sys_syscall to printargs. + * linux/dummy.h (sys_syscall): Alias to printargs. + * syscall.c [LINUX_MIPSO32] (SYS_FUNC(syscall)): Remove. + +2016-01-13 Dmitry V. Levin + + travis-ci: update build matrix. + Add clang-3.6/x86_64, clang-3.6/x86, and musl-gcc/x86_64 to the matrix. + + * .travis.yml (compiler): Add gcc, clang-3.6, and musl-gcc. + (env): Add matrix, remove global ENABLE_GCC_WERROR. + (matrix): Add exclude, remove include. + * travis-ci.sh: Add support for clang and musl-gcc. + Use --enable-gcc-Werror for gcc build unconditionally. + +2016-01-13 Dmitry V. Levin + + mpers.awk: add support for DWARF files generated by clang. + * mpers.awk: Define default_pointer_size. Initialize byte_size + for DW_TAG_pointer_type to default_pointer_size. Set parent + for DW_TAG_member only. Handle DW_AT_count as an alternative + to DW_AT_upper_bound. + +2016-01-12 Dmitry V. Levin + + configure.ac: reorder some statements for better readability. + * configure.ac: Sort and group together AC_PROG_*, AC_C_*, AC_TYPE_*, + AC_HEADER_*, AC_CHECK_FUNCS, AC_CHECK_TYPES, AC_CHECK_MEMBERS, + and AC_CHECK_HEADERS. + + scm_rights-fd.test: rewrite without fork. + * tests/scm_rights.c (main): Rewrite without fork. + Place all objects passed to sendmsg and recvmsg at the end + of memory pages followed by inaccessible pages. + * tests/scm_rights-fd.test: Update. + + tests: fix clang "duplicate 'const' declaration specifier" warnings. + * tests/ksysent.c (pstr_t): Remove second const specifier. + * tests/mmsg.c (main): Remove second const specifier from one[], two[], + and three[]. + + tests/times.c: fix clang compilation warning. + * tests/times.c (main): Initialize dummy variable. + +2016-01-12 Dmitry V. Levin + + tests/mmsg.c: fix build on rhel6/ppc. + There are weird platforms that define __NR_sendmmsg but at the same time + do not define __NR_recvmmsg. Add a workaround for them. + + * configure.ac (AC_CHECK_FUNCS): Add recvmmsg. + * tests/mmsg.c: Check for __NR_recvmmsg || HAVE_RECVMMSG. + +2016-01-12 Dmitry V. Levin + + s390: fix sigreturn decoding on recent kernels. + Linux kernel commit v4.3-rc1-50-g8d4bd0e corrected uc_sigmask + of the compat signal frame, so remove the old workaround. + + * linux/s390/arch_sigreturn.c (arch_sigreturn) [S390]: Remove. + +2016-01-12 Dmitry V. Levin + + Update PTRACE_* constants. + * ptrace.h (PTRACE_SECCOMP_GET_FILTER): Define. + * xlat/ptrace_cmds.in: Add PTRACE_SECCOMP_GET_FILTER. + +2016-01-12 Dmitry V. Levin + + Fix struct sigevent decoding for musl. + Do not rely on "struct sigevent.__pad" being located at the same address + as "struct sigevent.sigev_notify_thread_id", it's not the case with musl + libc. Do not rely on struct sigevent definition at all to access + sigev_notify_thread_id. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct sigevent._sigev_un._pad + and struct sigevent.__pad. + * sigevent.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * print_sigevent.c: Include it. + * print_sigevent.c (struct_sigevent): Remove. + (print_sigevent): Update all struct_sigevent users. + * tests/timer_create.c: Include "sigevent.h". + (main): Use struct_sigevent instead of struct sigevent, + all struct sigevent clients changed. + +2016-01-12 Dmitry V. Levin + + syscall.c: include + All users of NSIG macro must include . + This complements commit v4.10-184-g0e946ab. + + * syscall.c: Include . + +2016-01-12 Dmitry V. Levin + + signal.c: fix musl libc compilation warning. + musl libc defines SIGRTMAX to a function that returns signed int, + which obviously makes gcc -Wsign-compare unhappy. + + * signal.c (signame): Cast ASM_SIGRTMAX to unsigned int. + +2016-01-12 Dmitry V. Levin + + tests: fix TEST_SYSCALL_{NR,STR} and STRUCT_STAT_STR macros for musl. + The contents of TEST_SYSCALL_NAME and STRUCT_STAT macros was subject + to macro expansion when used in definitions of TEST_SYSCALL_NR, + TEST_SYSCALL_STR, and STRUCT_STAT_STR macros. + + As some libcs, e.g. musl libc, define lfs64 names as macros + (stat64 as stat, lstat64 as lstat, etc.), this might result to incorrect + expansion of TEST_SYSCALL_NR, TEST_SYSCALL_STR, and STRUCT_STAT_STR + macros. To avoid this problem, define these macros directly and remove + TEST_SYSCALL_NAME macro. + + * tests/_newselect.c (TEST_SYSCALL_NAME): Remove. + (TEST_SYSCALL_NR, TEST_SYSCALL_STR): New macros. + * tests/fcntl.c: Likewise. + * tests/fcntl64.c: Likewise. + * tests/fstat.c: Likewise. + * tests/fstatat64.c: Likewise. + * tests/lstat.c: Likewise. + * tests/newfstatat.c: Likewise. + * tests/select.c: Likewise. + * tests/stat.c: Likewise. + * tests/fstat64.c (TEST_SYSCALL_NAME): Remove. + (TEST_SYSCALL_NR, TEST_SYSCALL_STR, STRUCT_STAT_STR): New macros. + * tests/lstat64.c: Likewise. + * tests/stat64.c: Likewise. + * tests/fstatx.c (TEST_SYSCALL_NR, nrify, nrify_): Remove. + * tests/lstatx.c: Likewise. + * tests/struct_flock.c (TEST_SYSCALL_NR, TEST_SYSCALL_STR, nrify, + nrify_, stringify, stringify_): Remove. + * tests/xselect.c: Likewise. + * tests/xstatx.c: Check TEST_SYSCALL_STR instead of TEST_SYSCALL_NAME. + (STRUCT_STAT_STR, TEST_SYSCALL_STR, stringify, stringify_): Remove. + [!STRUCT_STAT] (STRUCT_STAT_STR): New macro. + +2016-01-12 Dmitry V. Levin + + tests/struct_flock.c: fix musl libc compilation warnings. + The size of off_t is not something one can rely upon. For example, + musl libc unconditionally defines it as an int64_t type on x86. + A cast to the target type helps to avoid these libc differences. + + * configure.ac: Call AC_C_TYPEOF. + * tests/struct_flock.c (TYPEOF_FLOCK_OFF_T): New macro. + (test_flock_einval): Use it instead of off_t. + +2016-01-12 Dmitry V. Levin + + tests/inet-cmsg.c: fix musl libc compilation warnings. + The types that are used to define msg_namelen member of struct msghdr + and cmsg_len member of struct cmsghdr differ between libcs. + For example, glibc defines them as size_t, while musl libc - as type + socklen_t. Print these fields using %lu format to avoid issues caused + by libc differences. + + * tests/inet-cmsg.c (main): Cast mh.msg_controllen and c->cmsg_len + to unsigned long and print them using %lu format. + +2016-01-11 Dmitry V. Levin + + aio.test: include instead of + * tests/aio.c: Include instead of . + + mmsg.test: check memory access by sendmmsg and recvmmsg decoders. + * tests/tests.h (tail_memdup): New prototype. + * tests/tail_alloc.c (tail_memdup): New function. + * tests/mmsg.c (main): Place all objects passed to sendmmsg and recvmmsg + at the end of memory pages followed by inaccessible pages. + + mmsg.test: check decoding of flags passed to sendmmsg and recvmmsg. + * tests/mmsg.c (main): Pass MSG_DONTROUTE|MSG_NOSIGNAL to sendmmsg. + Pass MSG_DONTWAIT to recvmmsg. + * tests/mmsg.expected: Update. + +2016-01-11 Dmitry V. Levin + + mmsg.test: prefer direct sendmmsg/recvmmsg syscalls to libc wrappers. + * tests/mmsg.c: Include . + Check for __NR_sendmmsg as an alternative to HAVE_SENDMMSG. + [!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define. + (send_mmsg, recv_mmsg): New functions. + (main): Use them instead of sendmmsg and recvmmsg. + + Reported-by: Szabolcs Nagy + +2016-01-10 Dmitry V. Levin + + sigreturn.test: use RT_5 signal number instead of RT_2. + Make the test compatible with musl libc that uses RT_2 internally. + + * tests/sigreturn.c (main): Replace RT_2 with RT_5. + * tests/sigreturn.test: Likewise. + + Reported-by: Szabolcs Nagy + +2016-01-10 Dmitry V. Levin + + avr32: wire up accept4 syscall. + * linux/avr32/syscallent.h [321]: Add accept4 entry. + +2016-01-09 Dmitry V. Levin + + sparc64: fix names of {s,g}etres{u,g}id syscalls. + * linux/sparc64/syscallent.h [108 ... 111]: Use sparc64 syscall names. + + sparc64: remove sparc32 syscall entries. + * linux/sparc64/syscallent.h [31, 32, 35, 44, 53, 56, 69, 70, 72, 77, + 82, 84, 87, 89, 91, 94, 112, 115, 155, 231]: Unassign. + + sparc: remove sparc64 syscall entries. + * linux/sparc/syscallent.h [52, 163]: Unassign. + + sparc64: clone syscallent.h from sparc. + * linux/sparc64/syscallent.h: Clone from linux/sparc/syscallent.h. + + sparc: fix mlock2 sysentry, wire up bind, listen, and setsockopt syscalls + * linux/sparc/syscallent.h [353]: Move mlock2 entry to 356. + [353, 354, 355]: Add bind, listen, and setsockopt entries. + * NEWS: Mention this. + +2016-01-09 Dmitry V. Levin + + tests: do not use settimeofday wrapper provided by libc. + Workaround limitations of settimeofday wrapper provided by musl libc. + + * tests/xettimeofday.c (main): Call settimeofday using syscall(). + + Reported-by: Szabolcs Nagy + +2016-01-09 Dmitry V. Levin + + ioctl.test: robustify against libcs invoking ioctl syscall on their own. + * tests/ioctl.test: Filter out from the log ioctl calls with standard + descriptor arguments. + + Reported-by: Szabolcs Nagy + +2016-01-09 Dmitry V. Levin + + alpha: enhance decoding of getxpid, getxuid, and getxgid syscalls. + Print the second return value of getxpid, getxuid, and getxgid syscalls + that return a pair of values using the same mechanism as pipe syscall. + + * alpha.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/alpha/syscallent.h [20]: Change SEN(getpid) to SEN(getxpid). + [24]: Change SEN(getuid) to SEN(getxuid). + [47]: Change SEN(getgid) to SEN(getxgid). + * NEWS: Mention this enhancement. + * tests/uid.awk: Update for getxgid output change. + * tests/uid.test: Cleanup. + * tests/getxxid.c: New file. + * tests/getxxid.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add getxxid. + (TESTS): Add getxxid.test. + * tests/.gitignore: Add getxxid. + +2016-01-08 Dmitry V. Levin + + Cleanup parser of getpagesize syscall. + * mem.c (SYS_FUNC(getpagesize)): Decode on entering syscall. + + alpha: alias getdtablesize to printargs. + * linux/dummy.h [ALPHA] (sys_getdtablesize): Alias to printargs. + * desc.c [ALPHA] (SYS_FUNC(getdtablesize)): Remove. + +2016-01-08 Dmitry V. Levin + + tests: change text marker in fork-f and vfork-f tests. + Use chdir syscalls instead of pwrite64 syscalls as a method of inserting + text markers into strace output because the former are more portable. + + * tests/fork-f.c (logit): Rename to logit_. Use chdir instead of pwrite. + (logit): New macro wrapper around logit_. + (main): Update expected output. + * tests/vfork-f.c: Likewise. + * tests/fork-f.test: Update. + +2016-01-07 Dmitry V. Levin + + Fix printing of 32-bit times syscall return value on 64-bit architectures + This change complements commit v4.9-359-gd93d9f8 by fixing + RVAL_UDECIMAL case. + The only syscall that appears to be affected is the times syscall. + + * syscall.c (trace_syscall_exiting): In case of RVAL_UDECIMAL, + when current personality is 32-bit, print 32-bit return code. + * NEWS: Mention this fix. + + Reported-by: Steve McIntyre + +2016-01-07 Dmitry V. Levin + + tests/vfork-f.c: support platforms without vfork. + On some platforms, e.g. hppa glibc, vfork() is implemented using fork + syscall, so the test cannot rely on the parent process remaining blocked + until the child process either terminates or calls execve. + + * tests/vfork-f.c (main): Explicitly block the parent until the child + either terminates or calls execve. + +2016-01-07 Dmitry V. Levin + + Fix and enhance decoding of sched_[gs]etaffinity syscalls. + Print cpu_set_t as a set of integers, similar to the way + fd_set is printed as a set of descriptors. + + * affinity.c: Include . + (get_cpuset_size): New function. + (print_affinitylist): Rewrite using get_cpuset_size and next_set_bit. + (sched_getaffinity, sched_setaffinity): Print first two args as ints. + * NEWS: Mention this enhancement. + * tests/sched_xetaffinity.c: New file. + * tests/sched_xetaffinity.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity. + (TESTS): Add sched_xetaffinity.test. + * tests/.gitignore: Add sched_xetaffinity. + + Reported-by: Joe Korty + +2016-01-06 Dmitry V. Levin + + tests: convert epoll_create1.test from match_grep to match_diff. + * tests/epoll_create1.c (main): Print expected output. + * tests/epoll_create1.test: Use match_diff instead of match_grep. + * tests/epoll_create1.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected. + + tests/struct_flock.c: use libtests. + * tests/struct_flock.c (create_sample): Return void, + all callers changed. Use perror_msg_and_fail. + * tests/fcntl.c: Use SKIP_MAIN_UNDEFINED. + * tests/fcntl64.c: Likewise. + + tests/file_handle.c: use libtests. + * tests/file_handle.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/uid32.c: use libtests. + * tests/uid32.c: Use SKIP_MAIN_UNDEFINED. + + tests/uid16.c: use libtests. + * tests/uid16.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/uid.c: use libtests. + * tests/uid.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/netlink_unix_diag.c: use libtests. + * tests/netlink_unix_diag.c (send_query, check_responses, main): + Use perror_msg_and_skip. + + tests/netlink_inet_diag.c: use libtests. + * tests/netlink_inet_diag.c (send_query, check_responses, main): + Use perror_msg_and_skip. + + tests/readdir.c: use libtests. + * tests/readdir.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/getdents64.c: use libtests. + * tests/getdents64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/getdents.c: use libtests. + * tests/getdents.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ipc_shm.c: use libtests. + * tests/ipc_shm.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_sem.c: use libtests. + * tests/ipc_sem.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_msg.c: use libtests. + * tests/ipc_msg.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_msgbuf.c: use libtests. + * tests/ipc_msgbuf.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/mq.c: use libtests. + * tests/mq.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/utimensat.c: use libtests. + * tests/utimensat.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ppoll.c: use libtests. + * tests/ppoll.c (main): Use assert, perror_msg_and_skip, + and perror_msg_and_fail. + + tests/mmsg.c: use libtests. + * tests/mmsg.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ip_mreq.c: use libtests. + * tests/ip_mreq.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ioctl.c: use libtests. + * tests/ioctl.c: Use SKIP_MAIN_UNDEFINED. + (main): Use %m printf format specifier. + + tests/pipe.c: use libtests. + * tests/pipe.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/getrandom.c: use libtests. + * tests/getrandom.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/signalfd.c: use libtests. + * tests/signalfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/pc.c: use libtests. + * tests/pc.c (main): Use assert, get_page_size, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/uio.c: use libtests. + * tests/uio.c: Use SKIP_MAIN_UNDEFINED. + + tests/bpf.c: use libtests. + * tests/bpf.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/aio.c: use libtests. + * tests/aio.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/sched_xetattr.c: use libtests. + * tests/sched_xetattr.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/wait.c: use libtests. + * tests/wait.c (main): Use perror_msg_and_fail. + + tests/vfork-f.c: use libtests. + * tests/vfork-f.c (main): Use assert and perror_msg_and_fail. + + tests/fork-f.c: use libtests. + * tests/fork-f.c (main): Use assert and perror_msg_and_fail. + + tests/userfaultfd.c: use libtests. + * tests/userfaultfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/mlock2.c: use libtests. + * tests/mlock2.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/membarrier.c: use libtests. + * tests/membarrier.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/nanosleep.c: use libtests. + * tests/nanosleep.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/timerfd_xettime.c: use libtests. + * tests/timerfd_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/timer_xettime.c: use libtests. + * tests/timer_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/timer_create.c: use libtests. + * tests/timer_create.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/clock_xettime.c: use libtests. + * tests/clock_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/clock_nanosleep.c: use libtests. + * tests/clock_nanosleep.c (main): Use assert and perror_msg_and_skip. + + tests/truncate64.c: use libtests. + * tests/truncate64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/truncate.c: use libtests. + * tests/truncate.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ftruncate64.c: use libtests. + * tests/ftruncate64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ftruncate.c: use libtests. + * tests/ftruncate.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/llseek.c: use libtests. + * tests/llseek.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/lseek.c: use libtests. + * tests/lseek.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/readlinkat.c: use libtests. + * tests/readlinkat.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/readlink.c: use libtests. + * tests/readlink.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/xattr.c: use libtests. + * tests/xattr.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/seccomp.c: use libtests. + * tests/seccomp.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/restart_syscall.c: use libtests. + * tests/restart_syscall.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/inet-cmsg.c: use libtests. + * tests/inet-cmsg.c (main): Use perror_msg_and_skip. + + tests/eventfd.c: use libtests. + * tests/eventfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/epoll_create1.c: use libtests. + * tests/epoll_create1.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/mmap.c: use libtests. + * tests/mmap.c (main): Use get_page_size and perror_msg_and_fail. + + tests/fanotify_mark.c: use libtests. + * tests/fanotify_mark.c: Use SKIP_MAIN_UNDEFINED. + + tests/inet-accept-connect-send-recv.c: use libtests. + * tests/inet-accept-connect-send-recv.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + + tests/net-accept-connect.c: use libtests. + * tests/net-accept-connect.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + + tests/unix-pair-send-recv.c: use libtests. + * tests/unix-pair-send-recv.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + +2016-01-06 Dmitry V. Levin + + tests/xselect.c: use libtests. + * tests/xselect.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/pselect6.c: use libtests. + * tests/pselect6.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, and perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/oldselect.c: use libtests. + * tests/oldselect.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/select.c: use libtests. + * tests/select.c: Use SKIP_MAIN_UNDEFINED. + + tests/_newselect.c: use libtests. + * tests/_newselect.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstatat.c: use libtests. + * tests/fstatat.c: Use SKIP_MAIN_UNDEFINED. + + tests/newfstatat.c: use libtests. + * tests/newfstatat.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstatat64.c: use libtests. + * tests/fstatat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/xstatx.c: use libtests. + * tests/xstatx.c: Use SKIP_MAIN_UNDEFINED. + + tests/stat64.c: use libtests. + * tests/stat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/stat.c: use libtests. + * tests/stat.c: Use SKIP_MAIN_UNDEFINED. + + tests/lstat64.c: use libtests. + * tests/lstat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/lstat.c: use libtests. + * tests/lstat.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstat64.c: use libtests. + * tests/fstat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstat.c: use libtests. + * tests/fstat.c: Use SKIP_MAIN_UNDEFINED. + + tests/statfs.c: use libtests. + * tests/statfs.c (main): Use perror_msg_and_fail. + +2016-01-06 Dmitry V. Levin + + tests/xettimeofday.c: use libtests. + * tests/xettimeofday.c (main): Use assert and perror_msg_and_skip. + + tests/utime.c: use libtests. + * tests/utime.c (main): Use assert and perror_msg_and_skip. + + tests/filter-unavailable.c: use libtests. + * tests/filter-unavailable.c (main): Use perror_msg_and_fail. + + tests/scm_rights.c: use libtests. + * tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/caps.c: use libtests. + * tests/caps.c (main): Use perror_msg_and_skip. + + tests/rt_sigqueueinfo.c: use libtests. + * tests/rt_sigqueueinfo.c (main): Use assert and perror_msg_and_skip. + + tests/umount.c: use libtests. + * tests/umount.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail. + + tests/umount2.c: use libtests. + * tests/umount2.c (main): Use perror_msg_and_fail. + +2016-01-05 Dmitry V. Levin + + tests/times.c: use libtests. + * tests/times.c (main): Use perror_msg_and_fail and perror_msg_and_skip. + +2016-01-04 Dmitry V. Levin + + tests/times-fail.c: use assert. + * tests/times-fail.c (main): Use assert. + + tests/memfd_create.c: use libtests. + * tests/memfd_create.c: Use SKIP_MAIN_UNDEFINED. + + tests/execveat.c: use libtests. + * tests/execveat.c: Use SKIP_MAIN_UNDEFINED. + + tests/xetitimer.c: use libtests. + * tests/xetitimer.c (main): Use perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/sysinfo.c: use libtests. + * tests/sysinfo.c (main): Use perror_msg_and_skip. + + tests/sigaltstack.c: use libtests. + * tests/sigaltstack.c (main): Use perror_msg_and_skip. + + tests/adjtimex.c: use libtests. + * tests/adjtimex.c (main): Use perror_msg_and_skip. + + tests/xet_robust_list.c: use libtests. + * tests/xet_robust_list.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip and tail_alloc. + + tests/umovestr2.c: use libtests. + * tests/umovestr2.c (main): Use get_page_size and tail_alloc. + + tests/umovestr.c: use libtests. + * tests/umovestr.c (main): Use perror_msg_and_skip and tail_alloc. + + tests/time.c: use libtests. + * tests/time.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip and tail_alloc. + + tests/sendfile64.c: use libtests. + * tests/sendfile64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, perror_msg_and_skip, + and tail_alloc. + + tests/sendfile.c: use libtests. + * tests/sendfile.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, perror_msg_and_skip, + and tail_alloc. + +2016-01-05 Dmitry V. Levin + + tests: include tests.h instead of config.h. + Automatically edit tests/*.c files using the following perl one-liner: + + perl -0777 -pi -e \ + 's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \ + tests/*.c + +2016-01-05 Dmitry V. Levin + + tests: introduce libtests. + Introduce tests/libtests.a with common functions for use in tests. + + * tests/tests.h: New file. + * tests/error_msg.c: Likewise. + * tests/tail_alloc.c: Likewise. + * tests/get_page_size.c: Likewise. + * tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS, + check_LIBRARIES, LDADD): New variables. + (clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD, + pc_LDADD, times_LDADD): Add $(LDADD). + * tests/.gitignore: Add libtests.a. + +2016-01-01 Dmitry V. Levin + + tests: enable strace-k.test only for --with-libunwind configurations. + Also, since -k option does not support multiple personalities, + add strace-k.test to XFAIL_TESTS when running mpers tests. + + * tests/Makefile.am (MPERS_NAME, LIBUNWIND_TESTS, XFAIL_TESTS_, + XFAIL_TESTS_m32, XFAIL_TESTS_mx32, XFAIL_TESTS): New variables. + [USE_LIBUNWIND] (LIBUNWIND_TESTS): Add strace-k.test. + (TESTS): Replace strace-k.test with $(LIBUNWIND_TESTS). + * bootstrap: Substitute MPERS_NAME variable in tests-*/Makefile.am. + * tests/strace-k.test: Do not check for -k option availability. + +2016-01-02 Dmitry V. Levin + + Move gcc compat macros to gcc_compat.h. + * defs.h: Include "gcc_compat.h". + (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT, + ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC, + ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ... + * gcc_compat.h: ... here. + * Makefile.am (strace_SOURCES): Add gcc_compat.h. + +2015-12-31 Dmitry V. Levin + + Move defs.h from noinst_HEADERS to strace_SOURCES. + * Makefile.am (noinst_HEADERS): Move defs.h ... + (strace_SOURCES): ... here. + +2015-12-30 Dmitry V. Levin + + test: remove fork.c and vfork.c. + These manual tests are obsoleted by fork-f.test and vfork-f.test. + + * test/fork.c: Remove. + * test/vfork.c: Remove. + * test/Makefile (PROGS): Remove fork and vfork. + * test/.gitignore: Remove fork and vfork. + +2015-12-30 Dmitry V. Levin + + tests: add fork-f.test and vfork-f.test. + Check how strace -f follows fork and vfork syscalls. + + * tests/fork-f.c: New file. + * tests/fork-f.test: New test. + * tests/vfork-f.c: New file. + * tests/vfork-f.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f. + (TESTS): Add fork-f.test and vfork-f.test. + * tests/.gitignore: Add fork-f and vfork-f. + +2015-12-29 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for getpid, getppid and gettid syscall. + * linux/*/syscallent*.h (getpid, getppid, gettid): Set NF flag. + +2015-12-29 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for umask syscall. + Linux kernel always ANDs umask argument with 0700 and therefore + this syscall never fails. + + * linux/*/syscallent*.h (umask): Set NF flag. + +2015-12-27 Dmitry V. Levin + + alpha, ia64, mips, nios2, powerpc, sparc: always check for syscall error + On architectures that use dedicated registers to report syscall errors, + check for syscall error condition regardless of SYSCALL_NEVER_FAILS flag + in the syscall entry. On architectures that use negated errno + semantics, there is no way to distinguish a syscall error from a valid + return code that looks like a syscall error, and the check for + SYSCALL_NEVER_FAILS flag remains the only way to tell one case + from another. + + * linux/alpha/get_error.c (get_error): Ignore check_errno. + * linux/ia64/get_error.c: Likewise. + * linux/mips/get_error.c: Likewise. + * linux/nios2/get_error.c: Likewise. + * linux/powerpc/get_error.c: Likewise. + * linux/sparc/get_error.c: Likewise. + * linux/sparc64/get_error.c: Likewise. + +2015-12-27 Dmitry V. Levin + + Handle unlikely errors from personality syscall. + Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still + might report a failure on some architectures due to obscure kernel + bugs. Check for this unlikely case and let users know that their + kernel has gone bananas. + + * personality.c (SYS_FUNC(personality)): Do not parse syscall return + value in case of syserror. + +2015-12-27 Dmitry V. Levin + + Do not truncate return value of get{,e}[ug]id and setfs[ug]id syscalls. + This should not be a user visible change unless the kernel does + something completely unexpected. In the latter case, let user see + what is going on. + + * uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate + tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED. + +2015-12-26 Dmitry V. Levin + + Enhance personality syscall decoding. + * xlat/personality_options.in: Split into ... + * xlat/personality_types.in: ... personality types and ... + * xlat/personality_flags.in: ... personality flags. + * personality.c: Include "xlat/personality_types.h" + and "xlat/personality_flags.h" instead of "xlat/personality_options.h". + (SYS_FUNC(personality)): Print PER_MASK part of personality as + a symbolic value, and the rest of personality as a set of flags. + * tests/personality.c (main): Add more test cases. + * tests/personality.test: Update. + +2015-12-25 Dmitry V. Levin + + sh, sh64: fix syscall flags in several syscall entries. + * linux/sh/syscallent.h (geteuid32, getegid32, setfsuid32, setfsgid32): + Set SYSCALL_NEVER_FAILS flag. + (fchown32): Set TRACE_DESC flag. + * linux/sh64/syscallent.h: Likewise. + +2015-12-25 Dmitry V. Levin + + Print personality value 0xffffffff properly. + Value 0xffffffff of personality syscall first argument has a special + meaning, it is not a set of personality flags. + + * personality.c (SYS_FUNC(personality)): If personality equals + to 0xffffffff, print it verbatim. + * tests/personality.c (main): Test it. + +2015-12-25 Dmitry V. Levin + + tests: add personality.test. + * tests/personality.c: New file. + * tests/personality.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add personality. + (TESTS): Add personality.test. + * tests/.gitignore: Add personality. + + Enhance personality syscall decoding. + * personality.c (SYS_FUNC(personality)): On entering syscall, + print first argument not as a hex value but as a set of flags. + On exiting syscall, print return code as a set of flags. + * NEWS: Mention this enhancement. + +2015-12-25 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for personality syscall. + Starting with commit + v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, personality + syscall never fails to set the personality, but before commit + v2.6.35-rc1-372-g485d527 it still could return an error. + Starting with that commit, personality syscall never returns an error. + + * linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag in personality + syscall entries. + +2015-12-24 Dmitry V. Levin + + Add personality emulation flags. + * xlat/personality_options.in: Add UNAME26, ADDR_NO_RANDOMIZE, + FDPIC_FUNCPTRS, MMAP_PAGE_ZERO, ADDR_COMPAT_LAYOUT, READ_IMPLIES_EXEC, + ADDR_LIMIT_32BIT, SHORT_INODE, WHOLE_SECONDS, STICKY_TIMEOUTS, + and ADDR_LIMIT_3GB. + +2015-12-24 Dmitry V. Levin + + arc, metag, nios2, or1k, tile: fix build. + Fix build regression introduced by commit + 34683e3926d8c2daa368afb805da422ee7043396. + + * linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. + * linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. + * linux/nios2/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. + * pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. + * NEWS: Mention this build fix. + + Reported-by: Alexey Brodkin + +2015-12-24 Dmitry V. Levin + + packages: remove acl development library from build dependencies. + Starting with commit v4.9-46-g681452b that removed all references + to acl.h, we no longer use acl development library. + + * .travis.yml (addons.apt.packages): Remove libacl1-dev. + * strace.spec (BuildRequires): Remove libacl-devel. + +2015-12-23 Dmitry V. Levin + + packages/x86_64: enable experimental -k option. + * debian/control (Build-Depends) [amd64]: Add libunwind-dev. + * strace.spec (BuildRequires) [x86_64]: Add libunwind-devel. + + maint: post-release administrivia. + * NEWS: Add header line for the next release. + 2015-12-21 Dmitry V. Levin Prepare for 4.11 release. diff -Nru strace-4.11/clone.c strace-4.12/clone.c --- strace-4.11/clone.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/clone.c 2016-05-16 22:49:54.000000000 +0000 @@ -142,7 +142,7 @@ SYS_FUNC(unshare) { - printflags(clone_flags, tcp->u_arg[0], "CLONE_???"); + printflags_long(clone_flags, tcp->u_arg[0], "CLONE_???"); return RVAL_DECODED; } diff -Nru strace-4.11/config.h.in strace-4.12/config.h.in --- strace-4.11/config.h.in 2015-12-21 23:24:03.000000000 +0000 +++ strace-4.12/config.h.in 2016-05-31 11:35:56.000000000 +0000 @@ -55,6 +55,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_BLUETOOTH_BLUETOOTH_H +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_LZO', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_LZO + +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_NONE', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_NONE + +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_ZLIB', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_ZLIB + /* Define to 1 if you have the declaration of `CTL_ABI', and to 0 if you don't. */ #undef HAVE_DECL_CTL_ABI @@ -1583,9 +1595,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_IOCTLS_H - /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_PTRACE_H @@ -1595,9 +1604,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_BSG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_BTRFS_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FALLOC_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FIEMAP_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FILTER_H @@ -1665,6 +1680,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_SHM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_USERFAULTFD_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_UTSNAME_H @@ -1707,6 +1725,9 @@ /* Define to 1 if you have the `pwritev' function. */ #undef HAVE_PWRITEV +/* Define to 1 if you have the `recvmmsg' function. */ +#undef HAVE_RECVMMSG + /* Define to 1 if you have the header file. */ #undef HAVE_SCSI_SG_H @@ -1758,6 +1779,21 @@ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL +/* Define to 1 if the system has the type `struct blk_user_trace_setup'. */ +#undef HAVE_STRUCT_BLK_USER_TRACE_SETUP + +/* Define to 1 if `start struct btrfs_ioctl_search_args_v2.buf_size' is a + member of `struct btrfs_ioctl_defrag_range_args'. */ +#undef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE + +/* Define to 1 if `compat_flags' is a member of `struct + btrfs_ioctl_feature_flags'. */ +#undef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS + +/* Define to 1 if `nodesize' is a member of `struct btrfs_ioctl_fs_info_args'. + */ +#undef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE + /* Define to 1 if the system has the type `struct flock'. */ #undef HAVE_STRUCT_FLOCK @@ -1785,21 +1821,42 @@ /* Define to 1 if the system has the type `struct sigcontext'. */ #undef HAVE_STRUCT_SIGCONTEXT -/* Define to 1 if `_sigev_un._pad' is a member of `struct sigevent'. */ -#undef HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD - -/* Define to 1 if `__pad' is a member of `struct sigevent'. */ -#undef HAVE_STRUCT_SIGEVENT___PAD - /* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID /* Define to 1 if the system has the type `struct stat64'. */ #undef HAVE_STRUCT_STAT64 +/* Define to 1 if the system has the type `struct statfs'. */ +#undef HAVE_STRUCT_STATFS + /* Define to 1 if the system has the type `struct statfs64'. */ #undef HAVE_STRUCT_STATFS64 +/* Define to 1 if `f_flags' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FLAGS + +/* Define to 1 if `f_frsize' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FRSIZE + +/* Define to 1 if `f_fsid.val' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FSID_VAL + +/* Define to 1 if `f_fsid.__val' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FSID___VAL + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FLAGS + +/* Define to 1 if `f_frsize' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FRSIZE + +/* Define to 1 if `f_fsid.val' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSID_VAL + +/* Define to 1 if `f_fsid.__val' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSID___VAL + /* Define to 1 if `st_atime_nsec' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIME_NSEC @@ -1851,6 +1908,9 @@ /* Define to 1 if the system has the type `struct __old_kernel_stat'. */ #undef HAVE_STRUCT___OLD_KERNEL_STAT +/* Define to 1 if you have the `sync_file_range' function. */ +#undef HAVE_SYNC_FILE_RANGE + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CONF_H @@ -1858,18 +1918,12 @@ */ #undef HAVE_SYS_DIR_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EPOLL_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENTFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FANOTIFY_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IPC_H @@ -1898,12 +1952,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_VFS_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_XATTR_H +/* Define to 1 if typeof works with your compiler. */ +#undef HAVE_TYPEOF + /* Define to 1 if union bpf_attr.log_buf initialization works */ #undef HAVE_UNION_BPF_ATTR_LOG_BUF @@ -2106,5 +2160,8 @@ /* Define to `int' if does not define. */ #undef mode_t +/* Define to __typeof__ if your compiler spells it that way. */ +#undef typeof + /* Define to `int' if doesn't define. */ #undef uid_t diff -Nru strace-4.11/configure strace-4.12/configure --- strace-4.11/configure 2015-12-21 23:24:02.000000000 +0000 +++ strace-4.12/configure 2016-05-31 11:35:55.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for strace 4.11. +# Generated by GNU Autoconf 2.69 for strace 4.12. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='strace' PACKAGE_TARNAME='strace' -PACKAGE_VERSION='4.11' -PACKAGE_STRING='strace 4.11' +PACKAGE_VERSION='4.12' +PACKAGE_STRING='strace 4.12' PACKAGE_BUGREPORT='strace-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -645,9 +645,21 @@ arch_mx32 arch_m32 arch -RANLIB +CODE_COVERAGE_RULES +CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_CXXFLAGS +CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS +GENHTML +LCOV +GCOV +CODE_COVERAGE_ENABLED +CODE_COVERAGE_ENABLED_FALSE +CODE_COVERAGE_ENABLED_TRUE +SED EGREP GREP +RANLIB LDFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CFLAGS_FOR_BUILD @@ -756,6 +768,8 @@ enable_silent_rules enable_maintainer_mode enable_dependency_tracking +with_gcov +enable_code_coverage enable_arm_oabi enable_gcc_Werror with_libunwind @@ -1309,7 +1323,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures strace 4.11 to adapt to many kinds of systems. +\`configure' configures strace 4.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1379,7 +1393,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of strace 4.11:";; + short | recursive ) echo "Configuration of strace 4.12:";; esac cat <<\_ACEOF @@ -1396,12 +1410,14 @@ do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-code-coverage Whether to enable code coverage support --enable-arm-oabi enable OABI support on ARM EABI --enable-gcc-Werror turn on gcc's -Werror option Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). --with-libunwind use libunwind to implement stack tracing support Some influential environment variables: @@ -1480,7 +1496,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -strace configure 4.11 +strace configure 4.12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2016,63 +2032,6 @@ } # ac_fn_c_check_type -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2169,6 +2128,63 @@ } # ac_fn_c_check_func +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2218,7 +2234,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by strace $as_me 4.11, which was +It was created by strace $as_me 4.12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3086,7 +3102,7 @@ # Define the identity of the package. PACKAGE='strace' - VERSION='4.11' + VERSION='4.12' cat >>confdefs.h <<_ACEOF @@ -5330,6 +5346,100 @@ BUILD_OBJEXT=$ac_build_objext +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } @@ -5651,38 +5761,146 @@ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED fi + fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + + # allow to override gcov location + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov +else + _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +$as_echo_n "checking whether to build with code coverage support... " >&6; } + # Check whether --enable-code-coverage was given. +if test "${enable_code_coverage+set}" = set; then : + enableval=$enable_code_coverage; +else + enable_code_coverage=no +fi + + + if test x$enable_code_coverage = xyes; then + CODE_COVERAGE_ENABLED_TRUE= + CODE_COVERAGE_ENABLED_FALSE='#' +else + CODE_COVERAGE_ENABLED_TRUE='#' + CODE_COVERAGE_ENABLED_FALSE= +fi + + CODE_COVERAGE_ENABLED=$enable_code_coverage + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +$as_echo "$enable_code_coverage" >&6; } + + if test "$enable_code_coverage" = "yes" ; then : + + # check for gcov + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -5690,17 +5908,17 @@ fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5709,7 +5927,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" + ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5719,17 +5937,17 @@ fi fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" + if test "x$ac_ct_GCOV" = x; then + GCOV=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -5737,12 +5955,275 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - RANLIB=$ac_ct_RANLIB + GCOV=$ac_ct_GCOV fi else - RANLIB="$ac_cv_prog_RANLIB" + GCOV="$ac_cv_prog_GCOV" +fi + + if test "X$GCOV" = "X:"; then : + as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 +fi + + + if test "$GCC" = "no" ; then : + + as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 + +fi + + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LCOV"; then + ac_cv_prog_LCOV="$LCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LCOV="lcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LCOV=$ac_cv_prog_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GENHTML"; then + ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GENHTML="genhtml" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GENHTML=$ac_cv_prog_GENHTML +if test -n "$GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$LCOV" ; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 +$as_echo_n "checking for lcov version... " >&6; } +if ${ax_cv_lcov_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 +$as_echo "$ax_cv_lcov_version" >&6; } + +else + + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + as_fn_error $? "$lcov_msg" "$LINENO" 5 + +fi + + case $ax_cv_lcov_version in + ""|invalid) + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + as_fn_error $? "$lcov_msg" "$LINENO" 5 + LCOV="exit 0;" + ;; + esac + + if test -z "$GENHTML" ; then : + + as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 + +fi + + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LDFLAGS="-lgcov" + + + + + + fi +CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported architecture" >&5 $as_echo_n "checking for supported architecture... " >&6; } @@ -6285,271 +6766,52 @@ -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include int main () @@ -6728,211 +6990,314 @@ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include int main () { +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes + ac_cv_c_const=yes else - ac_cv_header_stdc=no + ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +$as_echo "#define const /**/" >>confdefs.h -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5 +$as_echo_n "checking for typeof syntax and keyword spelling... " >&6; } +if ${ac_cv_c_typeof+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdc=no -fi -rm -f conftest* + ac_cv_c_typeof=no + for ac_kw in typeof __typeof__ no; do + test $ac_kw = no && break + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ + + int value; + typedef struct { + char a [1 + + ! (($ac_kw (value)) + (($ac_kw (value)) 0 < ($ac_kw (value)) -1 + ? ($ac_kw (value)) - 1 + : ~ (~ ($ac_kw (value)) 0 + << sizeof ($ac_kw (value)))))]; } + ac__typeof_type_; + return + (! ((void) ((ac__typeof_type_ *) 0), 0)); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_typeof=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test $ac_cv_c_typeof != no && break + done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5 +$as_echo "$ac_cv_c_typeof" >&6; } + if test $ac_cv_c_typeof != no; then -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h + + if test $ac_cv_c_typeof != typeof; then + +cat >>confdefs.h <<_ACEOF +#define typeof $ac_cv_c_typeof +_ACEOF + + fi + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes else - ac_cv_header_stdc=no + ac_cv_type_uid_t=no fi rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if ${ac_cv_type_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "$cross_compiling" = yes; then : - : + ac_cv_type_getgroups=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - + ac_cv_type_getgroups=gid_t else - ac_cv_header_stdc=no + ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF -$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; +#include +#include int main () { - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes + ac_cv_type_signal=int else - ac_cv_header_stdbool_h=no + ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 +#define RETSIGTYPE $ac_cv_type_signal _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then +$as_echo "#define uid_t int" >>confdefs.h -if test $ac_cv_header_stdbool_h = yes; then -$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h +$as_echo "#define gid_t int" >>confdefs.h fi + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` @@ -7091,10 +7456,60 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if ${ac_cv_header_stat_broken+:} false; then : - $as_echo_n "(cached) " >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if ${ac_cv_header_sys_types_h_makedev+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return makedev(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes +else + ac_cv_header_sys_types_h_makedev=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : + +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h + +fi + + + + if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : + +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h + +fi + + + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7133,318 +7548,584 @@ fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +#define HAVE__BOOL 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + + +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + + +for ac_func in fanotify_mark fopen64 fork fputs_unlocked fstatat ftruncate futimens if_indextoname inet_ntop inet_pton pipe2 prctl preadv process_vm_readv pwritev recvmmsg sendmmsg sigaction signalfd stpcpy strerror strsignal sync_file_range utimensat +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include +" +if test "x$ac_cv_type_sig_atomic_t" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +#define HAVE_SIG_ATOMIC_T 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : +ac_fn_c_check_type "$LINENO" "struct sigcontext" "ac_cv_type_struct_sigcontext" "#include +" +if test "x$ac_cv_type_struct_sigcontext" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +#define HAVE_STRUCT_SIGCONTEXT 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_ctim.tv_nsec" "ac_cv_member_struct_stat_st_ctim_tv_nsec" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_ctim_tv_nsec" = xyes; then : + + +ac_fn_c_check_type "$LINENO" "struct mmsghdr" "ac_cv_type_struct_mmsghdr" "#include +" +if test "x$ac_cv_type_struct_mmsghdr" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC 1 +#define HAVE_STRUCT_MMSGHDR 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : + + +ac_fn_c_check_type "$LINENO" "__kernel_long_t" "ac_cv_type___kernel_long_t" "#include +" +if test "x$ac_cv_type___kernel_long_t" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_FLAGS 1 +#define HAVE___KERNEL_LONG_T 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_fstype" = xyes; then : +ac_fn_c_check_type "$LINENO" "__kernel_ulong_t" "ac_cv_type___kernel_ulong_t" "#include +" +if test "x$ac_cv_type___kernel_ulong_t" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_FSTYPE 1 +#define HAVE___KERNEL_ULONG_T 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : + + +ac_fn_c_check_type "$LINENO" "struct stat64" "ac_cv_type_struct_stat64" "#include +#include +" +if test "x$ac_cv_type_struct_stat64" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_GEN 1 +#define HAVE_STRUCT_STAT64 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = xyes; then : +ac_fn_c_check_type "$LINENO" "struct __old_kernel_stat" "ac_cv_type_struct___old_kernel_stat" "#include +#include +" +if test "x$ac_cv_type_struct___old_kernel_stat" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#define HAVE_STRUCT___OLD_KERNEL_STAT 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : + + +ac_fn_c_check_type "$LINENO" "struct pt_all_user_regs" "ac_cv_type_struct_pt_all_user_regs" "#include +" +if test "x$ac_cv_type_struct_pt_all_user_regs" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 +#define HAVE_STRUCT_PT_ALL_USER_REGS 1 _ACEOF fi +ac_fn_c_check_type "$LINENO" "struct ia64_fpreg" "ac_cv_type_struct_ia64_fpreg" "#include +" +if test "x$ac_cv_type_struct_ia64_fpreg" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IA64_FPREG 1 +_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} +fi +ac_fn_c_check_type "$LINENO" "struct ptrace_peeksiginfo_args" "ac_cv_type_struct_ptrace_peeksiginfo_args" "#include +" +if test "x$ac_cv_type_struct_ptrace_peeksiginfo_args" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void + + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +ac_fn_c_check_type "$LINENO" "struct flock" "ac_cv_type_struct_flock" "#include +#include +" +if test "x$ac_cv_type_struct_flock" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FLOCK 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct flock64" "ac_cv_type_struct_flock64" "#include +#include +" +if test "x$ac_cv_type_struct_flock64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FLOCK64 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct __kernel_flock" "ac_cv_type_struct___kernel_flock" "#include +#include +" +if test "x$ac_cv_type_struct___kernel_flock" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___KERNEL_FLOCK 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct __kernel_flock64" "ac_cv_type_struct___kernel_flock64" "#include +#include +" +if test "x$ac_cv_type_struct___kernel_flock64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___KERNEL_FLOCK64 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_ctim.tv_nsec" "ac_cv_member_struct_stat_st_ctim_tv_nsec" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_ctim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +_ACEOF + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } +ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_fstype" = xyes; then : cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +#define HAVE_STRUCT_STAT_ST_FSTYPE 1 _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if ${ac_cv_type_uid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_GEN 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = xyes; then : -$as_echo "#define uid_t int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +_ACEOF -$as_echo "#define gid_t int" >>confdefs.h +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + fi -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes; then : -else +ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#include +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : cat >>confdefs.h <<_ACEOF -#define mode_t int +#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 _ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 -$as_echo_n "checking type of array argument to getgroups... " >&6; } -if ${ac_cv_type_getgroups+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_type_getgroups=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Mike Rendell for this test. */ -$ac_includes_default -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -int -main () -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long int lval; } val; +ac_fn_c_check_member "$LINENO" "struct timex" "tai" "ac_cv_member_struct_timex_tai" "#include +" +if test "x$ac_cv_member_struct_timex_tai" = xyes; then : - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short int but getgroups modifies an array - of ints. */ - return n > 0 && gidset[n] != val.gval; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMEX_TAI 1 _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_getgroups=gid_t -else - ac_cv_type_getgroups=int -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -if test $ac_cv_type_getgroups = cross; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : - ac_cv_type_getgroups=gid_t -else - ac_cv_type_getgroups=int fi -rm -f conftest* -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 -$as_echo "$ac_cv_type_getgroups" >&6; } + +ac_fn_c_check_member "$LINENO" "struct utsname" "domainname" "ac_cv_member_struct_utsname_domainname" "#include +" +if test "x$ac_cv_member_struct_utsname_domainname" = xyes; then : cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups +#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1 _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if ${ac_cv_header_sys_types_h_makedev+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return makedev(0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_header_sys_types_h_makedev=yes -else - ac_cv_header_sys_types_h_makedev=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -if test $ac_cv_header_sys_types_h_makedev = no; then -ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : +ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "#include +#include +#include +" +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +_ACEOF -$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_atime_nsec" "ac_cv_member_struct_stat_st_atime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_atime_nsec" = xyes; then : - if test $ac_cv_header_sys_mkdev_h = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1 +_ACEOF -$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime_nsec" "ac_cv_member_struct_stat_st_ctime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_ctime_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIME_NSEC 1 +_ACEOF - fi fi - -ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_nsec" "ac_cv_member_struct_stat_st_mtime_nsec" "#include +#include " -if test "x$ac_cv_type_sig_atomic_t" = xyes; then : +if test "x$ac_cv_member_struct_stat_st_mtime_nsec" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SIG_ATOMIC_T 1 +#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "#include -#include -#include + +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_syscall" "ac_cv_member_siginfo_t_si_syscall" "#include " -if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then : +if test "x$ac_cv_member_siginfo_t_si_syscall" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +#define HAVE_SIGINFO_T_SI_SYSCALL 1 _ACEOF fi +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_timerid" "ac_cv_member_siginfo_t_si_timerid" "#include +" +if test "x$ac_cv_member_siginfo_t_si_timerid" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_TIMERID 1 +_ACEOF -for ac_func in fanotify_mark fopen64 fork fputs_unlocked fstatat ftruncate futimens if_indextoname inet_ntop inet_pton pipe2 prctl preadv process_vm_readv pwritev sendmmsg sigaction signalfd stpcpy strerror strsignal utimensat -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +fi +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_overrun" "ac_cv_member_siginfo_t_si_overrun" "#include +" +if test "x$ac_cv_member_siginfo_t_si_overrun" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_OVERRUN 1 _ACEOF + fi -done -for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h ioctls.h linux/bsg.h linux/falloc.h linux/filter.h linux/hiddev.h linux/ip_vs.h linux/ipc.h linux/mmtimer.h linux/msg.h linux/perf_event.h linux/seccomp.h linux/securebits.h linux/sem.h linux/shm.h linux/utsname.h mqueue.h netinet/sctp.h scsi/sg.h stropts.h sys/conf.h sys/epoll.h sys/eventfd.h sys/fanotify.h sys/ioctl.h sys/ipc.h sys/msg.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h sys/vfs.h sys/xattr.h + +for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h linux/bsg.h linux/falloc.h linux/fiemap.h linux/filter.h linux/hiddev.h linux/ip_vs.h linux/ipc.h linux/mmtimer.h linux/msg.h linux/perf_event.h linux/seccomp.h linux/securebits.h linux/sem.h linux/shm.h linux/userfaultfd.h linux/utsname.h mqueue.h netinet/sctp.h scsi/sg.h stropts.h sys/conf.h sys/eventfd.h sys/fanotify.h sys/ipc.h sys/msg.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h sys/xattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -7457,25 +8138,25 @@ done -for ac_header in linux/mqueue.h + +for ac_header in asm/sigcontext.h do : - ac_fn_c_check_header_compile "$LINENO" "linux/mqueue.h" "ac_cv_header_linux_mqueue_h" "#include + ac_fn_c_check_header_compile "$LINENO" "asm/sigcontext.h" "ac_cv_header_asm_sigcontext_h" "#include " -if test "x$ac_cv_header_linux_mqueue_h" = xyes; then : +if test "x$ac_cv_header_asm_sigcontext_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_MQUEUE_H 1 +#define HAVE_ASM_SIGCONTEXT_H 1 _ACEOF fi done -for ac_header in linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h + +for ac_header in netinet/tcp.h netinet/udp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include -#include -#include +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @@ -7486,34 +8167,27 @@ done -for ac_header in asm/sigcontext.h + +for ac_header in linux/mqueue.h do : - ac_fn_c_check_header_compile "$LINENO" "asm/sigcontext.h" "ac_cv_header_asm_sigcontext_h" "#include + ac_fn_c_check_header_compile "$LINENO" "linux/mqueue.h" "ac_cv_header_linux_mqueue_h" "#include " -if test "x$ac_cv_header_asm_sigcontext_h" = xyes; then : +if test "x$ac_cv_header_linux_mqueue_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_ASM_SIGCONTEXT_H 1 -_ACEOF - -fi - -done - -ac_fn_c_check_type "$LINENO" "struct sigcontext" "ac_cv_type_struct_sigcontext" "#include -" -if test "x$ac_cv_type_struct_sigcontext" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SIGCONTEXT 1 +#define HAVE_LINUX_MQUEUE_H 1 _ACEOF - fi -for ac_header in netinet/tcp.h netinet/udp.h +done + + +for ac_header in linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include +#include +#include " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @@ -7524,6 +8198,7 @@ done + for ac_header in linux/netfilter_arp/arp_tables.h linux/netfilter_bridge/ebtables.h linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -7540,338 +8215,289 @@ done -ac_fn_c_check_type "$LINENO" "struct mmsghdr" "ac_cv_type_struct_mmsghdr" "#include -" -if test "x$ac_cv_type_struct_mmsghdr" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MMSGHDR 1 +for ac_header in linux/input.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_input_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_INPUT_H 1 _ACEOF - -fi - -ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#include + ac_fn_c_check_member "$LINENO" "struct input_absinfo" "resolution" "ac_cv_member_struct_input_absinfo_resolution" "#include " -if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : +if test "x$ac_cv_member_struct_input_absinfo_resolution" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 +#define HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_atime_nsec" "ac_cv_member_struct_stat_st_atime_nsec" "#include -#include -" -if test "x$ac_cv_member_struct_stat_st_atime_nsec" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1 -_ACEOF +fi +done -fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime_nsec" "ac_cv_member_struct_stat_st_ctime_nsec" "#include -#include -" -if test "x$ac_cv_member_struct_stat_st_ctime_nsec" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_CTIME_NSEC 1 +for ac_header in linux/bpf.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/bpf.h" "ac_cv_header_linux_bpf_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_bpf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_BPF_H 1 _ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union bpf_attr.log_buf initialization works" >&5 +$as_echo_n "checking whether union bpf_attr.log_buf initialization works... " >&6; } +if ${st_cv_have_union_bpf_attr_log_buf+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +union bpf_attr a = { .log_buf = 0 }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_have_union_bpf_attr_log_buf=yes +else + st_cv_have_union_bpf_attr_log_buf=no fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_nsec" "ac_cv_member_struct_stat_st_mtime_nsec" "#include -#include -" -if test "x$ac_cv_member_struct_stat_st_mtime_nsec" = xyes; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_union_bpf_attr_log_buf" >&5 +$as_echo "$st_cv_have_union_bpf_attr_log_buf" >&6; } + if test $st_cv_have_union_bpf_attr_log_buf = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -_ACEOF +$as_echo "#define HAVE_UNION_BPF_ATTR_LOG_BUF 1" >>confdefs.h + fi fi +done -ac_fn_c_check_type "$LINENO" "struct stat64" "ac_cv_type_struct_stat64" "#include -#include + +ac_fn_c_check_type "$LINENO" "struct statfs" "ac_cv_type_struct_statfs" "#include +#include " -if test "x$ac_cv_type_struct_stat64" = xyes; then : +if test "x$ac_cv_type_struct_statfs" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT64 1 +#define HAVE_STRUCT_STATFS 1 _ACEOF -fi - -ac_fn_c_check_type "$LINENO" "struct __old_kernel_stat" "ac_cv_type_struct___old_kernel_stat" "#include + ac_fn_c_check_member "$LINENO" "struct statfs" "f_frsize" "ac_cv_member_struct_statfs_f_frsize" "#include +#include " -if test "x$ac_cv_type_struct___old_kernel_stat" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_frsize" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT___OLD_KERNEL_STAT 1 +#define HAVE_STRUCT_STATFS_F_FRSIZE 1 _ACEOF fi -ac_fn_c_check_type "$LINENO" "struct statfs64" "ac_cv_type_struct_statfs64" "#include + ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "#include +#include " -if test "x$ac_cv_type_struct_statfs64" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS64 1 +#define HAVE_STRUCT_STATFS_F_FLAGS 1 _ACEOF fi - -ac_fn_c_check_type "$LINENO" "struct pt_all_user_regs" "ac_cv_type_struct_pt_all_user_regs" "#include + ac_fn_c_check_member "$LINENO" "struct statfs" "f_fsid.val" "ac_cv_member_struct_statfs_f_fsid_val" "#include +#include " -if test "x$ac_cv_type_struct_pt_all_user_regs" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_fsid_val" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_PT_ALL_USER_REGS 1 +#define HAVE_STRUCT_STATFS_F_FSID_VAL 1 _ACEOF fi -ac_fn_c_check_type "$LINENO" "struct ia64_fpreg" "ac_cv_type_struct_ia64_fpreg" "#include -" -if test "x$ac_cv_type_struct_ia64_fpreg" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IA64_FPREG 1 -_ACEOF - -fi -ac_fn_c_check_type "$LINENO" "struct ptrace_peeksiginfo_args" "ac_cv_type_struct_ptrace_peeksiginfo_args" "#include + ac_fn_c_check_member "$LINENO" "struct statfs" "f_fsid.__val" "ac_cv_member_struct_statfs_f_fsid___val" "#include +#include " -if test "x$ac_cv_type_struct_ptrace_peeksiginfo_args" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_fsid___val" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS 1 +#define HAVE_STRUCT_STATFS_F_FSID___VAL 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct utsname" "domainname" "ac_cv_member_struct_utsname_domainname" "#include -" -if test "x$ac_cv_member_struct_utsname_domainname" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1 -_ACEOF - - fi -ac_fn_c_check_member "$LINENO" "struct sigevent" "_sigev_un._pad" "ac_cv_member_struct_sigevent__sigev_un__pad" "#include +ac_fn_c_check_type "$LINENO" "struct statfs64" "ac_cv_type_struct_statfs64" "#include +#include " -if test "x$ac_cv_member_struct_sigevent__sigev_un__pad" = xyes; then : +if test "x$ac_cv_type_struct_statfs64" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD 1 +#define HAVE_STRUCT_STATFS64 1 _ACEOF -fi -ac_fn_c_check_member "$LINENO" "struct sigevent" "__pad" "ac_cv_member_struct_sigevent___pad" "#include + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_frsize" "ac_cv_member_struct_statfs64_f_frsize" "#include +#include " -if test "x$ac_cv_member_struct_sigevent___pad" = xyes; then : +if test "x$ac_cv_member_struct_statfs64_f_frsize" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SIGEVENT___PAD 1 +#define HAVE_STRUCT_STATFS64_F_FRSIZE 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "siginfo_t" "si_syscall" "ac_cv_member_siginfo_t_si_syscall" "#include -" -if test "x$ac_cv_member_siginfo_t_si_syscall" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SIGINFO_T_SI_SYSCALL 1 -_ACEOF - -fi -ac_fn_c_check_member "$LINENO" "siginfo_t" "si_timerid" "ac_cv_member_siginfo_t_si_timerid" "#include + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_flags" "ac_cv_member_struct_statfs64_f_flags" "#include +#include " -if test "x$ac_cv_member_siginfo_t_si_timerid" = xyes; then : +if test "x$ac_cv_member_struct_statfs64_f_flags" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SIGINFO_T_SI_TIMERID 1 +#define HAVE_STRUCT_STATFS64_F_FLAGS 1 _ACEOF fi -ac_fn_c_check_member "$LINENO" "siginfo_t" "si_overrun" "ac_cv_member_siginfo_t_si_overrun" "#include + + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_fsid.val" "ac_cv_member_struct_statfs64_f_fsid_val" "#include +#include " -if test "x$ac_cv_member_siginfo_t_si_overrun" = xyes; then : +if test "x$ac_cv_member_struct_statfs64_f_fsid_val" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SIGINFO_T_SI_OVERRUN 1 +#define HAVE_STRUCT_STATFS64_F_FSID_VAL 1 _ACEOF fi - -ac_fn_c_check_type "$LINENO" "struct flock" "ac_cv_type_struct_flock" "#include -#include + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_fsid.__val" "ac_cv_member_struct_statfs64_f_fsid___val" "#include +#include " -if test "x$ac_cv_type_struct_flock" = xyes; then : +if test "x$ac_cv_member_struct_statfs64_f_fsid___val" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_FLOCK 1 +#define HAVE_STRUCT_STATFS64_F_FSID___VAL 1 _ACEOF fi -ac_fn_c_check_type "$LINENO" "struct flock64" "ac_cv_type_struct_flock64" "#include -#include -" -if test "x$ac_cv_type_struct_flock64" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_FLOCK64 1 -_ACEOF fi -ac_fn_c_check_type "$LINENO" "struct __kernel_flock" "ac_cv_type_struct___kernel_flock" "#include -#include -" -if test "x$ac_cv_type_struct___kernel_flock" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT___KERNEL_FLOCK 1 -_ACEOF -fi -ac_fn_c_check_type "$LINENO" "struct __kernel_flock64" "ac_cv_type_struct___kernel_flock64" "#include -#include +ac_fn_c_check_type "$LINENO" "struct blk_user_trace_setup" "ac_cv_type_struct_blk_user_trace_setup" "#include " -if test "x$ac_cv_type_struct___kernel_flock64" = xyes; then : +if test "x$ac_cv_type_struct_blk_user_trace_setup" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT___KERNEL_FLOCK64 1 +#define HAVE_STRUCT_BLK_USER_TRACE_SETUP 1 _ACEOF fi -ac_fn_c_check_type "$LINENO" "__kernel_long_t" "ac_cv_type___kernel_long_t" "#include -" -if test "x$ac_cv_type___kernel_long_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE___KERNEL_LONG_T 1 +for ac_header in linux/btrfs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/btrfs.h" "ac_cv_header_linux_btrfs_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_btrfs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_BTRFS_H 1 _ACEOF - -fi -ac_fn_c_check_type "$LINENO" "__kernel_ulong_t" "ac_cv_type___kernel_ulong_t" "#include + ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_feature_flags" "compat_flags" "ac_cv_member_struct_btrfs_ioctl_feature_flags_compat_flags" " #include +#include " -if test "x$ac_cv_type___kernel_ulong_t" = xyes; then : +if test "x$ac_cv_member_struct_btrfs_ioctl_feature_flags_compat_flags" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE___KERNEL_ULONG_T 1 +#define HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS 1 _ACEOF fi - - -ac_fn_c_check_member "$LINENO" "struct timex" "tai" "ac_cv_member_struct_timex_tai" "#include +ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_fs_info_args" "nodesize" "ac_cv_member_struct_btrfs_ioctl_fs_info_args_nodesize" " #include +#include " -if test "x$ac_cv_member_struct_timex_tai" = xyes; then : +if test "x$ac_cv_member_struct_btrfs_ioctl_fs_info_args_nodesize" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TIMEX_TAI 1 +#define HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE 1 _ACEOF fi - - -for ac_header in linux/input.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_input_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_INPUT_H 1 -_ACEOF - - ac_fn_c_check_member "$LINENO" "struct input_absinfo" "resolution" "ac_cv_member_struct_input_absinfo_resolution" "#include +ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_defrag_range_args" "start struct btrfs_ioctl_search_args_v2.buf_size" "ac_cv_member_struct_btrfs_ioctl_defrag_range_args_start_struct_btrfs_ioctl_search_args_v2_buf_size" " #include +#include " -if test "x$ac_cv_member_struct_input_absinfo_resolution" = xyes; then : +if test "x$ac_cv_member_struct_btrfs_ioctl_defrag_range_args_start_struct_btrfs_ioctl_search_args_v2_buf_size" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION 1 +#define HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE 1 _ACEOF fi - + ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_NONE" "ac_cv_have_decl_BTRFS_COMPRESS_NONE" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_NONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -done - - -for ac_header in linux/bpf.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "linux/bpf.h" "ac_cv_header_linux_bpf_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_bpf_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_BPF_H 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_NONE $ac_have_decl _ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union bpf_attr.log_buf initialization works" >&5 -$as_echo_n "checking whether union bpf_attr.log_buf initialization works... " >&6; } -if ${st_cv_have_union_bpf_attr_log_buf+:} false; then : - $as_echo_n "(cached) " >&6 +ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_ZLIB" "ac_cv_have_decl_BTRFS_COMPRESS_ZLIB" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_ZLIB" = xyes; then : + ac_have_decl=1 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -union bpf_attr a = { .log_buf = 0 }; - ; - return 0; -} + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_ZLIB $ac_have_decl _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - st_cv_have_union_bpf_attr_log_buf=yes +ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_LZO" "ac_cv_have_decl_BTRFS_COMPRESS_LZO" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_LZO" = xyes; then : + ac_have_decl=1 else - st_cv_have_union_bpf_attr_log_buf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_union_bpf_attr_log_buf" >&5 -$as_echo "$st_cv_have_union_bpf_attr_log_buf" >&6; } - if test $st_cv_have_union_bpf_attr_log_buf = yes; then - -$as_echo "#define HAVE_UNION_BPF_ATTR_LOG_BUF 1" >>confdefs.h - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_LZO $ac_have_decl +_ACEOF fi @@ -11651,7 +12277,10 @@ _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ANY" "ac_cv_have_decl_V4L2_FIELD_ANY" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ANY" "ac_cv_have_decl_V4L2_FIELD_ANY" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_ANY" = xyes; then : ac_have_decl=1 @@ -11662,7 +12291,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_ANY $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_NONE" "ac_cv_have_decl_V4L2_FIELD_NONE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_NONE" "ac_cv_have_decl_V4L2_FIELD_NONE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_NONE" = xyes; then : ac_have_decl=1 @@ -11673,7 +12305,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_NONE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_TOP" "ac_cv_have_decl_V4L2_FIELD_TOP" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_TOP" "ac_cv_have_decl_V4L2_FIELD_TOP" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_TOP" = xyes; then : ac_have_decl=1 @@ -11684,7 +12319,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_TOP $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_BOTTOM" "ac_cv_have_decl_V4L2_FIELD_BOTTOM" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_BOTTOM" "ac_cv_have_decl_V4L2_FIELD_BOTTOM" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_BOTTOM" = xyes; then : ac_have_decl=1 @@ -11695,7 +12333,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_BOTTOM $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED" "ac_cv_have_decl_V4L2_FIELD_INTERLACED" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED" "ac_cv_have_decl_V4L2_FIELD_INTERLACED" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED" = xyes; then : ac_have_decl=1 @@ -11706,7 +12347,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_INTERLACED $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_TB" "ac_cv_have_decl_V4L2_FIELD_SEQ_TB" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_TB" "ac_cv_have_decl_V4L2_FIELD_SEQ_TB" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_SEQ_TB" = xyes; then : ac_have_decl=1 @@ -11717,7 +12361,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_SEQ_TB $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_BT" "ac_cv_have_decl_V4L2_FIELD_SEQ_BT" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_BT" "ac_cv_have_decl_V4L2_FIELD_SEQ_BT" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_SEQ_BT" = xyes; then : ac_have_decl=1 @@ -11728,7 +12375,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_SEQ_BT $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ALTERNATE" "ac_cv_have_decl_V4L2_FIELD_ALTERNATE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ALTERNATE" "ac_cv_have_decl_V4L2_FIELD_ALTERNATE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_ALTERNATE" = xyes; then : ac_have_decl=1 @@ -11739,7 +12389,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_ALTERNATE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_TB" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_TB" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_TB" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_TB" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED_TB" = xyes; then : ac_have_decl=1 @@ -11750,7 +12403,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_INTERLACED_TB $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_BT" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_BT" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_BT" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_BT" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED_BT" = xyes; then : ac_have_decl=1 @@ -11761,7 +12417,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FIELD_INTERLACED_BT $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE" = xyes; then : ac_have_decl=1 @@ -11772,7 +12431,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" = xyes; then : ac_have_decl=1 @@ -11783,7 +12445,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT" = xyes; then : ac_have_decl=1 @@ -11794,7 +12459,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" = xyes; then : ac_have_decl=1 @@ -11805,7 +12473,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OVERLAY" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OVERLAY" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OVERLAY" = xyes; then : ac_have_decl=1 @@ -11816,7 +12487,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_CAPTURE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_CAPTURE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VBI_CAPTURE" = xyes; then : ac_have_decl=1 @@ -11827,7 +12501,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_OUTPUT" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_OUTPUT" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VBI_OUTPUT" = xyes; then : ac_have_decl=1 @@ -11838,7 +12515,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" = xyes; then : ac_have_decl=1 @@ -11849,7 +12529,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" = xyes; then : ac_have_decl=1 @@ -11860,7 +12543,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" = xyes; then : ac_have_decl=1 @@ -11871,7 +12557,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_RADIO" "ac_cv_have_decl_V4L2_TUNER_RADIO" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_RADIO" "ac_cv_have_decl_V4L2_TUNER_RADIO" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_TUNER_RADIO" = xyes; then : ac_have_decl=1 @@ -11882,7 +12571,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_TUNER_RADIO $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_ANALOG_TV" "ac_cv_have_decl_V4L2_TUNER_ANALOG_TV" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_ANALOG_TV" "ac_cv_have_decl_V4L2_TUNER_ANALOG_TV" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_TUNER_ANALOG_TV" = xyes; then : ac_have_decl=1 @@ -11893,7 +12585,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_TUNER_ANALOG_TV $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_DIGITAL_TV" "ac_cv_have_decl_V4L2_TUNER_DIGITAL_TV" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_DIGITAL_TV" "ac_cv_have_decl_V4L2_TUNER_DIGITAL_TV" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_TUNER_DIGITAL_TV" = xyes; then : ac_have_decl=1 @@ -11904,7 +12599,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_TUNER_DIGITAL_TV $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_MMAP" "ac_cv_have_decl_V4L2_MEMORY_MMAP" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_MMAP" "ac_cv_have_decl_V4L2_MEMORY_MMAP" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_MEMORY_MMAP" = xyes; then : ac_have_decl=1 @@ -11915,7 +12613,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_MEMORY_MMAP $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_USERPTR" "ac_cv_have_decl_V4L2_MEMORY_USERPTR" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_USERPTR" "ac_cv_have_decl_V4L2_MEMORY_USERPTR" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_MEMORY_USERPTR" = xyes; then : ac_have_decl=1 @@ -11926,7 +12627,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_MEMORY_USERPTR $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_OVERLAY" "ac_cv_have_decl_V4L2_MEMORY_OVERLAY" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_OVERLAY" "ac_cv_have_decl_V4L2_MEMORY_OVERLAY" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_MEMORY_OVERLAY" = xyes; then : ac_have_decl=1 @@ -11937,7 +12641,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_MEMORY_OVERLAY $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_DMABUF" "ac_cv_have_decl_V4L2_MEMORY_DMABUF" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_DMABUF" "ac_cv_have_decl_V4L2_MEMORY_DMABUF" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_MEMORY_DMABUF" = xyes; then : ac_have_decl=1 @@ -11948,7 +12655,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_MEMORY_DMABUF $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE170M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE170M" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE170M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE170M" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SMPTE170M" = xyes; then : ac_have_decl=1 @@ -11959,7 +12669,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_SMPTE170M $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE240M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE240M" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE240M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE240M" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SMPTE240M" = xyes; then : ac_have_decl=1 @@ -11970,7 +12683,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_SMPTE240M $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_REC709" "ac_cv_have_decl_V4L2_COLORSPACE_REC709" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_REC709" "ac_cv_have_decl_V4L2_COLORSPACE_REC709" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_REC709" = xyes; then : ac_have_decl=1 @@ -11981,7 +12697,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_REC709 $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_BT878" "ac_cv_have_decl_V4L2_COLORSPACE_BT878" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_BT878" "ac_cv_have_decl_V4L2_COLORSPACE_BT878" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_BT878" = xyes; then : ac_have_decl=1 @@ -11992,7 +12711,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_BT878 $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_M" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_M" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_M" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_M" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_M" = xyes; then : ac_have_decl=1 @@ -12003,7 +12725,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_BG" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_BG" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_BG" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_BG" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_BG" = xyes; then : ac_have_decl=1 @@ -12014,7 +12739,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_JPEG" "ac_cv_have_decl_V4L2_COLORSPACE_JPEG" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_JPEG" "ac_cv_have_decl_V4L2_COLORSPACE_JPEG" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_JPEG" = xyes; then : ac_have_decl=1 @@ -12025,7 +12753,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_JPEG $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SRGB" "ac_cv_have_decl_V4L2_COLORSPACE_SRGB" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SRGB" "ac_cv_have_decl_V4L2_COLORSPACE_SRGB" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SRGB" = xyes; then : ac_have_decl=1 @@ -12036,7 +12767,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_COLORSPACE_SRGB $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_UNSET" "ac_cv_have_decl_V4L2_PRIORITY_UNSET" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_UNSET" "ac_cv_have_decl_V4L2_PRIORITY_UNSET" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_PRIORITY_UNSET" = xyes; then : ac_have_decl=1 @@ -12047,7 +12781,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_PRIORITY_UNSET $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_BACKGROUND" "ac_cv_have_decl_V4L2_PRIORITY_BACKGROUND" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_BACKGROUND" "ac_cv_have_decl_V4L2_PRIORITY_BACKGROUND" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_PRIORITY_BACKGROUND" = xyes; then : ac_have_decl=1 @@ -12058,7 +12795,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_PRIORITY_BACKGROUND $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_INTERACTIVE" "ac_cv_have_decl_V4L2_PRIORITY_INTERACTIVE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_INTERACTIVE" "ac_cv_have_decl_V4L2_PRIORITY_INTERACTIVE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_PRIORITY_INTERACTIVE" = xyes; then : ac_have_decl=1 @@ -12069,7 +12809,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_PRIORITY_INTERACTIVE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_RECORD" "ac_cv_have_decl_V4L2_PRIORITY_RECORD" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_RECORD" "ac_cv_have_decl_V4L2_PRIORITY_RECORD" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_PRIORITY_RECORD" = xyes; then : ac_have_decl=1 @@ -12080,7 +12823,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_PRIORITY_RECORD $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_DISCRETE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_DISCRETE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_DISCRETE" = xyes; then : ac_have_decl=1 @@ -12091,7 +12837,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_CONTINUOUS" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_CONTINUOUS" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_CONTINUOUS" = xyes; then : ac_have_decl=1 @@ -12102,7 +12851,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_STEPWISE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_STEPWISE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_STEPWISE" = xyes; then : ac_have_decl=1 @@ -12113,7 +12865,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_DISCRETE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_DISCRETE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_DISCRETE" = xyes; then : ac_have_decl=1 @@ -12124,7 +12879,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_CONTINUOUS" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_CONTINUOUS" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_CONTINUOUS" = xyes; then : ac_have_decl=1 @@ -12135,7 +12893,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_STEPWISE" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_STEPWISE" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_STEPWISE" = xyes; then : ac_have_decl=1 @@ -12146,7 +12907,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER" = xyes; then : ac_have_decl=1 @@ -12157,7 +12921,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BOOLEAN" "ac_cv_have_decl_V4L2_CTRL_TYPE_BOOLEAN" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BOOLEAN" "ac_cv_have_decl_V4L2_CTRL_TYPE_BOOLEAN" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BOOLEAN" = xyes; then : ac_have_decl=1 @@ -12168,7 +12935,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_MENU" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_MENU" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_MENU" = xyes; then : ac_have_decl=1 @@ -12179,7 +12949,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_MENU $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BUTTON" "ac_cv_have_decl_V4L2_CTRL_TYPE_BUTTON" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BUTTON" "ac_cv_have_decl_V4L2_CTRL_TYPE_BUTTON" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BUTTON" = xyes; then : ac_have_decl=1 @@ -12190,7 +12963,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_BUTTON $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER64" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER64" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER64" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER64" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER64" = xyes; then : ac_have_decl=1 @@ -12201,7 +12977,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64 $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_CTRL_CLASS" "ac_cv_have_decl_V4L2_CTRL_TYPE_CTRL_CLASS" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_CTRL_CLASS" "ac_cv_have_decl_V4L2_CTRL_TYPE_CTRL_CLASS" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_CTRL_CLASS" = xyes; then : ac_have_decl=1 @@ -12212,7 +12991,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_STRING" "ac_cv_have_decl_V4L2_CTRL_TYPE_STRING" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_STRING" "ac_cv_have_decl_V4L2_CTRL_TYPE_STRING" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_STRING" = xyes; then : ac_have_decl=1 @@ -12223,7 +13005,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_STRING $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BITMASK" "ac_cv_have_decl_V4L2_CTRL_TYPE_BITMASK" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BITMASK" "ac_cv_have_decl_V4L2_CTRL_TYPE_BITMASK" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BITMASK" = xyes; then : ac_have_decl=1 @@ -12234,7 +13019,10 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_V4L2_CTRL_TYPE_BITMASK $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER_MENU" "#include +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER_MENU" "#include +#include +#include +#include " if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER_MENU" = xyes; then : ac_have_decl=1 @@ -13222,6 +14010,10 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USE_LIBUNWIND_TRUE}" && test -z "${USE_LIBUNWIND_FALSE}"; then as_fn_error $? "conditional \"USE_LIBUNWIND\" was never defined. @@ -13640,7 +14432,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by strace $as_me 4.11, which was +This file was extended by strace $as_me 4.12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13706,7 +14498,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -strace config.status 4.11 +strace config.status 4.12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru strace-4.11/configure.ac strace-4.12/configure.ac --- strace-4.11/configure.ac 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/configure.ac 2016-05-26 14:44:13.000000000 +0000 @@ -2,7 +2,7 @@ # # Copyright (c) 1999-2001 Wichert Akkerman # Copyright (c) 2002-2009 Roland McGrath -# Copyright (c) 2006-2015 Dmitry V. Levin +# Copyright (c) 2006-2016 Dmitry V. Levin # Copyright (c) 2008-2015 Mike Frysinger # Copyright (c) 2015 Elvira Khabirova # All rights reserved. @@ -41,10 +41,14 @@ AC_CANONICAL_HOST AC_PROG_CC +AC_PROG_CPP AX_PROG_CC_FOR_BUILD -AC_USE_SYSTEM_EXTENSIONS +AC_PROG_INSTALL AC_PROG_RANLIB +AC_USE_SYSTEM_EXTENSIONS +AX_CODE_COVERAGE + AC_MSG_CHECKING([for supported architecture]) arch_m32= arch_mx32= @@ -247,36 +251,20 @@ ) AC_SUBST([WARN_CFLAGS]) -AC_PROG_CPP -AC_PROG_INSTALL -AC_C_CONST AC_C_BIGENDIAN -AC_HEADER_STDC -AC_HEADER_STDBOOL -AC_HEADER_DIRENT -AC_HEADER_STAT -AC_CHECK_MEMBERS(m4_normalize([ - struct stat.st_atim.tv_nsec, - struct stat.st_blksize, - struct stat.st_blocks, - struct stat.st_ctim.tv_nsec, - struct stat.st_flags, - struct stat.st_fstype, - struct stat.st_gen, - struct stat.st_mtim.tv_nsec, - struct stat.st_rdev -])) +AC_C_CONST +AC_C_TYPEOF +AC_TYPE_GETGROUPS +AC_TYPE_MODE_T AC_TYPE_SIGNAL AC_TYPE_UID_T -AC_TYPE_MODE_T -AC_TYPE_GETGROUPS + +AC_HEADER_DIRENT AC_HEADER_MAJOR -AC_CHECK_TYPES([sig_atomic_t],,, [#include ]) -AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, -[#include -#include -#include ]) +AC_HEADER_STAT +AC_HEADER_STDBOOL +AC_HEADER_STDC AC_CHECK_FUNCS(m4_normalize([ fanotify_mark @@ -294,23 +282,88 @@ preadv process_vm_readv pwritev + recvmmsg sendmmsg sigaction signalfd stpcpy strerror strsignal + sync_file_range utimensat ])) + +AC_CHECK_TYPES([sig_atomic_t, struct sigcontext],,, [#include ]) + +AC_CHECK_TYPES([struct mmsghdr],,, [#include ]) + +AC_CHECK_TYPES([__kernel_long_t, __kernel_ulong_t],,, +[#include ]) + +AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,, +[#include +#include ]) + +AC_CHECK_TYPES(m4_normalize([ + struct pt_all_user_regs, + struct ia64_fpreg, + struct ptrace_peeksiginfo_args +]),,, [#include ]) + +AC_CHECK_TYPES(m4_normalize([ + struct flock, + struct flock64, + struct __kernel_flock, + struct __kernel_flock64 +]),,, +[#include +#include ]) + +AC_CHECK_MEMBERS(m4_normalize([ + struct stat.st_atim.tv_nsec, + struct stat.st_blksize, + struct stat.st_blocks, + struct stat.st_ctim.tv_nsec, + struct stat.st_flags, + struct stat.st_fstype, + struct stat.st_gen, + struct stat.st_mtim.tv_nsec, + struct stat.st_rdev +])) + +AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include ]) + +AC_CHECK_MEMBERS([struct timex.tai],,, [#include ]) + +AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include ]) + +AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, +[#include +#include +#include ]) + +AC_CHECK_MEMBERS(m4_normalize([ + struct stat.st_atime_nsec, + struct stat.st_ctime_nsec, + struct stat.st_mtime_nsec +]),,, [#include +#include ]) + +AC_CHECK_MEMBERS(m4_normalize([ + siginfo_t.si_syscall, + siginfo_t.si_timerid, + siginfo_t.si_overrun +]),,, [#include ]) + AC_CHECK_HEADERS(m4_normalize([ asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h - ioctls.h linux/bsg.h linux/falloc.h + linux/fiemap.h linux/filter.h linux/hiddev.h linux/ip_vs.h @@ -322,77 +375,43 @@ linux/securebits.h linux/sem.h linux/shm.h + linux/userfaultfd.h linux/utsname.h mqueue.h netinet/sctp.h scsi/sg.h stropts.h sys/conf.h - sys/epoll.h sys/eventfd.h sys/fanotify.h - sys/ioctl.h sys/ipc.h sys/msg.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h - sys/vfs.h sys/xattr.h ])) + +AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include ]) + +AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include ]) + AC_CHECK_HEADERS([linux/mqueue.h],,, [#include ]) -AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], - [], [], [#include + +AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],,, +[#include #include #include ]) -AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include ]) -AC_CHECK_TYPES([struct sigcontext],,, [#include ]) -AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include ]) + AC_CHECK_HEADERS(m4_normalize([ linux/netfilter_arp/arp_tables.h linux/netfilter_bridge/ebtables.h linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h -]), [], [], [#include +]),,, [#include #include ]) -AC_CHECK_TYPES([struct mmsghdr],,, [#include ]) -AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include ]) - -AC_CHECK_MEMBERS(m4_normalize([ - struct stat.st_atime_nsec, - struct stat.st_ctime_nsec, - struct stat.st_mtime_nsec -]),,, [#include -#include ]) - -AC_CHECK_TYPES([struct stat64],,, [#include -#include ]) -AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include ]) -AC_CHECK_TYPES([struct statfs64],,, [#include ]) - -AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,, - [#include ]) - -AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include ]) - -AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad, - struct sigevent.__pad, - siginfo_t.si_syscall, - siginfo_t.si_timerid, - siginfo_t.si_overrun],,, [#include ]) - -AC_CHECK_TYPES([struct flock, - struct flock64, - struct __kernel_flock, - struct __kernel_flock64],,, [#include -#include ]) - -AC_CHECK_TYPES([__kernel_long_t, __kernel_ulong_t],,, [#include ]) - -AC_CHECK_MEMBERS([struct timex.tai],,, [#include ]) - AC_CHECK_HEADERS([linux/input.h], [ AC_CHECK_MEMBERS([struct input_absinfo.resolution],,, [#include ]) ]) @@ -411,6 +430,44 @@ fi ]) +AC_CHECK_TYPES([struct statfs], [ + AC_CHECK_MEMBERS([struct statfs.f_frsize],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs.f_flags],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs.f_fsid.val],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs.f_fsid.__val],,, [#include +#include ]) +],, [#include +#include ]) + +AC_CHECK_TYPES([struct statfs64], [ + AC_CHECK_MEMBERS([struct statfs64.f_frsize],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs64.f_flags],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs64.f_fsid.val],,, [#include +#include ]) + AC_CHECK_MEMBERS([struct statfs64.f_fsid.__val],,, [#include +#include ]) +],, [#include +#include ]) + +AC_CHECK_TYPES([struct blk_user_trace_setup],,, [#include ]) + +AC_CHECK_HEADERS([linux/btrfs.h], [ + AC_CHECK_MEMBERS(m4_normalize([ + struct btrfs_ioctl_feature_flags.compat_flags, + struct btrfs_ioctl_fs_info_args.nodesize, + struct btrfs_ioctl_defrag_range_args.start + struct btrfs_ioctl_search_args_v2.buf_size + ]),,, [ #include +#include ]) + AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB, + BTRFS_COMPRESS_LZO]),,,[ #include +#include ])]) + AC_CHECK_DECLS([sys_errlist]) AC_CHECK_DECLS(m4_normalize([ PTRACE_PEEKUSER, @@ -795,7 +852,10 @@ V4L2_CTRL_TYPE_STRING, V4L2_CTRL_TYPE_BITMASK, V4L2_CTRL_TYPE_INTEGER_MENU -]),,, [#include ]) +]),,, [#include +#include +#include +#include ]) AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ diff -Nru strace-4.11/copy_file_range.c strace-4.12/copy_file_range.c --- strace-4.11/copy_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/copy_file_range.c 2016-02-14 00:36:38.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +SYS_FUNC(copy_file_range) +{ + /* int fd_in */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* loff_t *off_in */ + printnum_int64(tcp, tcp->u_arg[1], "%" PRId64); + tprints(", "); + /* int fd_out */ + printfd(tcp, tcp->u_arg[2]); + tprints(", "); + /* loff_t *off_out */ + printnum_int64(tcp, tcp->u_arg[3], "%" PRId64); + tprints(", "); + /* size_t len */ + tprintf("%lu, ", tcp->u_arg[4]); + /* unsigned int flags */ + tprintf("%u", (unsigned int) tcp->u_arg[5]); + + return RVAL_DECODED; +} diff -Nru strace-4.11/count.c strace-4.12/count.c --- strace-4.11/count.c 2015-11-26 23:38:59.000000000 +0000 +++ strace-4.12/count.c 2016-05-10 00:38:59.000000000 +0000 @@ -112,8 +112,9 @@ static int syscall_cmp(void *a, void *b) { - return strcmp(sysent[*((int *) a)].sys_name, - sysent[*((int *) b)].sys_name); + const char *a_name = sysent[*((int *) a)].sys_name; + const char *b_name = sysent[*((int *) b)].sys_name; + return strcmp(a_name ? a_name : "", b_name ? b_name : ""); } static int diff -Nru strace-4.11/CREDITS strace-4.12/CREDITS --- strace-4.11/CREDITS 2015-12-21 23:24:36.000000000 +0000 +++ strace-4.12/CREDITS 2016-05-31 11:36:29.000000000 +0000 @@ -15,6 +15,7 @@ Aaron Ucko Adrien Kunysz Ali Polatel + Anchit Jain Andi Kleen Andreas Schwab Anton Blanchard @@ -44,6 +45,7 @@ Dmitry V. Levin Douglas Mencken Dr. David Alan Gilbert + Dr. David Alan Gilbert Edgar E. Iglesias Elliott Hughes Elvira Khabirova @@ -51,6 +53,8 @@ Etienne Gemsa Eugene Syromyatnikov Ezequiel Garcia + Fabien Siron + Fei Jie Felix Janda Fernando Luis Vazquez Cao Florian Lohoff @@ -73,6 +77,7 @@ James Hogan James Yang Jan Kratochvil + JayRJoshi Jeff Mahoney Jian Zhen Joe Ilacqua @@ -81,6 +86,8 @@ John Spencer Ju"rgen Fluk Juergen Weigert + Katerina Koukiou + Keith Owens Keith Thompson Kirill A. Shutemov Kyle McMartin @@ -102,11 +109,13 @@ Maxin B. John Michael E Chastain Michael Holzheu + Michael Shigorin Michail Litvak Michal Ludvig Mike Frysinger Mike Stroyan Muttley Meen + Nahim El Atmani Namhyung Kim Nate Eldredge Nate Sammons diff -Nru strace-4.11/debian/changelog strace-4.12/debian/changelog --- strace-4.11/debian/changelog 2016-01-13 15:26:46.000000000 +0000 +++ strace-4.12/debian/changelog 2016-08-12 10:08:32.000000000 +0000 @@ -1,3 +1,38 @@ +strace (4.12-3ubuntu1) yakkety; urgency=medium + + * Merge from Debian unstalbe. Remaining changes: + - Apply ptrace-error-verbosity.patch + + * Drop lseek patch, no longer needed. + + -- Dimitri John Ledkov Fri, 12 Aug 2016 11:08:03 +0100 + +strace (4.12-3) unstable; urgency=medium + + * Fix up 32/64-bit test output in strace -S test to fix i386 build + * Run make check with VERBOSE=1so we get useful information in build logs + + -- Steve McIntyre <93sam@debian.org> Sat, 04 Jun 2016 02:37:44 +0100 + +strace (4.12-2) unstable; urgency=medium + + * Remove libunwind dependency. Closes: #826223 + + -- Steve McIntyre <93sam@debian.org> Fri, 03 Jun 2016 13:43:44 +0100 + +strace (4.12-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + implemented simultaneous use of -p option and tracing of a command, + closes: #549942 + + fixed decoding of syscalls unknown to the kernel on s390/s390x, + closes: #485979 + [ Steve McIntyre ] + * Drop mips64el from the architecture list for now. + + -- Steve McIntyre <93sam@debian.org> Fri, 03 Jun 2016 00:18:40 +0100 + strace (4.11-1ubuntu3) xenial; urgency=high * Patch lseek test-suite to ignore libc generated lseek calls. @@ -16,9 +51,11 @@ [ Dmitry V. Levin ] * New upstream version. + fixed decoding of path argument of umount2 syscall, closes: #785050 - + Drop patches against old upstream - all upstream now. - + Add simple upstream patch to fix printing of 32-bit times syscall - return value on 64-bit architectures. + + [ Steve McIntyre ] + * Drop patches against old upstream - all upstream now. + * Add simple upstream patch to fix printing of 32-bit times syscall + return value on 64-bit architectures. -- Steve McIntyre <93sam@debian.org> Fri, 08 Jan 2015 00:52:05 +0000 diff -Nru strace-4.11/debian/patches/fix-strace-S-32bit-test.patch strace-4.12/debian/patches/fix-strace-S-32bit-test.patch --- strace-4.11/debian/patches/fix-strace-S-32bit-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/debian/patches/fix-strace-S-32bit-test.patch 2016-06-04 01:41:23.000000000 +0000 @@ -0,0 +1,23 @@ + * Fix up 32/64-bit test output in strace -S test to fix i386 build +Author: Steve McIntyre <93sam@debian.org> + +--- strace-4.12.orig/tests/strace-S.test ++++ strace-4.12/tests/strace-S.test +@@ -14,7 +14,16 @@ test_c() + sedexpr="$1"; shift + + run_strace -c -S "$sortby" date > /dev/null +- sed -ne "$sedexpr" < "$LOG" > "$OUT" ++ ++ # If we're using a 64-bit binary with linux32 then we'll see ++ # two sets of stats. Drop the first (64-bit) one ++ if (grep -q '32 bit mode:' "$LOG") ; then ++ awk '/.*/ { if (go) {print $0}}; ++ /32 bit mode:/ {go=1}' "$LOG" > "$LOG.32" ++ sed -ne "$sedexpr" < "$LOG.32" > "$OUT" ++ else ++ sed -ne "$sedexpr" < "$LOG" > "$OUT" ++ fi + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" diff -Nru strace-4.11/debian/patches/lseek-extra-glibc-calls.patch strace-4.12/debian/patches/lseek-extra-glibc-calls.patch --- strace-4.11/debian/patches/lseek-extra-glibc-calls.patch 2016-01-13 15:10:07.000000000 +0000 +++ strace-4.12/debian/patches/lseek-extra-glibc-calls.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Description: Patch lseek test-suite to ignore libc generated lseek calls. -Author: Dimitri John Ledkov - ---- strace-4.11.orig/tests/lseek.test -+++ strace-4.11/tests/lseek.test -@@ -7,6 +7,7 @@ - run_prog > /dev/null - OUT="$LOG.out" - run_strace -a30 -elseek $args > "$OUT" -+sed '/lseek(3/d' -i $LOG - match_diff "$LOG" "$OUT" - rm -f "$OUT" - diff -Nru strace-4.11/debian/patches/series strace-4.12/debian/patches/series --- strace-4.11/debian/patches/series 2016-01-13 15:09:58.000000000 +0000 +++ strace-4.12/debian/patches/series 2016-08-12 10:06:46.000000000 +0000 @@ -1,3 +1,2 @@ -times32.patch +fix-strace-S-32bit-test.patch ptrace-error-verbosity.patch -lseek-extra-glibc-calls.patch diff -Nru strace-4.11/debian/patches/times32.patch strace-4.12/debian/patches/times32.patch --- strace-4.11/debian/patches/times32.patch 2016-01-08 00:50:43.000000000 +0000 +++ strace-4.12/debian/patches/times32.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -commit be1cb92c72267a1593d2573304101105ef2a5a3e -Author: Dmitry V. Levin -Date: Thu Jan 7 14:20:17 2016 +0000 - - Fix printing of 32-bit times syscall return value on 64-bit architectures - - This change complements commit v4.9-359-gd93d9f8 by fixing - RVAL_UDECIMAL case. - The only syscall that appears to be affected is the times syscall. - - * syscall.c (trace_syscall_exiting): In case of RVAL_UDECIMAL, - when current personality is 32-bit, print 32-bit return code. - * NEWS: Mention this fix. - - Reported-by: Steve McIntyre - -diff --git a/syscall.c b/syscall.c -index 8d81274..b0e20ee 100644 ---- a/syscall.c -+++ b/syscall.c -@@ -1064,7 +1064,13 @@ trace_syscall_exiting(struct tcb *tcp) - tprintf("= %#lo", tcp->u_rval); - break; - case RVAL_UDECIMAL: -- tprintf("= %lu", tcp->u_rval); -+#if SUPPORTED_PERSONALITIES > 1 -+ if (current_wordsize < sizeof(long)) -+ tprintf("= %u", -+ (unsigned int) tcp->u_rval); -+ else -+#endif -+ tprintf("= %lu", tcp->u_rval); - break; - case RVAL_DECIMAL: - tprintf("= %ld", tcp->u_rval); diff -Nru strace-4.11/debian/rules strace-4.12/debian/rules --- strace-4.11/debian/rules 2016-01-08 22:43:48.000000000 +0000 +++ strace-4.12/debian/rules 2016-06-03 17:36:46.000000000 +0000 @@ -47,7 +47,7 @@ %-stamp: %/Makefile $(MAKE) -C $* ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - $(MAKE) -C $* check + $(MAKE) -C $* check VERBOSE=1 endif touch $@ diff -Nru strace-4.11/defs.h strace-4.12/defs.h --- strace-4.11/defs.h 2015-12-16 00:06:59.000000000 +0000 +++ strace-4.12/defs.h 2016-05-30 00:29:14.000000000 +0000 @@ -55,6 +55,7 @@ #include #include "mpers_type.h" +#include "gcc_compat.h" #ifndef HAVE_STRERROR const char *strerror(int); @@ -68,48 +69,6 @@ extern char *stpcpy(char *dst, const char *src); #endif -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -# define __attribute__(x) /* empty */ -# define GNUC_PREREQ(maj, min) 0 -#endif - -#if GNUC_PREREQ(2, 5) -# define ATTRIBUTE_NORETURN __attribute__((__noreturn__)) -#else -# define ATTRIBUTE_NORETURN /* empty */ -#endif - -#if GNUC_PREREQ(2, 7) -# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args)) -# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg))) -# define ATTRIBUTE_PACKED __attribute__((__packed__)) -#else -# define ATTRIBUTE_FORMAT(args) /* empty */ -# define ATTRIBUTE_ALIGNED(arg) /* empty */ -# define ATTRIBUTE_PACKED /* empty */ -#endif - -#if GNUC_PREREQ(3, 0) -# define ATTRIBUTE_MALLOC __attribute__((__malloc__)) -#else -# define ATTRIBUTE_MALLOC /* empty */ -#endif - -#if GNUC_PREREQ(3, 1) -# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) -#else -# define ATTRIBUTE_NOINLINE /* empty */ -#endif - -#if GNUC_PREREQ(4, 3) -# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args)) -#else -# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */ -#endif - #ifndef offsetof # define offsetof(type, member) \ (((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL)) @@ -198,6 +157,7 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif # endif #endif @@ -211,11 +171,13 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif # ifdef HAVE_MX32_MPERS # define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h" # define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h" # define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h" +# define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h" # endif #endif @@ -227,6 +189,7 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif #endif @@ -243,6 +206,7 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif #endif @@ -254,6 +218,7 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif #endif @@ -268,6 +233,7 @@ # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h" # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h" # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h" +# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h" # endif #endif @@ -401,16 +367,12 @@ #define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV) #define filtered(tcp) ((tcp)->flags & TCB_FILTERED) -struct xlat { - unsigned int val; - const char *str; -}; -#define XLAT(x) { x, #x } -#define XLAT_END { 0, NULL } +#include "xlat.h" extern const struct xlat addrfams[]; extern const struct xlat at_flags[]; extern const struct xlat dirent_types[]; +extern const struct xlat evdev_abs[]; extern const struct xlat open_access_modes[]; extern const struct xlat open_mode_flags[]; extern const struct xlat resource_flags[]; @@ -549,11 +511,25 @@ extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *); #define umove_or_printaddr(pid, addr, objp) \ umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp)) -extern int umove_ulong_or_printaddr(struct tcb *, long, unsigned long *); -extern int umove_ulong_array_or_printaddr(struct tcb *, long, unsigned long *, size_t); extern int umovestr(struct tcb *, long, unsigned int, char *); extern int upeek(int pid, long, long *); +extern bool +print_array(struct tcb *tcp, + const unsigned long start_addr, + const size_t nmemb, + void *const elem_buf, + const size_t elem_size, + int (*const umoven_func)(struct tcb *, + long, + unsigned int, + void *), + bool (*const print_func)(struct tcb *, + void *elem_buf, + size_t elem_size, + void *opaque_data), + void *const opaque_data); + #if defined ALPHA || defined IA64 || defined MIPS \ || defined SH || defined SPARC || defined SPARC64 # define HAVE_GETRVAL2 @@ -567,8 +543,8 @@ extern int pathtrace_match(struct tcb *); extern int getfdpath(struct tcb *, int, char *, unsigned); -extern const char *xlookup(const struct xlat *, const unsigned int); -extern const char *xlat_search(const struct xlat *, const size_t, const unsigned int); +extern const char *xlookup(const struct xlat *, const uint64_t); +extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t); extern unsigned long get_pagesize(void); extern int string_to_uint(const char *str); @@ -577,6 +553,7 @@ #define QUOTE_0_TERMINATED 0x01 #define QUOTE_OMIT_LEADING_TRAILING_QUOTES 0x02 +extern int string_quote(const char *, char *, unsigned int, unsigned int); extern int print_quoted_string(const char *, unsigned int, unsigned int); /* a refers to the lower numbered u_arg, @@ -594,19 +571,22 @@ ATTRIBUTE_FORMAT((printf, 2, 0)); extern void printaddr(long); -extern void printxvals(const unsigned int, const char *, const struct xlat *, ...); -#define printxval(xlat, val, dflt) printxvals(val, dflt, xlat, NULL) +extern void printxvals(const uint64_t, const char *, const struct xlat *, ...) + ATTRIBUTE_SENTINEL; extern int printargs(struct tcb *); -extern int printargs_lu(struct tcb *); -extern int printargs_ld(struct tcb *); -extern void addflags(const struct xlat *, int); -extern int printflags(const struct xlat *, int, const char *); -extern const char *sprintflags(const char *, const struct xlat *, int); -extern const char *sprintmode(int); +extern int printargs_u(struct tcb *); +extern int printargs_d(struct tcb *); + +extern void addflags(const struct xlat *, uint64_t); +extern int printflags64(const struct xlat *, uint64_t, const char *); +extern const char *sprintflags(const char *, const struct xlat *, uint64_t); +extern const char *sprintmode(unsigned int); extern const char *sprinttime(time_t); -extern void dumpiov_in_msghdr(struct tcb *, long); +extern void dumpiov_in_msghdr(struct tcb *, long, unsigned long); extern void dumpiov_in_mmsghdr(struct tcb *, long); -extern void dumpiov(struct tcb *, int, long); +extern void dumpiov_upto(struct tcb *, int, long, unsigned long); +#define dumpiov(tcp, len, addr) \ + dumpiov_upto((tcp), (len), (addr), (unsigned long) -1L) extern void dumpstr(struct tcb *, long, int); extern void printstr(struct tcb *, long, long); extern bool printnum_short(struct tcb *, long, const char *) @@ -652,6 +632,7 @@ (sizeof(intmax_t)*3 * 2 + sizeof("{tv_sec=%jd, tv_nsec=%jd}")) extern void printfd(struct tcb *, int); extern bool print_sockaddr_by_inode(const unsigned long, const char *); +extern bool print_sockaddr_by_inode_cached(const unsigned long); extern void print_dirfd(struct tcb *, int); extern void printsock(struct tcb *, long, int); extern void print_sock_optmgmt(struct tcb *, long, int); @@ -670,21 +651,24 @@ extern void printsignal(int); extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_iov); extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long); -extern void tprint_open_modes(int); -extern const char *sprint_open_modes(int); -extern void print_seccomp_filter(struct tcb *tcp, unsigned long); +extern void tprint_open_modes(unsigned int); +extern const char *sprint_open_modes(unsigned int); +extern void print_seccomp_filter(struct tcb *, unsigned long); +extern void print_seccomp_fprog(struct tcb *, unsigned long, unsigned short); + +struct strace_statfs; +extern void print_struct_statfs(struct tcb *tcp, long); +extern void print_struct_statfs64(struct tcb *tcp, long, unsigned long); -extern int block_ioctl(struct tcb *, const unsigned int, long); -extern int evdev_ioctl(struct tcb *, const unsigned int, long); +extern int file_ioctl(struct tcb *, const unsigned int, long); +extern int fs_x_ioctl(struct tcb *, const unsigned int, long); extern int loop_ioctl(struct tcb *, const unsigned int, long); -extern int mtd_ioctl(struct tcb *, const unsigned int, long); extern int ptp_ioctl(struct tcb *, const unsigned int, long); -extern int rtc_ioctl(struct tcb *, const unsigned int, long); extern int scsi_ioctl(struct tcb *, const unsigned int, long); extern int sock_ioctl(struct tcb *, const unsigned int, long); extern int term_ioctl(struct tcb *, const unsigned int, long); extern int ubi_ioctl(struct tcb *, const unsigned int, long); -extern int v4l2_ioctl(struct tcb *, const unsigned int, long); +extern int uffdio_ioctl(struct tcb *, const unsigned int, long); extern int tv_nz(const struct timeval *); extern int tv_cmp(const struct timeval *, const struct timeval *); @@ -703,6 +687,36 @@ extern void unwind_capture_stacktrace(struct tcb* tcp); #endif +static inline int +printflags(const struct xlat *x, unsigned int flags, const char *dflt) +{ + return printflags64(x, flags, dflt); +} + +static inline int +printflags_long(const struct xlat *x, unsigned long flags, const char *dflt) +{ + return printflags64(x, flags, dflt); +} + +static inline void +printxval64(const struct xlat *x, const uint64_t val, const char *dflt) +{ + printxvals(val, dflt, x, NULL); +} + +static inline void +printxval(const struct xlat *x, const unsigned int val, const char *dflt) +{ + printxvals(val, dflt, x, NULL); +} + +static inline void +printxval_long(const struct xlat *x, const unsigned long val, const char *dflt) +{ + printxvals(val, dflt, x, NULL); +} + /* Strace log generation machinery. * * printing_tcp: tcb which has incomplete line being printed right now. @@ -755,6 +769,14 @@ # define widen_to_long(v) ((long)(v)) #endif +/* + * Widen without sign-extension a signed integer type to unsigned long long. + */ +#define widen_to_ull(v) \ + (sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \ + sizeof(v) == sizeof(long) ? (unsigned long long) (unsigned long) (v) : \ + (unsigned long long) (v)) + extern const struct_sysent sysent0[]; extern const char *const errnoent0[]; extern const char *const signalent0[]; @@ -780,11 +802,17 @@ extern unsigned nioctlents; extern unsigned num_quals; -#if SUPPORTED_PERSONALITIES > 1 -# include "printers.h" -#else -# include "native_printer_decls.h" -#endif +#ifdef IN_MPERS_BOOTSTRAP +/* Transform multi-line MPERS_PRINTER_DECL statements to one-liners. */ +# define MPERS_PRINTER_DECL(type, name, ...) MPERS_PRINTER_DECL(type, name, __VA_ARGS__) +#else /* !IN_MPERS_BOOTSTRAP */ +# if SUPPORTED_PERSONALITIES > 1 +# include "printers.h" +# else +# include "native_printer_decls.h" +# endif +# define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__) +#endif /* !IN_MPERS_BOOTSTRAP */ /* * If you need non-NULL sysent[scno].sys_func and sysent[scno].sys_name @@ -804,4 +832,22 @@ #define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp) -#define MPERS_PRINTER_DECL(type, name) type MPERS_FUNC_NAME(name) +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +#if SIZEOF_LONG == 4 +# define PRI__64 "ll" +#elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +#else +# define PRI__64 "ll" +#endif + +#define PRI__d64 PRI__64"d" +#define PRI__u64 PRI__64"u" +#define PRI__x64 PRI__64"x" diff -Nru strace-4.11/desc.c strace-4.12/desc.c --- strace-4.11/desc.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/desc.c 2016-01-08 18:53:27.000000000 +0000 @@ -68,13 +68,6 @@ return do_dup2(tcp, 2); } -#if defined(ALPHA) -SYS_FUNC(getdtablesize) -{ - return 0; -} -#endif - static int decode_select(struct tcb *tcp, long *args, void (*print_tv_ts) (struct tcb *, const long), diff -Nru strace-4.11/dirent64.c strace-4.12/dirent64.c --- strace-4.11/dirent64.c 2015-11-19 22:49:58.000000000 +0000 +++ strace-4.12/dirent64.c 2016-04-26 22:38:10.000000000 +0000 @@ -49,9 +49,12 @@ tprints(", "); return 0; } + + const unsigned int count = tcp->u_arg[2]; + if (syserror(tcp) || !verbose(tcp)) { printaddr(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); return 0; } @@ -67,7 +70,7 @@ buf = malloc(len); if (!buf || umoven(tcp, tcp->u_arg[1], len, buf) < 0) { printaddr(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); free(buf); return 0; } @@ -117,7 +120,7 @@ tprints("]"); else tprintf("/* %u entries */", dents); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); free(buf); return 0; } diff -Nru strace-4.11/dirent.c strace-4.12/dirent.c --- strace-4.11/dirent.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/dirent.c 2016-05-26 14:44:13.000000000 +0000 @@ -48,8 +48,8 @@ return; tprintf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=", - (unsigned long long) d.d_ino, - (unsigned long long) d.d_off, d.d_reclen); + widen_to_ull(d.d_ino), + widen_to_ull(d.d_off), d.d_reclen); if (d.d_reclen > D_NAME_LEN_MAX) d.d_reclen = D_NAME_LEN_MAX; printpathn(tcp, addr + offsetof(kernel_dirent, d_name), d.d_reclen); @@ -76,16 +76,19 @@ SYS_FUNC(getdents) { unsigned int i, len, dents = 0; - char *buf; + unsigned char *buf; if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); return 0; } + + const unsigned int count = tcp->u_arg[2]; + if (syserror(tcp) || !verbose(tcp)) { printaddr(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); return 0; } @@ -101,7 +104,7 @@ buf = malloc(len); if (!buf || umoven(tcp, tcp->u_arg[1], len, buf) < 0) { printaddr(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); free(buf); return 0; } @@ -124,8 +127,8 @@ tprintf("%s{d_ino=%llu, d_off=%llu, d_reclen=%u" ", d_name=", i ? ", " : "", - (unsigned long long) d->d_ino, - (unsigned long long) d->d_off, d->d_reclen); + widen_to_ull(d->d_ino), + widen_to_ull(d->d_off), d->d_reclen); if (print_quoted_string(d->d_name, d_name_len, QUOTE_0_TERMINATED) > 0) { @@ -150,7 +153,7 @@ tprints("]"); else tprintf("/* %u entries */", dents); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %u", count); free(buf); return 0; } diff -Nru strace-4.11/epoll.c strace-4.12/epoll.c --- strace-4.11/epoll.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/epoll.c 2016-05-16 21:47:09.000000000 +0000 @@ -29,9 +29,7 @@ #include "defs.h" #include -#ifdef HAVE_SYS_EPOLL_H -# include -#endif +#include SYS_FUNC(epoll_create) { @@ -49,84 +47,53 @@ return RVAL_DECODED | RVAL_FD; } -#ifdef HAVE_SYS_EPOLL_H -# include "xlat/epollevents.h" +#include "xlat/epollevents.h" -static void -print_epoll_event(struct epoll_event *ev) +static bool +print_epoll_event(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { + const struct epoll_event *ev = elem_buf; + tprints("{"); printflags(epollevents, ev->events, "EPOLL???"); /* We cannot know what format the program uses, so print u32 and u64 which will cover every value. */ tprintf(", {u32=%" PRIu32 ", u64=%" PRIu64 "}}", ev->data.u32, ev->data.u64); + + return true; } -#endif #include "xlat/epollctls.h" SYS_FUNC(epoll_ctl) { - struct epoll_event ev; - printfd(tcp, tcp->u_arg[0]); tprints(", "); - printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???"); + const unsigned int op = tcp->u_arg[1]; + printxval(epollctls, op, "EPOLL_CTL_???"); tprints(", "); printfd(tcp, tcp->u_arg[2]); tprints(", "); -#ifdef HAVE_SYS_EPOLL_H - if (EPOLL_CTL_DEL == tcp->u_arg[1]) + struct epoll_event ev; + if (EPOLL_CTL_DEL == op) printaddr(tcp->u_arg[3]); else if (!umove_or_printaddr(tcp, tcp->u_arg[3], &ev)) - print_epoll_event(&ev); -#else - printaddr(tcp->u_arg[3]); -#endif + print_epoll_event(tcp, &ev, sizeof(ev), 0); return RVAL_DECODED; } static void -print_epoll_event_array(struct tcb *tcp, const long addr, const long len) -{ -#ifdef HAVE_SYS_EPOLL_H - struct epoll_event ev, *start, *cur, *end; - - if (!len) { - tprints("[]"); - return; - } - - if (umove_or_printaddr(tcp, addr, &ev)) - return; - - tprints("["); - print_epoll_event(&ev); - - start = (struct epoll_event *) addr; - end = start + len; - for (cur = start + 1; cur < end; ++cur) { - tprints(", "); - if (umove_or_printaddr(tcp, (long) cur, &ev)) - break; - print_epoll_event(&ev); - } - tprints("]"); -#else - printaddr(addr); -#endif -} - -static void epoll_wait_common(struct tcb *tcp) { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); } else { - print_epoll_event_array(tcp, tcp->u_arg[1], tcp->u_rval); + struct epoll_event ev; + print_array(tcp, tcp->u_arg[1], tcp->u_rval, &ev, sizeof(ev), + umoven_or_printaddr, print_epoll_event, 0); tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]); } } diff -Nru strace-4.11/evdev.c strace-4.12/evdev.c --- strace-4.11/evdev.c 2015-07-09 01:43:44.000000000 +0000 +++ strace-4.12/evdev.c 2016-05-28 00:56:47.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Etienne Gemsa - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,33 +28,47 @@ #include "defs.h" -#include +#ifdef HAVE_LINUX_INPUT_H + +#include DEF_MPERS_TYPE(struct_ff_effect) + +# include +# include + +typedef struct ff_effect struct_ff_effect; + +#endif /* HAVE_LINUX_BTRFS_H */ + +#include MPERS_DEFS #ifdef HAVE_LINUX_INPUT_H -#include -#include "xlat/evdev_abs.h" -#include "xlat/evdev_autorepeat.h" -#include "xlat/evdev_ff_status.h" -#include "xlat/evdev_ff_types.h" -#include "xlat/evdev_keycode.h" -#include "xlat/evdev_leds.h" -#include "xlat/evdev_misc.h" -#include "xlat/evdev_mtslots.h" -#include "xlat/evdev_prop.h" -#include "xlat/evdev_relative_axes.h" -#include "xlat/evdev_snd.h" -#include "xlat/evdev_switch.h" -#include "xlat/evdev_sync.h" - -#ifndef SYN_MAX -# define SYN_MAX 0xf -#endif + +# include "xlat/evdev_autorepeat.h" +# include "xlat/evdev_ff_status.h" +# include "xlat/evdev_ff_types.h" +# include "xlat/evdev_keycode.h" +# include "xlat/evdev_leds.h" +# include "xlat/evdev_misc.h" +# include "xlat/evdev_mtslots.h" +# include "xlat/evdev_prop.h" +# include "xlat/evdev_relative_axes.h" +# include "xlat/evdev_snd.h" +# include "xlat/evdev_switch.h" +# include "xlat/evdev_sync.h" + +# ifndef SYN_MAX +# define SYN_MAX 0xf +# endif static void -decode_envelope(struct ff_envelope *envelope) +decode_envelope(void *const data) { - tprintf(", envelope={attack_length=%" PRIu16 ", attack_level=%" PRIu16 - ", fade_length=%" PRIu16 ", fade_level=%" PRIx32 "}", + const struct ff_envelope *const envelope = data; + + tprintf(", envelope={attack_length=%" PRIu16 + ", attack_level=%" PRIu16 + ", fade_length=%" PRIu16 + ", fade_level=%#x}", envelope->attack_length, envelope->attack_level, envelope->fade_length, @@ -64,136 +78,151 @@ static int ff_effect_ioctl(struct tcb *tcp, long arg) { - struct ff_effect ffe; + tprints(", "); - if (!verbose(tcp) || umove(tcp, arg, &ffe) < 0) - return 0; + struct_ff_effect ffe; - tprints(", {type="); + if (umove_or_printaddr(tcp, arg, &ffe)) + return 1; + + tprints("{type="); printxval(evdev_ff_types, ffe.type, "FF_???"); - tprintf(", id=%" PRIu16 ", direction=%" PRIu16, - ffe.id, ffe.direction); + tprintf(", id=%" PRIu16 + ", direction=%" PRIu16 ", ", + ffe.id, + ffe.direction); - if (!abbrev(tcp)) { - tprintf(", trigger={button=%" PRIu16 ", interval=%" PRIu16 "}", - ffe.trigger.button, ffe.trigger.interval); - tprintf(", replay={lenght=%" PRIu16 ", delay=%" PRIu16 "}", - ffe.replay.length, ffe.replay.delay); - switch (ffe.type) { - case FF_CONSTANT: - tprintf(", constant_ef={%" PRIi16, - ffe.u.constant.level); - decode_envelope(&ffe.u.constant.envelope); - tprints("}"); - return 1; - case FF_RAMP: - tprintf(", ramp={start_level=%" PRIi16 - ", end_level=%" PRIi16, - ffe.u.ramp.start_level, - ffe.u.ramp.end_level); - decode_envelope(&ffe.u.ramp.envelope); - tprints("}"); - return 1; - case FF_PERIODIC: - tprintf(", periodic_ef={waveform=%" PRIu16 - ", period=%" PRIu16 - ", magnitude=%" PRIi16 - ", offset=%" PRIi16 - ", phase=%" PRIu16, - ffe.u.periodic.waveform, - ffe.u.periodic.period, - ffe.u.periodic.magnitude, - ffe.u.periodic.offset, - ffe.u.periodic.phase); - decode_envelope(&ffe.u.periodic.envelope); - tprintf(", custom_len=%" PRIu32 - ", *custom_data=%#lx}", - ffe.u.periodic.custom_len, - (unsigned long)ffe.u.periodic.custom_data); - return 1; - case FF_RUMBLE: - tprintf(", rumble={strong_magnitude=%" PRIu16 - ", weak_magnitude=%" PRIu16 "}", - ffe.u.rumble.strong_magnitude, - ffe.u.rumble.weak_magnitude); - return 1; - case FF_SPRING: - case FF_FRICTION: - case FF_DAMPER: - case FF_INERTIA: - case FF_CUSTOM: - break; - default : - break; - } + if (abbrev(tcp)) { + tprints("...}"); + return 1; } - tprints(", ...}"); + tprintf("trigger={button=%" PRIu16 + ", interval=%" PRIu16 "}" + ", replay={length=%" PRIu16 + ", delay=%" PRIu16 "}", + ffe.trigger.button, + ffe.trigger.interval, + ffe.replay.length, + ffe.replay.delay); + + switch (ffe.type) { + case FF_CONSTANT: + tprintf(", constant={level=%" PRId16, + ffe.u.constant.level); + decode_envelope(&ffe.u.constant.envelope); + tprints("}"); + break; + case FF_RAMP: + tprintf(", ramp={start_level=%" PRId16 + ", end_level=%" PRId16, + ffe.u.ramp.start_level, + ffe.u.ramp.end_level); + decode_envelope(&ffe.u.ramp.envelope); + tprints("}"); + break; + case FF_PERIODIC: + tprintf(", periodic={waveform=%" PRIu16 + ", period=%" PRIu16 + ", magnitude=%" PRId16 + ", offset=%" PRId16 + ", phase=%" PRIu16, + ffe.u.periodic.waveform, + ffe.u.periodic.period, + ffe.u.periodic.magnitude, + ffe.u.periodic.offset, + ffe.u.periodic.phase); + decode_envelope(&ffe.u.periodic.envelope); + tprintf(", custom_len=%u" + ", custom_data=%#lx}", + ffe.u.periodic.custom_len, + (unsigned long) ffe.u.periodic.custom_data); + break; + case FF_RUMBLE: + tprintf(", rumble={strong_magnitude=%" PRIu16 + ", weak_magnitude=%" PRIu16 "}", + ffe.u.rumble.strong_magnitude, + ffe.u.rumble.weak_magnitude); + break; + default: + break; + } + + tprints("}"); + return 1; } static int abs_ioctl(struct tcb *tcp, long arg) { + tprints(", "); + struct input_absinfo absinfo; - if (!verbose(tcp) || umove(tcp, arg, &absinfo) < 0) - return 0; + if (!umove_or_printaddr(tcp, arg, &absinfo)) { + tprintf("{value=%u" + ", minimum=%u, ", + absinfo.value, + absinfo.minimum); + + if (!abbrev(tcp)) { + tprintf("maximum=%u" + ", fuzz=%u" + ", flat=%u", + absinfo.maximum, + absinfo.fuzz, + absinfo.flat); +# ifdef HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION + tprintf(", resolution=%u", + absinfo.resolution); +# endif + } else { + tprints("..."); + } - tprintf(", {value=%" PRIu32 ", minimum=%" PRIu32, - absinfo.value, absinfo.minimum); - if (!abbrev(tcp)) { - tprintf(", maximum=%" PRIu32 ", fuzz=%" PRIu32, - absinfo.maximum, absinfo.fuzz); - tprintf(", flat=%" PRIu32, absinfo.flat); -#ifdef HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION - tprintf(", resolution=%" PRIu32, absinfo.resolution); -#endif tprints("}"); - } else { - tprints(", ...}"); } + return 1; } static int keycode_ioctl(struct tcb *tcp, long arg) { + tprints(", "); + unsigned int keycode[2]; - if (!arg) { - tprints(", NULL"); - return 1; + if (!umove_or_printaddr(tcp, arg, &keycode)) { + tprintf("[%u, ", keycode[0]); + printxval(evdev_keycode, keycode[1], "KEY_???"); + tprints("]"); } - if (!verbose(tcp) || umove(tcp, arg, &keycode) < 0) - return 0; - - tprintf(", [%u, ", keycode[0]); - printxval(evdev_keycode, keycode[1], "KEY_???"); - tprints("]"); return 1; } -#ifdef EVIOCGKEYCODE_V2 +# ifdef EVIOCGKEYCODE_V2 static int keycode_V2_ioctl(struct tcb *tcp, long arg) { + tprints(", "); + struct input_keymap_entry ike; - if (!arg) { - tprints(", NULL"); + if (umove_or_printaddr(tcp, arg, &ike)) return 1; - } - if (!verbose(tcp) || umove(tcp, arg, &ike) < 0) - return 0; + tprintf("{flags=%" PRIu8 + ", len=%" PRIu8 ", ", + ike.flags, + ike.len); - tprintf(", {flags=%" PRIu8 ", len=%" PRIu8, ike.flags, ike.len); if (!abbrev(tcp)) { unsigned int i; - tprintf(", index=%" PRIu16 ", keycode=", ike.index); + tprintf("index=%" PRIu16 ", keycode=", ike.index); printxval(evdev_keycode, ike.keycode, "KEY_???"); tprints(", scancode=["); for (i = 0; i < ARRAY_SIZE(ike.scancode); i++) { @@ -201,30 +230,34 @@ tprints(", "); tprintf("%" PRIx8, ike.scancode[i]); } - tprints("]}"); + tprints("]"); } else { - tprints(", ...}"); + tprints("..."); } + + tprints("}"); + return 1; } -#endif /* EVIOCGKEYCODE_V2 */ +# endif /* EVIOCGKEYCODE_V2 */ static int getid_ioctl(struct tcb *tcp, long arg) { + tprints(", "); + struct input_id id; - if (!verbose(tcp) || umove(tcp, arg, &id) < 0) - return 0; + if (!umove_or_printaddr(tcp, arg, &id)) + tprintf("{ID_BUS=%" PRIu16 + ", ID_VENDOR=%" PRIu16 + ", ID_PRODUCT=%" PRIu16 + ", ID_VERSION=%" PRIu16 "}", + id.bustype, + id.vendor, + id.product, + id.version); - tprintf(", {ID_BUS=%" PRIu16 ", ID_VENDOR=%" PRIu16, - id.bustype, id.vendor); - if (!abbrev(tcp)) { - tprintf(", ID_PRODUCT=%" PRIu16 ", ID_VERSION=%" PRIu16 "}", - id.product, id.version); - } else { - tprints(", ...}"); - } return 1; } @@ -232,8 +265,7 @@ decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[], const unsigned int max_nr, const char *dflt) { - if (!verbose(tcp)) - return 0; + tprints(", "); unsigned int size; if ((unsigned long) tcp->u_rval > max_nr) @@ -242,10 +274,10 @@ size = tcp->u_rval; char decoded_arg[size]; - if (umoven(tcp, arg, size, decoded_arg) < 0) - return 0; + if (umove_or_printaddr(tcp, arg, &decoded_arg)) + return 1; - tprints(", ["); + tprints("["); int bit_displayed = 0; int i = next_set_bit(decoded_arg, 0, size); @@ -270,34 +302,39 @@ return 1; } -#ifdef EVIOCGMTSLOTS +# ifdef EVIOCGMTSLOTS static int mtslots_ioctl(struct tcb *tcp, const unsigned int code, long arg) { - const size_t size = _IOC_SIZE(code) / sizeof(int32_t); - if (!size) - return 0; + tprints(", "); - int32_t buffer[size]; + const size_t size = _IOC_SIZE(code) / sizeof(int); + if (!size) { + printaddr(arg); + return 1; + } - if (!verbose(tcp) || umove(tcp, arg, &buffer) < 0) - return 0; + int buffer[size]; - tprints(", {code="); + if (umove_or_printaddr(tcp, arg, &buffer)) + return 1; + + tprints("{code="); printxval(evdev_mtslots, buffer[0], "ABS_MT_???"); - unsigned int i; tprints(", values=["); + unsigned int i; for (i = 1; i < ARRAY_SIZE(buffer); i++) tprintf("%s%d", i > 1 ? ", " : "", buffer[i]); tprints("]}"); + return 1; } -#endif /* EVIOCGMTSLOTS */ +# endif /* EVIOCGMTSLOTS */ -#if defined EVIOCGREP || defined EVIOCSREP +# if defined EVIOCGREP || defined EVIOCSREP static int repeat_ioctl(struct tcb *tcp, long arg) { @@ -305,173 +342,185 @@ printpair_int(tcp, arg, "%u"); return 1; } -#endif /* EVIOCGREP || EVIOCSREP */ +# endif /* EVIOCGREP || EVIOCSREP */ static int -evdev_read_ioctl(struct tcb *tcp, const unsigned int code, long arg) +bit_ioctl(struct tcb *tcp, const unsigned int ev_nr, const long arg) { - if (entering(tcp)) - return 1; - - if (syserror(tcp)) - return 0; - - if ((_IOC_NR(code) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0, 0))) { - switch (_IOC_NR(code) - 0x20) { - case EV_SYN: - return decode_bitset(tcp, arg, evdev_sync, - SYN_MAX, "SYN_???"); - case EV_KEY: - return decode_bitset(tcp, arg, evdev_keycode, - KEY_MAX, "KEY_???"); - case EV_REL: - return decode_bitset(tcp, arg, evdev_relative_axes, - REL_MAX, "REL_???"); - case EV_ABS: - return decode_bitset(tcp, arg, - evdev_abs, ABS_MAX, "ABS_???"); - case EV_MSC: - return decode_bitset(tcp, arg, - evdev_misc, MSC_MAX, "MSC_???"); -#ifdef EV_SW - case EV_SW: - return decode_bitset(tcp, arg, - evdev_switch, SW_MAX, "SW_???"); -#endif - case EV_LED: - return decode_bitset(tcp, arg, - evdev_leds, LED_MAX, "LED_???"); - case EV_SND: - return decode_bitset(tcp, arg, - evdev_snd, SND_MAX, "SND_???"); - case EV_REP: - return decode_bitset(tcp, arg, evdev_autorepeat, - REP_MAX, "REP_???"); - case EV_FF: - return decode_bitset(tcp, arg, evdev_ff_types, - FF_MAX, "FF_???"); - case EV_PWR: - printnum_int(tcp, arg, "%d"); - return 1; - case EV_FF_STATUS: - return decode_bitset(tcp, arg, evdev_ff_status, - FF_STATUS_MAX, "FF_STATUS_???"); - default: - return 0; - } + switch (ev_nr) { + case EV_SYN: + return decode_bitset(tcp, arg, evdev_sync, + SYN_MAX, "SYN_???"); + case EV_KEY: + return decode_bitset(tcp, arg, evdev_keycode, + KEY_MAX, "KEY_???"); + case EV_REL: + return decode_bitset(tcp, arg, evdev_relative_axes, + REL_MAX, "REL_???"); + case EV_ABS: + return decode_bitset(tcp, arg, evdev_abs, + ABS_MAX, "ABS_???"); + case EV_MSC: + return decode_bitset(tcp, arg, evdev_misc, + MSC_MAX, "MSC_???"); +# ifdef EV_SW + case EV_SW: + return decode_bitset(tcp, arg, evdev_switch, + SW_MAX, "SW_???"); +# endif + case EV_LED: + return decode_bitset(tcp, arg, evdev_leds, + LED_MAX, "LED_???"); + case EV_SND: + return decode_bitset(tcp, arg, evdev_snd, + SND_MAX, "SND_???"); + case EV_REP: + return decode_bitset(tcp, arg, evdev_autorepeat, + REP_MAX, "REP_???"); + case EV_FF: + return decode_bitset(tcp, arg, evdev_ff_types, + FF_MAX, "FF_???"); + case EV_PWR: + tprints(", "); + printnum_int(tcp, arg, "%d"); + return 1; + case EV_FF_STATUS: + return decode_bitset(tcp, arg, evdev_ff_status, + FF_STATUS_MAX, "FF_STATUS_???"); + default: + tprints(", "); + printaddr(arg); + return 1; } +} - if ((_IOC_NR(code) & ~ABS_MAX) == _IOC_NR(EVIOCGABS(0))) - return abs_ioctl(tcp, arg); - +static int +evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +{ + /* fixed-number fixed-length commands */ switch (code) { case EVIOCGVERSION: tprints(", "); - printnum_int(tcp, arg, "%" PRIx32); + printnum_int(tcp, arg, "%#x"); return 1; case EVIOCGEFFECTS: tprints(", "); - printnum_int(tcp, arg, "%" PRIu32); + printnum_int(tcp, arg, "%u"); return 1; case EVIOCGID: return getid_ioctl(tcp, arg); -#ifdef EVIOCGREP +# ifdef EVIOCGREP case EVIOCGREP: - return repeat_ioctl(tcp, arg);; -#endif + return repeat_ioctl(tcp, arg); +# endif case EVIOCGKEYCODE: return keycode_ioctl(tcp, arg); -#ifdef EVIOCGKEYCODE_V2 +# ifdef EVIOCGKEYCODE_V2 case EVIOCGKEYCODE_V2: return keycode_V2_ioctl(tcp, arg); -#endif +# endif } + /* fixed-number variable-length commands */ switch (_IOC_NR(code)) { -#ifdef EVIOCGMTSLOTS +# ifdef EVIOCGMTSLOTS case _IOC_NR(EVIOCGMTSLOTS(0)): return mtslots_ioctl(tcp, code, arg); -#endif +# endif case _IOC_NR(EVIOCGNAME(0)): case _IOC_NR(EVIOCGPHYS(0)): case _IOC_NR(EVIOCGUNIQ(0)): tprints(", "); - printstr(tcp, arg, tcp->u_rval - 1); + if (syserror(tcp)) + printaddr(arg); + else + printstr(tcp, arg, tcp->u_rval); return 1; -#ifdef EVIOCGPROP +# ifdef EVIOCGPROP case _IOC_NR(EVIOCGPROP(0)): - return decode_bitset(tcp, arg, - evdev_prop, INPUT_PROP_MAX, "PROP_???"); -#endif + return decode_bitset(tcp, arg, evdev_prop, + INPUT_PROP_MAX, "PROP_???"); +# endif case _IOC_NR(EVIOCGSND(0)): - return decode_bitset(tcp, arg, - evdev_snd, SND_MAX, "SND_???"); -#ifdef EVIOCGSW + return decode_bitset(tcp, arg, evdev_snd, + SND_MAX, "SND_???"); +# ifdef EVIOCGSW case _IOC_NR(EVIOCGSW(0)): - return decode_bitset(tcp, arg, - evdev_switch, SW_MAX, "SW_???"); -#endif + return decode_bitset(tcp, arg, evdev_switch, + SW_MAX, "SW_???"); +# endif case _IOC_NR(EVIOCGKEY(0)): - return decode_bitset(tcp, arg, - evdev_keycode, KEY_MAX, "KEY_???"); + return decode_bitset(tcp, arg, evdev_keycode, + KEY_MAX, "KEY_???"); case _IOC_NR(EVIOCGLED(0)): - return decode_bitset(tcp, arg, - evdev_leds, LED_MAX, "LED_???"); - default: - return 0; + return decode_bitset(tcp, arg, evdev_leds, + LED_MAX, "LED_???"); } + + /* multi-number fixed-length commands */ + if ((_IOC_NR(code) & ~ABS_MAX) == _IOC_NR(EVIOCGABS(0))) + return abs_ioctl(tcp, arg); + + /* multi-number variable-length commands */ + if ((_IOC_NR(code) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0, 0))) + return bit_ioctl(tcp, _IOC_NR(code) & EV_MAX, arg); + + return 0; } static int -evdev_write_ioctl(struct tcb *tcp, const unsigned int code, long arg) +evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg) { - if (exiting(tcp)) - return 1; - - if ((_IOC_NR(code) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) - return abs_ioctl(tcp, arg); - + /* fixed-number fixed-length commands */ switch (code) { -#ifdef EVIOCSREP +# ifdef EVIOCSREP case EVIOCSREP: return repeat_ioctl(tcp, arg); -#endif +# endif case EVIOCSKEYCODE: return keycode_ioctl(tcp, arg); -#ifdef EVIOCSKEYCODE_V2 +# ifdef EVIOCSKEYCODE_V2 case EVIOCSKEYCODE_V2: return keycode_V2_ioctl(tcp, arg); -#endif +# endif case EVIOCSFF: return ff_effect_ioctl(tcp, arg); case EVIOCRMFF: -#ifdef EVIOCSCLOCKID - case EVIOCSCLOCKID: -#endif + tprintf(", %d", (int) arg); + return 1; case EVIOCGRAB: -#ifdef EVIOCREVOKE +# ifdef EVIOCREVOKE case EVIOCREVOKE: -#endif +# endif + tprintf(", %lu", arg); + return 1; +# ifdef EVIOCSCLOCKID + case EVIOCSCLOCKID: tprints(", "); printnum_int(tcp, arg, "%u"); return 1; - default: - return 0; +# endif } + + /* multi-number fixed-length commands */ + if ((_IOC_NR(code) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) + return abs_ioctl(tcp, arg); + + return 0; } -int -evdev_ioctl(struct tcb *tcp, const unsigned int code, long arg) +MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *tcp, + const unsigned int code, const long arg) { switch(_IOC_DIR(code)) { case _IOC_READ: + if (entering(tcp)) + return 0; return evdev_read_ioctl(tcp, code, arg); case _IOC_WRITE: - if (!evdev_write_ioctl(tcp, code, arg)) - tprintf(", %lx", arg); - return 1; + return evdev_write_ioctl(tcp, code, arg) | RVAL_DECODED; default: - return 0; + return RVAL_DECODED; } } diff -Nru strace-4.11/execve.c strace-4.12/execve.c --- strace-4.11/execve.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/execve.c 2016-02-08 18:21:31.000000000 +0000 @@ -36,41 +36,72 @@ static void printargv(struct tcb *tcp, long addr) { - union { - unsigned int p32; - unsigned long p64; - char data[sizeof(long)]; - } cp; - const char *sep; - unsigned int n = 0; - const unsigned wordsize = current_wordsize; - - cp.p64 = 1; - for (sep = ""; !abbrev(tcp) || n < max_strlen / 2; sep = ", ", ++n) { - if (umoven_or_printaddr(tcp, addr, wordsize, cp.data)) + if (!addr || !verbose(tcp)) { + printaddr(addr); + return; + } + + const char *const start_sep = "["; + const char *sep = start_sep; + const unsigned int wordsize = current_wordsize; + unsigned int n; + + for (n = 0; addr; sep = ", ", addr += wordsize, ++n) { + union { + unsigned int p32; + unsigned long p64; + char data[sizeof(long)]; + } cp; + + if (umoven(tcp, addr, wordsize, cp.data)) { + if (sep == start_sep) + printaddr(addr); + else + tprints(", ???]"); return; - if (wordsize == 4) - cp.p64 = cp.p32; - if (cp.p64 == 0) + } + if (!(wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64)) { + if (sep == start_sep) + tprints(start_sep); + break; + } + if (abbrev(tcp) && n >= max_strlen) { + tprintf("%s...", sep); break; + } tprints(sep); - printstr(tcp, cp.p64, -1); - addr += wordsize; + printstr(tcp, wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64, -1); } - if (cp.p64) - tprintf("%s...", sep); + tprints("]"); } static void -printargc(const char *fmt, struct tcb *tcp, long addr) +printargc(struct tcb *tcp, long addr) { - int count; + if (!addr || !verbose(tcp)) { + printaddr(addr); + return; + } + + bool unterminated = false; + unsigned int count = 0; char *cp = NULL; - for (count = 0; !umoven(tcp, addr, current_wordsize, &cp) && cp; count++) { - addr += current_wordsize; + for (; addr; addr += current_wordsize, ++count) { + if (umoven(tcp, addr, current_wordsize, &cp)) { + if (count) { + unterminated = true; + break; + } + printaddr(addr); + return; + } + if (!cp) + break; } - tprintf(fmt, count, count == 1 ? "" : "s"); + tprintf("[/* %u var%s%s */]", + count, count == 1 ? "" : "s", + unterminated ? ", unterminated" : ""); } static void @@ -79,24 +110,10 @@ printpath(tcp, tcp->u_arg[index + 0]); tprints(", "); - if (!tcp->u_arg[index + 1] || !verbose(tcp)) - printaddr(tcp->u_arg[index + 1]); - else { - tprints("["); - printargv(tcp, tcp->u_arg[index + 1]); - tprints("]"); - } + printargv(tcp, tcp->u_arg[index + 1]); tprints(", "); - if (!tcp->u_arg[index + 2] || !verbose(tcp)) - printaddr(tcp->u_arg[index + 2]); - else if (abbrev(tcp)) - printargc("[/* %d var%s */]", tcp, tcp->u_arg[index + 2]); - else { - tprints("["); - printargv(tcp, tcp->u_arg[index + 2]); - tprints("]"); - } + (abbrev(tcp) ? printargc : printargv) (tcp, tcp->u_arg[index + 2]); } SYS_FUNC(execve) @@ -121,13 +138,7 @@ { printpath(tcp, tcp->u_arg[0]); tprints(", "); - if (!tcp->u_arg[1] || !verbose(tcp)) - printaddr(tcp->u_arg[1]); - else { - tprints("["); - printargv(tcp, tcp->u_arg[1]); - tprints("]"); - } + printargv(tcp, tcp->u_arg[1]); return RVAL_DECODED; } diff -Nru strace-4.11/fanotify.c strace-4.12/fanotify.c --- strace-4.11/fanotify.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/fanotify.c 2016-05-16 22:41:17.000000000 +0000 @@ -39,9 +39,8 @@ SYS_FUNC(fanotify_init) { - unsigned flags; + unsigned int flags = tcp->u_arg[0]; - flags = tcp->u_arg[0]; printxval(fan_classes, flags & FAN_ALL_CLASS_BITS, "FAN_CLASS_???"); flags &= ~FAN_ALL_CLASS_BITS; if (flags) { @@ -59,23 +58,21 @@ SYS_FUNC(fanotify_mark) { - unsigned long long mask = 0; - int argn; - printfd(tcp, tcp->u_arg[0]); tprints(", "); - printflags(fan_mark_flags, (unsigned) tcp->u_arg[1], "FAN_MARK_???"); + printflags(fan_mark_flags, tcp->u_arg[1], "FAN_MARK_???"); tprints(", "); /* * the mask argument is defined as 64-bit, * but kernel uses the lower 32 bits only. */ - argn = getllval(tcp, &mask, 2); + unsigned long long mask = 0; + int argn = getllval(tcp, &mask, 2); #ifdef HPPA /* Parsic is weird. See arch/parisc/kernel/sys_parisc32.c. */ mask = (mask << 32) | (mask >> 32); #endif - printflags(fan_event_flags, mask, "FAN_???"); + printflags64(fan_event_flags, mask, "FAN_???"); tprints(", "); if ((int) tcp->u_arg[argn] == FAN_NOFD) tprints("FAN_NOFD, "); diff -Nru strace-4.11/fcntl.c strace-4.12/fcntl.c --- strace-4.11/fcntl.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/fcntl.c 2016-05-16 22:52:04.000000000 +0000 @@ -43,9 +43,9 @@ print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk) { tprints("{l_type="); - printxval(lockfcmds, fl->l_type, "F_???"); + printxval(lockfcmds, (unsigned short) fl->l_type, "F_???"); tprints(", l_whence="); - printxval(whence_codes, fl->l_whence, "SEEK_???"); + printxval(whence_codes, (unsigned short) fl->l_whence, "SEEK_???"); tprintf(", l_start=%lld, l_len=%lld", (long long) fl->l_start, (long long) fl->l_len); if (getlk) @@ -87,7 +87,9 @@ static int print_fcntl(struct tcb *tcp) { - switch (tcp->u_arg[1]) { + const unsigned int cmd = tcp->u_arg[1]; + + switch (cmd) { case F_SETFD: tprints(", "); printflags(fdflags, tcp->u_arg[2], "FD_???"); @@ -120,15 +122,15 @@ break; case F_NOTIFY: tprints(", "); - printflags(notifyflags, tcp->u_arg[2], "DN_???"); + printflags_long(notifyflags, tcp->u_arg[2], "DN_???"); break; case F_SETLEASE: tprints(", "); - printxval(lockfcmds, tcp->u_arg[2], "F_???"); + printxval_long(lockfcmds, tcp->u_arg[2], "F_???"); break; case F_ADD_SEALS: tprints(", "); - printflags(f_seals, tcp->u_arg[2], "F_SEAL_???"); + printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???"); break; case F_SETSIG: tprints(", "); @@ -140,7 +142,8 @@ case F_GETFD: if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) return 0; - tcp->auxstr = sprintflags("flags ", fdflags, tcp->u_rval); + tcp->auxstr = sprintflags("flags ", fdflags, + (unsigned long) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GETFL: if (entering(tcp) || syserror(tcp)) @@ -168,12 +171,13 @@ case F_GETLEASE: if (entering(tcp) || syserror(tcp)) return 0; - tcp->auxstr = xlookup(lockfcmds, tcp->u_rval); + tcp->auxstr = xlookup(lockfcmds, (unsigned long) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GET_SEALS: if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) return 0; - tcp->auxstr = sprintflags("seals ", f_seals, tcp->u_rval); + tcp->auxstr = sprintflags("seals ", f_seals, + (unsigned long) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GETSIG: if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) @@ -192,7 +196,8 @@ if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - const char *str = xlookup(fcntlcmds, tcp->u_arg[1]); + const unsigned int cmd = tcp->u_arg[1]; + const char *str = xlookup(fcntlcmds, cmd); if (str) { tprints(str); } else { @@ -201,7 +206,7 @@ * constants, but we would like to show them * for better debugging experience. */ - printxval(fcntl64cmds, tcp->u_arg[1], "F_???"); + printxval(fcntl64cmds, cmd, "F_???"); } } return print_fcntl(tcp); @@ -209,17 +214,18 @@ SYS_FUNC(fcntl64) { + const unsigned int cmd = tcp->u_arg[1]; if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - const char *str = xlookup(fcntl64cmds, tcp->u_arg[1]); + const char *str = xlookup(fcntl64cmds, cmd); if (str) { tprints(str); } else { - printxval(fcntlcmds, tcp->u_arg[1], "F_???"); + printxval(fcntlcmds, cmd, "F_???"); } } - switch (tcp->u_arg[1]) { + switch (cmd) { case F_SETLK64: case F_SETLKW64: tprints(", "); diff -Nru strace-4.11/fetch_seccomp_fprog.c strace-4.12/fetch_seccomp_fprog.c --- strace-4.11/fetch_seccomp_fprog.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/fetch_seccomp_fprog.c 2016-05-21 22:53:06.000000000 +0000 @@ -34,7 +34,8 @@ #include MPERS_DEFS -MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog)(struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog, + struct tcb *tcp, const long addr, void *p) { struct seccomp_fprog *pfp = p; seccomp_fprog_t mfp; diff -Nru strace-4.11/fetch_struct_flock.c strace-4.12/fetch_struct_flock.c --- strace-4.11/fetch_struct_flock.c 2015-11-26 01:37:34.000000000 +0000 +++ strace-4.12/fetch_struct_flock.c 2016-05-21 22:53:06.000000000 +0000 @@ -51,7 +51,8 @@ && FLOCK_MEMBERS_EQ(type, l_len) \ && FLOCK_MEMBERS_EQ(type, l_pid)) -MPERS_PRINTER_DECL(bool, fetch_struct_flock)(struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_struct_flock, + struct tcb *tcp, const long addr, void *p) { struct_kernel_flock64 *pfl = p; struct_flock mfl; @@ -70,7 +71,8 @@ return true; } -MPERS_PRINTER_DECL(bool, fetch_struct_flock64)(struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_struct_flock64, + struct tcb *tcp, const long addr, void *p) { struct_kernel_flock64 *pfl = p; struct_flock64 mfl; diff -Nru strace-4.11/fetch_struct_statfs.c strace-4.12/fetch_struct_statfs.c --- strace-4.11/fetch_struct_statfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/fetch_struct_statfs.c 2016-05-26 14:44:13.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include DEF_MPERS_TYPE(struct_statfs) +#include DEF_MPERS_TYPE(struct_statfs64) + +#include +#include +typedef struct statfs struct_statfs; +typedef struct statfs64 struct_statfs64; + +#include MPERS_DEFS + +#include "statfs.h" + +MPERS_PRINTER_DECL(bool, fetch_struct_statfs, + struct tcb *tcp, const long addr, struct strace_statfs *p) +{ + struct_statfs b; + + if (umove_or_printaddr(tcp, addr, &b)) + return false; + + p->f_type = widen_to_ull(b.f_type); + p->f_bsize = widen_to_ull(b.f_bsize); + p->f_blocks = widen_to_ull(b.f_blocks); + p->f_bfree = widen_to_ull(b.f_bfree); + p->f_bavail = widen_to_ull(b.f_bavail); + p->f_files = widen_to_ull(b.f_files); + p->f_ffree = widen_to_ull(b.f_ffree); +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL + p->f_fsid[0] = widen_to_ull(b.f_fsid.val[0]); + p->f_fsid[1] = widen_to_ull(b.f_fsid.val[1]); +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL + p->f_fsid[0] = widen_to_ull(b.f_fsid.__val[0]); + p->f_fsid[1] = widen_to_ull(b.f_fsid.__val[1]); +#endif + p->f_namelen = widen_to_ull(b.f_namelen); +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE + p->f_frsize = widen_to_ull(b.f_frsize); +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS + p->f_flags = widen_to_ull(b.f_flags); +#endif + + return true; +} + +#if defined ARM || (defined AARCH64 && defined IN_MPERS) +/* See arch/arm/kernel/sys_oabi-compat.c for details. */ +# define COMPAT_STATFS64_PADDED_SIZE (sizeof(struct_statfs64) + 4) +#endif + +MPERS_PRINTER_DECL(bool, fetch_struct_statfs64, + struct tcb *tcp, const long addr, const unsigned long size, + struct strace_statfs *p) +{ + struct_statfs64 b; + + if (sizeof(b) != size +#ifdef COMPAT_STATFS64_PADDED_SIZE + && sizeof(b) != COMPAT_STATFS64_PADDED_SIZE +#endif + ) { + printaddr(addr); + return false; + } + + if (umove_or_printaddr(tcp, addr, &b)) + return false; + + p->f_type = widen_to_ull(b.f_type); + p->f_bsize = widen_to_ull(b.f_bsize); + p->f_blocks = widen_to_ull(b.f_blocks); + p->f_bfree = widen_to_ull(b.f_bfree); + p->f_bavail = widen_to_ull(b.f_bavail); + p->f_files = widen_to_ull(b.f_files); + p->f_ffree = widen_to_ull(b.f_ffree); +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL + p->f_fsid[0] = widen_to_ull(b.f_fsid.val[0]); + p->f_fsid[1] = widen_to_ull(b.f_fsid.val[1]); +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL + p->f_fsid[0] = widen_to_ull(b.f_fsid.__val[0]); + p->f_fsid[1] = widen_to_ull(b.f_fsid.__val[1]); +#endif + p->f_namelen = widen_to_ull(b.f_namelen); +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE + p->f_frsize = widen_to_ull(b.f_frsize); +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS + p->f_flags = widen_to_ull(b.f_flags); +#endif + + return true; +} diff -Nru strace-4.11/file_ioctl.c strace-4.12/file_ioctl.c --- strace-4.11/file_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/file_ioctl.c 2016-05-28 00:37:02.000000000 +0000 @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +#include + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef FICLONE +# define FICLONE _IOW(0x94, 9, int) +#endif + +#ifndef FICLONERANGE +# define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) +struct file_clone_range { + int64_t src_fd; + uint64_t src_offset; + uint64_t src_length; + uint64_t dest_offset; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +static bool +print_file_dedupe_range_info(struct tcb *tcp, void *elem_buf, + size_t elem_size, void *data) +{ + const struct file_dedupe_range_info *info = elem_buf; + unsigned int *count = data; + + if (count) { + if (*count == 0) { + tprints("..."); + return false; + } + --*count; + } + + if (entering(tcp)) { + tprints("{dest_fd="); + printfd(tcp, info->dest_fd); + tprintf(", dest_offset=%" PRIu64 "}", + (uint64_t) info->dest_offset); + } else { + tprintf("{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t) info->bytes_deduped, info->status); + } + + return true; +} + +#ifdef HAVE_LINUX_FIEMAP_H +static bool +print_fiemap_extent(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + const struct fiemap_extent *fe = elem_buf; + + tprintf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 ", ", + fe->fe_logical, fe->fe_physical, fe->fe_length); + + printflags64(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + tprints("}"); + + return true; +} +#endif /* HAVE_LINUX_FIEMAP_H */ + +int +file_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +{ + switch (code) { + case FICLONE: /* W */ + tprintf(", %d", (int) arg); + break; + + case FICLONERANGE: { /* W */ + struct file_clone_range args; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{src_fd="); + printfd(tcp, args.src_fd); + tprintf(", src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_offset=%" PRIu64 "}", + (uint64_t) args.src_offset, + (uint64_t) args.src_length, + (uint64_t) args.dest_offset); + break; + } + + case FIDEDUPERANGE: { /* RW */ + struct file_dedupe_range args; + struct file_dedupe_range_info info; + unsigned int *limit = NULL; + unsigned int count = 2; + bool rc; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + tprints("{"); + if (entering(tcp)) { + tprintf("src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, ", + (uint64_t) args.src_offset, + (uint64_t) args.src_length, + (uint16_t) args.dest_count); + } + + tprints("info="); + + /* Limit how many elements we print in abbrev mode. */ + if (abbrev(tcp) && args.dest_count > count) + limit = &count; + + rc = print_array(tcp, arg + offsetof(typeof(args), info), + args.dest_count, &info, sizeof(info), + umoven_or_printaddr, + print_file_dedupe_range_info, limit); + + tprints("}"); + if (!rc || exiting(tcp)) + break; + + return 0; + } + +#ifdef HAVE_LINUX_FIEMAP_H + case FS_IOC_FIEMAP: { + struct fiemap args; + + if (entering(tcp)) + tprints(", "); + else if (syserror(tcp)) + break; + else + tprints(" => "); + + if (umove_or_printaddr(tcp, arg, &args)) + break; + + if (entering(tcp)) { + tprintf("{fm_start=%" PRI__u64 ", " + "fm_length=%" PRI__u64 ", " + "fm_flags=", + args.fm_start, args.fm_length); + printflags64(fiemap_flags, args.fm_flags, + "FIEMAP_FLAG_???"); + tprintf(", fm_extent_count=%u}", args.fm_extent_count); + return 0; + } + + tprints("{fm_flags="); + printflags64(fiemap_flags, args.fm_flags, + "FIEMAP_FLAG_???"); + tprintf(", fm_mapped_extents=%u", + args.fm_mapped_extents); + tprints(", fm_extents="); + if (abbrev(tcp)) { + tprints("..."); + } else { + struct fiemap_extent fe; + print_array(tcp, + arg + offsetof(typeof(args), fm_extents), + args.fm_mapped_extents, &fe, sizeof(fe), + umoven_or_printaddr, + print_fiemap_extent, 0); + } + tprints("}"); + + break; + } +#endif /* HAVE_LINUX_FIEMAP_H */ + + default: + return RVAL_DECODED; + }; + + return RVAL_DECODED | 1; +} diff -Nru strace-4.11/fstatfs64.c strace-4.12/fstatfs64.c --- strace-4.11/fstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/fstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,14 @@ +#include "defs.h" + +SYS_FUNC(fstatfs64) +{ + const unsigned long size = tcp->u_arg[1]; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprintf(", %lu, ", size); + } else { + print_struct_statfs64(tcp, tcp->u_arg[2], size); + } + return 0; +} diff -Nru strace-4.11/fstatfs.c strace-4.12/fstatfs.c --- strace-4.11/fstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/fstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,12 @@ +#include "defs.h" + +SYS_FUNC(fstatfs) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + print_struct_statfs(tcp, tcp->u_arg[1]); + } + return 0; +} diff -Nru strace-4.11/fs_x_ioctl.c strace-4.12/fs_x_ioctl.c --- strace-4.11/fs_x_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/fs_x_ioctl.c 2016-05-26 14:44:13.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2014 Mike Frysinger + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include + +int +fs_x_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +{ + switch (code) { +#ifdef FITRIM + /* First seen in linux-2.6.37 */ + case FITRIM: { + struct fstrim_range fstrim; + + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &fstrim)) + tprintf("{start=%#" PRIx64 + ", len=%#" PRIx64 + ", minlen=%#" PRIx64 "}", + (uint64_t) fstrim.start, + (uint64_t) fstrim.len, + (uint64_t) fstrim.minlen); + break; + } +#endif + + /* No arguments */ +#ifdef FIFREEZE + case FIFREEZE: + case FITHAW: + break; +#endif + + default: + return RVAL_DECODED; + } + + return RVAL_DECODED | 1; +} diff -Nru strace-4.11/gcc_compat.h strace-4.12/gcc_compat.h --- strace-4.11/gcc_compat.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/gcc_compat.h 2016-04-01 00:52:01.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef GCC_COMPAT_H_ +#define GCC_COMPAT_H_ + +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +# define __attribute__(x) /* empty */ +# define GNUC_PREREQ(maj, min) 0 +#endif + +#if GNUC_PREREQ(2, 5) +# define ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#else +# define ATTRIBUTE_NORETURN /* empty */ +#endif + +#if GNUC_PREREQ(2, 7) +# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args)) +# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg))) +# define ATTRIBUTE_PACKED __attribute__((__packed__)) +#else +# define ATTRIBUTE_FORMAT(args) /* empty */ +# define ATTRIBUTE_ALIGNED(arg) /* empty */ +# define ATTRIBUTE_PACKED /* empty */ +#endif + +#if GNUC_PREREQ(3, 0) +# define ATTRIBUTE_MALLOC __attribute__((__malloc__)) +#else +# define ATTRIBUTE_MALLOC /* empty */ +#endif + +#if GNUC_PREREQ(3, 1) +# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) +#else +# define ATTRIBUTE_NOINLINE /* empty */ +#endif + +#if GNUC_PREREQ(4, 0) +# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__)) +#else +# define ATTRIBUTE_SENTINEL /* empty */ +#endif + +#if GNUC_PREREQ(4, 3) +# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args)) +#else +# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */ +#endif + +#endif diff -Nru strace-4.11/hdio.c strace-4.12/hdio.c --- strace-4.11/hdio.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/hdio.c 2016-05-30 00:29:14.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include DEF_MPERS_TYPE(struct_hd_geometry) + +#include + +typedef struct hd_geometry struct_hd_geometry; + +#include MPERS_DEFS + +MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *tcp, + const unsigned int code, const long arg) +{ + switch (code) { + case HDIO_GETGEO: + if (entering(tcp)) + return 0; + else { + struct_hd_geometry geo; + + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &geo)) + tprintf("{heads=%u, sectors=%u, " + "cylinders=%hu, start=%lu}", + (unsigned) geo.heads, + (unsigned) geo.sectors, + geo.cylinders, + (unsigned long) geo.start); + } + break; + default: + return RVAL_DECODED; + } + + return RVAL_DECODED | 1; +} diff -Nru strace-4.11/io.c strace-4.12/io.c --- strace-4.11/io.c 2015-11-26 20:29:25.000000000 +0000 +++ strace-4.12/io.c 2016-05-26 14:44:13.000000000 +0000 @@ -57,58 +57,57 @@ return RVAL_DECODED; } +struct print_iovec_config { + int decode_iov; + unsigned long data_size; +}; + +static bool +print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + const unsigned long *iov; + unsigned long iov_buf[2]; + struct print_iovec_config *c = data; + + if (elem_size < sizeof(iov_buf)) { + iov_buf[0] = ((unsigned int *) elem_buf)[0]; + iov_buf[1] = ((unsigned int *) elem_buf)[1]; + iov = iov_buf; + } else { + iov = elem_buf; + } + + tprints("{"); + + if (c->decode_iov) { + unsigned long len = iov[1]; + if (len > c->data_size) + len = c->data_size; + c->data_size -= len; + printstr(tcp, iov[0], len); + } else { + printaddr(iov[0]); + } + + tprintf(", %lu}", iov[1]); + + return true; +} + /* * data_size limits the cumulative size of printed data. * Example: recvmsg returing a short read. */ void -tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov, unsigned long data_size) +tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, + int decode_iov, unsigned long data_size) { unsigned long iov[2]; - unsigned long size, cur, end, abbrev_end; - const unsigned long sizeof_iov = current_wordsize * 2; + struct print_iovec_config config = + { .decode_iov = decode_iov, .data_size = data_size }; - if (!len) { - tprints("[]"); - return; - } - size = len * sizeof_iov; - end = addr + size; - if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || - !addr || size / sizeof_iov != len || end < addr) { - printaddr(addr); - return; - } - if (abbrev(tcp)) { - abbrev_end = addr + max_strlen * sizeof_iov; - if (abbrev_end < addr) - abbrev_end = end; - } else { - abbrev_end = end; - } - tprints("["); - for (cur = addr; cur < end; cur += sizeof_iov) { - if (cur > addr) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umove_ulong_array_or_printaddr(tcp, cur, iov, - ARRAY_SIZE(iov))) - break; - tprints("{"); - if (decode_iov) { - unsigned long len = iov[1]; - if (len > data_size) - len = data_size; - data_size -= len; - printstr(tcp, iov[0], len); - } else - printaddr(iov[0]); - tprintf(", %lu}", iov[1]); - } - tprints("]"); + print_array(tcp, addr, len, iov, current_wordsize * 2, + umoven_or_printaddr, print_iovec, &config); } void @@ -123,7 +122,8 @@ printfd(tcp, tcp->u_arg[0]); tprints(", "); } else { - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], 1, + tcp->u_rval); tprintf(", %lu", tcp->u_arg[2]); } return 0; @@ -161,7 +161,7 @@ else printstr(tcp, tcp->u_arg[1], tcp->u_rval); tprintf(", %lu, ", tcp->u_arg[2]); - printllval(tcp, "%llu", PREAD_OFFSET_ARG); + printllval(tcp, "%lld", PREAD_OFFSET_ARG); } return 0; } @@ -172,13 +172,13 @@ tprints(", "); printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); tprintf(", %lu, ", tcp->u_arg[2]); - printllval(tcp, "%llu", PREAD_OFFSET_ARG); + printllval(tcp, "%lld", PREAD_OFFSET_ARG); return RVAL_DECODED; } static void -print_llu_from_low_high_val(struct tcb *tcp, int arg) +print_lld_from_low_high_val(struct tcb *tcp, int arg) { #if SIZEOF_LONG == SIZEOF_LONG_LONG # if SUPPORTED_PERSONALITIES > 1 @@ -188,49 +188,82 @@ if (current_wordsize == sizeof(long)) # endif # endif - tprintf("%lu", (unsigned long) tcp->u_arg[arg]); + tprintf("%ld", tcp->u_arg[arg]); # if SUPPORTED_PERSONALITIES > 1 else - tprintf("%lu", + tprintf("%ld", ((unsigned long) tcp->u_arg[arg + 1] << current_wordsize * 8) | (unsigned long) tcp->u_arg[arg]); # endif #else # ifdef X32 if (current_personality == 0) - tprintf("%llu", (unsigned long long) tcp->ext_arg[arg]); + tprintf("%lld", tcp->ext_arg[arg]); else # endif - tprintf("%llu", - ((unsigned long long) (unsigned long) tcp->u_arg[arg + 1] << sizeof(long) * 8) - | (unsigned long long) (unsigned long) tcp->u_arg[arg]); + tprintf("%lld", + (widen_to_ull(tcp->u_arg[arg + 1]) << sizeof(long) * 8) + | widen_to_ull(tcp->u_arg[arg])); #endif } -SYS_FUNC(preadv) +#include "xlat/rwf_flags.h" + +static int +do_preadv(struct tcb *tcp, const int flags_arg) { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); } else { - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], 1, + tcp->u_rval); tprintf(", %lu, ", tcp->u_arg[2]); - print_llu_from_low_high_val(tcp, 3); + print_lld_from_low_high_val(tcp, 3); + if (flags_arg >= 0) { + tprints(", "); + printflags(rwf_flags, tcp->u_arg[flags_arg], "RWF_???"); + } } return 0; } -SYS_FUNC(pwritev) +SYS_FUNC(preadv) +{ + return do_preadv(tcp, -1); +} + +SYS_FUNC(preadv2) +{ + return do_preadv(tcp, 5); +} + +static int +do_pwritev(struct tcb *tcp, const int flags_arg) { printfd(tcp, tcp->u_arg[0]); tprints(", "); tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); tprintf(", %lu, ", tcp->u_arg[2]); - print_llu_from_low_high_val(tcp, 3); + print_lld_from_low_high_val(tcp, 3); + if (flags_arg >= 0) { + tprints(", "); + printflags(rwf_flags, tcp->u_arg[flags_arg], "RWF_???"); + } return RVAL_DECODED; } +SYS_FUNC(pwritev) +{ + return do_pwritev(tcp, -1); +} + +SYS_FUNC(pwritev2) +{ + return do_pwritev(tcp, 5); +} + #include "xlat/splice_flags.h" SYS_FUNC(tee) @@ -255,13 +288,13 @@ printfd(tcp, tcp->u_arg[0]); tprints(", "); /* loff_t *off_in */ - printnum_int64(tcp, tcp->u_arg[1], "%" PRIu64); + printnum_int64(tcp, tcp->u_arg[1], "%" PRId64); tprints(", "); /* int fd_out */ printfd(tcp, tcp->u_arg[2]); tprints(", "); /* loff_t *off_out */ - printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64); + printnum_int64(tcp, tcp->u_arg[3], "%" PRId64); tprints(", "); /* size_t len */ tprintf("%lu, ", tcp->u_arg[4]); diff -Nru strace-4.11/ioctl.c strace-4.12/ioctl.c --- strace-4.11/ioctl.c 2015-12-04 18:05:38.000000000 +0000 +++ strace-4.12/ioctl.c 2016-05-27 08:55:40.000000000 +0000 @@ -91,7 +91,7 @@ if (_IOC_DIR(code) == _IOC_WRITE) { if (nr >= 0xc0 && nr <= 0xc0 + 0x3f) { tprints("EVIOCSABS("); - printxval(evdev_abs, nr - 0xc0, "EV_???"); + printxval(evdev_abs, nr - 0xc0, "ABS_???"); tprints(")"); return 1; } @@ -231,8 +231,17 @@ switch (_IOC_TYPE(code)) { #if defined(ALPHA) || defined(POWERPC) - case 'f': case 't': case 'T': + case 'f': { + int ret = file_ioctl(tcp, code, arg); + if (ret != RVAL_DECODED) + return ret; + } + case 't': + case 'T': + return term_ioctl(tcp, code, arg); #else /* !ALPHA */ + case 'f': + return file_ioctl(tcp, code, arg); case 0x54: #endif /* !ALPHA */ return term_ioctl(tcp, code, arg); @@ -241,9 +250,11 @@ case 'p': return rtc_ioctl(tcp, code, arg); case 0x03: + return hdio_ioctl(tcp, code, arg); case 0x12: - case 'X': return block_ioctl(tcp, code, arg); + case 'X': + return fs_x_ioctl(tcp, code, arg); #ifdef HAVE_SCSI_SG_H case 0x22: return scsi_ioctl(tcp, code, arg); @@ -263,6 +274,14 @@ case 'E': return evdev_ioctl(tcp, code, arg); #endif +#ifdef HAVE_LINUX_USERFAULTFD_H + case 0xaa: + return uffdio_ioctl(tcp, code, arg); +#endif +#ifdef HAVE_LINUX_BTRFS_H + case 0x94: + return btrfs_ioctl(tcp, code, arg); +#endif default: break; } diff -Nru strace-4.11/ioprio.c strace-4.12/ioprio.c --- strace-4.11/ioprio.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/ioprio.c 2016-05-14 22:05:06.000000000 +0000 @@ -51,19 +51,19 @@ #define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK) static const char * -sprint_ioprio(int ioprio) +sprint_ioprio(unsigned int ioprio) { static char outstr[256]; const char *str; - int class, data; + unsigned int class, data; class = IOPRIO_PRIO_CLASS(ioprio); data = IOPRIO_PRIO_DATA(ioprio); str = xlookup(ioprio_class, class); if (str) - sprintf(outstr, "IOPRIO_PRIO_VALUE(%s,%d)", str, data); + sprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data); else - sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */,%d)", + sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)", class, "IOPRIO_CLASS_???", data); return outstr; diff -Nru strace-4.11/ipc_sem.c strace-4.12/ipc_sem.c --- strace-4.11/ipc_sem.c 2015-11-26 01:36:58.000000000 +0000 +++ strace-4.12/ipc_sem.c 2016-05-16 22:41:19.000000000 +0000 @@ -43,12 +43,16 @@ #include "xlat/semop_flags.h" #if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H -static void -tprint_sembuf(const struct sembuf *sb) +static bool +print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { + const struct sembuf *sb = elem_buf; + tprintf("{%u, %d, ", sb->sem_num, sb->sem_op); - printflags(semop_flags, sb->sem_flg, "SEM_???"); + printflags(semop_flags, (unsigned short) sb->sem_flg, "SEM_???"); tprints("}"); + + return true; } #endif @@ -56,35 +60,9 @@ tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned long count) { #if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H - unsigned long max_count; struct sembuf sb; - - if (abbrev(tcp)) - max_count = (max_strlen < count) ? max_strlen : count; - else - max_count = count; - - if (!max_count) - printaddr(addr); - else if (!umove_or_printaddr(tcp, addr, &sb)) { - unsigned long i; - - tprints("["); - tprint_sembuf(&sb); - - for (i = 1; i < max_count; ++i) { - tprints(", "); - if (umove_or_printaddr(tcp, addr + i * sizeof(sb), &sb)) - break; - else - tprint_sembuf(&sb); - } - - if (i < max_count || max_count < count) - tprints(", ..."); - - tprints("]"); - } + print_array(tcp, addr, count, &sb, sizeof(sb), + umoven_or_printaddr, print_sembuf, 0); #else printaddr(addr); #endif diff -Nru strace-4.11/kexec.c strace-4.12/kexec.c --- strace-4.11/kexec.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/kexec.c 2016-05-16 22:54:41.000000000 +0000 @@ -37,56 +37,49 @@ # define KEXEC_SEGMENT_MAX 16 #endif -static void -print_seg(const unsigned long *seg) +static bool +print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { + const unsigned long *seg; + unsigned long seg_buf[4]; + + if (elem_size < sizeof(seg_buf)) { + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(seg_buf); ++i) + seg_buf[i] = ((unsigned int *) elem_buf)[i]; + seg = seg_buf; + } else { + seg = elem_buf; + } + tprints("{"); printaddr(seg[0]); tprintf(", %lu, ", seg[1]); printaddr(seg[2]); tprintf(", %lu}", seg[3]); + + return true; } static void print_kexec_segments(struct tcb *tcp, const unsigned long addr, const unsigned long len) { - unsigned long seg[4]; - const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize; - unsigned int i; - - if (!len) { - tprints("[]"); - return; - } - if (len > KEXEC_SEGMENT_MAX) { printaddr(addr); return; } - if (umove_ulong_array_or_printaddr(tcp, addr, seg, ARRAY_SIZE(seg))) - return; - - tprints("["); - print_seg(seg); - - for (i = 1; i < len; ++i) { - tprints(", "); - if (umove_ulong_array_or_printaddr(tcp, - addr + i * sizeof_seg, - seg, ARRAY_SIZE(seg))) - break; - print_seg(seg); - } + unsigned long seg[4]; + const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize; - tprints("]"); + print_array(tcp, addr, len, seg, sizeof_seg, + umoven_or_printaddr, print_seg, 0); } SYS_FUNC(kexec_load) { - unsigned long n; - /* entry, nr_segments */ printaddr(tcp->u_arg[0]); tprintf(", %lu, ", tcp->u_arg[1]); @@ -96,12 +89,12 @@ tprints(", "); /* flags */ - n = tcp->u_arg[3]; - printxval(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???"); + unsigned long n = tcp->u_arg[3]; + printxval_long(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???"); n &= ~KEXEC_ARCH_MASK; if (n) { tprints("|"); - printflags(kexec_load_flags, n, "KEXEC_???"); + printflags_long(kexec_load_flags, n, "KEXEC_???"); } return RVAL_DECODED; @@ -123,7 +116,7 @@ printstr(tcp, tcp->u_arg[3], tcp->u_arg[2]); tprints(", "); /* flags */ - printflags(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???"); + printflags_long(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???"); return RVAL_DECODED; } diff -Nru strace-4.11/keyctl.c strace-4.12/keyctl.c --- strace-4.11/keyctl.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/keyctl.c 2016-05-14 22:05:06.000000000 +0000 @@ -34,7 +34,7 @@ static void print_keyring_serial_number(key_serial_t id) { - const char *str = xlookup(key_spec, id); + const char *str = xlookup(key_spec, (unsigned int) id); if (str) tprints(str); diff -Nru strace-4.11/linux/32/ioctls_inc_align32.h strace-4.12/linux/32/ioctls_inc_align32.h --- strace-4.11/linux/32/ioctls_inc_align32.h 2015-05-21 22:53:42.000000000 +0000 +++ strace-4.12/linux/32/ioctls_inc_align32.h 2016-05-18 09:26:01.000000000 +0000 @@ -81,6 +81,18 @@ { "asm-generic/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, { "asm-generic/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, { "asm-generic/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x11c }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_OP", _IOC_READ|_IOC_WRITE, 0x6450, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6451, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -118,11 +130,14 @@ { "drm/drm.h", "DRM_IOCTL_MARK_BUFS", _IOC_WRITE, 0x6417, 0x18 }, { "drm/drm.h", "DRM_IOCTL_MODESET_CTL", _IOC_WRITE, 0x6408, 0x08 }, { "drm/drm.h", "DRM_IOCTL_MODE_ADDFB", _IOC_READ|_IOC_WRITE, 0x64ae, 0x1c }, -{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x44 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x64 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATOMIC", _IOC_READ|_IOC_WRITE, 0x64bc, 0x38 }, { "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 }, { "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DESTROY_DUMB", _IOC_READ|_IOC_WRITE, 0x64b4, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DETACHMODE", _IOC_READ|_IOC_WRITE, 0x64a9, 0x48 }, { "drm/drm.h", "DRM_IOCTL_MODE_DIRTYFB", _IOC_READ|_IOC_WRITE, 0x64b1, 0x18 }, @@ -166,11 +181,21 @@ { "drm/drm.h", "DRM_IOCTL_UPDATE_DRAW", _IOC_WRITE, 0x643f, 0x14 }, { "drm/drm.h", "DRM_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x6400, 0x24 }, { "drm/drm.h", "DRM_IOCTL_WAIT_VBLANK", _IOC_READ|_IOC_WRITE, 0x643a, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", _IOC_READ|_IOC_WRITE, 0x6461, 0x28 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 }, @@ -201,6 +226,8 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x6457, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_CREATE", _IOC_READ|_IOC_WRITE, 0x646d, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY", _IOC_WRITE, 0x646e, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6474, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM", _IOC_READ|_IOC_WRITE, 0x6475, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645b, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 }, @@ -211,7 +238,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_INIT", _IOC_WRITE, 0x6453, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_LEAVEVT", _IOC_NONE, 0x645a, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6466, 0x0c }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x28 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP_GTT", _IOC_READ|_IOC_WRITE, 0x6464, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PIN", _IOC_READ|_IOC_WRITE, 0x6455, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PREAD", _IOC_WRITE, 0x645c, 0x20 }, @@ -227,7 +254,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6446, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID", _IOC_READ|_IOC_WRITE, 0x6465, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_RESET_STATS", _IOC_READ|_IOC_WRITE, 0x6472, 0x18 }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646a, 0x14 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_VBLANK_PIPE", _IOC_READ, 0x644e, 0x04 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_HWS_ADDR", _IOC_WRITE, 0x6451, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_INIT", _IOC_WRITE, 0x6440, 0x44 }, @@ -352,7 +379,7 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644d, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 }, -{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644c, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, @@ -362,6 +389,13 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_INCR", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_READ", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 }, @@ -376,6 +410,15 @@ { "drm/via_drm.h", "DRM_IOCTL_VIA_MAP_INIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_PCICMD", _IOC_WRITE, 0x644a, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_WAIT_IRQ", _IOC_READ|_IOC_WRITE, 0x644d, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_EXECBUFFER", _IOC_WRITE, 0x6442, 0x20 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x6449, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", _IOC_READ|_IOC_WRITE, 0x6444, 0x38 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_INFO", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", _IOC_READ|_IOC_WRITE, 0x6447, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_WAIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x08 }, { "linux/agpgart.h", "AGPIOC_ACQUIRE", _IOC_NONE, 0x4101, 0x00 }, { "linux/agpgart.h", "AGPIOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x4106, 0x04 }, { "linux/agpgart.h", "AGPIOC_BIND", _IOC_WRITE, 0x4108, 0x04 }, @@ -387,6 +430,7 @@ { "linux/agpgart.h", "AGPIOC_RESERVE", _IOC_WRITE, 0x4104, 0x04 }, { "linux/agpgart.h", "AGPIOC_SETUP", _IOC_WRITE, 0x4103, 0x04 }, { "linux/agpgart.h", "AGPIOC_UNBIND", _IOC_WRITE, 0x4109, 0x04 }, +{ "linux/am437x-vpfe.h", "VIDIOC_AM437X_CCDC_CFG", _IOC_WRITE, 0x56c1, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE", _IOC_WRITE, 0x6305, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE_DONE", _IOC_WRITE, 0x6309, 0x10 }, { "linux/android/binder.h", "BC_ACQUIRE_RESULT", _IOC_WRITE, 0x6302, 0x04 }, @@ -672,6 +716,7 @@ { "linux/dm-ioctl.h", "DM_TABLE_STATUS", _IOC_READ|_IOC_WRITE, 0xfd0c, 0x138 }, { "linux/dm-ioctl.h", "DM_TARGET_MSG", _IOC_READ|_IOC_WRITE, 0xfd0e, 0x138 }, { "linux/dm-ioctl.h", "DM_VERSION", _IOC_READ|_IOC_WRITE, 0xfd00, 0x138 }, +{ "linux/dma-buf.h", "DMA_BUF_IOCTL_SYNC", _IOC_WRITE, 0x6200, 0x08 }, { "linux/dn.h", "OSIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, { "linux/dn.h", "OSIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, { "linux/dn.h", "SIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, @@ -840,6 +885,7 @@ { "linux/fs.h", "BLKALIGNOFF", _IOC_NONE, 0x127a, 0x00 }, { "linux/fs.h", "BLKBSZGET", _IOC_READ, 0x1270, 0x04 }, { "linux/fs.h", "BLKBSZSET", _IOC_WRITE, 0x1271, 0x04 }, +{ "linux/fs.h", "BLKDAXGET", _IOC_NONE, 0x1281, 0x00 }, { "linux/fs.h", "BLKDISCARD", _IOC_NONE, 0x1277, 0x00 }, { "linux/fs.h", "BLKDISCARDZEROES", _IOC_NONE, 0x127c, 0x00 }, { "linux/fs.h", "BLKFLSBUF", _IOC_NONE, 0x1261, 0x00 }, @@ -866,6 +912,9 @@ { "linux/fs.h", "BLKTRACETEARDOWN", _IOC_NONE, 0x1276, 0x00 }, { "linux/fs.h", "BLKZEROOUT", _IOC_NONE, 0x127f, 0x00 }, { "linux/fs.h", "FIBMAP", _IOC_NONE, 0x0001, 0x00 }, +{ "linux/fs.h", "FICLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/fs.h", "FICLONERANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/fs.h", "FIDEDUPERANGE", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, { "linux/fs.h", "FIFREEZE", _IOC_READ|_IOC_WRITE, 0x5877, 0x04 }, { "linux/fs.h", "FIGETBSZ", _IOC_NONE, 0x0002, 0x00 }, { "linux/fs.h", "FITHAW", _IOC_READ|_IOC_WRITE, 0x5878, 0x04 }, @@ -875,10 +924,15 @@ { "linux/fs.h", "FS_IOC32_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC32_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_FIEMAP", _IOC_READ|_IOC_WRITE, 0x660b, 0x20 }, +{ "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, +{ "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, { "linux/fsl-diu-fb.h", "MFB_GET_AOID", _IOC_READ, 0x4d04, 0x08 }, { "linux/fsl-diu-fb.h", "MFB_GET_GAMMA", _IOC_READ, 0x4d01, 0x01 }, @@ -897,6 +951,7 @@ { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 }, +{ "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_GET_CARD_STATE", _IOC_READ, 0xa524, 0x04 }, @@ -914,6 +969,8 @@ { "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 }, +{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 }, +{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 }, { "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 }, { "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 }, { "linux/gsmmux.h", "GSMIOC_GETCONF", _IOC_READ, 0x4700, 0x4c }, @@ -982,6 +1039,10 @@ { "linux/hpet.h", "HPET_IE_ON", _IOC_NONE, 0x6801, 0x00 }, { "linux/hpet.h", "HPET_INFO", _IOC_READ, 0x6803, 0x0c }, { "linux/hpet.h", "HPET_IRQFREQ", _IOC_WRITE, 0x6806, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_CONFIG_BUFS", _IOC_WRITE, 0x431f, 0x20 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_IF_VERSION", _IOC_READ, 0x431e, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_STATE", _IOC_READ, 0x4315, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_SET_WAKELINE", _IOC_WRITE, 0x4317, 0x04 }, { "linux/hsi/hsi_char.h", "HSC_GET_RX", _IOC_WRITE, 0x6b14, 0x0c }, { "linux/hsi/hsi_char.h", "HSC_GET_TX", _IOC_WRITE, 0x6b16, 0x10 }, { "linux/hsi/hsi_char.h", "HSC_RESET", _IOC_NONE, 0x6b10, 0x00 }, @@ -1003,10 +1064,6 @@ { "linux/i2o-dev.h", "I2OSWDL", _IOC_READ|_IOC_WRITE, 0x6905, 0x1c }, { "linux/i2o-dev.h", "I2OSWUL", _IOC_READ|_IOC_WRITE, 0x6906, 0x1c }, { "linux/i2o-dev.h", "I2OVALIDATE", _IOC_READ, 0x6908, 0x04 }, -{ "linux/i2o.h", "BLKI2OGRSTRAT", _IOC_READ, 0x3201, 0x04 }, -{ "linux/i2o.h", "BLKI2OGWSTRAT", _IOC_READ, 0x3202, 0x04 }, -{ "linux/i2o.h", "BLKI2OSRSTRAT", _IOC_WRITE, 0x3203, 0x04 }, -{ "linux/i2o.h", "BLKI2OSWSTRAT", _IOC_WRITE, 0x3204, 0x04 }, { "linux/i8k.h", "I8K_BIOS_VERSION", _IOC_READ, 0x6980, 0x04 }, { "linux/i8k.h", "I8K_FN_STATUS", _IOC_READ, 0x6983, 0x04 }, { "linux/i8k.h", "I8K_GET_FAN", _IOC_READ|_IOC_WRITE, 0x6986, 0x04 }, @@ -1023,6 +1080,7 @@ { "linux/if_tun.h", "TUNGETFILTER", _IOC_READ, 0x54db, 0x08 }, { "linux/if_tun.h", "TUNGETIFF", _IOC_READ, 0x54d2, 0x04 }, { "linux/if_tun.h", "TUNGETSNDBUF", _IOC_READ, 0x54d3, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETBE", _IOC_READ, 0x54df, 0x04 }, { "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 }, { "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 }, { "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 }, @@ -1037,6 +1095,7 @@ { "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 }, { "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 }, { "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 }, { "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 }, { "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 }, { "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 }, @@ -1044,6 +1103,7 @@ { "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE_V2", _IOC_READ, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCGMASK", _IOC_READ, 0x4592, 0x10 }, { "linux/input.h", "EVIOCGRAB", _IOC_WRITE, 0x4590, 0x04 }, { "linux/input.h", "EVIOCGREP", _IOC_READ, 0x4503, 0x08 }, { "linux/input.h", "EVIOCGVERSION", _IOC_READ, 0x4501, 0x04 }, @@ -1053,6 +1113,7 @@ { "linux/input.h", "EVIOCSFF", _IOC_WRITE, 0x4580, 0x2c }, { "linux/input.h", "EVIOCSKEYCODE", _IOC_WRITE, 0x4504, 0x08 }, { "linux/input.h", "EVIOCSKEYCODE_V2", _IOC_WRITE, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCSMASK", _IOC_WRITE, 0x4593, 0x10 }, { "linux/input.h", "EVIOCSREP", _IOC_WRITE, 0x4503, 0x08 }, { "linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", _IOC_READ, 0x691e, 0x04 }, { "linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", _IOC_READ, 0x6912, 0x04 }, @@ -1167,6 +1228,9 @@ { "linux/joystick.h", "JSIOCSAXMAP", _IOC_WRITE, 0x6a31, 0x40 }, { "linux/joystick.h", "JSIOCSBTNMAP", _IOC_WRITE, 0x6a33, 0x400 }, { "linux/joystick.h", "JSIOCSCORR", _IOC_WRITE, 0x6a21, 0x24 }, +{ "linux/kcov.h", "KCOV_DISABLE", _IOC_NONE, 0x6365, 0x00 }, +{ "linux/kcov.h", "KCOV_ENABLE", _IOC_NONE, 0x6364, 0x00 }, +{ "linux/kcov.h", "KCOV_INIT_TRACE", _IOC_READ, 0x6301, 0x04 }, { "linux/kd.h", "GIO_CMAP", 0, 0x4B70, 0 }, { "linux/kd.h", "GIO_FONT", 0, 0x4B60, 0 }, { "linux/kd.h", "GIO_FONTX", 0, 0x4B6B, 0 }, @@ -1213,13 +1277,22 @@ { "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 }, { "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 }, { "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_REGISTER", _IOC_WRITE, 0x4b0d, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_UNREGISTER", _IOC_WRITE, 0x4b0e, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, { "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, { "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, { "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, @@ -1235,6 +1308,7 @@ { "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, { "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, { "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, { "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, { "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, { "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, @@ -1284,9 +1358,15 @@ { "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, { "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, { "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, { "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, { "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, { "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, { "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, { "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, { "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, @@ -1322,6 +1402,7 @@ { "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, { "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, { "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, { "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, { "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, { "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, @@ -1329,6 +1410,46 @@ { "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, { "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, { "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, +{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, +{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, +{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, +{ "linux/lightnvm.h", "NVM_DEV_REMOVE", _IOC_WRITE, 0x4c23, 0x24 }, +{ "linux/lightnvm.h", "NVM_GET_DEVICES", _IOC_READ, 0x4c21, 0x1000 }, +{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 }, +{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, +{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, +{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, { "linux/loop.h", "LOOP_CHANGE_FD", 0, 0x4C06, 0 }, { "linux/loop.h", "LOOP_CLR_FD", 0, 0x4C01, 0 }, { "linux/loop.h", "LOOP_CTL_ADD", 0, 0x4C80, 0 }, @@ -1337,6 +1458,7 @@ { "linux/loop.h", "LOOP_GET_STATUS", 0, 0x4C03, 0 }, { "linux/loop.h", "LOOP_GET_STATUS64", 0, 0x4C05, 0 }, { "linux/loop.h", "LOOP_SET_CAPACITY", 0, 0x4C07, 0 }, +{ "linux/loop.h", "LOOP_SET_DIRECT_IO", 0, 0x4C08, 0 }, { "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 }, { "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 }, { "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 }, @@ -1358,8 +1480,11 @@ { "linux/media.h", "MEDIA_IOC_DEVICE_INFO", _IOC_READ|_IOC_WRITE, 0x7c00, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c }, +{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 }, { "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 }, { "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 }, { "linux/meye.h", "MEYEIOC_G_PARAMS", _IOC_READ, 0x76c0, 0x06 }, { "linux/meye.h", "MEYEIOC_QBUF_CAPT", _IOC_WRITE, 0x76c2, 0x04 }, { "linux/meye.h", "MEYEIOC_STILLCAPT", _IOC_NONE, 0x76c4, 0x00 }, @@ -1370,6 +1495,7 @@ { "linux/mic_ioctl.h", "MIC_VIRTIO_CONFIG_CHANGE", _IOC_READ|_IOC_WRITE, 0x7305, 0x04 }, { "linux/mic_ioctl.h", "MIC_VIRTIO_COPY_DESC", _IOC_READ|_IOC_WRITE, 0x7302, 0x04 }, { "linux/mmc/ioctl.h", "MMC_IOC_CMD", _IOC_READ|_IOC_WRITE, 0xb300, 0x48 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_MULTI_CMD", _IOC_READ|_IOC_WRITE, 0xb301, 0x08 }, { "linux/mmtimer.h", "MMTIMER_GETBITS", _IOC_NONE, 0x6d04, 0x00 }, { "linux/mmtimer.h", "MMTIMER_GETCOUNTER", _IOC_READ, 0x6d09, 0x04 }, { "linux/mmtimer.h", "MMTIMER_GETFREQ", _IOC_READ, 0x6d02, 0x04 }, @@ -1381,8 +1507,6 @@ { "linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", _IOC_WRITE, 0x7211, 0x04 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", _IOC_READ, 0x7201, 0x218 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", _IOC_READ, 0x7202, 0x218 }, -{ "linux/msm_mdp.h", "MSMFB_BLIT", _IOC_WRITE, 0x6d02, 0x04 }, -{ "linux/msm_mdp.h", "MSMFB_GRP_DISP", _IOC_WRITE, 0x6d01, 0x04 }, { "linux/mtio.h", "MTIOCGET", _IOC_READ, 0x6d02, 0x1c }, { "linux/mtio.h", "MTIOCPOS", _IOC_READ, 0x6d03, 0x04 }, { "linux/mtio.h", "MTIOCTOP", _IOC_WRITE, 0x6d01, 0x08 }, @@ -1417,6 +1541,17 @@ { "linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", _IOC_WRITE, 0x6e06, 0x04 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", _IOC_READ, 0x6e05, 0x18 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", _IOC_READ, 0x6e06, 0x04 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_CAP", _IOC_READ|_IOC_WRITE, 0x4e01, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_START", _IOC_READ|_IOC_WRITE, 0x4e02, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_STATUS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x30 }, +{ "linux/ndctl.h", "ND_IOCTL_CLEAR_ERROR", _IOC_READ|_IOC_WRITE, 0x4e04, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_DIMM_FLAGS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 }, @@ -1430,10 +1565,12 @@ { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, -{ "linux/nvme.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, -{ "linux/nvme.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x2c }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESET", _IOC_NONE, 0x4e44, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x2c }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBSYS_RESET", _IOC_NONE, 0x4e45, 0x00 }, { "linux/nvram.h", "NVRAM_INIT", _IOC_NONE, 0x7040, 0x00 }, { "linux/nvram.h", "NVRAM_SETCKS", _IOC_NONE, 0x7041, 0x00 }, { "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AEWB_CFG", _IOC_READ|_IOC_WRITE, 0x56c3, 0x20 }, @@ -1472,6 +1609,7 @@ { "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 }, { "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 }, { "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", _IOC_WRITE, 0x2406, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", _IOC_NONE, 0x2405, 0x00 }, { "linux/phantom.h", "PHN_GETREG", _IOC_READ|_IOC_WRITE, 0x7005, 0x08 }, @@ -1484,6 +1622,7 @@ { "linux/phantom.h", "PHN_SET_REG", _IOC_WRITE, 0x7001, 0x04 }, { "linux/phantom.h", "PHN_SET_REGS", _IOC_WRITE, 0x7003, 0x04 }, { "linux/pktcdvd.h", "PACKET_CTRL_CMD", _IOC_READ|_IOC_WRITE, 0x5801, 0x18 }, +{ "linux/platform_data/media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, { "linux/pmu.h", "PMU_IOC_CAN_SLEEP", _IOC_READ, 0x4205, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", _IOC_READ, 0x4201, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_MODEL", _IOC_READ, 0x4203, 0x04 }, @@ -1549,6 +1688,12 @@ { "linux/pps.h", "PPS_GETPARAMS", _IOC_READ, 0x70a1, 0x04 }, { "linux/pps.h", "PPS_KC_BIND", _IOC_WRITE, 0x70a5, 0x04 }, { "linux/pps.h", "PPS_SETPARAMS", _IOC_WRITE, 0x70a2, 0x04 }, +{ "linux/pr.h", "IOC_PR_CLEAR", _IOC_WRITE, 0x70cd, 0x10 }, +{ "linux/pr.h", "IOC_PR_PREEMPT", _IOC_WRITE, 0x70cb, 0x18 }, +{ "linux/pr.h", "IOC_PR_PREEMPT_ABORT", _IOC_WRITE, 0x70cc, 0x18 }, +{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 }, +{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 }, +{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 }, { "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 }, { "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 }, { "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 }, @@ -1556,10 +1701,12 @@ { "linux/ptp_clock.h", "PTP_PIN_GETFUNC", _IOC_READ|_IOC_WRITE, 0x3d06, 0x60 }, { "linux/ptp_clock.h", "PTP_PIN_SETFUNC", _IOC_WRITE, 0x3d07, 0x60 }, { "linux/ptp_clock.h", "PTP_SYS_OFFSET", _IOC_WRITE, 0x3d05, 0x340 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET_PRECISE", _IOC_READ|_IOC_WRITE, 0x3d08, 0x40 }, { "linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", _IOC_READ, 0x4003, 0x04 }, { "linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", _IOC_WRITE, 0x4004, 0x04 }, { "linux/raid/md_u.h", "ADD_NEW_DISK", _IOC_WRITE, 0x0921, 0x14 }, { "linux/raid/md_u.h", "CLEAR_ARRAY", _IOC_NONE, 0x0920, 0x00 }, +{ "linux/raid/md_u.h", "CLUSTERED_DISK_NACK", _IOC_NONE, 0x0935, 0x00 }, { "linux/raid/md_u.h", "GET_ARRAY_INFO", _IOC_READ, 0x0911, 0x48 }, { "linux/raid/md_u.h", "GET_BITMAP_FILE", _IOC_READ, 0x0915, 0x1000 }, { "linux/raid/md_u.h", "GET_DISK_INFO", _IOC_READ, 0x0912, 0x14 }, @@ -1589,6 +1736,30 @@ { "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 }, { "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 }, { "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 }, +{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d0a, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0c, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d09, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0b, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_FREE_DMA", _IOC_WRITE, 0x6d14, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_GET_EVENT_MASK", _IOC_READ, 0x6d0e, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_INBOUND", _IOC_READ|_IOC_WRITE, 0x6d11, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_OUTBOUND", _IOC_READ|_IOC_WRITE, 0x6d0f, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_GET_PROPERTIES", _IOC_READ, 0x6d04, 0x30 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_COMPTAG_SET", _IOC_WRITE, 0x6d02, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_HDID_SET", _IOC_WRITE, 0x6d01, 0x02 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_PORT_IDX_GET", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_LOCAL", _IOC_READ, 0x6d05, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_REMOTE", _IOC_READ, 0x6d07, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_LOCAL", _IOC_WRITE, 0x6d06, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_REMOTE", _IOC_WRITE, 0x6d08, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_SET_EVENT_MASK", _IOC_WRITE, 0x6d0d, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_TRANSFER", _IOC_READ|_IOC_WRITE, 0x6d15, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_INBOUND", _IOC_WRITE, 0x6d12, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_OUTBOUND", _IOC_WRITE, 0x6d10, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_WAIT_FOR_ASYNC", _IOC_WRITE, 0x6d16, 0x08 }, { "linux/rtc.h", "RTC_AIE_OFF", _IOC_NONE, 0x7002, 0x00 }, { "linux/rtc.h", "RTC_AIE_ON", _IOC_NONE, 0x7001, 0x00 }, { "linux/rtc.h", "RTC_ALM_READ", _IOC_READ, 0x7008, 0x24 }, @@ -1611,6 +1782,23 @@ { "linux/rtc.h", "RTC_WIE_ON", _IOC_NONE, 0x700f, 0x00 }, { "linux/rtc.h", "RTC_WKALM_RD", _IOC_READ, 0x7010, 0x28 }, { "linux/rtc.h", "RTC_WKALM_SET", _IOC_WRITE, 0x700f, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREG", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREQ", _IOC_READ|_IOC_WRITE, 0x7304, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_BIND", _IOC_READ|_IOC_WRITE, 0x7301, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_CONNECT", _IOC_READ|_IOC_WRITE, 0x7303, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_MARK", _IOC_READ|_IOC_WRITE, 0x730f, 0x0c }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_SIGNAL", _IOC_READ|_IOC_WRITE, 0x7311, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_WAIT", _IOC_READ|_IOC_WRITE, 0x7310, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_GET_NODEIDS", _IOC_READ|_IOC_WRITE, 0x730e, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_LISTEN", _IOC_WRITE, 0x7302, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_READFROM", _IOC_READ|_IOC_WRITE, 0x730a, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_RECV", _IOC_READ|_IOC_WRITE, 0x7307, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_REG", _IOC_READ|_IOC_WRITE, 0x7308, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_SEND", _IOC_READ|_IOC_WRITE, 0x7306, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_UNREG", _IOC_READ|_IOC_WRITE, 0x7309, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_VREADFROM", _IOC_READ|_IOC_WRITE, 0x730c, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_VWRITETO", _IOC_READ|_IOC_WRITE, 0x730d, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_WRITETO", _IOC_READ|_IOC_WRITE, 0x730b, 0x24 }, { "linux/serio.h", "SPIOCSTYPE", _IOC_WRITE, 0x7101, 0x04 }, { "linux/sockios.h", "SIOCADDDLCI", 0, 0x8980, 0 }, { "linux/sockios.h", "SIOCADDMULTI", 0, 0x8931, 0 }, @@ -1805,6 +1993,9 @@ { "linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", _IOC_WRITE, 0x6b04, 0x04 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE", _IOC_WRITE, 0x6b01, 0x01 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE32", _IOC_WRITE, 0x6b05, 0x04 }, +{ "linux/stm.h", "STP_POLICY_ID_GET", _IOC_READ, 0x2501, 0x10 }, +{ "linux/stm.h", "STP_POLICY_ID_SET", _IOC_READ|_IOC_WRITE, 0x2500, 0x10 }, +{ "linux/stm.h", "STP_SET_OPTIONS", _IOC_WRITE, 0x2502, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", _IOC_READ, 0x3314, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", _IOC_NONE, 0x3304, 0x00 }, { "linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", _IOC_READ, 0x3313, 0x08 }, @@ -1887,15 +2078,18 @@ { "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 }, { "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 }, { "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 }, -{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x04 }, +{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 }, +{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 }, { "linux/udf_fs_i.h", "UDF_GETEABLOCK", _IOC_READ, 0x6c41, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 }, { "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 }, +{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c }, { "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c }, { "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x60 }, { "linux/uinput.h", "UI_DEV_CREATE", _IOC_NONE, 0x5501, 0x00 }, { "linux/uinput.h", "UI_DEV_DESTROY", _IOC_NONE, 0x5502, 0x00 }, +{ "linux/uinput.h", "UI_DEV_SETUP", _IOC_WRITE, 0x5503, 0x5c }, { "linux/uinput.h", "UI_END_FF_ERASE", _IOC_WRITE, 0x55cb, 0x0c }, { "linux/uinput.h", "UI_END_FF_UPLOAD", _IOC_WRITE, 0x55c9, 0x60 }, { "linux/uinput.h", "UI_GET_VERSION", _IOC_READ, 0x552d, 0x04 }, @@ -1925,6 +2119,11 @@ { "linux/usb/iowarrior.h", "IOW_GETINFO", _IOC_READ, 0xc003, 0x28 }, { "linux/usb/iowarrior.h", "IOW_READ", _IOC_WRITE, 0xc002, 0x04 }, { "linux/usb/iowarrior.h", "IOW_WRITE", _IOC_WRITE, 0xc001, 0x04 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GET_CAPS", _IOC_READ, 0x5b11, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GOTO_LOCAL", _IOC_NONE, 0x5b14, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_LOCAL_LOCKOUT", _IOC_NONE, 0x5b15, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 }, @@ -1946,6 +2145,7 @@ { "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", _IOC_READ, 0x551b, 0x108 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", _IOC_READ, 0x550e, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DROP_PRIVILEGES", _IOC_WRITE, 0x551e, 0x04 }, { "linux/usbdevice_fs.h", "USBDEVFS_FREE_STREAMS", _IOC_READ, 0x551d, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", _IOC_WRITE, 0x5508, 0x104 }, { "linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", _IOC_READ, 0x551a, 0x04 }, @@ -1964,6 +2164,12 @@ { "linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", _IOC_READ, 0x5504, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", _IOC_READ, 0x550a, 0x2c }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", _IOC_READ, 0x550a, 0x2a }, +{ "linux/userfaultfd.h", "UFFDIO_API", _IOC_READ|_IOC_WRITE, 0xaa3f, 0x18 }, +{ "linux/userfaultfd.h", "UFFDIO_COPY", _IOC_READ|_IOC_WRITE, 0xaa03, 0x28 }, +{ "linux/userfaultfd.h", "UFFDIO_REGISTER", _IOC_READ|_IOC_WRITE, 0xaa00, 0x20 }, +{ "linux/userfaultfd.h", "UFFDIO_UNREGISTER", _IOC_READ, 0xaa01, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_WAKE", _IOC_READ, 0xaa02, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_ZEROPAGE", _IOC_READ|_IOC_WRITE, 0xaa04, 0x20 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_MAP", _IOC_READ|_IOC_WRITE, 0x7520, 0x58 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", _IOC_READ|_IOC_WRITE, 0x7521, 0x0c }, { "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, @@ -2002,11 +2208,17 @@ { "linux/vfio.h", "VFIO_IOMMU_ENABLE", _IOC_NONE, 0x3b73, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_MAP_DMA", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_REGISTER_MEMORY", _IOC_NONE, 0x3b75, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_CREATE", _IOC_NONE, 0x3b77, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_REMOVE", _IOC_NONE, 0x3b78, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY", _IOC_NONE, 0x3b76, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", _IOC_NONE, 0x3b72, 0x00 }, { "linux/vfio.h", "VFIO_SET_IOMMU", _IOC_NONE, 0x3b66, 0x00 }, { "linux/vhost.h", "VHOST_GET_FEATURES", _IOC_READ, 0xaf00, 0x08 }, { "linux/vhost.h", "VHOST_GET_VRING_BASE", _IOC_READ|_IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf24, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_ENDIAN", _IOC_WRITE, 0xaf14, 0x08 }, { "linux/vhost.h", "VHOST_NET_SET_BACKEND", _IOC_WRITE, 0xaf30, 0x08 }, { "linux/vhost.h", "VHOST_RESET_OWNER", _IOC_NONE, 0xaf02, 0x00 }, { "linux/vhost.h", "VHOST_SCSI_CLEAR_ENDPOINT", _IOC_WRITE, 0xaf41, 0xe8 }, @@ -2021,7 +2233,9 @@ { "linux/vhost.h", "VHOST_SET_OWNER", _IOC_NONE, 0xaf01, 0x00 }, { "linux/vhost.h", "VHOST_SET_VRING_ADDR", _IOC_WRITE, 0xaf11, 0x28 }, { "linux/vhost.h", "VHOST_SET_VRING_BASE", _IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf23, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_CALL", _IOC_WRITE, 0xaf21, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ENDIAN", _IOC_WRITE, 0xaf13, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 }, @@ -2211,55 +2425,24 @@ { "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 }, { "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 }, { "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 }, -{ "media/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, { "media/davinci/vpfe_capture.h", "VPFE_CMD_S_CCDC_RAW_PARAMS", _IOC_WRITE, 0x56c1, 0x04 }, -{ "media/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, -{ "media/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, -{ "media/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, -{ "media/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, -{ "media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, -{ "media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, -{ "media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, -{ "media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, +{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, +{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, { "media/v4l2-common.h", "TUNER_SET_CONFIG", _IOC_WRITE, 0x645c, 0x08 }, { "media/v4l2-common.h", "VIDIOC_INT_RESET", _IOC_WRITE, 0x6466, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_DEVICE_NOTIFY_EVENT", _IOC_WRITE, 0x7602, 0x78 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", _IOC_WRITE, 0x7600, 0x04 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", _IOC_WRITE, 0x7601, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_DOWNLOAD_IMAGE", _IOC_WRITE, 0xca0a, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_AFU_ID", _IOC_READ, 0xca02, 0x40 }, { "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 }, { "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 }, { "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 }, { "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 }, { "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 }, @@ -2324,10 +2507,21 @@ { "net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", _IOC_READ, 0x52d2, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", _IOC_WRITE, 0x52c9, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", _IOC_WRITE, 0x52dc, 0x04 }, +{ "net/nfc/nci_core.h", "NCIUARTSETDRIVER", _IOC_WRITE, 0x5500, 0x04 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", _IOC_NONE, 0x1b03, 0x00 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RECOVER_AFU", _IOC_READ|_IOC_WRITE, 0xca85, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RELEASE", _IOC_READ|_IOC_WRITE, 0xca82, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_DIRECT", _IOC_READ|_IOC_WRITE, 0xca81, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_VIRTUAL", _IOC_READ|_IOC_WRITE, 0xca87, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VERIFY", _IOC_READ|_IOC_WRITE, 0xca84, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_CLONE", _IOC_READ|_IOC_WRITE, 0xca89, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_RESIZE", _IOC_READ|_IOC_WRITE, 0xca88, 0x78 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0, 0x5386, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0, 0x5382, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0, 0x5387, 0 }, @@ -2370,7 +2564,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", _IOC_READ|_IOC_WRITE, 0x5322, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", _IOC_READ|_IOC_WRITE, 0x5349, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5334, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", _IOC_READ|_IOC_WRITE, 0x5343, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", _IOC_READ|_IOC_WRITE, 0x5340, 0x5c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", _IOC_READ|_IOC_WRITE, 0x5341, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", _IOC_READ|_IOC_WRITE, 0x5345, 0x60 }, @@ -2386,7 +2579,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", _IOC_WRITE, 0x5323, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", _IOC_WRITE, 0x534a, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5335, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", _IOC_WRITE, 0x5344, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", _IOC_WRITE, 0x5342, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", _IOC_WRITE, 0x5346, 0x60 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", _IOC_WRITE, 0x5330, 0x50 }, @@ -2442,6 +2634,7 @@ { "sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", _IOC_WRITE, 0x4146, 0x04 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_START", _IOC_NONE, 0x4142, 0x00 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", _IOC_READ, 0x4120, 0x6c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS_EXT", _IOC_READ|_IOC_WRITE, 0x4124, 0x6c }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4113, 0x68 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", _IOC_READ|_IOC_WRITE, 0x4123, 0x84 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", _IOC_WRITE, 0x4102, 0x04 }, @@ -2539,8 +2732,7 @@ { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", _IOC_NONE, 0x4883, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", _IOC_NONE, 0x4882, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", _IOC_READ, 0x4880, 0x04 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_SET_RTC", _IOC_WRITE, 0x6105, 0x08 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_WAIT", _IOC_NONE, 0x6101, 0x00 }, +{ "sound/usb_stream.h", "SNDRV_USB_STREAM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4890, 0x10 }, { "staging/android/ashmem.h", "ASHMEM_GET_NAME", _IOC_READ, 0x7702, 0x100 }, { "staging/android/ashmem.h", "ASHMEM_GET_PIN_STATUS", _IOC_NONE, 0x7709, 0x00 }, { "staging/android/ashmem.h", "ASHMEM_GET_PROT_MASK", _IOC_NONE, 0x7706, 0x00 }, @@ -2561,17 +2753,10 @@ { "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 }, -{ "staging/android/logger.h", "LOGGER_FLUSH_LOG", _IOC_NONE, 0xae04, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_BUF_SIZE", _IOC_NONE, 0xae01, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_LEN", _IOC_NONE, 0xae02, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_NEXT_ENTRY_LEN", _IOC_NONE, 0xae03, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_VERSION", _IOC_NONE, 0xae05, 0x00 }, -{ "staging/android/logger.h", "LOGGER_SET_VERSION", _IOC_NONE, 0xae06, 0x00 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 }, { "staging/android/sync.h", "SYNC_IOC_FENCE_INFO", _IOC_READ|_IOC_WRITE, 0x3e02, 0x28 }, { "staging/android/sync.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e01, 0x28 }, -{ "staging/android/sync.h", "SYNC_IOC_WAIT", _IOC_WRITE, 0x3e00, 0x04 }, { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 }, { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 }, { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 }, @@ -2613,5 +2798,11 @@ { "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 }, { "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 }, { "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_MAP_GRANT_REF", _IOC_NONE, 0x4700, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_MAX_GRANTS", _IOC_NONE, 0x4703, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_UNMAP_NOTIFY", _IOC_NONE, 0x4707, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_UNMAP_GRANT_REF", _IOC_NONE, 0x4701, 0x10 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_EVTCHN", _IOC_NONE, 0x4200, 0x00 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_SETUP", _IOC_NONE, 0x4201, 0x00 }, diff -Nru strace-4.11/linux/32/ioctls_inc_align64.h strace-4.12/linux/32/ioctls_inc_align64.h --- strace-4.11/linux/32/ioctls_inc_align64.h 2015-05-21 22:53:42.000000000 +0000 +++ strace-4.12/linux/32/ioctls_inc_align64.h 2016-05-18 09:26:01.000000000 +0000 @@ -81,6 +81,18 @@ { "asm-generic/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, { "asm-generic/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, { "asm-generic/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x120 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_OP", _IOC_READ|_IOC_WRITE, 0x6450, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6451, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -118,11 +130,14 @@ { "drm/drm.h", "DRM_IOCTL_MARK_BUFS", _IOC_WRITE, 0x6417, 0x18 }, { "drm/drm.h", "DRM_IOCTL_MODESET_CTL", _IOC_WRITE, 0x6408, 0x08 }, { "drm/drm.h", "DRM_IOCTL_MODE_ADDFB", _IOC_READ|_IOC_WRITE, 0x64ae, 0x1c }, -{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x44 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x68 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATOMIC", _IOC_READ|_IOC_WRITE, 0x64bc, 0x38 }, { "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 }, { "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DESTROY_DUMB", _IOC_READ|_IOC_WRITE, 0x64b4, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DETACHMODE", _IOC_READ|_IOC_WRITE, 0x64a9, 0x48 }, { "drm/drm.h", "DRM_IOCTL_MODE_DIRTYFB", _IOC_READ|_IOC_WRITE, 0x64b1, 0x18 }, @@ -166,11 +181,21 @@ { "drm/drm.h", "DRM_IOCTL_UPDATE_DRAW", _IOC_WRITE, 0x643f, 0x18 }, { "drm/drm.h", "DRM_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x6400, 0x24 }, { "drm/drm.h", "DRM_IOCTL_WAIT_VBLANK", _IOC_READ|_IOC_WRITE, 0x643a, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", _IOC_READ|_IOC_WRITE, 0x6461, 0x28 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 }, @@ -201,6 +226,8 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x6457, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_CREATE", _IOC_READ|_IOC_WRITE, 0x646d, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY", _IOC_WRITE, 0x646e, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6474, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM", _IOC_READ|_IOC_WRITE, 0x6475, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645b, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 }, @@ -211,7 +238,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_INIT", _IOC_WRITE, 0x6453, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_LEAVEVT", _IOC_NONE, 0x645a, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6466, 0x0c }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x28 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP_GTT", _IOC_READ|_IOC_WRITE, 0x6464, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PIN", _IOC_READ|_IOC_WRITE, 0x6455, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PREAD", _IOC_WRITE, 0x645c, 0x20 }, @@ -227,7 +254,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6446, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID", _IOC_READ|_IOC_WRITE, 0x6465, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_RESET_STATS", _IOC_READ|_IOC_WRITE, 0x6472, 0x18 }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646a, 0x14 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_VBLANK_PIPE", _IOC_READ, 0x644e, 0x04 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_HWS_ADDR", _IOC_WRITE, 0x6451, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_INIT", _IOC_WRITE, 0x6440, 0x44 }, @@ -352,7 +379,7 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644d, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 }, -{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644c, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, @@ -362,6 +389,13 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_INCR", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_READ", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 }, @@ -376,6 +410,15 @@ { "drm/via_drm.h", "DRM_IOCTL_VIA_MAP_INIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_PCICMD", _IOC_WRITE, 0x644a, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_WAIT_IRQ", _IOC_READ|_IOC_WRITE, 0x644d, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_EXECBUFFER", _IOC_WRITE, 0x6442, 0x20 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x6449, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", _IOC_READ|_IOC_WRITE, 0x6444, 0x38 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_INFO", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", _IOC_READ|_IOC_WRITE, 0x6447, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_WAIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x08 }, { "linux/agpgart.h", "AGPIOC_ACQUIRE", _IOC_NONE, 0x4101, 0x00 }, { "linux/agpgart.h", "AGPIOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x4106, 0x04 }, { "linux/agpgart.h", "AGPIOC_BIND", _IOC_WRITE, 0x4108, 0x04 }, @@ -387,6 +430,7 @@ { "linux/agpgart.h", "AGPIOC_RESERVE", _IOC_WRITE, 0x4104, 0x04 }, { "linux/agpgart.h", "AGPIOC_SETUP", _IOC_WRITE, 0x4103, 0x04 }, { "linux/agpgart.h", "AGPIOC_UNBIND", _IOC_WRITE, 0x4109, 0x04 }, +{ "linux/am437x-vpfe.h", "VIDIOC_AM437X_CCDC_CFG", _IOC_WRITE, 0x56c1, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE", _IOC_WRITE, 0x6305, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE_DONE", _IOC_WRITE, 0x6309, 0x10 }, { "linux/android/binder.h", "BC_ACQUIRE_RESULT", _IOC_WRITE, 0x6302, 0x04 }, @@ -672,6 +716,7 @@ { "linux/dm-ioctl.h", "DM_TABLE_STATUS", _IOC_READ|_IOC_WRITE, 0xfd0c, 0x138 }, { "linux/dm-ioctl.h", "DM_TARGET_MSG", _IOC_READ|_IOC_WRITE, 0xfd0e, 0x138 }, { "linux/dm-ioctl.h", "DM_VERSION", _IOC_READ|_IOC_WRITE, 0xfd00, 0x138 }, +{ "linux/dma-buf.h", "DMA_BUF_IOCTL_SYNC", _IOC_WRITE, 0x6200, 0x08 }, { "linux/dn.h", "OSIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, { "linux/dn.h", "OSIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, { "linux/dn.h", "SIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, @@ -840,6 +885,7 @@ { "linux/fs.h", "BLKALIGNOFF", _IOC_NONE, 0x127a, 0x00 }, { "linux/fs.h", "BLKBSZGET", _IOC_READ, 0x1270, 0x04 }, { "linux/fs.h", "BLKBSZSET", _IOC_WRITE, 0x1271, 0x04 }, +{ "linux/fs.h", "BLKDAXGET", _IOC_NONE, 0x1281, 0x00 }, { "linux/fs.h", "BLKDISCARD", _IOC_NONE, 0x1277, 0x00 }, { "linux/fs.h", "BLKDISCARDZEROES", _IOC_NONE, 0x127c, 0x00 }, { "linux/fs.h", "BLKFLSBUF", _IOC_NONE, 0x1261, 0x00 }, @@ -866,6 +912,9 @@ { "linux/fs.h", "BLKTRACETEARDOWN", _IOC_NONE, 0x1276, 0x00 }, { "linux/fs.h", "BLKZEROOUT", _IOC_NONE, 0x127f, 0x00 }, { "linux/fs.h", "FIBMAP", _IOC_NONE, 0x0001, 0x00 }, +{ "linux/fs.h", "FICLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/fs.h", "FICLONERANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/fs.h", "FIDEDUPERANGE", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, { "linux/fs.h", "FIFREEZE", _IOC_READ|_IOC_WRITE, 0x5877, 0x04 }, { "linux/fs.h", "FIGETBSZ", _IOC_NONE, 0x0002, 0x00 }, { "linux/fs.h", "FITHAW", _IOC_READ|_IOC_WRITE, 0x5878, 0x04 }, @@ -875,10 +924,15 @@ { "linux/fs.h", "FS_IOC32_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC32_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_FIEMAP", _IOC_READ|_IOC_WRITE, 0x660b, 0x20 }, +{ "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, +{ "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, { "linux/fsl-diu-fb.h", "MFB_GET_AOID", _IOC_READ, 0x4d04, 0x08 }, { "linux/fsl-diu-fb.h", "MFB_GET_GAMMA", _IOC_READ, 0x4d01, 0x01 }, @@ -897,6 +951,7 @@ { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 }, +{ "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_GET_CARD_STATE", _IOC_READ, 0xa524, 0x04 }, @@ -914,6 +969,8 @@ { "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 }, +{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 }, +{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 }, { "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 }, { "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 }, { "linux/gsmmux.h", "GSMIOC_GETCONF", _IOC_READ, 0x4700, 0x4c }, @@ -982,6 +1039,10 @@ { "linux/hpet.h", "HPET_IE_ON", _IOC_NONE, 0x6801, 0x00 }, { "linux/hpet.h", "HPET_INFO", _IOC_READ, 0x6803, 0x0c }, { "linux/hpet.h", "HPET_IRQFREQ", _IOC_WRITE, 0x6806, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_CONFIG_BUFS", _IOC_WRITE, 0x431f, 0x20 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_IF_VERSION", _IOC_READ, 0x431e, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_STATE", _IOC_READ, 0x4315, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_SET_WAKELINE", _IOC_WRITE, 0x4317, 0x04 }, { "linux/hsi/hsi_char.h", "HSC_GET_RX", _IOC_WRITE, 0x6b14, 0x0c }, { "linux/hsi/hsi_char.h", "HSC_GET_TX", _IOC_WRITE, 0x6b16, 0x10 }, { "linux/hsi/hsi_char.h", "HSC_RESET", _IOC_NONE, 0x6b10, 0x00 }, @@ -1003,10 +1064,6 @@ { "linux/i2o-dev.h", "I2OSWDL", _IOC_READ|_IOC_WRITE, 0x6905, 0x1c }, { "linux/i2o-dev.h", "I2OSWUL", _IOC_READ|_IOC_WRITE, 0x6906, 0x1c }, { "linux/i2o-dev.h", "I2OVALIDATE", _IOC_READ, 0x6908, 0x04 }, -{ "linux/i2o.h", "BLKI2OGRSTRAT", _IOC_READ, 0x3201, 0x04 }, -{ "linux/i2o.h", "BLKI2OGWSTRAT", _IOC_READ, 0x3202, 0x04 }, -{ "linux/i2o.h", "BLKI2OSRSTRAT", _IOC_WRITE, 0x3203, 0x04 }, -{ "linux/i2o.h", "BLKI2OSWSTRAT", _IOC_WRITE, 0x3204, 0x04 }, { "linux/i8k.h", "I8K_BIOS_VERSION", _IOC_READ, 0x6980, 0x04 }, { "linux/i8k.h", "I8K_FN_STATUS", _IOC_READ, 0x6983, 0x04 }, { "linux/i8k.h", "I8K_GET_FAN", _IOC_READ|_IOC_WRITE, 0x6986, 0x04 }, @@ -1023,6 +1080,7 @@ { "linux/if_tun.h", "TUNGETFILTER", _IOC_READ, 0x54db, 0x08 }, { "linux/if_tun.h", "TUNGETIFF", _IOC_READ, 0x54d2, 0x04 }, { "linux/if_tun.h", "TUNGETSNDBUF", _IOC_READ, 0x54d3, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETBE", _IOC_READ, 0x54df, 0x04 }, { "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 }, { "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 }, { "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 }, @@ -1037,6 +1095,7 @@ { "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 }, { "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 }, { "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 }, { "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 }, { "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 }, { "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 }, @@ -1044,6 +1103,7 @@ { "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE_V2", _IOC_READ, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCGMASK", _IOC_READ, 0x4592, 0x10 }, { "linux/input.h", "EVIOCGRAB", _IOC_WRITE, 0x4590, 0x04 }, { "linux/input.h", "EVIOCGREP", _IOC_READ, 0x4503, 0x08 }, { "linux/input.h", "EVIOCGVERSION", _IOC_READ, 0x4501, 0x04 }, @@ -1053,6 +1113,7 @@ { "linux/input.h", "EVIOCSFF", _IOC_WRITE, 0x4580, 0x2c }, { "linux/input.h", "EVIOCSKEYCODE", _IOC_WRITE, 0x4504, 0x08 }, { "linux/input.h", "EVIOCSKEYCODE_V2", _IOC_WRITE, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCSMASK", _IOC_WRITE, 0x4593, 0x10 }, { "linux/input.h", "EVIOCSREP", _IOC_WRITE, 0x4503, 0x08 }, { "linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", _IOC_READ, 0x691e, 0x04 }, { "linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", _IOC_READ, 0x6912, 0x04 }, @@ -1167,6 +1228,9 @@ { "linux/joystick.h", "JSIOCSAXMAP", _IOC_WRITE, 0x6a31, 0x40 }, { "linux/joystick.h", "JSIOCSBTNMAP", _IOC_WRITE, 0x6a33, 0x400 }, { "linux/joystick.h", "JSIOCSCORR", _IOC_WRITE, 0x6a21, 0x24 }, +{ "linux/kcov.h", "KCOV_DISABLE", _IOC_NONE, 0x6365, 0x00 }, +{ "linux/kcov.h", "KCOV_ENABLE", _IOC_NONE, 0x6364, 0x00 }, +{ "linux/kcov.h", "KCOV_INIT_TRACE", _IOC_READ, 0x6301, 0x04 }, { "linux/kd.h", "GIO_CMAP", 0, 0x4B70, 0 }, { "linux/kd.h", "GIO_FONT", 0, 0x4B60, 0 }, { "linux/kd.h", "GIO_FONTX", 0, 0x4B6B, 0 }, @@ -1213,13 +1277,22 @@ { "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 }, { "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 }, { "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_REGISTER", _IOC_WRITE, 0x4b0d, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_UNREGISTER", _IOC_WRITE, 0x4b0e, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, { "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, { "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, { "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, @@ -1235,6 +1308,7 @@ { "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, { "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, { "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, { "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, { "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, { "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, @@ -1279,14 +1353,20 @@ { "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, { "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, { "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, -{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x200 }, +{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, { "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, { "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, { "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, { "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, { "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, { "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, { "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, { "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, { "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, { "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, @@ -1322,6 +1402,7 @@ { "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, { "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, { "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, { "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, { "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, { "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, @@ -1329,6 +1410,46 @@ { "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, { "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, { "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, +{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, +{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, +{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, +{ "linux/lightnvm.h", "NVM_DEV_REMOVE", _IOC_WRITE, 0x4c23, 0x24 }, +{ "linux/lightnvm.h", "NVM_GET_DEVICES", _IOC_READ, 0x4c21, 0x1000 }, +{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 }, +{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, +{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, +{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, { "linux/loop.h", "LOOP_CHANGE_FD", 0, 0x4C06, 0 }, { "linux/loop.h", "LOOP_CLR_FD", 0, 0x4C01, 0 }, { "linux/loop.h", "LOOP_CTL_ADD", 0, 0x4C80, 0 }, @@ -1337,6 +1458,7 @@ { "linux/loop.h", "LOOP_GET_STATUS", 0, 0x4C03, 0 }, { "linux/loop.h", "LOOP_GET_STATUS64", 0, 0x4C05, 0 }, { "linux/loop.h", "LOOP_SET_CAPACITY", 0, 0x4C07, 0 }, +{ "linux/loop.h", "LOOP_SET_DIRECT_IO", 0, 0x4C08, 0 }, { "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 }, { "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 }, { "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 }, @@ -1358,8 +1480,11 @@ { "linux/media.h", "MEDIA_IOC_DEVICE_INFO", _IOC_READ|_IOC_WRITE, 0x7c00, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c }, +{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 }, { "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 }, { "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 }, { "linux/meye.h", "MEYEIOC_G_PARAMS", _IOC_READ, 0x76c0, 0x06 }, { "linux/meye.h", "MEYEIOC_QBUF_CAPT", _IOC_WRITE, 0x76c2, 0x04 }, { "linux/meye.h", "MEYEIOC_STILLCAPT", _IOC_NONE, 0x76c4, 0x00 }, @@ -1370,6 +1495,7 @@ { "linux/mic_ioctl.h", "MIC_VIRTIO_CONFIG_CHANGE", _IOC_READ|_IOC_WRITE, 0x7305, 0x04 }, { "linux/mic_ioctl.h", "MIC_VIRTIO_COPY_DESC", _IOC_READ|_IOC_WRITE, 0x7302, 0x04 }, { "linux/mmc/ioctl.h", "MMC_IOC_CMD", _IOC_READ|_IOC_WRITE, 0xb300, 0x48 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_MULTI_CMD", _IOC_READ|_IOC_WRITE, 0xb301, 0x08 }, { "linux/mmtimer.h", "MMTIMER_GETBITS", _IOC_NONE, 0x6d04, 0x00 }, { "linux/mmtimer.h", "MMTIMER_GETCOUNTER", _IOC_READ, 0x6d09, 0x04 }, { "linux/mmtimer.h", "MMTIMER_GETFREQ", _IOC_READ, 0x6d02, 0x04 }, @@ -1381,8 +1507,6 @@ { "linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", _IOC_WRITE, 0x7211, 0x04 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", _IOC_READ, 0x7201, 0x218 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", _IOC_READ, 0x7202, 0x218 }, -{ "linux/msm_mdp.h", "MSMFB_BLIT", _IOC_WRITE, 0x6d02, 0x04 }, -{ "linux/msm_mdp.h", "MSMFB_GRP_DISP", _IOC_WRITE, 0x6d01, 0x04 }, { "linux/mtio.h", "MTIOCGET", _IOC_READ, 0x6d02, 0x1c }, { "linux/mtio.h", "MTIOCPOS", _IOC_READ, 0x6d03, 0x04 }, { "linux/mtio.h", "MTIOCTOP", _IOC_WRITE, 0x6d01, 0x08 }, @@ -1417,6 +1541,17 @@ { "linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", _IOC_WRITE, 0x6e06, 0x04 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", _IOC_READ, 0x6e05, 0x18 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", _IOC_READ, 0x6e06, 0x04 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_CAP", _IOC_READ|_IOC_WRITE, 0x4e01, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_START", _IOC_READ|_IOC_WRITE, 0x4e02, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_STATUS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x30 }, +{ "linux/ndctl.h", "ND_IOCTL_CLEAR_ERROR", _IOC_READ|_IOC_WRITE, 0x4e04, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_DIMM_FLAGS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 }, @@ -1430,10 +1565,12 @@ { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, -{ "linux/nvme.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, -{ "linux/nvme.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESET", _IOC_NONE, 0x4e44, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBSYS_RESET", _IOC_NONE, 0x4e45, 0x00 }, { "linux/nvram.h", "NVRAM_INIT", _IOC_NONE, 0x7040, 0x00 }, { "linux/nvram.h", "NVRAM_SETCKS", _IOC_NONE, 0x7041, 0x00 }, { "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AEWB_CFG", _IOC_READ|_IOC_WRITE, 0x56c3, 0x20 }, @@ -1472,6 +1609,7 @@ { "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 }, { "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 }, { "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", _IOC_WRITE, 0x2406, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", _IOC_NONE, 0x2405, 0x00 }, { "linux/phantom.h", "PHN_GETREG", _IOC_READ|_IOC_WRITE, 0x7005, 0x08 }, @@ -1484,6 +1622,7 @@ { "linux/phantom.h", "PHN_SET_REG", _IOC_WRITE, 0x7001, 0x04 }, { "linux/phantom.h", "PHN_SET_REGS", _IOC_WRITE, 0x7003, 0x04 }, { "linux/pktcdvd.h", "PACKET_CTRL_CMD", _IOC_READ|_IOC_WRITE, 0x5801, 0x18 }, +{ "linux/platform_data/media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, { "linux/pmu.h", "PMU_IOC_CAN_SLEEP", _IOC_READ, 0x4205, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", _IOC_READ, 0x4201, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_MODEL", _IOC_READ, 0x4203, 0x04 }, @@ -1549,6 +1688,12 @@ { "linux/pps.h", "PPS_GETPARAMS", _IOC_READ, 0x70a1, 0x04 }, { "linux/pps.h", "PPS_KC_BIND", _IOC_WRITE, 0x70a5, 0x04 }, { "linux/pps.h", "PPS_SETPARAMS", _IOC_WRITE, 0x70a2, 0x04 }, +{ "linux/pr.h", "IOC_PR_CLEAR", _IOC_WRITE, 0x70cd, 0x10 }, +{ "linux/pr.h", "IOC_PR_PREEMPT", _IOC_WRITE, 0x70cb, 0x18 }, +{ "linux/pr.h", "IOC_PR_PREEMPT_ABORT", _IOC_WRITE, 0x70cc, 0x18 }, +{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 }, +{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 }, +{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 }, { "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 }, { "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 }, { "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 }, @@ -1556,10 +1701,12 @@ { "linux/ptp_clock.h", "PTP_PIN_GETFUNC", _IOC_READ|_IOC_WRITE, 0x3d06, 0x60 }, { "linux/ptp_clock.h", "PTP_PIN_SETFUNC", _IOC_WRITE, 0x3d07, 0x60 }, { "linux/ptp_clock.h", "PTP_SYS_OFFSET", _IOC_WRITE, 0x3d05, 0x340 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET_PRECISE", _IOC_READ|_IOC_WRITE, 0x3d08, 0x40 }, { "linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", _IOC_READ, 0x4003, 0x04 }, { "linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", _IOC_WRITE, 0x4004, 0x04 }, { "linux/raid/md_u.h", "ADD_NEW_DISK", _IOC_WRITE, 0x0921, 0x14 }, { "linux/raid/md_u.h", "CLEAR_ARRAY", _IOC_NONE, 0x0920, 0x00 }, +{ "linux/raid/md_u.h", "CLUSTERED_DISK_NACK", _IOC_NONE, 0x0935, 0x00 }, { "linux/raid/md_u.h", "GET_ARRAY_INFO", _IOC_READ, 0x0911, 0x48 }, { "linux/raid/md_u.h", "GET_BITMAP_FILE", _IOC_READ, 0x0915, 0x1000 }, { "linux/raid/md_u.h", "GET_DISK_INFO", _IOC_READ, 0x0912, 0x14 }, @@ -1589,6 +1736,30 @@ { "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 }, { "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 }, { "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 }, +{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d0a, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0c, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d09, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0b, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_FREE_DMA", _IOC_WRITE, 0x6d14, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_GET_EVENT_MASK", _IOC_READ, 0x6d0e, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_INBOUND", _IOC_READ|_IOC_WRITE, 0x6d11, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_OUTBOUND", _IOC_READ|_IOC_WRITE, 0x6d0f, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_GET_PROPERTIES", _IOC_READ, 0x6d04, 0x30 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_COMPTAG_SET", _IOC_WRITE, 0x6d02, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_HDID_SET", _IOC_WRITE, 0x6d01, 0x02 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_PORT_IDX_GET", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_LOCAL", _IOC_READ, 0x6d05, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_REMOTE", _IOC_READ, 0x6d07, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_LOCAL", _IOC_WRITE, 0x6d06, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_REMOTE", _IOC_WRITE, 0x6d08, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_SET_EVENT_MASK", _IOC_WRITE, 0x6d0d, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_TRANSFER", _IOC_READ|_IOC_WRITE, 0x6d15, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_INBOUND", _IOC_WRITE, 0x6d12, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_OUTBOUND", _IOC_WRITE, 0x6d10, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_WAIT_FOR_ASYNC", _IOC_WRITE, 0x6d16, 0x08 }, { "linux/rtc.h", "RTC_AIE_OFF", _IOC_NONE, 0x7002, 0x00 }, { "linux/rtc.h", "RTC_AIE_ON", _IOC_NONE, 0x7001, 0x00 }, { "linux/rtc.h", "RTC_ALM_READ", _IOC_READ, 0x7008, 0x24 }, @@ -1611,6 +1782,23 @@ { "linux/rtc.h", "RTC_WIE_ON", _IOC_NONE, 0x700f, 0x00 }, { "linux/rtc.h", "RTC_WKALM_RD", _IOC_READ, 0x7010, 0x28 }, { "linux/rtc.h", "RTC_WKALM_SET", _IOC_WRITE, 0x700f, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREG", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREQ", _IOC_READ|_IOC_WRITE, 0x7304, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_BIND", _IOC_READ|_IOC_WRITE, 0x7301, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_CONNECT", _IOC_READ|_IOC_WRITE, 0x7303, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_MARK", _IOC_READ|_IOC_WRITE, 0x730f, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_SIGNAL", _IOC_READ|_IOC_WRITE, 0x7311, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_WAIT", _IOC_READ|_IOC_WRITE, 0x7310, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_GET_NODEIDS", _IOC_READ|_IOC_WRITE, 0x730e, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_LISTEN", _IOC_WRITE, 0x7302, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_READFROM", _IOC_READ|_IOC_WRITE, 0x730a, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_RECV", _IOC_READ|_IOC_WRITE, 0x7307, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_REG", _IOC_READ|_IOC_WRITE, 0x7308, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_SEND", _IOC_READ|_IOC_WRITE, 0x7306, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_UNREG", _IOC_READ|_IOC_WRITE, 0x7309, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_VREADFROM", _IOC_READ|_IOC_WRITE, 0x730c, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_VWRITETO", _IOC_READ|_IOC_WRITE, 0x730d, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_WRITETO", _IOC_READ|_IOC_WRITE, 0x730b, 0x28 }, { "linux/serio.h", "SPIOCSTYPE", _IOC_WRITE, 0x7101, 0x04 }, { "linux/sockios.h", "SIOCADDDLCI", 0, 0x8980, 0 }, { "linux/sockios.h", "SIOCADDMULTI", 0, 0x8931, 0 }, @@ -1805,6 +1993,9 @@ { "linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", _IOC_WRITE, 0x6b04, 0x04 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE", _IOC_WRITE, 0x6b01, 0x01 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE32", _IOC_WRITE, 0x6b05, 0x04 }, +{ "linux/stm.h", "STP_POLICY_ID_GET", _IOC_READ, 0x2501, 0x10 }, +{ "linux/stm.h", "STP_POLICY_ID_SET", _IOC_READ|_IOC_WRITE, 0x2500, 0x10 }, +{ "linux/stm.h", "STP_SET_OPTIONS", _IOC_WRITE, 0x2502, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", _IOC_READ, 0x3314, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", _IOC_NONE, 0x3304, 0x00 }, { "linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", _IOC_READ, 0x3313, 0x08 }, @@ -1887,15 +2078,18 @@ { "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 }, { "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 }, { "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 }, -{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x04 }, +{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 }, +{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 }, { "linux/udf_fs_i.h", "UDF_GETEABLOCK", _IOC_READ, 0x6c41, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 }, { "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 }, +{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c }, { "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c }, { "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x60 }, { "linux/uinput.h", "UI_DEV_CREATE", _IOC_NONE, 0x5501, 0x00 }, { "linux/uinput.h", "UI_DEV_DESTROY", _IOC_NONE, 0x5502, 0x00 }, +{ "linux/uinput.h", "UI_DEV_SETUP", _IOC_WRITE, 0x5503, 0x5c }, { "linux/uinput.h", "UI_END_FF_ERASE", _IOC_WRITE, 0x55cb, 0x0c }, { "linux/uinput.h", "UI_END_FF_UPLOAD", _IOC_WRITE, 0x55c9, 0x60 }, { "linux/uinput.h", "UI_GET_VERSION", _IOC_READ, 0x552d, 0x04 }, @@ -1925,6 +2119,11 @@ { "linux/usb/iowarrior.h", "IOW_GETINFO", _IOC_READ, 0xc003, 0x28 }, { "linux/usb/iowarrior.h", "IOW_READ", _IOC_WRITE, 0xc002, 0x04 }, { "linux/usb/iowarrior.h", "IOW_WRITE", _IOC_WRITE, 0xc001, 0x04 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GET_CAPS", _IOC_READ, 0x5b11, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GOTO_LOCAL", _IOC_NONE, 0x5b14, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_LOCAL_LOCKOUT", _IOC_NONE, 0x5b15, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 }, @@ -1946,6 +2145,7 @@ { "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", _IOC_READ, 0x551b, 0x108 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", _IOC_READ, 0x550e, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DROP_PRIVILEGES", _IOC_WRITE, 0x551e, 0x04 }, { "linux/usbdevice_fs.h", "USBDEVFS_FREE_STREAMS", _IOC_READ, 0x551d, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", _IOC_WRITE, 0x5508, 0x104 }, { "linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", _IOC_READ, 0x551a, 0x04 }, @@ -1964,6 +2164,12 @@ { "linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", _IOC_READ, 0x5504, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", _IOC_READ, 0x550a, 0x2c }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", _IOC_READ, 0x550a, 0x2a }, +{ "linux/userfaultfd.h", "UFFDIO_API", _IOC_READ|_IOC_WRITE, 0xaa3f, 0x18 }, +{ "linux/userfaultfd.h", "UFFDIO_COPY", _IOC_READ|_IOC_WRITE, 0xaa03, 0x28 }, +{ "linux/userfaultfd.h", "UFFDIO_REGISTER", _IOC_READ|_IOC_WRITE, 0xaa00, 0x20 }, +{ "linux/userfaultfd.h", "UFFDIO_UNREGISTER", _IOC_READ, 0xaa01, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_WAKE", _IOC_READ, 0xaa02, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_ZEROPAGE", _IOC_READ|_IOC_WRITE, 0xaa04, 0x20 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_MAP", _IOC_READ|_IOC_WRITE, 0x7520, 0x58 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", _IOC_READ|_IOC_WRITE, 0x7521, 0x0c }, { "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, @@ -2002,11 +2208,17 @@ { "linux/vfio.h", "VFIO_IOMMU_ENABLE", _IOC_NONE, 0x3b73, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_MAP_DMA", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_REGISTER_MEMORY", _IOC_NONE, 0x3b75, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_CREATE", _IOC_NONE, 0x3b77, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_REMOVE", _IOC_NONE, 0x3b78, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY", _IOC_NONE, 0x3b76, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", _IOC_NONE, 0x3b72, 0x00 }, { "linux/vfio.h", "VFIO_SET_IOMMU", _IOC_NONE, 0x3b66, 0x00 }, { "linux/vhost.h", "VHOST_GET_FEATURES", _IOC_READ, 0xaf00, 0x08 }, { "linux/vhost.h", "VHOST_GET_VRING_BASE", _IOC_READ|_IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf24, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_ENDIAN", _IOC_WRITE, 0xaf14, 0x08 }, { "linux/vhost.h", "VHOST_NET_SET_BACKEND", _IOC_WRITE, 0xaf30, 0x08 }, { "linux/vhost.h", "VHOST_RESET_OWNER", _IOC_NONE, 0xaf02, 0x00 }, { "linux/vhost.h", "VHOST_SCSI_CLEAR_ENDPOINT", _IOC_WRITE, 0xaf41, 0xe8 }, @@ -2021,7 +2233,9 @@ { "linux/vhost.h", "VHOST_SET_OWNER", _IOC_NONE, 0xaf01, 0x00 }, { "linux/vhost.h", "VHOST_SET_VRING_ADDR", _IOC_WRITE, 0xaf11, 0x28 }, { "linux/vhost.h", "VHOST_SET_VRING_BASE", _IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf23, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_CALL", _IOC_WRITE, 0xaf21, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ENDIAN", _IOC_WRITE, 0xaf13, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 }, @@ -2211,55 +2425,24 @@ { "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 }, { "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 }, { "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 }, -{ "media/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, { "media/davinci/vpfe_capture.h", "VPFE_CMD_S_CCDC_RAW_PARAMS", _IOC_WRITE, 0x56c1, 0x04 }, -{ "media/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, -{ "media/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, -{ "media/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, -{ "media/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, -{ "media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, -{ "media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, -{ "media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, -{ "media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, +{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, +{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, { "media/v4l2-common.h", "TUNER_SET_CONFIG", _IOC_WRITE, 0x645c, 0x08 }, { "media/v4l2-common.h", "VIDIOC_INT_RESET", _IOC_WRITE, 0x6466, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_DEVICE_NOTIFY_EVENT", _IOC_WRITE, 0x7602, 0x80 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", _IOC_WRITE, 0x7600, 0x04 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", _IOC_WRITE, 0x7601, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_DOWNLOAD_IMAGE", _IOC_WRITE, 0xca0a, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_AFU_ID", _IOC_READ, 0xca02, 0x40 }, { "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 }, { "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 }, { "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 }, { "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 }, { "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 }, @@ -2324,10 +2507,21 @@ { "net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", _IOC_READ, 0x52d2, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", _IOC_WRITE, 0x52c9, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", _IOC_WRITE, 0x52dc, 0x04 }, +{ "net/nfc/nci_core.h", "NCIUARTSETDRIVER", _IOC_WRITE, 0x5500, 0x04 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", _IOC_NONE, 0x1b03, 0x00 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RECOVER_AFU", _IOC_READ|_IOC_WRITE, 0xca85, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RELEASE", _IOC_READ|_IOC_WRITE, 0xca82, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_DIRECT", _IOC_READ|_IOC_WRITE, 0xca81, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_VIRTUAL", _IOC_READ|_IOC_WRITE, 0xca87, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VERIFY", _IOC_READ|_IOC_WRITE, 0xca84, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_CLONE", _IOC_READ|_IOC_WRITE, 0xca89, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_RESIZE", _IOC_READ|_IOC_WRITE, 0xca88, 0x78 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0, 0x5386, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0, 0x5382, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0, 0x5387, 0 }, @@ -2370,7 +2564,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", _IOC_READ|_IOC_WRITE, 0x5322, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", _IOC_READ|_IOC_WRITE, 0x5349, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5334, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", _IOC_READ|_IOC_WRITE, 0x5343, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", _IOC_READ|_IOC_WRITE, 0x5340, 0x5c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", _IOC_READ|_IOC_WRITE, 0x5341, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", _IOC_READ|_IOC_WRITE, 0x5345, 0x60 }, @@ -2386,7 +2579,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", _IOC_WRITE, 0x5323, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", _IOC_WRITE, 0x534a, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5335, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", _IOC_WRITE, 0x5344, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", _IOC_WRITE, 0x5342, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", _IOC_WRITE, 0x5346, 0x60 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", _IOC_WRITE, 0x5330, 0x50 }, @@ -2442,6 +2634,7 @@ { "sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", _IOC_WRITE, 0x4146, 0x04 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_START", _IOC_NONE, 0x4142, 0x00 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", _IOC_READ, 0x4120, 0x6c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS_EXT", _IOC_READ|_IOC_WRITE, 0x4124, 0x6c }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4113, 0x68 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", _IOC_READ|_IOC_WRITE, 0x4123, 0x84 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", _IOC_WRITE, 0x4102, 0x04 }, @@ -2539,8 +2732,7 @@ { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", _IOC_NONE, 0x4883, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", _IOC_NONE, 0x4882, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", _IOC_READ, 0x4880, 0x04 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_SET_RTC", _IOC_WRITE, 0x6105, 0x08 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_WAIT", _IOC_NONE, 0x6101, 0x00 }, +{ "sound/usb_stream.h", "SNDRV_USB_STREAM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4890, 0x10 }, { "staging/android/ashmem.h", "ASHMEM_GET_NAME", _IOC_READ, 0x7702, 0x100 }, { "staging/android/ashmem.h", "ASHMEM_GET_PIN_STATUS", _IOC_NONE, 0x7709, 0x00 }, { "staging/android/ashmem.h", "ASHMEM_GET_PROT_MASK", _IOC_NONE, 0x7706, 0x00 }, @@ -2561,17 +2753,10 @@ { "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 }, -{ "staging/android/logger.h", "LOGGER_FLUSH_LOG", _IOC_NONE, 0xae04, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_BUF_SIZE", _IOC_NONE, 0xae01, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_LEN", _IOC_NONE, 0xae02, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_NEXT_ENTRY_LEN", _IOC_NONE, 0xae03, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_VERSION", _IOC_NONE, 0xae05, 0x00 }, -{ "staging/android/logger.h", "LOGGER_SET_VERSION", _IOC_NONE, 0xae06, 0x00 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 }, { "staging/android/sync.h", "SYNC_IOC_FENCE_INFO", _IOC_READ|_IOC_WRITE, 0x3e02, 0x28 }, { "staging/android/sync.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e01, 0x28 }, -{ "staging/android/sync.h", "SYNC_IOC_WAIT", _IOC_WRITE, 0x3e00, 0x04 }, { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 }, { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 }, { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 }, @@ -2613,5 +2798,11 @@ { "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 }, { "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 }, { "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_MAP_GRANT_REF", _IOC_NONE, 0x4700, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_MAX_GRANTS", _IOC_NONE, 0x4703, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_UNMAP_NOTIFY", _IOC_NONE, 0x4707, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_UNMAP_GRANT_REF", _IOC_NONE, 0x4701, 0x10 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_EVTCHN", _IOC_NONE, 0x4200, 0x00 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_SETUP", _IOC_NONE, 0x4201, 0x00 }, diff -Nru strace-4.11/linux/32/syscallent.h strace-4.12/linux/32/syscallent.h --- strace-4.11/linux/32/syscallent.h 2015-12-04 23:12:14.000000000 +0000 +++ strace-4.12/linux/32/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -1,5 +1,5 @@ -#ifndef ARCH_mmap -# define ARCH_mmap mmap +#ifndef sys_ARCH_mmap +# define sys_ARCH_mmap sys_mmap #endif [ 0] = { 2, 0, SEN(io_setup), "io_setup" }, [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" }, @@ -97,7 +97,7 @@ [ 89] = { 1, TF, SEN(acct), "acct" }, [ 90] = { 2, 0, SEN(capget), "capget" }, [ 91] = { 2, 0, SEN(capset), "capset" }, -[ 92] = { 1, 0, SEN(personality), "personality" }, +[ 92] = { 1, NF, SEN(personality), "personality" }, [ 93] = { 1, TP|SE, SEN(exit), "exit" }, [ 94] = { 1, TP|SE, SEN(exit), "exit_group" }, [ 95] = { 5, TP, SEN(waitid), "waitid" }, @@ -171,19 +171,19 @@ [163] = { 2, 0, SEN(getrlimit), "getrlimit" }, [164] = { 2, 0, SEN(setrlimit), "setrlimit" }, [165] = { 2, 0, SEN(getrusage), "getrusage" }, -[166] = { 1, 0, SEN(umask), "umask" }, +[166] = { 1, NF, SEN(umask), "umask" }, [167] = { 5, 0, SEN(prctl), "prctl" }, [168] = { 3, 0, SEN(getcpu), "getcpu" }, [169] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [170] = { 2, 0, SEN(settimeofday), "settimeofday" }, [171] = { 1, 0, SEN(adjtimex), "adjtimex" }, -[172] = { 0, 0, SEN(getpid), "getpid" }, -[173] = { 0, 0, SEN(getppid), "getppid" }, +[172] = { 0, NF, SEN(getpid), "getpid" }, +[173] = { 0, NF, SEN(getppid), "getppid" }, [174] = { 0, NF, SEN(getuid), "getuid" }, [175] = { 0, NF, SEN(geteuid), "geteuid" }, [176] = { 0, NF, SEN(getgid), "getgid" }, [177] = { 0, NF, SEN(getegid), "getegid" }, -[178] = { 0, 0, SEN(gettid), "gettid" }, +[178] = { 0, NF, SEN(gettid), "gettid" }, [179] = { 1, 0, SEN(sysinfo), "sysinfo" }, [180] = { 4, 0, SEN(mq_open), "mq_open" }, [181] = { 1, 0, SEN(mq_unlink), "mq_unlink" }, @@ -275,6 +275,9 @@ [282] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [283] = { 2, 0, SEN(membarrier), "membarrier", }, [284] = { 3, TM, SEN(mlock2), "mlock2" }, +[285] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[286] = { 6, TD, SEN(preadv2), "preadv2" }, +[287] = { 6, TD, SEN(pwritev2), "pwritev2" }, -#undef ARCH_mmap +#undef sys_ARCH_mmap #undef ARCH_WANT_SYNC_FILE_RANGE2 diff -Nru strace-4.11/linux/64/ioctls_inc.h strace-4.12/linux/64/ioctls_inc.h --- strace-4.11/linux/64/ioctls_inc.h 2015-02-28 18:52:02.000000000 +0000 +++ strace-4.12/linux/64/ioctls_inc.h 2016-05-18 09:26:01.000000000 +0000 @@ -81,6 +81,18 @@ { "asm-generic/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, { "asm-generic/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, { "asm-generic/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x120 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_OP", _IOC_READ|_IOC_WRITE, 0x6450, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6451, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -118,11 +130,14 @@ { "drm/drm.h", "DRM_IOCTL_MARK_BUFS", _IOC_WRITE, 0x6417, 0x20 }, { "drm/drm.h", "DRM_IOCTL_MODESET_CTL", _IOC_WRITE, 0x6408, 0x08 }, { "drm/drm.h", "DRM_IOCTL_MODE_ADDFB", _IOC_READ|_IOC_WRITE, 0x64ae, 0x1c }, -{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x44 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x68 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATOMIC", _IOC_READ|_IOC_WRITE, 0x64bc, 0x38 }, { "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 }, { "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DESTROY_DUMB", _IOC_READ|_IOC_WRITE, 0x64b4, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DETACHMODE", _IOC_READ|_IOC_WRITE, 0x64a9, 0x48 }, { "drm/drm.h", "DRM_IOCTL_MODE_DIRTYFB", _IOC_READ|_IOC_WRITE, 0x64b1, 0x18 }, @@ -166,11 +181,21 @@ { "drm/drm.h", "DRM_IOCTL_UPDATE_DRAW", _IOC_WRITE, 0x643f, 0x18 }, { "drm/drm.h", "DRM_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x6400, 0x40 }, { "drm/drm.h", "DRM_IOCTL_WAIT_VBLANK", _IOC_READ|_IOC_WRITE, 0x643a, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", _IOC_READ|_IOC_WRITE, 0x6461, 0x28 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 }, @@ -201,6 +226,8 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x6457, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_CREATE", _IOC_READ|_IOC_WRITE, 0x646d, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY", _IOC_WRITE, 0x646e, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6474, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM", _IOC_READ|_IOC_WRITE, 0x6475, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645b, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 }, @@ -211,7 +238,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_INIT", _IOC_WRITE, 0x6453, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_LEAVEVT", _IOC_NONE, 0x645a, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6466, 0x0c }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x28 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP_GTT", _IOC_READ|_IOC_WRITE, 0x6464, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PIN", _IOC_READ|_IOC_WRITE, 0x6455, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PREAD", _IOC_WRITE, 0x645c, 0x20 }, @@ -227,7 +254,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6446, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID", _IOC_READ|_IOC_WRITE, 0x6465, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_RESET_STATS", _IOC_READ|_IOC_WRITE, 0x6472, 0x18 }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646a, 0x14 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_VBLANK_PIPE", _IOC_READ, 0x644e, 0x04 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_HWS_ADDR", _IOC_WRITE, 0x6451, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_INIT", _IOC_WRITE, 0x6440, 0x44 }, @@ -352,7 +379,7 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644d, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 }, -{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644c, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, @@ -362,6 +389,13 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_INCR", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_READ", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 }, @@ -376,6 +410,15 @@ { "drm/via_drm.h", "DRM_IOCTL_VIA_MAP_INIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x28 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_PCICMD", _IOC_WRITE, 0x644a, 0x10 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_WAIT_IRQ", _IOC_READ|_IOC_WRITE, 0x644d, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_EXECBUFFER", _IOC_WRITE, 0x6442, 0x20 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x6449, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", _IOC_READ|_IOC_WRITE, 0x6444, 0x38 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_INFO", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", _IOC_READ|_IOC_WRITE, 0x6447, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_WAIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x08 }, { "linux/agpgart.h", "AGPIOC_ACQUIRE", _IOC_NONE, 0x4101, 0x00 }, { "linux/agpgart.h", "AGPIOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x4106, 0x08 }, { "linux/agpgart.h", "AGPIOC_BIND", _IOC_WRITE, 0x4108, 0x08 }, @@ -387,6 +430,7 @@ { "linux/agpgart.h", "AGPIOC_RESERVE", _IOC_WRITE, 0x4104, 0x08 }, { "linux/agpgart.h", "AGPIOC_SETUP", _IOC_WRITE, 0x4103, 0x08 }, { "linux/agpgart.h", "AGPIOC_UNBIND", _IOC_WRITE, 0x4109, 0x08 }, +{ "linux/am437x-vpfe.h", "VIDIOC_AM437X_CCDC_CFG", _IOC_WRITE, 0x56c1, 0x08 }, { "linux/android/binder.h", "BC_ACQUIRE", _IOC_WRITE, 0x6305, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE_DONE", _IOC_WRITE, 0x6309, 0x10 }, { "linux/android/binder.h", "BC_ACQUIRE_RESULT", _IOC_WRITE, 0x6302, 0x04 }, @@ -672,6 +716,7 @@ { "linux/dm-ioctl.h", "DM_TABLE_STATUS", _IOC_READ|_IOC_WRITE, 0xfd0c, 0x138 }, { "linux/dm-ioctl.h", "DM_TARGET_MSG", _IOC_READ|_IOC_WRITE, 0xfd0e, 0x138 }, { "linux/dm-ioctl.h", "DM_VERSION", _IOC_READ|_IOC_WRITE, 0xfd00, 0x138 }, +{ "linux/dma-buf.h", "DMA_BUF_IOCTL_SYNC", _IOC_WRITE, 0x6200, 0x08 }, { "linux/dn.h", "OSIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, { "linux/dn.h", "OSIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, { "linux/dn.h", "SIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, @@ -840,6 +885,7 @@ { "linux/fs.h", "BLKALIGNOFF", _IOC_NONE, 0x127a, 0x00 }, { "linux/fs.h", "BLKBSZGET", _IOC_READ, 0x1270, 0x08 }, { "linux/fs.h", "BLKBSZSET", _IOC_WRITE, 0x1271, 0x08 }, +{ "linux/fs.h", "BLKDAXGET", _IOC_NONE, 0x1281, 0x00 }, { "linux/fs.h", "BLKDISCARD", _IOC_NONE, 0x1277, 0x00 }, { "linux/fs.h", "BLKDISCARDZEROES", _IOC_NONE, 0x127c, 0x00 }, { "linux/fs.h", "BLKFLSBUF", _IOC_NONE, 0x1261, 0x00 }, @@ -866,6 +912,9 @@ { "linux/fs.h", "BLKTRACETEARDOWN", _IOC_NONE, 0x1276, 0x00 }, { "linux/fs.h", "BLKZEROOUT", _IOC_NONE, 0x127f, 0x00 }, { "linux/fs.h", "FIBMAP", _IOC_NONE, 0x0001, 0x00 }, +{ "linux/fs.h", "FICLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/fs.h", "FICLONERANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/fs.h", "FIDEDUPERANGE", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, { "linux/fs.h", "FIFREEZE", _IOC_READ|_IOC_WRITE, 0x5877, 0x04 }, { "linux/fs.h", "FIGETBSZ", _IOC_NONE, 0x0002, 0x00 }, { "linux/fs.h", "FITHAW", _IOC_READ|_IOC_WRITE, 0x5878, 0x04 }, @@ -875,10 +924,15 @@ { "linux/fs.h", "FS_IOC32_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC32_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_FIEMAP", _IOC_READ|_IOC_WRITE, 0x660b, 0x20 }, +{ "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, +{ "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x08 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x08 }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x08 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x08 }, +{ "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, { "linux/fsl-diu-fb.h", "MFB_GET_AOID", _IOC_READ, 0x4d04, 0x08 }, { "linux/fsl-diu-fb.h", "MFB_GET_GAMMA", _IOC_READ, 0x4d01, 0x01 }, @@ -897,6 +951,7 @@ { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 }, +{ "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_GET_CARD_STATE", _IOC_READ, 0xa524, 0x04 }, @@ -914,6 +969,8 @@ { "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 }, +{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 }, +{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 }, { "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 }, { "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 }, { "linux/gsmmux.h", "GSMIOC_GETCONF", _IOC_READ, 0x4700, 0x4c }, @@ -982,6 +1039,10 @@ { "linux/hpet.h", "HPET_IE_ON", _IOC_NONE, 0x6801, 0x00 }, { "linux/hpet.h", "HPET_INFO", _IOC_READ, 0x6803, 0x18 }, { "linux/hpet.h", "HPET_IRQFREQ", _IOC_WRITE, 0x6806, 0x08 }, +{ "linux/hsi/cs-protocol.h", "CS_CONFIG_BUFS", _IOC_WRITE, 0x431f, 0x20 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_IF_VERSION", _IOC_READ, 0x431e, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_STATE", _IOC_READ, 0x4315, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_SET_WAKELINE", _IOC_WRITE, 0x4317, 0x04 }, { "linux/hsi/hsi_char.h", "HSC_GET_RX", _IOC_WRITE, 0x6b14, 0x0c }, { "linux/hsi/hsi_char.h", "HSC_GET_TX", _IOC_WRITE, 0x6b16, 0x10 }, { "linux/hsi/hsi_char.h", "HSC_RESET", _IOC_NONE, 0x6b10, 0x00 }, @@ -1003,10 +1064,6 @@ { "linux/i2o-dev.h", "I2OSWDL", _IOC_READ|_IOC_WRITE, 0x6905, 0x30 }, { "linux/i2o-dev.h", "I2OSWUL", _IOC_READ|_IOC_WRITE, 0x6906, 0x30 }, { "linux/i2o-dev.h", "I2OVALIDATE", _IOC_READ, 0x6908, 0x04 }, -{ "linux/i2o.h", "BLKI2OGRSTRAT", _IOC_READ, 0x3201, 0x04 }, -{ "linux/i2o.h", "BLKI2OGWSTRAT", _IOC_READ, 0x3202, 0x04 }, -{ "linux/i2o.h", "BLKI2OSRSTRAT", _IOC_WRITE, 0x3203, 0x04 }, -{ "linux/i2o.h", "BLKI2OSWSTRAT", _IOC_WRITE, 0x3204, 0x04 }, { "linux/i8k.h", "I8K_BIOS_VERSION", _IOC_READ, 0x6980, 0x04 }, { "linux/i8k.h", "I8K_FN_STATUS", _IOC_READ, 0x6983, 0x08 }, { "linux/i8k.h", "I8K_GET_FAN", _IOC_READ|_IOC_WRITE, 0x6986, 0x08 }, @@ -1023,6 +1080,7 @@ { "linux/if_tun.h", "TUNGETFILTER", _IOC_READ, 0x54db, 0x10 }, { "linux/if_tun.h", "TUNGETIFF", _IOC_READ, 0x54d2, 0x04 }, { "linux/if_tun.h", "TUNGETSNDBUF", _IOC_READ, 0x54d3, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETBE", _IOC_READ, 0x54df, 0x04 }, { "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 }, { "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 }, { "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 }, @@ -1037,6 +1095,7 @@ { "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 }, { "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 }, { "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 }, { "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 }, { "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 }, { "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 }, @@ -1044,6 +1103,7 @@ { "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE_V2", _IOC_READ, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCGMASK", _IOC_READ, 0x4592, 0x10 }, { "linux/input.h", "EVIOCGRAB", _IOC_WRITE, 0x4590, 0x04 }, { "linux/input.h", "EVIOCGREP", _IOC_READ, 0x4503, 0x08 }, { "linux/input.h", "EVIOCGVERSION", _IOC_READ, 0x4501, 0x04 }, @@ -1053,6 +1113,7 @@ { "linux/input.h", "EVIOCSFF", _IOC_WRITE, 0x4580, 0x30 }, { "linux/input.h", "EVIOCSKEYCODE", _IOC_WRITE, 0x4504, 0x08 }, { "linux/input.h", "EVIOCSKEYCODE_V2", _IOC_WRITE, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCSMASK", _IOC_WRITE, 0x4593, 0x10 }, { "linux/input.h", "EVIOCSREP", _IOC_WRITE, 0x4503, 0x08 }, { "linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", _IOC_READ, 0x691e, 0x04 }, { "linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", _IOC_READ, 0x6912, 0x04 }, @@ -1167,6 +1228,9 @@ { "linux/joystick.h", "JSIOCSAXMAP", _IOC_WRITE, 0x6a31, 0x40 }, { "linux/joystick.h", "JSIOCSBTNMAP", _IOC_WRITE, 0x6a33, 0x400 }, { "linux/joystick.h", "JSIOCSCORR", _IOC_WRITE, 0x6a21, 0x24 }, +{ "linux/kcov.h", "KCOV_DISABLE", _IOC_NONE, 0x6365, 0x00 }, +{ "linux/kcov.h", "KCOV_ENABLE", _IOC_NONE, 0x6364, 0x00 }, +{ "linux/kcov.h", "KCOV_INIT_TRACE", _IOC_READ, 0x6301, 0x08 }, { "linux/kd.h", "GIO_CMAP", 0, 0x4B70, 0 }, { "linux/kd.h", "GIO_FONT", 0, 0x4B60, 0 }, { "linux/kd.h", "GIO_FONTX", 0, 0x4B6B, 0 }, @@ -1213,13 +1277,22 @@ { "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 }, { "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 }, { "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_REGISTER", _IOC_WRITE, 0x4b0d, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_UNREGISTER", _IOC_WRITE, 0x4b0e, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, { "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, { "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, { "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, @@ -1235,6 +1308,7 @@ { "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, { "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, { "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, { "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, { "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, { "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, @@ -1284,9 +1358,15 @@ { "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, { "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, { "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, { "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, { "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, { "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, { "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x08 }, { "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, { "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, @@ -1322,6 +1402,7 @@ { "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, { "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, { "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, { "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, { "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, { "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, @@ -1329,6 +1410,46 @@ { "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, { "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, { "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, +{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, +{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, +{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, +{ "linux/lightnvm.h", "NVM_DEV_REMOVE", _IOC_WRITE, 0x4c23, 0x24 }, +{ "linux/lightnvm.h", "NVM_GET_DEVICES", _IOC_READ, 0x4c21, 0x1000 }, +{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 }, +{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, +{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, +{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, { "linux/loop.h", "LOOP_CHANGE_FD", 0, 0x4C06, 0 }, { "linux/loop.h", "LOOP_CLR_FD", 0, 0x4C01, 0 }, { "linux/loop.h", "LOOP_CTL_ADD", 0, 0x4C80, 0 }, @@ -1337,6 +1458,7 @@ { "linux/loop.h", "LOOP_GET_STATUS", 0, 0x4C03, 0 }, { "linux/loop.h", "LOOP_GET_STATUS64", 0, 0x4C05, 0 }, { "linux/loop.h", "LOOP_SET_CAPACITY", 0, 0x4C07, 0 }, +{ "linux/loop.h", "LOOP_SET_DIRECT_IO", 0, 0x4C08, 0 }, { "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 }, { "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 }, { "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 }, @@ -1358,8 +1480,11 @@ { "linux/media.h", "MEDIA_IOC_DEVICE_INFO", _IOC_READ|_IOC_WRITE, 0x7c00, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x28 }, +{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 }, { "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 }, { "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 }, { "linux/meye.h", "MEYEIOC_G_PARAMS", _IOC_READ, 0x76c0, 0x06 }, { "linux/meye.h", "MEYEIOC_QBUF_CAPT", _IOC_WRITE, 0x76c2, 0x04 }, { "linux/meye.h", "MEYEIOC_STILLCAPT", _IOC_NONE, 0x76c4, 0x00 }, @@ -1370,6 +1495,7 @@ { "linux/mic_ioctl.h", "MIC_VIRTIO_CONFIG_CHANGE", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, { "linux/mic_ioctl.h", "MIC_VIRTIO_COPY_DESC", _IOC_READ|_IOC_WRITE, 0x7302, 0x08 }, { "linux/mmc/ioctl.h", "MMC_IOC_CMD", _IOC_READ|_IOC_WRITE, 0xb300, 0x48 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_MULTI_CMD", _IOC_READ|_IOC_WRITE, 0xb301, 0x08 }, { "linux/mmtimer.h", "MMTIMER_GETBITS", _IOC_NONE, 0x6d04, 0x00 }, { "linux/mmtimer.h", "MMTIMER_GETCOUNTER", _IOC_READ, 0x6d09, 0x08 }, { "linux/mmtimer.h", "MMTIMER_GETFREQ", _IOC_READ, 0x6d02, 0x08 }, @@ -1381,8 +1507,6 @@ { "linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", _IOC_WRITE, 0x7211, 0x04 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", _IOC_READ, 0x7201, 0x230 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", _IOC_READ, 0x7202, 0x230 }, -{ "linux/msm_mdp.h", "MSMFB_BLIT", _IOC_WRITE, 0x6d02, 0x04 }, -{ "linux/msm_mdp.h", "MSMFB_GRP_DISP", _IOC_WRITE, 0x6d01, 0x04 }, { "linux/mtio.h", "MTIOCGET", _IOC_READ, 0x6d02, 0x30 }, { "linux/mtio.h", "MTIOCPOS", _IOC_READ, 0x6d03, 0x08 }, { "linux/mtio.h", "MTIOCTOP", _IOC_WRITE, 0x6d01, 0x08 }, @@ -1417,6 +1541,17 @@ { "linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", _IOC_WRITE, 0x6e06, 0x04 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", _IOC_READ, 0x6e05, 0x18 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", _IOC_READ, 0x6e06, 0x04 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_CAP", _IOC_READ|_IOC_WRITE, 0x4e01, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_START", _IOC_READ|_IOC_WRITE, 0x4e02, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_STATUS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x30 }, +{ "linux/ndctl.h", "ND_IOCTL_CLEAR_ERROR", _IOC_READ|_IOC_WRITE, 0x4e04, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_DIMM_FLAGS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 }, @@ -1430,10 +1565,12 @@ { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, -{ "linux/nvme.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, -{ "linux/nvme.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESET", _IOC_NONE, 0x4e44, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBSYS_RESET", _IOC_NONE, 0x4e45, 0x00 }, { "linux/nvram.h", "NVRAM_INIT", _IOC_NONE, 0x7040, 0x00 }, { "linux/nvram.h", "NVRAM_SETCKS", _IOC_NONE, 0x7041, 0x00 }, { "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AEWB_CFG", _IOC_READ|_IOC_WRITE, 0x56c3, 0x20 }, @@ -1472,6 +1609,7 @@ { "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 }, { "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 }, { "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", _IOC_WRITE, 0x2406, 0x08 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", _IOC_NONE, 0x2405, 0x00 }, { "linux/phantom.h", "PHN_GETREG", _IOC_READ|_IOC_WRITE, 0x7005, 0x08 }, @@ -1484,6 +1622,7 @@ { "linux/phantom.h", "PHN_SET_REG", _IOC_WRITE, 0x7001, 0x08 }, { "linux/phantom.h", "PHN_SET_REGS", _IOC_WRITE, 0x7003, 0x08 }, { "linux/pktcdvd.h", "PACKET_CTRL_CMD", _IOC_READ|_IOC_WRITE, 0x5801, 0x18 }, +{ "linux/platform_data/media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, { "linux/pmu.h", "PMU_IOC_CAN_SLEEP", _IOC_READ, 0x4205, 0x08 }, { "linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", _IOC_READ, 0x4201, 0x08 }, { "linux/pmu.h", "PMU_IOC_GET_MODEL", _IOC_READ, 0x4203, 0x08 }, @@ -1549,6 +1688,12 @@ { "linux/pps.h", "PPS_GETPARAMS", _IOC_READ, 0x70a1, 0x08 }, { "linux/pps.h", "PPS_KC_BIND", _IOC_WRITE, 0x70a5, 0x08 }, { "linux/pps.h", "PPS_SETPARAMS", _IOC_WRITE, 0x70a2, 0x08 }, +{ "linux/pr.h", "IOC_PR_CLEAR", _IOC_WRITE, 0x70cd, 0x10 }, +{ "linux/pr.h", "IOC_PR_PREEMPT", _IOC_WRITE, 0x70cb, 0x18 }, +{ "linux/pr.h", "IOC_PR_PREEMPT_ABORT", _IOC_WRITE, 0x70cc, 0x18 }, +{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 }, +{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 }, +{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 }, { "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 }, { "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 }, { "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 }, @@ -1556,10 +1701,12 @@ { "linux/ptp_clock.h", "PTP_PIN_GETFUNC", _IOC_READ|_IOC_WRITE, 0x3d06, 0x60 }, { "linux/ptp_clock.h", "PTP_PIN_SETFUNC", _IOC_WRITE, 0x3d07, 0x60 }, { "linux/ptp_clock.h", "PTP_SYS_OFFSET", _IOC_WRITE, 0x3d05, 0x340 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET_PRECISE", _IOC_READ|_IOC_WRITE, 0x3d08, 0x40 }, { "linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", _IOC_READ, 0x4003, 0x08 }, { "linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", _IOC_WRITE, 0x4004, 0x08 }, { "linux/raid/md_u.h", "ADD_NEW_DISK", _IOC_WRITE, 0x0921, 0x14 }, { "linux/raid/md_u.h", "CLEAR_ARRAY", _IOC_NONE, 0x0920, 0x00 }, +{ "linux/raid/md_u.h", "CLUSTERED_DISK_NACK", _IOC_NONE, 0x0935, 0x00 }, { "linux/raid/md_u.h", "GET_ARRAY_INFO", _IOC_READ, 0x0911, 0x48 }, { "linux/raid/md_u.h", "GET_BITMAP_FILE", _IOC_READ, 0x0915, 0x1000 }, { "linux/raid/md_u.h", "GET_DISK_INFO", _IOC_READ, 0x0912, 0x14 }, @@ -1589,6 +1736,30 @@ { "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 }, { "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x08 }, { "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 }, +{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d0a, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0c, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d09, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0b, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_FREE_DMA", _IOC_WRITE, 0x6d14, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_GET_EVENT_MASK", _IOC_READ, 0x6d0e, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_INBOUND", _IOC_READ|_IOC_WRITE, 0x6d11, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_OUTBOUND", _IOC_READ|_IOC_WRITE, 0x6d0f, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_GET_PROPERTIES", _IOC_READ, 0x6d04, 0x30 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_COMPTAG_SET", _IOC_WRITE, 0x6d02, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_HDID_SET", _IOC_WRITE, 0x6d01, 0x02 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_PORT_IDX_GET", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_LOCAL", _IOC_READ, 0x6d05, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_REMOTE", _IOC_READ, 0x6d07, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_LOCAL", _IOC_WRITE, 0x6d06, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_REMOTE", _IOC_WRITE, 0x6d08, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_SET_EVENT_MASK", _IOC_WRITE, 0x6d0d, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_TRANSFER", _IOC_READ|_IOC_WRITE, 0x6d15, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_INBOUND", _IOC_WRITE, 0x6d12, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_OUTBOUND", _IOC_WRITE, 0x6d10, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_WAIT_FOR_ASYNC", _IOC_WRITE, 0x6d16, 0x08 }, { "linux/rtc.h", "RTC_AIE_OFF", _IOC_NONE, 0x7002, 0x00 }, { "linux/rtc.h", "RTC_AIE_ON", _IOC_NONE, 0x7001, 0x00 }, { "linux/rtc.h", "RTC_ALM_READ", _IOC_READ, 0x7008, 0x24 }, @@ -1611,6 +1782,23 @@ { "linux/rtc.h", "RTC_WIE_ON", _IOC_NONE, 0x700f, 0x00 }, { "linux/rtc.h", "RTC_WKALM_RD", _IOC_READ, 0x7010, 0x28 }, { "linux/rtc.h", "RTC_WKALM_SET", _IOC_WRITE, 0x700f, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREG", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREQ", _IOC_READ|_IOC_WRITE, 0x7304, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_BIND", _IOC_READ|_IOC_WRITE, 0x7301, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_CONNECT", _IOC_READ|_IOC_WRITE, 0x7303, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_MARK", _IOC_READ|_IOC_WRITE, 0x730f, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_SIGNAL", _IOC_READ|_IOC_WRITE, 0x7311, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_WAIT", _IOC_READ|_IOC_WRITE, 0x7310, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_GET_NODEIDS", _IOC_READ|_IOC_WRITE, 0x730e, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_LISTEN", _IOC_WRITE, 0x7302, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_READFROM", _IOC_READ|_IOC_WRITE, 0x730a, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_RECV", _IOC_READ|_IOC_WRITE, 0x7307, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_REG", _IOC_READ|_IOC_WRITE, 0x7308, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_SEND", _IOC_READ|_IOC_WRITE, 0x7306, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_UNREG", _IOC_READ|_IOC_WRITE, 0x7309, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_VREADFROM", _IOC_READ|_IOC_WRITE, 0x730c, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_VWRITETO", _IOC_READ|_IOC_WRITE, 0x730d, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_WRITETO", _IOC_READ|_IOC_WRITE, 0x730b, 0x28 }, { "linux/serio.h", "SPIOCSTYPE", _IOC_WRITE, 0x7101, 0x08 }, { "linux/sockios.h", "SIOCADDDLCI", 0, 0x8980, 0 }, { "linux/sockios.h", "SIOCADDMULTI", 0, 0x8931, 0 }, @@ -1805,6 +1993,9 @@ { "linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", _IOC_WRITE, 0x6b04, 0x04 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE", _IOC_WRITE, 0x6b01, 0x01 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE32", _IOC_WRITE, 0x6b05, 0x04 }, +{ "linux/stm.h", "STP_POLICY_ID_GET", _IOC_READ, 0x2501, 0x10 }, +{ "linux/stm.h", "STP_POLICY_ID_SET", _IOC_READ|_IOC_WRITE, 0x2500, 0x10 }, +{ "linux/stm.h", "STP_SET_OPTIONS", _IOC_WRITE, 0x2502, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", _IOC_READ, 0x3314, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", _IOC_NONE, 0x3304, 0x00 }, { "linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", _IOC_READ, 0x3313, 0x08 }, @@ -1887,15 +2078,18 @@ { "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 }, { "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 }, { "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 }, -{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x04 }, +{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 }, +{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 }, { "linux/udf_fs_i.h", "UDF_GETEABLOCK", _IOC_READ, 0x6c41, 0x08 }, { "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x08 }, { "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x08 }, +{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c }, { "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c }, { "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x68 }, { "linux/uinput.h", "UI_DEV_CREATE", _IOC_NONE, 0x5501, 0x00 }, { "linux/uinput.h", "UI_DEV_DESTROY", _IOC_NONE, 0x5502, 0x00 }, +{ "linux/uinput.h", "UI_DEV_SETUP", _IOC_WRITE, 0x5503, 0x5c }, { "linux/uinput.h", "UI_END_FF_ERASE", _IOC_WRITE, 0x55cb, 0x0c }, { "linux/uinput.h", "UI_END_FF_UPLOAD", _IOC_WRITE, 0x55c9, 0x68 }, { "linux/uinput.h", "UI_GET_VERSION", _IOC_READ, 0x552d, 0x04 }, @@ -1925,6 +2119,11 @@ { "linux/usb/iowarrior.h", "IOW_GETINFO", _IOC_READ, 0xc003, 0x28 }, { "linux/usb/iowarrior.h", "IOW_READ", _IOC_WRITE, 0xc002, 0x08 }, { "linux/usb/iowarrior.h", "IOW_WRITE", _IOC_WRITE, 0xc001, 0x08 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GET_CAPS", _IOC_READ, 0x5b11, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GOTO_LOCAL", _IOC_NONE, 0x5b14, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_LOCAL_LOCKOUT", _IOC_NONE, 0x5b15, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 }, @@ -1946,6 +2145,7 @@ { "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", _IOC_READ, 0x551b, 0x108 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", _IOC_READ, 0x550e, 0x10 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DROP_PRIVILEGES", _IOC_WRITE, 0x551e, 0x04 }, { "linux/usbdevice_fs.h", "USBDEVFS_FREE_STREAMS", _IOC_READ, 0x551d, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", _IOC_WRITE, 0x5508, 0x104 }, { "linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", _IOC_READ, 0x551a, 0x04 }, @@ -1964,6 +2164,12 @@ { "linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", _IOC_READ, 0x5504, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", _IOC_READ, 0x550a, 0x38 }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", _IOC_READ, 0x550a, 0x2a }, +{ "linux/userfaultfd.h", "UFFDIO_API", _IOC_READ|_IOC_WRITE, 0xaa3f, 0x18 }, +{ "linux/userfaultfd.h", "UFFDIO_COPY", _IOC_READ|_IOC_WRITE, 0xaa03, 0x28 }, +{ "linux/userfaultfd.h", "UFFDIO_REGISTER", _IOC_READ|_IOC_WRITE, 0xaa00, 0x20 }, +{ "linux/userfaultfd.h", "UFFDIO_UNREGISTER", _IOC_READ, 0xaa01, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_WAKE", _IOC_READ, 0xaa02, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_ZEROPAGE", _IOC_READ|_IOC_WRITE, 0xaa04, 0x20 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_MAP", _IOC_READ|_IOC_WRITE, 0x7520, 0x60 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", _IOC_READ|_IOC_WRITE, 0x7521, 0x10 }, { "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, @@ -2002,11 +2208,17 @@ { "linux/vfio.h", "VFIO_IOMMU_ENABLE", _IOC_NONE, 0x3b73, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_MAP_DMA", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_REGISTER_MEMORY", _IOC_NONE, 0x3b75, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_CREATE", _IOC_NONE, 0x3b77, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_REMOVE", _IOC_NONE, 0x3b78, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY", _IOC_NONE, 0x3b76, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", _IOC_NONE, 0x3b72, 0x00 }, { "linux/vfio.h", "VFIO_SET_IOMMU", _IOC_NONE, 0x3b66, 0x00 }, { "linux/vhost.h", "VHOST_GET_FEATURES", _IOC_READ, 0xaf00, 0x08 }, { "linux/vhost.h", "VHOST_GET_VRING_BASE", _IOC_READ|_IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf24, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_ENDIAN", _IOC_WRITE, 0xaf14, 0x08 }, { "linux/vhost.h", "VHOST_NET_SET_BACKEND", _IOC_WRITE, 0xaf30, 0x08 }, { "linux/vhost.h", "VHOST_RESET_OWNER", _IOC_NONE, 0xaf02, 0x00 }, { "linux/vhost.h", "VHOST_SCSI_CLEAR_ENDPOINT", _IOC_WRITE, 0xaf41, 0xe8 }, @@ -2021,7 +2233,9 @@ { "linux/vhost.h", "VHOST_SET_OWNER", _IOC_NONE, 0xaf01, 0x00 }, { "linux/vhost.h", "VHOST_SET_VRING_ADDR", _IOC_WRITE, 0xaf11, 0x28 }, { "linux/vhost.h", "VHOST_SET_VRING_BASE", _IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf23, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_CALL", _IOC_WRITE, 0xaf21, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ENDIAN", _IOC_WRITE, 0xaf13, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 }, @@ -2211,55 +2425,24 @@ { "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 }, { "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 }, { "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 }, -{ "media/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, { "media/davinci/vpfe_capture.h", "VPFE_CMD_S_CCDC_RAW_PARAMS", _IOC_WRITE, 0x56c1, 0x08 }, -{ "media/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, -{ "media/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, -{ "media/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, -{ "media/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, -{ "media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, -{ "media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, -{ "media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, -{ "media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, +{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, +{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, { "media/v4l2-common.h", "TUNER_SET_CONFIG", _IOC_WRITE, 0x645c, 0x10 }, { "media/v4l2-common.h", "VIDIOC_INT_RESET", _IOC_WRITE, 0x6466, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_DEVICE_NOTIFY_EVENT", _IOC_WRITE, 0x7602, 0x88 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", _IOC_WRITE, 0x7600, 0x04 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", _IOC_WRITE, 0x7601, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_DOWNLOAD_IMAGE", _IOC_WRITE, 0xca0a, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_AFU_ID", _IOC_READ, 0xca02, 0x40 }, { "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 }, { "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 }, { "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 }, { "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 }, { "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 }, @@ -2324,10 +2507,21 @@ { "net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", _IOC_READ, 0x52d2, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", _IOC_WRITE, 0x52c9, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", _IOC_WRITE, 0x52dc, 0x04 }, +{ "net/nfc/nci_core.h", "NCIUARTSETDRIVER", _IOC_WRITE, 0x5500, 0x08 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", _IOC_NONE, 0x1b03, 0x00 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RECOVER_AFU", _IOC_READ|_IOC_WRITE, 0xca85, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RELEASE", _IOC_READ|_IOC_WRITE, 0xca82, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_DIRECT", _IOC_READ|_IOC_WRITE, 0xca81, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_VIRTUAL", _IOC_READ|_IOC_WRITE, 0xca87, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VERIFY", _IOC_READ|_IOC_WRITE, 0xca84, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_CLONE", _IOC_READ|_IOC_WRITE, 0xca89, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_RESIZE", _IOC_READ|_IOC_WRITE, 0xca88, 0x78 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0, 0x5386, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0, 0x5382, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0, 0x5387, 0 }, @@ -2370,7 +2564,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", _IOC_READ|_IOC_WRITE, 0x5322, 0xa8 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", _IOC_READ|_IOC_WRITE, 0x5349, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5334, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", _IOC_READ|_IOC_WRITE, 0x5343, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", _IOC_READ|_IOC_WRITE, 0x5340, 0x5c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", _IOC_READ|_IOC_WRITE, 0x5341, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", _IOC_READ|_IOC_WRITE, 0x5345, 0x60 }, @@ -2386,7 +2579,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", _IOC_WRITE, 0x5323, 0xa8 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", _IOC_WRITE, 0x534a, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5335, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", _IOC_WRITE, 0x5344, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", _IOC_WRITE, 0x5342, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", _IOC_WRITE, 0x5346, 0x60 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", _IOC_WRITE, 0x5330, 0x50 }, @@ -2442,6 +2634,7 @@ { "sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", _IOC_WRITE, 0x4146, 0x08 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_START", _IOC_NONE, 0x4142, 0x00 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", _IOC_READ, 0x4120, 0x98 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS_EXT", _IOC_READ|_IOC_WRITE, 0x4124, 0x98 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4113, 0x88 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", _IOC_READ|_IOC_WRITE, 0x4123, 0x88 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", _IOC_WRITE, 0x4102, 0x04 }, @@ -2539,8 +2732,7 @@ { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", _IOC_NONE, 0x4883, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", _IOC_NONE, 0x4882, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", _IOC_READ, 0x4880, 0x04 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_SET_RTC", _IOC_WRITE, 0x6105, 0x10 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_WAIT", _IOC_NONE, 0x6101, 0x00 }, +{ "sound/usb_stream.h", "SNDRV_USB_STREAM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4890, 0x10 }, { "staging/android/ashmem.h", "ASHMEM_GET_NAME", _IOC_READ, 0x7702, 0x100 }, { "staging/android/ashmem.h", "ASHMEM_GET_PIN_STATUS", _IOC_NONE, 0x7709, 0x00 }, { "staging/android/ashmem.h", "ASHMEM_GET_PROT_MASK", _IOC_NONE, 0x7706, 0x00 }, @@ -2561,17 +2753,10 @@ { "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 }, -{ "staging/android/logger.h", "LOGGER_FLUSH_LOG", _IOC_NONE, 0xae04, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_BUF_SIZE", _IOC_NONE, 0xae01, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_LEN", _IOC_NONE, 0xae02, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_NEXT_ENTRY_LEN", _IOC_NONE, 0xae03, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_VERSION", _IOC_NONE, 0xae05, 0x00 }, -{ "staging/android/logger.h", "LOGGER_SET_VERSION", _IOC_NONE, 0xae06, 0x00 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 }, { "staging/android/sync.h", "SYNC_IOC_FENCE_INFO", _IOC_READ|_IOC_WRITE, 0x3e02, 0x28 }, { "staging/android/sync.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e01, 0x28 }, -{ "staging/android/sync.h", "SYNC_IOC_WAIT", _IOC_WRITE, 0x3e00, 0x04 }, { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 }, { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 }, { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 }, @@ -2613,5 +2798,11 @@ { "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 }, { "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 }, { "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_MAP_GRANT_REF", _IOC_NONE, 0x4700, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_MAX_GRANTS", _IOC_NONE, 0x4703, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_UNMAP_NOTIFY", _IOC_NONE, 0x4707, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_UNMAP_GRANT_REF", _IOC_NONE, 0x4701, 0x10 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_EVTCHN", _IOC_NONE, 0x4200, 0x00 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_SETUP", _IOC_NONE, 0x4201, 0x00 }, diff -Nru strace-4.11/linux/64/syscallent.h strace-4.12/linux/64/syscallent.h --- strace-4.11/linux/64/syscallent.h 2015-11-17 00:39:49.000000000 +0000 +++ strace-4.12/linux/64/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -90,7 +90,7 @@ [ 89] = { 1, TF, SEN(acct), "acct" }, [ 90] = { 2, 0, SEN(capget), "capget" }, [ 91] = { 2, 0, SEN(capset), "capset" }, -[ 92] = { 1, 0, SEN(personality), "personality" }, +[ 92] = { 1, NF, SEN(personality), "personality" }, [ 93] = { 1, TP|SE, SEN(exit), "exit" }, [ 94] = { 1, TP|SE, SEN(exit), "exit_group" }, [ 95] = { 5, TP, SEN(waitid), "waitid" }, @@ -164,19 +164,19 @@ [163] = { 2, 0, SEN(getrlimit), "getrlimit" }, [164] = { 2, 0, SEN(setrlimit), "setrlimit" }, [165] = { 2, 0, SEN(getrusage), "getrusage" }, -[166] = { 1, 0, SEN(umask), "umask" }, +[166] = { 1, NF, SEN(umask), "umask" }, [167] = { 5, 0, SEN(prctl), "prctl" }, [168] = { 3, 0, SEN(getcpu), "getcpu" }, [169] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [170] = { 2, 0, SEN(settimeofday), "settimeofday" }, [171] = { 1, 0, SEN(adjtimex), "adjtimex" }, -[172] = { 0, 0, SEN(getpid), "getpid" }, -[173] = { 0, 0, SEN(getppid), "getppid" }, +[172] = { 0, NF, SEN(getpid), "getpid" }, +[173] = { 0, NF, SEN(getppid), "getppid" }, [174] = { 0, NF, SEN(getuid), "getuid" }, [175] = { 0, NF, SEN(geteuid), "geteuid" }, [176] = { 0, NF, SEN(getgid), "getgid" }, [177] = { 0, NF, SEN(getegid), "getegid" }, -[178] = { 0, 0, SEN(gettid), "gettid" }, +[178] = { 0, NF, SEN(gettid), "gettid" }, [179] = { 1, 0, SEN(sysinfo), "sysinfo" }, [180] = { 4, 0, SEN(mq_open), "mq_open" }, [181] = { 1, 0, SEN(mq_unlink), "mq_unlink" }, @@ -268,3 +268,6 @@ [282] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [283] = { 2, 0, SEN(membarrier), "membarrier", }, [284] = { 3, TM, SEN(mlock2), "mlock2" }, +[285] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[286] = { 6, TD, SEN(preadv2), "preadv2" }, +[287] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff -Nru strace-4.11/linux/aarch64/syscallent.h strace-4.12/linux/aarch64/syscallent.h --- strace-4.11/linux/aarch64/syscallent.h 2015-12-09 01:09:11.000000000 +0000 +++ strace-4.12/linux/aarch64/syscallent.h 2016-02-13 00:57:00.000000000 +0000 @@ -62,7 +62,7 @@ [1070] = { 2, 0, SEN(ustat), "ustat" }, [1071] = { 0, TP, SEN(vfork), "vfork" }, [1072] = { 4, TP, SEN(wait4), "wait4" }, -[1073] = { 6, TN, SEN(recv), "recv" }, +[1073] = { 4, TN, SEN(recv), "recv" }, [1074] = { 4, TN, SEN(send), "send" }, [1075] = { 2, 0, SEN(bdflush), "bdflush" }, [1076] = { 1, TF, SEN(umount), "umount" }, diff -Nru strace-4.11/linux/alpha/get_error.c strace-4.12/linux/alpha/get_error.c --- strace-4.11/linux/alpha/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/alpha/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -1,7 +1,7 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && alpha_a3) { + if (alpha_a3) { tcp->u_rval = -1; tcp->u_error = alpha_r0; } else { diff -Nru strace-4.11/linux/alpha/syscallent.h strace-4.12/linux/alpha/syscallent.h --- strace-4.11/linux/alpha/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/alpha/syscallent.h 2016-04-25 23:52:03.000000000 +0000 @@ -46,11 +46,11 @@ [ 17] = { 1, TM|SI, SEN(brk), "brk" }, [ 18] = { 5, 0, SEN(printargs), "osf_getfsstat" }, /*not implemented */ [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getxpid" }, +[ 20] = { 0, NF, SEN(getxpid), "getxpid" }, [ 21] = { 4, 0, SEN(printargs), "osf_mount" }, [ 22] = { 2, TF, SEN(umount2), "umount" }, [ 23] = { 1, 0, SEN(setuid), "setuid" }, -[ 24] = { 0, NF, SEN(getuid), "getxuid" }, +[ 24] = { 0, NF, SEN(getxuid), "getxuid" }, [ 25] = { 5, 0, SEN(printargs), "exec_with_loader" }, /*not implemented */ [ 26] = { 4, 0, SEN(ptrace), "ptrace" }, [ 27] = { 5, 0, SEN(printargs), "osf_nrecvmsg" }, /*not implemented */ @@ -68,12 +68,12 @@ [ 39] = { 2, 0, SEN(setpgid), "setpgid" }, [ 40] = { 5, 0, SEN(printargs), "osf_old_lstat" }, /*not implemented */ [ 41] = { 1, TD, SEN(dup), "dup" }, -[ 42] = { 1, TD, SEN(pipe), "pipe" }, +[ 42] = { 0, TD, SEN(pipe), "pipe" }, [ 43] = { 4, 0, SEN(printargs), "osf_set_program_attributes" }, [ 44] = { 5, 0, SEN(printargs), "osf_profil" }, /*not implemented */ [ 45] = { 3, TD|TF, SEN(open), "open" }, [ 46] = { 5, 0, SEN(printargs), "osf_old_sigaction" }, /*not implemented */ -[ 47] = { 1, NF, SEN(getgid), "getxgid" }, +[ 47] = { 1, NF, SEN(getxgid), "getxgid" }, [ 48] = { 2, TS, SEN(sigprocmask), "osf_sigprocmask" }, [ 49] = { 5, 0, SEN(printargs), "osf_getlogin" }, /*not implemented */ [ 50] = { 5, 0, SEN(printargs), "osf_setlogin" }, /*not implemented */ @@ -86,7 +86,7 @@ [ 57] = { 2, TF, SEN(symlink), "symlink" }, [ 58] = { 3, TF, SEN(readlink), "readlink" }, [ 59] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 5, 0, SEN(printargs), "osf_old_fstat" }, /*not implemented */ [ 63] = { 0, 0, SEN(getpgrp), "getpgrp" }, @@ -212,7 +212,7 @@ [206] = { 3, TI, SEN(semop), "semop" }, [207] = { 1, 0, SEN(printargs), "osf_utsname" }, [208] = { 3, TF, SEN(chown), "lchown" }, -[209] = { 3, TI|TM, SEN(printargs), "osf_shmat" }, +[209] = { 3, TI|TM|SI, SEN(shmat), "osf_shmat" }, [210] = { 3, TI, SEN(shmctl), "shmctl" }, [211] = { 1, TI|TM|SI, SEN(shmdt), "shmdt" }, [212] = { 3, TI, SEN(shmget), "shmget" }, @@ -230,12 +230,12 @@ [224] = { 5, 0, SEN(printargs), "osf_stat" }, /*not implemented */ [225] = { 5, 0, SEN(printargs), "osf_lstat" }, /*not implemented */ [226] = { 5, 0, SEN(printargs), "osf_fstat" }, /*not implemented */ -[227] = { 5, 0, SEN(printargs), "osf_statfs64" }, /*not implemented */ -[228] = { 5, 0, SEN(printargs), "osf_fstatfs64" }, /*not implemented */ +[227] = { 3, 0, SEN(osf_statfs), "osf_statfs64" }, /*not implemented */ +[228] = { 3, 0, SEN(osf_fstatfs), "osf_fstatfs64" }, /*not implemented */ [229 ... 232] = { }, [233] = { 1, 0, SEN(getpgid), "getpgid" }, [234] = { 1, 0, SEN(getsid), "getsid" }, -[235] = { 5, TS, SEN(sigaltstack), "sigaltstack" }, +[235] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, [236] = { 5, 0, SEN(printargs), "osf_waitid" }, /*not implemented */ [237] = { 5, 0, SEN(printargs), "osf_priocntlset" }, /*not implemented */ [238] = { 5, 0, SEN(printargs), "osf_sigsendset" }, /*not implemented */ @@ -270,7 +270,7 @@ [304] = { 1, TF, SEN(swapoff), "swapoff" }, [305] = { 3, TD, SEN(getdents), "getdents" }, [306] = { 2, 0, SEN(create_module), "create_module" }, -[307] = { 4, 0, SEN(init_module), "init_module" }, +[307] = { 3, 0, SEN(init_module), "init_module" }, [308] = { 2, 0, SEN(delete_module), "delete_module" }, [309] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [310] = { 3, 0, SEN(syslog), "syslog" }, @@ -287,7 +287,7 @@ [321] = { 1, TF, SEN(umount), "oldumount" }, [322] = { 2, TF, SEN(swapon), "swapon" }, [323] = { 1, 0, SEN(times), "times" }, -[324] = { 1, 0, SEN(personality), "personality" }, +[324] = { 1, NF, SEN(personality), "personality" }, [325] = { 1, NF, SEN(setfsuid), "setfsuid" }, [326] = { 1, NF, SEN(setfsgid), "setfsgid" }, [327] = { 2, 0, SEN(ustat), "ustat" }, @@ -296,7 +296,7 @@ [330] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, [331] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, [332] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, -[333] = { 2, 0, SEN(sched_getscheduler), "sched_getscheduler" }, +[333] = { 1, 0, SEN(sched_getscheduler), "sched_getscheduler" }, [334] = { 0, 0, SEN(sched_yield), "sched_yield" }, [335] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"}, [336] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"}, @@ -323,7 +323,7 @@ [357] = { 2, TS, SEN(rt_sigsuspend), "rt_sigsuspend" }, [358] = { 5, TD, SEN(select), "select" }, [359] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, -[360] = { 3, 0, SEN(settimeofday), "settimeofday" }, +[360] = { 2, 0, SEN(settimeofday), "settimeofday" }, [361] = { 2, 0, SEN(getitimer), "getitimer" }, [362] = { 3, 0, SEN(setitimer), "setitimer" }, [363] = { 2, TF, SEN(utimes), "utimes" }, @@ -341,7 +341,7 @@ [375] = { 3, TM, SEN(mincore), "mincore" }, [376] = { 3, 0, SEN(printargs), "pciconfig_iobase" }, [377] = { 3, TD, SEN(getdents64), "getdents64" }, -[378] = { 0, 0, SEN(gettid), "gettid" }, +[378] = { 0, NF, SEN(gettid), "gettid" }, [379] = { 3, TD, SEN(readahead), "readahead" }, [380] = { }, [381] = { 2, TS, SEN(kill), "tkill" }, diff -Nru strace-4.11/linux/arc/syscallent.h strace-4.12/linux/arc/syscallent.h --- strace-4.11/linux/arc/syscallent.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/arc/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,6 +1,6 @@ -#define ARCH_mmap mmap_pgoff +#define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, [245] = { 1, 0, SEN(printargs), "arc_settls" }, [246] = { 0, 0, SEN(printargs), "arc_gettls" }, -[247 ... 259] = { }, diff -Nru strace-4.11/linux/arm/syscallent.h strace-4.12/linux/arm/syscallent.h --- strace-4.11/linux/arm/syscallent.h 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/linux/arm/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -249,7 +249,7 @@ [220] = { 3, TM, SEN(madvise), "madvise" }, [221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, -[224] = { 0, 0, SEN(gettid), "gettid" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, [225] = { 5, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, [227] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -295,7 +295,7 @@ [268] = { 3, TS, SEN(tgkill), "tgkill" }, [269] = { 2, TF, SEN(utimes), "utimes" }, [270] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, -[271] = { 5, 0, SEN(printargs), "pciconfig_iobase" }, +[271] = { 3, 0, SEN(printargs), "pciconfig_iobase" }, [272] = { 5, 0, SEN(printargs), "pciconfig_read" }, [273] = { 5, 0, SEN(printargs), "pciconfig_write" }, [274] = { 4, 0, SEN(mq_open), "mq_open" }, @@ -326,17 +326,17 @@ [299] = { 3, TI, SEN(semget), "semget" }, [300] = { 4, TI, SEN(semctl), "semctl" }, [301] = { 4, TI, SEN(msgsnd), "msgsnd" }, -[302] = { 4, TI, SEN(msgrcv), "msgrcv" }, +[302] = { 5, TI, SEN(msgrcv), "msgrcv" }, [303] = { 2, TI, SEN(msgget), "msgget" }, -[304] = { 4, TI, SEN(msgctl), "msgctl" }, -[305] = { 4, TI|TM|SI, SEN(shmat), "shmat" }, -[306] = { 4, TI|TM|SI, SEN(shmdt), "shmdt" }, +[304] = { 3, TI, SEN(msgctl), "msgctl" }, +[305] = { 3, TI|TM|SI, SEN(shmat), "shmat" }, +[306] = { 1, TI|TM|SI, SEN(shmdt), "shmdt" }, [307] = { 3, TI, SEN(shmget), "shmget" }, -[308] = { 4, TI, SEN(shmctl), "shmctl" }, +[308] = { 3, TI, SEN(shmctl), "shmctl" }, [309] = { 5, 0, SEN(add_key), "add_key" }, [310] = { 4, 0, SEN(request_key), "request_key" }, [311] = { 5, 0, SEN(keyctl), "keyctl" }, -[312] = { 5, TI, SEN(semtimedop), "semtimedop" }, +[312] = { 4, TI, SEN(semtimedop), "semtimedop" }, [313] = { 5, 0, SEN(vserver), "vserver" }, [314] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, [315] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, @@ -344,8 +344,8 @@ [317] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [318] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, [319] = { 6, TM, SEN(mbind), "mbind" }, -[320] = { 3, TM, SEN(get_mempolicy), "get_mempolicy" }, -[321] = { 5, TM, SEN(set_mempolicy), "set_mempolicy" }, +[320] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" }, +[321] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" }, [322] = { 4, TD|TF, SEN(openat), "openat" }, [323] = { 3, TD|TF, SEN(mkdirat), "mkdirat" }, [324] = { 4, TD|TF, SEN(mknodat), "mknodat" }, @@ -374,7 +374,7 @@ [347] = { 4, 0, SEN(kexec_load), "kexec_load" }, [348] = { 4, TD|TF, SEN(utimensat), "utimensat" }, [349] = { 3, TD|TS, SEN(signalfd), "signalfd" }, -[350] = { 4, TD, SEN(timerfd_create), "timerfd_create" }, +[350] = { 2, TD, SEN(timerfd_create), "timerfd_create" }, [351] = { 1, TD, SEN(eventfd), "eventfd" }, [352] = { 6, TD, SEN(fallocate), "fallocate" }, [353] = { 4, TD, SEN(timerfd_settime), "timerfd_settime" }, @@ -415,7 +415,9 @@ [388] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [389] = { 2, 0, SEN(membarrier), "membarrier", }, [390] = { 3, TM, SEN(mlock2), "mlock2" }, -[391 ... 399] = { }, +[391] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[392] = { 6, TD, SEN(preadv2), "preadv2" }, +[393] = { 6, TD, SEN(pwritev2), "pwritev2" }, #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 400 diff -Nru strace-4.11/linux/avr32/syscallent.h strace-4.12/linux/avr32/syscallent.h --- strace-4.11/linux/avr32/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/avr32/syscallent.h 2016-04-20 17:15:05.000000000 +0000 @@ -32,7 +32,7 @@ [ 4] = { 3, TD, SEN(write), "write" }, [ 5] = { 3, TD|TF, SEN(open), "open" }, [ 6] = { 1, TD, SEN(close), "close" }, -[ 7] = { 1, 0, SEN(umask), "umask" }, +[ 7] = { 1, NF, SEN(umask), "umask" }, [ 8] = { 2, TD|TF, SEN(creat), "creat" }, [ 9] = { 2, TF, SEN(link), "link" }, [ 10] = { 1, TF, SEN(unlink), "unlink" }, @@ -45,7 +45,7 @@ [ 17] = { 3, TF, SEN(chown), "lchown" }, [ 18] = { 3, TD, SEN(lseek), "lseek" }, [ 19] = { 5, TD, SEN(llseek), "_llseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount2), "umount2" }, [ 23] = { 1, 0, SEN(setuid), "setuid" }, @@ -89,7 +89,7 @@ [ 61] = { 2, 0, SEN(setregid), "setregid" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 4, TS, SEN(rt_sigaction), "rt_sigaction" }, @@ -146,7 +146,7 @@ [118] = { 1, 0, SEN(getpgid), "getpgid" }, [119] = { 2, 0, SEN(bdflush), "bdflush" }, [120] = { 3, 0, SEN(sysfs), "sysfs" }, -[121] = { 1, 0, SEN(personality), "personality" }, +[121] = { 1, NF, SEN(personality), "personality" }, [122] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [123] = { 3, TD, SEN(getdents), "getdents" }, [124] = { 2, TD, SEN(flock), "flock" }, @@ -201,7 +201,7 @@ [173] = { 3, TM, SEN(madvise), "madvise" }, [174] = { 3, TD, SEN(getdents64), "getdents64" }, [175] = { 3, TD, SEN(fcntl64), "fcntl64" }, -[176] = { 0, 0, SEN(gettid), "gettid" }, +[176] = { 0, NF, SEN(gettid), "gettid" }, [177] = { 4, TD, SEN(readahead), "readahead" }, [178] = { 5, TF, SEN(setxattr), "setxattr" }, [179] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -305,7 +305,7 @@ [277] = { 3, TI, SEN(shmctl), "shmctl" }, [278] = { 4, TD|TF, SEN(utimensat), "utimensat" }, [279] = { 3, TD|TS, SEN(signalfd), "signalfd" }, -[280] = { 2, TD, SEN(timerfd), "timerfd" }, +[280] = { 4, TD, SEN(timerfd), "timerfd" }, [281] = { 1, TD, SEN(eventfd), "eventfd" }, [282] = { }, [283] = { 2, TD, SEN(setns), "setns" }, @@ -346,3 +346,8 @@ [318] = { 2, TD, SEN(memfd_create), "memfd_create", }, [319] = { 3, TD, SEN(bpf), "bpf", }, [320] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[321] = { 4, TN, SEN(accept4), "accept4" }, +[322] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, +[323] = { 2, 0, SEN(membarrier), "membarrier", }, +[324] = { 3, TM, SEN(mlock2), "mlock2" }, +[325] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, diff -Nru strace-4.11/linux/bfin/syscallent.h strace-4.12/linux/bfin/syscallent.h --- strace-4.11/linux/bfin/syscallent.h 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/linux/bfin/syscallent.h 2016-02-13 00:57:00.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -155,14 +155,14 @@ [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, [128] = { 3, 0, SEN(init_module), "init_module" }, -[129] = { 1, 0, SEN(delete_module), "delete_module" }, +[129] = { 2, 0, SEN(delete_module), "delete_module" }, [130] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [131] = { 4, TF, SEN(quotactl), "quotactl" }, [132] = { 1, 0, SEN(getpgid), "getpgid" }, [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -249,7 +249,7 @@ [220] = { 3, TD, SEN(getdents64), "getdents64" }, [221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, -[224] = { 0, 0, SEN(gettid), "gettid" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, [227] = { 5, TF, SEN(setxattr), "lsetxattr" }, diff -Nru strace-4.11/linux/dummy.h strace-4.12/linux/dummy.h --- strace-4.11/linux/dummy.h 2015-11-24 02:42:38.000000000 +0000 +++ strace-4.12/linux/dummy.h 2016-04-20 17:15:05.000000000 +0000 @@ -45,6 +45,9 @@ # endif # endif #endif +#ifdef ALPHA +# define sys_getdtablesize printargs +#endif /* like another call */ #define sys_acct sys_chdir @@ -95,7 +98,7 @@ #define sys_vfork sys_fork /* printargs does the right thing */ -#define sys_getpgid printargs +#define sys_getpgrp printargs #define sys_getpid printargs #define sys_getppid printargs #define sys_gettid printargs @@ -112,17 +115,20 @@ #define sys_setup printargs #define sys_socketcall printargs #define sys_sync printargs -#define sys_timer_delete printargs -#define sys_timer_getoverrun printargs +#define sys_syscall printargs #define sys_vhangup printargs -/* printargs_lu/ld does the right thing */ -#define sys_alarm printargs_lu -#define sys_getpgrp printargs_lu -#define sys_getsid printargs_lu -#define sys_nice printargs_ld -#define sys_setpgid printargs_lu -#define sys_setpgrp printargs_lu +/* printargs_u does the right thing */ +#define sys_alarm printargs_u + +/* printargs_d does the right thing */ +#define sys_getpgid printargs_d +#define sys_getsid printargs_d +#define sys_nice printargs_d +#define sys_setpgid printargs_d +#define sys_setpgrp printargs_d +#define sys_timer_delete printargs_d +#define sys_timer_getoverrun printargs_d /* unimplemented */ #define sys_afs_syscall printargs @@ -141,6 +147,7 @@ #define sys_query_module printargs #define sys_security printargs #define sys_stty printargs +#define sys_timerfd printargs #define sys_tuxcall printargs #define sys_ulimit printargs #define sys_ustat printargs diff -Nru strace-4.11/linux/hppa/errnoent.h strace-4.12/linux/hppa/errnoent.h --- strace-4.11/linux/hppa/errnoent.h 2015-02-23 13:29:17.000000000 +0000 +++ strace-4.12/linux/hppa/errnoent.h 2016-04-20 21:36:46.000000000 +0000 @@ -128,7 +128,7 @@ [249] = "ELOOP", [251] = "ENOSYS", [252] = "ENOTSUP", -[253] = "ECANCELLED", +[253] = "ECANCELED", [254] = "EOWNERDEAD", [255] = "ENOTRECOVERABLE", [256] = "ERFKILL", diff -Nru strace-4.11/linux/hppa/syscallent.h strace-4.12/linux/hppa/syscallent.h --- strace-4.11/linux/hppa/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/hppa/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -22,7 +22,7 @@ [ 17] = { 3, TN, SEN(socket), "socket" }, [ 18] = { 2, TF, SEN(stat), "stat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 3, TN, SEN(bind), "bind" }, [ 23] = { 1, 0, SEN(setuid), "setuid" }, @@ -62,11 +62,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 4, TN, SEN(send), "send" }, [ 59] = { 1, 0, SEN(uname), "uname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 2, TF, SEN(pivotroot), "pivot_root" }, @@ -130,7 +130,7 @@ [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, -[128] = { 4, 0, SEN(init_module), "init_module" }, +[128] = { 3, 0, SEN(init_module), "init_module" }, [129] = { 2, 0, SEN(delete_module), "delete_module" }, [130] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [131] = { 4, TF, SEN(quotactl), "quotactl" }, @@ -138,7 +138,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid), "setfsgid" }, @@ -155,11 +155,11 @@ [150] = { 2, TM, SEN(mlock), "mlock" }, [151] = { 2, TM, SEN(munlock), "munlock" }, [152] = { 1, TM, SEN(mlockall), "mlockall" }, -[153] = { 1, TM, SEN(munlockall), "munlockall" }, +[153] = { 0, TM, SEN(munlockall), "munlockall" }, [154] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, [155] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, [156] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, -[157] = { 2, 0, SEN(sched_getscheduler), "sched_getscheduler" }, +[157] = { 1, 0, SEN(sched_getscheduler), "sched_getscheduler" }, [158] = { 0, 0, SEN(sched_yield), "sched_yield" }, [159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"}, [160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"}, @@ -208,7 +208,7 @@ [203] = { 5, 0, SEN(printargs), "attrctl" }, [204] = { 5, 0, SEN(printargs), "acl_get" }, [205] = { 5, 0, SEN(printargs), "acl_set" }, -[206] = { 0, 0, SEN(gettid), "gettid" }, +[206] = { 0, NF, SEN(gettid), "gettid" }, [207] = { 4, TD, SEN(readahead), "readahead" }, [208] = { 2, TS, SEN(kill), "tkill" }, [209] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, @@ -221,7 +221,7 @@ [216] = { 1, 0, SEN(io_destroy), "io_destroy" }, [217] = { 5, 0, SEN(io_getevents), "io_getevents" }, [218] = { 3, 0, SEN(io_submit), "io_submit" }, -[219] = { 4, 0, SEN(io_cancel), "io_cancel" }, +[219] = { 3, 0, SEN(io_cancel), "io_cancel" }, [220] = { 5, 0, SEN(printargs), "alloc_hugepages" }, [221] = { 1, 0, SEN(printargs), "free_hugepages" }, [222] = { 1, TP|SE, SEN(exit), "exit_group" }, @@ -239,19 +239,19 @@ [234] = { 3, 0, SEN(mq_getsetattr), "mq_getsetattr" }, [235] = { 5, TP, SEN(waitid), "waitid" }, [236] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, -[237] = { 5, 0, SEN(set_tid_address), "set_tid_address" }, +[237] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, [238] = { 5, TF, SEN(setxattr), "setxattr" }, [239] = { 5, TF, SEN(setxattr), "lsetxattr" }, [240] = { 5, TD, SEN(fsetxattr), "fsetxattr" }, [241] = { 4, TF, SEN(getxattr), "getxattr" }, [242] = { 4, TF, SEN(getxattr), "lgetxattr" }, [243] = { 4, TD, SEN(fgetxattr), "fgetxattr" }, -[244] = { 5, TF, SEN(listxattr), "listxattr" }, -[245] = { 5, TF, SEN(listxattr), "llistxattr" }, -[246] = { 5, TD, SEN(flistxattr), "flistxattr" }, -[247] = { 5, TF, SEN(removexattr), "removexattr" }, -[248] = { 5, TF, SEN(removexattr), "lremovexattr" }, -[249] = { 5, TD, SEN(fremovexattr), "fremovexattr" }, +[244] = { 3, TF, SEN(listxattr), "listxattr" }, +[245] = { 3, TF, SEN(listxattr), "llistxattr" }, +[246] = { 3, TD, SEN(flistxattr), "flistxattr" }, +[247] = { 2, TF, SEN(removexattr), "removexattr" }, +[248] = { 2, TF, SEN(removexattr), "lremovexattr" }, +[249] = { 2, TD, SEN(fremovexattr), "fremovexattr" }, [250] = { 3, 0, SEN(timer_create), "timer_create" }, [251] = { 4, 0, SEN(timer_settime), "timer_settime" }, [252] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, @@ -348,3 +348,6 @@ [343] = { 2, 0, SEN(membarrier), "membarrier", }, [344] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [345] = { 3, TM, SEN(mlock2), "mlock2" }, +[346] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[347] = { 6, TD, SEN(preadv2), "preadv2" }, +[348] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff -Nru strace-4.11/linux/i386/syscallent.h strace-4.12/linux/i386/syscallent.h --- strace-4.11/linux/i386/syscallent.h 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/linux/i386/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -116,7 +116,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(old_mmap), "mmap" }, +[ 90] = { 1, TD|TM|SI, SEN(old_mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -249,7 +249,7 @@ [220] = { 3, TD, SEN(getdents64), "getdents64" }, [221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, -[224] = { 0, 0, SEN(gettid), "gettid" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, [227] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -402,7 +402,9 @@ [374] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [375] = { 2, 0, SEN(membarrier), "membarrier", }, [376] = { 3, TM, SEN(mlock2), "mlock2" }, -[377 ... 399] = { }, +[377] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[378] = { 6, TD, SEN(preadv2), "preadv2" }, +[379] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/ia64/get_error.c strace-4.12/linux/ia64/get_error.c --- strace-4.11/linux/ia64/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/ia64/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -10,7 +10,7 @@ tcp->u_rval = err; } } else { - if (check_errno && ia64_regs.gr[10]) { + if (ia64_regs.gr[10]) { tcp->u_rval = -1; tcp->u_error = ia64_regs.gr[8]; } else { diff -Nru strace-4.11/linux/ia64/syscallent.h strace-4.12/linux/ia64/syscallent.h --- strace-4.11/linux/ia64/syscallent.h 2015-12-18 20:55:40.000000000 +0000 +++ strace-4.12/linux/ia64/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -57,8 +57,8 @@ [1038] = { 2, TF, SEN(chmod), "chmod" }, [1039] = { 3, TF, SEN(chown), "chown" }, [1040] = { 3, TD, SEN(lseek), "lseek" }, -[1041] = { 0, 0, SEN(getpid), "getpid" }, -[1042] = { 0, 0, SEN(getppid), "getppid" }, +[1041] = { 0, NF, SEN(getpid), "getpid" }, +[1042] = { 0, NF, SEN(getppid), "getppid" }, [1043] = { 5, TF, SEN(mount), "mount" }, [1044] = { 2, TF, SEN(umount2), "umount" }, [1045] = { 1, 0, SEN(setuid), "setuid" }, @@ -74,7 +74,7 @@ [1055] = { 2, TF, SEN(mkdir), "mkdir" }, [1056] = { 1, TF, SEN(rmdir), "rmdir" }, [1057] = { 1, TD, SEN(dup), "dup" }, -[1058] = { 1, TD, SEN(pipe), "pipe" }, +[1058] = { 0, TD, SEN(pipe), "pipe" }, [1059] = { 1, 0, SEN(times), "times" }, [1060] = { 1, TM|SI, SEN(brk), "brk" }, [1061] = { 1, 0, SEN(setgid), "setgid" }, @@ -83,7 +83,7 @@ [1064] = { 1, TF, SEN(acct), "acct" }, [1065] = { 3, TD, SEN(ioctl), "ioctl" }, [1066] = { 3, TD, SEN(fcntl), "fcntl" }, -[1067] = { 1, 0, SEN(umask), "umask" }, +[1067] = { 1, NF, SEN(umask), "umask" }, [1068] = { 1, TF, SEN(chroot), "chroot" }, [1069] = { 2, 0, SEN(ustat), "ustat" }, [1070] = { 2, TD, SEN(dup2), "dup2" }, @@ -121,7 +121,7 @@ [1102] = { 3, 0, SEN(setpriority), "setpriority" }, [1103] = { 2, TF, SEN(statfs), "statfs" }, [1104] = { 2, TD, SEN(fstatfs), "fstatfs" }, -[1105] = { 3, 0, SEN(gettid), "gettid" }, +[1105] = { 0, NF, SEN(gettid), "gettid" }, [1106] = { 3, TI, SEN(semget), "semget" }, [1107] = { 3, TI, SEN(semop), "semop" }, [1108] = { 4, TI, SEN(semctl), "semctl" }, @@ -149,21 +149,21 @@ [1130] = { 1, 0, SEN(uname), "uname" }, [1131] = { 1, 0, SEN(adjtimex), "adjtimex" }, [1132] = { 2, 0, SEN(create_module), "create_module" }, -[1133] = { 4, 0, SEN(init_module), "init_module" }, +[1133] = { 3, 0, SEN(init_module), "init_module" }, [1134] = { 2, 0, SEN(delete_module), "delete_module" }, [1135] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [1136] = { 5, 0, SEN(query_module), "query_module" }, [1137] = { 4, TF, SEN(quotactl), "quotactl" }, [1138] = { 2, 0, SEN(bdflush), "bdflush" }, [1139] = { 3, 0, SEN(sysfs), "sysfs" }, -[1140] = { 1, 0, SEN(personality), "personality" }, +[1140] = { 1, NF, SEN(personality), "personality" }, [1141] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [1142] = { 1, NF, SEN(setfsuid), "setfsuid" }, [1143] = { 1, NF, SEN(setfsgid), "setfsgid" }, [1144] = { 3, TD, SEN(getdents), "getdents" }, [1145] = { 2, TD, SEN(flock), "flock" }, -[1146] = { 5, TD, SEN(readv), "readv" }, -[1147] = { 5, TD, SEN(writev), "writev" }, +[1146] = { 3, TD, SEN(readv), "readv" }, +[1147] = { 3, TD, SEN(writev), "writev" }, [1148] = { 4, TD, SEN(pread), "pread64" }, [1149] = { 4, TD, SEN(pwrite), "pwrite64" }, [1150] = { 1, 0, SEN(printargs), "_sysctl" }, @@ -178,7 +178,7 @@ [1159] = { 0, TM, SEN(munlockall), "munlockall" }, [1160] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, [1161] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, -[1162] = { 2, 0, SEN(sched_getscheduler), "sched_getscheduler" }, +[1162] = { 1, 0, SEN(sched_getscheduler), "sched_getscheduler" }, [1163] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, [1164] = { 0, 0, SEN(sched_yield), "sched_yield" }, [1165] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"}, @@ -273,8 +273,8 @@ [1254] = { 2, 0, SEN(clock_gettime), "clock_gettime" }, [1255] = { 2, 0, SEN(clock_getres), "clock_getres" }, [1256] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, -[1257] = { MA, 0, SEN(printargs), "fstatfs64" }, -[1258] = { MA, 0, SEN(printargs), "statfs64" }, +[1257] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, +[1258] = { 3, TF, SEN(statfs64), "statfs64" }, [1259] = { 6, TM, SEN(mbind), "mbind" }, [1260] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" }, [1261] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" }, @@ -363,3 +363,6 @@ [1344] = { 2, 0, SEN(membarrier), "membarrier", }, [1345] = { 5, 0, SEN(kcmp), "kcmp" }, [1346] = { 3, TM, SEN(mlock2), "mlock2" }, +[1347] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[1348] = { 6, TD, SEN(preadv2), "preadv2" }, +[1349] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff -Nru strace-4.11/linux/m68k/syscallent.h strace-4.12/linux/m68k/syscallent.h --- strace-4.11/linux/m68k/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/m68k/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -246,7 +246,7 @@ [217] = { 2, TF, SEN(pivotroot), "pivot_root" }, [218 ... 219] = { }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 0, 0, SEN(gettid), "gettid" }, +[221] = { 0, NF, SEN(gettid), "gettid" }, [222] = { 2, TS, SEN(kill), "tkill" }, [223] = { 5, TF, SEN(setxattr), "setxattr" }, [224] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -305,7 +305,7 @@ [277] = { 5, TP, SEN(waitid), "waitid" }, [278] = { 5, 0, SEN(vserver), "vserver" }, [279] = { 5, 0, SEN(add_key), "add_key" }, -[280] = { 5, 0, SEN(request_key), "request_key" }, +[280] = { 4, 0, SEN(request_key), "request_key" }, [281] = { 5, 0, SEN(keyctl), "keyctl" }, [282] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, [283] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, @@ -401,7 +401,9 @@ [373] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [374] = { 2, 0, SEN(membarrier), "membarrier", }, [375] = { 3, TM, SEN(mlock2), "mlock2" }, -[376 ... 399] = { }, +[376] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[377] = { 6, TD, SEN(preadv2), "preadv2" }, +[378] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/metag/syscallent.h strace-4.12/linux/metag/syscallent.h --- strace-4.11/linux/metag/syscallent.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/metag/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,7 +1,6 @@ #include "32/syscallent.h" -[244] = { }, +/* [244 ... 259] are arch specific */ [245] = { 2, 0, SEN(printargs), "metag_setglobalbit" }, [246] = { 1, 0, SEN(printargs), "metag_set_fpu_flags" }, [247] = { 1, 0, SEN(printargs), "metag_set_tls" }, [248] = { 0, NF, SEN(printargs), "metag_get_tls" }, -[249 ... 259] = { }, diff -Nru strace-4.11/linux/microblaze/syscallent.h strace-4.12/linux/microblaze/syscallent.h --- strace-4.11/linux/microblaze/syscallent.h 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/linux/microblaze/syscallent.h 2016-02-13 00:57:00.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -146,7 +146,7 @@ [117] = { 6, TI, SEN(ipc), "ipc" }, [118] = { 1, TD, SEN(fsync), "fsync" }, [119] = { 0, TS, SEN(sigreturn), "sigreturn" }, -[120] = { 5, TP, SEN(clone), "clone" }, +[120] = { 6, TP, SEN(clone), "clone" }, [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -249,7 +249,7 @@ [220] = { 3, TD, SEN(getdents64), "getdents64" }, [221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, -[224] = { 0, 0, SEN(gettid), "gettid" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, [227] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -294,7 +294,7 @@ [266] = { 2, 0, SEN(clock_getres), "clock_getres" }, [267] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, [268] = { 3, TF, SEN(statfs64), "statfs64" }, -[269] = { 2, TD, SEN(fstatfs64), "fstatfs64" }, +[269] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, [270] = { 3, TS, SEN(tgkill), "tgkill" }, [271] = { 2, TF, SEN(utimes), "utimes" }, [272] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, @@ -341,7 +341,7 @@ [313] = { 6, TD, SEN(splice), "splice" }, [314] = { 6, TD, SEN(sync_file_range), "sync_file_range" }, [315] = { 4, TD, SEN(tee), "tee" }, -[316] = { 5, TD, SEN(vmsplice), "vmsplice" }, +[316] = { 4, TD, SEN(vmsplice), "vmsplice" }, [317] = { 6, TM, SEN(move_pages), "move_pages" }, [318] = { 3, 0, SEN(getcpu), "getcpu" }, [319] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, diff -Nru strace-4.11/linux/mips/get_error.c strace-4.12/linux/mips/get_error.c --- strace-4.11/linux/mips/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/mips/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -1,7 +1,7 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && mips_REG_A3) { + if (mips_REG_A3) { tcp->u_rval = -1; tcp->u_error = mips_REG_V0; } else { diff -Nru strace-4.11/linux/mips/syscallent-compat.h strace-4.12/linux/mips/syscallent-compat.h --- strace-4.11/linux/mips/syscallent-compat.h 2015-07-21 19:09:35.000000000 +0000 +++ strace-4.12/linux/mips/syscallent-compat.h 2016-04-29 21:51:00.000000000 +0000 @@ -149,8 +149,6 @@ [ 207] = { 0, 0, SEN(printargs), "svr4_areadv" }, [ 208] = { 0, 0, SEN(printargs), "svr4_awritev" }, -[209 ... 999] = { }, /* end of SVR4 */ - [1000] = { 0, 0, SEN(printargs), "sysv_syscall" }, /* start of SYSV */ [1001] = { 0, 0, SEN(printargs), "sysv_exit" }, [1002] = { 0, 0, SEN(printargs), "sysv_fork" }, @@ -336,8 +334,6 @@ [1187] = { 0, 0, SEN(printargs), "sysv_pread" }, [1188] = { 0, 0, SEN(printargs), "sysv_pwrite" }, -[1189 ... 1999] = { }, /* end of SYSV */ - [2000] = { 0, 0, SEN(printargs), "bsd43_syscall" }, /* start of BSD 4.3 */ [2001] = { 0, 0, SEN(printargs), "bsd43_exit" }, [2002] = { 0, 0, SEN(printargs), "bsd43_fork" }, @@ -531,8 +527,6 @@ [2190] = { 0, 0, SEN(printargs), "bsd43_areadv" }, [2191] = { 0, 0, SEN(printargs), "bsd43_awritev" }, -[2192 ... 2999] = { }, /* end of BSD 4.3 */ - [3000] = { 0, 0, SEN(printargs), "posix_syscall" }, /* start of POSIX */ [3001] = { 0, 0, SEN(printargs), "posix_exit" }, [3002] = { 0, 0, SEN(printargs), "posix_fork" }, @@ -704,5 +698,3 @@ [3266] = { 0, 0, SEN(printargs), "posix_sigprocmask" }, [3267] = { 0, 0, SEN(printargs), "posix_sigsuspend" }, [3268] = { 0, 0, SEN(printargs), "posix_sigaction" }, - -[3269 ... 3999] = { }, /* end of POSIX */ diff -Nru strace-4.11/linux/mips/syscallent-n32.h strace-4.12/linux/mips/syscallent-n32.h --- strace-4.11/linux/mips/syscallent-n32.h 2015-12-08 22:35:26.000000000 +0000 +++ strace-4.12/linux/mips/syscallent-n32.h 2016-05-11 00:58:06.000000000 +0000 @@ -21,7 +21,7 @@ [6018] = { 3, TD, SEN(readv), "readv" }, [6019] = { 3, TD, SEN(writev), "writev" }, [6020] = { 2, TF, SEN(access), "access" }, -[6021] = { 1, TD, SEN(pipe), "pipe" }, +[6021] = { 0, TD, SEN(pipe), "pipe" }, [6022] = { 5, TD, SEN(select), "_newselect" }, [6023] = { 0, 0, SEN(sched_yield), "sched_yield" }, [6024] = { 5, TM|SI, SEN(mremap), "mremap" }, @@ -38,7 +38,7 @@ [6035] = { 2, 0, SEN(getitimer), "getitimer" }, [6036] = { 3, 0, SEN(setitimer), "setitimer" }, [6037] = { 1, 0, SEN(alarm), "alarm" }, -[6038] = { 0, 0, SEN(getpid), "getpid" }, +[6038] = { 0, NF, SEN(getpid), "getpid" }, [6039] = { 4, TD|TN, SEN(sendfile), "sendfile" }, [6040] = { 3, TN, SEN(socket), "socket" }, [6041] = { 3, TN, SEN(connect), "connect" }, @@ -93,7 +93,7 @@ [6090] = { 3, TF, SEN(chown), "chown" }, [6091] = { 3, TD, SEN(fchown), "fchown" }, [6092] = { 3, TF, SEN(chown), "lchown" }, -[6093] = { 1, 0, SEN(umask), "umask" }, +[6093] = { 1, NF, SEN(umask), "umask" }, [6094] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [6095] = { 2, 0, SEN(getrlimit), "getrlimit" }, [6096] = { 2, 0, SEN(getrusage), "getrusage" }, @@ -108,7 +108,7 @@ [6105] = { 0, NF, SEN(geteuid), "geteuid" }, [6106] = { 0, NF, SEN(getegid), "getegid" }, [6107] = { 2, 0, SEN(setpgid), "setpgid" }, -[6108] = { 0, 0, SEN(getppid), "getppid" }, +[6108] = { 0, NF, SEN(getppid), "getppid" }, [6109] = { 0, 0, SEN(getpgrp), "getpgrp" }, [6110] = { 0, 0, SEN(setsid), "setsid" }, [6111] = { 2, 0, SEN(setreuid), "setreuid" }, @@ -119,7 +119,7 @@ [6116] = { 3, 0, SEN(getresuid), "getresuid" }, [6117] = { 3, 0, SEN(setresgid), "setresgid" }, [6118] = { 3, 0, SEN(getresgid), "getresgid" }, -[6119] = { 0, 0, SEN(getpgid), "getpgid" }, +[6119] = { 1, 0, SEN(getpgid), "getpgid" }, [6120] = { 1, NF, SEN(setfsuid), "setfsuid" }, [6121] = { 1, NF, SEN(setfsgid), "setfsgid" }, [6122] = { 1, 0, SEN(getsid), "getsid" }, @@ -132,10 +132,10 @@ [6129] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, [6130] = { 2, TF, SEN(utime), "utime" }, [6131] = { 3, TF, SEN(mknod), "mknod" }, -[6132] = { 1, 0, SEN(personality), "personality" }, +[6132] = { 1, NF, SEN(personality), "personality" }, [6133] = { 2, 0, SEN(ustat), "ustat" }, -[6134] = { 3, TF, SEN(statfs), "statfs" }, -[6135] = { 3, TD, SEN(fstatfs), "fstatfs" }, +[6134] = { 2, TF, SEN(statfs), "statfs" }, +[6135] = { 2, TD, SEN(fstatfs), "fstatfs" }, [6136] = { 3, 0, SEN(sysfs), "sysfs" }, [6137] = { 2, 0, SEN(getpriority), "getpriority" }, [6138] = { 3, 0, SEN(setpriority), "setpriority" }, @@ -168,8 +168,8 @@ [6165] = { 2, 0, SEN(sethostname), "sethostname" }, [6166] = { 2, 0, SEN(setdomainname), "setdomainname" }, [6167] = { 2, 0, SEN(create_module), "create_module" }, -[6168] = { 4, 0, SEN(init_module), "init_module" }, -[6169] = { 1, 0, SEN(delete_module), "delete_module" }, +[6168] = { 3, 0, SEN(init_module), "init_module" }, +[6169] = { 2, 0, SEN(delete_module), "delete_module" }, [6170] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [6171] = { 5, 0, SEN(query_module), "query_module" }, [6172] = { 4, TF, SEN(quotactl), "quotactl" }, @@ -178,7 +178,7 @@ [6175] = { 5, TN, SEN(putpmsg), "putpmsg" }, [6176] = { 0, 0, SEN(afs_syscall), "afs_syscall" }, [6177] = { 0, 0, SEN(printargs), "reserved177" }, -[6178] = { 0, 0, SEN(gettid), "gettid" }, +[6178] = { 0, NF, SEN(gettid), "gettid" }, [6179] = { 3, TD, SEN(readahead), "readahead" }, [6180] = { 5, TF, SEN(setxattr), "setxattr" }, [6181] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -324,7 +324,9 @@ [6321] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [6322] = { 2, 0, SEN(membarrier), "membarrier", }, [6323] = { 3, TM, SEN(mlock2), "mlock2" }, -[6324 ... 6399] = { }, +[6324] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[6325] = { 6, TD, SEN(preadv2), "preadv2" }, +[6326] = { 6, TD, SEN(pwritev2), "pwritev2" }, # define SYS_socket_subcall 6400 # include "subcall.h" diff -Nru strace-4.11/linux/mips/syscallent-n64.h strace-4.12/linux/mips/syscallent-n64.h --- strace-4.11/linux/mips/syscallent-n64.h 2015-12-08 22:35:26.000000000 +0000 +++ strace-4.12/linux/mips/syscallent-n64.h 2016-05-11 00:58:06.000000000 +0000 @@ -21,7 +21,7 @@ [5018] = { 3, TD, SEN(readv), "readv" }, [5019] = { 3, TD, SEN(writev), "writev" }, [5020] = { 2, TF, SEN(access), "access" }, -[5021] = { 1, TD, SEN(pipe), "pipe" }, +[5021] = { 0, TD, SEN(pipe), "pipe" }, [5022] = { 5, TD, SEN(select), "_newselect" }, [5023] = { 0, 0, SEN(sched_yield), "sched_yield" }, [5024] = { 5, TM|SI, SEN(mremap), "mremap" }, @@ -38,7 +38,7 @@ [5035] = { 2, 0, SEN(getitimer), "getitimer" }, [5036] = { 3, 0, SEN(setitimer), "setitimer" }, [5037] = { 1, 0, SEN(alarm), "alarm" }, -[5038] = { 0, 0, SEN(getpid), "getpid" }, +[5038] = { 0, NF, SEN(getpid), "getpid" }, [5039] = { 4, TD|TN, SEN(sendfile), "sendfile" }, [5040] = { 3, TN, SEN(socket), "socket" }, [5041] = { 3, TN, SEN(connect), "connect" }, @@ -93,7 +93,7 @@ [5090] = { 3, TF, SEN(chown), "chown" }, [5091] = { 3, TD, SEN(fchown), "fchown" }, [5092] = { 3, TF, SEN(chown), "lchown" }, -[5093] = { 1, 0, SEN(umask), "umask" }, +[5093] = { 1, NF, SEN(umask), "umask" }, [5094] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [5095] = { 2, 0, SEN(getrlimit), "getrlimit" }, [5096] = { 2, 0, SEN(getrusage), "getrusage" }, @@ -108,7 +108,7 @@ [5105] = { 0, NF, SEN(geteuid), "geteuid" }, [5106] = { 0, NF, SEN(getegid), "getegid" }, [5107] = { 2, 0, SEN(setpgid), "setpgid" }, -[5108] = { 0, 0, SEN(getppid), "getppid" }, +[5108] = { 0, NF, SEN(getppid), "getppid" }, [5109] = { 0, 0, SEN(getpgrp), "getpgrp" }, [5110] = { 0, 0, SEN(setsid), "setsid" }, [5111] = { 2, 0, SEN(setreuid), "setreuid" }, @@ -119,7 +119,7 @@ [5116] = { 3, 0, SEN(getresuid), "getresuid" }, [5117] = { 3, 0, SEN(setresgid), "setresgid" }, [5118] = { 3, 0, SEN(getresgid), "getresgid" }, -[5119] = { 0, 0, SEN(getpgid), "getpgid" }, +[5119] = { 1, 0, SEN(getpgid), "getpgid" }, [5120] = { 1, NF, SEN(setfsuid), "setfsuid" }, [5121] = { 1, NF, SEN(setfsgid), "setfsgid" }, [5122] = { 1, 0, SEN(getsid), "getsid" }, @@ -132,10 +132,10 @@ [5129] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, [5130] = { 2, TF, SEN(utime), "utime" }, [5131] = { 3, TF, SEN(mknod), "mknod" }, -[5132] = { 1, 0, SEN(personality), "personality" }, +[5132] = { 1, NF, SEN(personality), "personality" }, [5133] = { 2, 0, SEN(ustat), "ustat" }, -[5134] = { 3, TF, SEN(statfs), "statfs" }, -[5135] = { 3, TD, SEN(fstatfs), "fstatfs" }, +[5134] = { 2, TF, SEN(statfs), "statfs" }, +[5135] = { 2, TD, SEN(fstatfs), "fstatfs" }, [5136] = { 3, 0, SEN(sysfs), "sysfs" }, [5137] = { 2, 0, SEN(getpriority), "getpriority" }, [5138] = { 3, 0, SEN(setpriority), "setpriority" }, @@ -168,8 +168,8 @@ [5165] = { 2, 0, SEN(sethostname), "sethostname" }, [5166] = { 2, 0, SEN(setdomainname), "setdomainname" }, [5167] = { 2, 0, SEN(create_module), "create_module" }, -[5168] = { 4, 0, SEN(init_module), "init_module" }, -[5169] = { 1, 0, SEN(delete_module), "delete_module" }, +[5168] = { 3, 0, SEN(init_module), "init_module" }, +[5169] = { 2, 0, SEN(delete_module), "delete_module" }, [5170] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, [5171] = { 5, 0, SEN(query_module), "query_module" }, [5172] = { 4, TF, SEN(quotactl), "quotactl" }, @@ -178,7 +178,7 @@ [5175] = { 5, TN, SEN(putpmsg), "putpmsg" }, [5176] = { 0, 0, SEN(afs_syscall), "afs_syscall" }, [5177] = { 0, 0, SEN(printargs), "reserved177" }, -[5178] = { 0, 0, SEN(gettid), "gettid" }, +[5178] = { 0, NF, SEN(gettid), "gettid" }, [5179] = { 3, TD, SEN(readahead), "readahead" }, [5180] = { 5, TF, SEN(setxattr), "setxattr" }, [5181] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -215,7 +215,7 @@ [5212] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, [5213] = { 0, 0, SEN(restart_syscall), "restart_syscall" }, [5214] = { 4, TI, SEN(semtimedop), "semtimedop" }, -[5215] = { 4, TD, SEN(fadvise64_64), "fadvise64" }, +[5215] = { 4, TD, SEN(fadvise64), "fadvise64" }, [5216] = { 3, 0, SEN(timer_create), "timer_create" }, [5217] = { 4, 0, SEN(timer_settime), "timer_settime" }, [5218] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, @@ -320,16 +320,15 @@ [5317] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [5318] = { 2, 0, SEN(membarrier), "membarrier", }, [5319] = { 3, TM, SEN(mlock2), "mlock2" }, -[5320 ... 5399] = { }, +[5320] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[5321] = { 6, TD, SEN(preadv2), "preadv2" }, +[5322] = { 6, TD, SEN(pwritev2), "pwritev2" }, # define SYS_socket_subcall 5400 # include "subcall.h" -/* end of Linux N64 */ [SYS_socket_subcall + SYS_socket_nsubcalls + SYS_ipc_nsubcalls ... 5999] = { }, - #else # include "syscallent-n64-stub.h" -/* end of Linux N64 */ [5400 ... 5999] = { }, #endif diff -Nru strace-4.11/linux/mips/syscallent-o32.h strace-4.12/linux/mips/syscallent-o32.h --- strace-4.11/linux/mips/syscallent-o32.h 2015-12-08 22:35:26.000000000 +0000 +++ strace-4.12/linux/mips/syscallent-o32.h 2016-05-11 00:58:06.000000000 +0000 @@ -20,7 +20,7 @@ [4017] = { 0, TM, SEN(break), "break" }, [4018] = { 2, TF, SEN(oldstat), "oldstat" }, [4019] = { 3, TD, SEN(lseek), "lseek" }, -[4020] = { 0, 0, SEN(getpid), "getpid" }, +[4020] = { 0, NF, SEN(getpid), "getpid" }, [4021] = { 5, TF, SEN(mount), "mount" }, [4022] = { 1, TF, SEN(umount), "umount" }, [4023] = { 1, 0, SEN(setuid), "setuid" }, @@ -42,13 +42,13 @@ [4039] = { 2, TF, SEN(mkdir), "mkdir" }, [4040] = { 1, TF, SEN(rmdir), "rmdir" }, [4041] = { 1, TD, SEN(dup), "dup" }, -[4042] = { 1, TD, SEN(pipe), "pipe" }, +[4042] = { 0, TD, SEN(pipe), "pipe" }, [4043] = { 1, 0, SEN(times), "times" }, [4044] = { 0, 0, SEN(prof), "prof" }, [4045] = { 1, TM|SI, SEN(brk), "brk" }, [4046] = { 1, 0, SEN(setgid), "setgid" }, [4047] = { 0, NF, SEN(getgid), "getgid" }, -[4048] = { 1, TS, SEN(signal), "signal" }, +[4048] = { 2, TS, SEN(signal), "signal" }, [4049] = { 0, NF, SEN(geteuid), "geteuid" }, [4050] = { 0, NF, SEN(getegid), "getegid" }, [4051] = { 1, TF, SEN(acct), "acct" }, @@ -60,11 +60,11 @@ [4057] = { 2, 0, SEN(setpgid), "setpgid" }, [4058] = { 0, 0, SEN(ulimit), "ulimit" }, [4059] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[4060] = { 1, 0, SEN(umask), "umask" }, +[4060] = { 1, NF, SEN(umask), "umask" }, [4061] = { 1, TF, SEN(chroot), "chroot" }, [4062] = { 2, 0, SEN(ustat), "ustat" }, [4063] = { 2, TD, SEN(dup2), "dup2" }, -[4064] = { 0, 0, SEN(getppid), "getppid" }, +[4064] = { 0, NF, SEN(getppid), "getppid" }, [4065] = { 0, 0, SEN(getpgrp), "getpgrp" }, [4066] = { 0, 0, SEN(setsid), "setsid" }, [4067] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -99,9 +99,9 @@ [4096] = { 2, 0, SEN(getpriority), "getpriority" }, [4097] = { 3, 0, SEN(setpriority), "setpriority" }, [4098] = { 0, 0, SEN(profil), "profil" }, -[4099] = { 3, TF, SEN(statfs), "statfs" }, -[4100] = { 3, TD, SEN(fstatfs), "fstatfs" }, -[4101] = { 0, 0, SEN(ioperm), "ioperm" }, +[4099] = { 2, TF, SEN(statfs), "statfs" }, +[4100] = { 2, TD, SEN(fstatfs), "fstatfs" }, +[4101] = { 3, 0, SEN(ioperm), "ioperm" }, [4102] = { 2, TD, SEN(socketcall), "socketcall" }, [4103] = { 3, 0, SEN(syslog), "syslog" }, [4104] = { 3, 0, SEN(setitimer), "setitimer" }, @@ -110,7 +110,7 @@ [4107] = { 2, TF, SEN(lstat), "lstat" }, [4108] = { 2, TD, SEN(fstat), "fstat" }, [4109] = { 1, 0, SEN(olduname), "olduname" }, -[4110] = { 0, 0, SEN(iopl), "iopl" }, +[4110] = { 1, 0, SEN(iopl), "iopl" }, [4111] = { 0, 0, SEN(vhangup), "vhangup" }, [4112] = { 0, 0, SEN(idle), "idle" }, [4113] = { 5, 0, SEN(vm86old), "vm86" }, @@ -136,7 +136,7 @@ [4133] = { 1, TD, SEN(fchdir), "fchdir" }, [4134] = { 2, 0, SEN(bdflush), "bdflush" }, [4135] = { 3, 0, SEN(sysfs), "sysfs" }, -[4136] = { 1, 0, SEN(personality), "personality" }, +[4136] = { 1, NF, SEN(personality), "personality" }, [4137] = { 0, 0, SEN(afs_syscall), "afs_syscall" }, [4138] = { 1, NF, SEN(setfsuid), "setfsuid" }, [4139] = { 1, NF, SEN(setfsgid), "setfsgid" }, @@ -222,7 +222,7 @@ [4219] = { 3, TD, SEN(getdents64), "getdents64" }, [4220] = { 3, TD, SEN(fcntl64), "fcntl64" }, [4221] = { }, -[4222] = { 0, 0, SEN(gettid), "gettid" }, +[4222] = { 0, NF, SEN(gettid), "gettid" }, [4223] = { 5, TD, SEN(readahead), "readahead" }, [4224] = { 5, TF, SEN(setxattr), "setxattr" }, [4225] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -256,7 +256,7 @@ [4253] = { 0, 0, SEN(restart_syscall), "restart_syscall" }, [4254] = { 7, TD, SEN(fadvise64_64), "fadvise64" }, [4255] = { 3, TF, SEN(statfs64), "statfs64" }, -[4256] = { 2, TD, SEN(fstatfs64), "fstatfs64" }, +[4256] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, [4257] = { 3, 0, SEN(timer_create), "timer_create" }, [4258] = { 4, 0, SEN(timer_settime), "timer_settime" }, [4259] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, @@ -360,16 +360,15 @@ [4357] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [4358] = { 2, 0, SEN(membarrier), "membarrier", }, [4359] = { 3, TM, SEN(mlock2), "mlock2" }, -[4360 ... 4399] = { }, +[4360] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[4361] = { 6, TD, SEN(preadv2), "preadv2" }, +[4362] = { 6, TD, SEN(pwritev2), "pwritev2" }, # define SYS_socket_subcall 4400 # include "subcall.h" -/* end of Linux o32 */ [SYS_socket_subcall + SYS_socket_nsubcalls + SYS_ipc_nsubcalls ... 4999] = { }, - #else # include "syscallent-o32-stub.h" -/* end of Linux o32 */ [4400 ... 4999] = { }, #endif diff -Nru strace-4.11/linux/netlink_diag.h strace-4.12/linux/netlink_diag.h --- strace-4.11/linux/netlink_diag.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/linux/netlink_diag.h 2016-05-18 22:02:48.000000000 +0000 @@ -0,0 +1,24 @@ +struct netlink_diag_req { + uint8_t sdiag_family; + uint8_t sdiag_protocol; + uint16_t pad; + uint32_t ndiag_ino; + uint32_t ndiag_show; + uint32_t ndiag_cookie[2]; +}; + +struct netlink_diag_msg { + uint8_t ndiag_family; + uint8_t ndiag_type; + uint8_t ndiag_protocol; + uint8_t ndiag_state; + + uint32_t ndiag_portid; + uint32_t ndiag_dst_portid; + uint32_t ndiag_dst_group; + uint32_t ndiag_ino; + uint32_t ndiag_cookie[2]; +}; + +#define NDIAG_SHOW_MEMINFO 0x00000001 +#define NDIAG_PROTO_ALL ((uint8_t) ~0) diff -Nru strace-4.11/linux/nios2/get_error.c strace-4.12/linux/nios2/get_error.c --- strace-4.11/linux/nios2/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/nios2/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -8,7 +8,7 @@ * the system call success, r7=1 indicates an error. The positive * errno value written in r2. */ - if (check_errno && nios2_regs.regs[7]) { + if (nios2_regs.regs[7]) { tcp->u_rval = -1; tcp->u_error = nios2_regs.regs[2]; } else { diff -Nru strace-4.11/linux/nios2/syscallent.h strace-4.12/linux/nios2/syscallent.h --- strace-4.11/linux/nios2/syscallent.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/nios2/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,4 +1,4 @@ -#define ARCH_mmap mmap_pgoff +#define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = {4, 0, SEN(cacheflush), "cacheflush"}, -[245 ... 259] = { }, diff -Nru strace-4.11/linux/or1k/syscallent.h strace-4.12/linux/or1k/syscallent.h --- strace-4.11/linux/or1k/syscallent.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/or1k/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,4 +1,4 @@ -#define ARCH_mmap mmap_pgoff +#define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, -[245 ... 259] = { }, diff -Nru strace-4.11/linux/powerpc/get_error.c strace-4.12/linux/powerpc/get_error.c --- strace-4.11/linux/powerpc/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/powerpc/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -1,7 +1,7 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && (ppc_regs.ccr & 0x10000000)) { + if (ppc_regs.ccr & 0x10000000) { tcp->u_rval = -1; tcp->u_error = ppc_regs.gpr[3]; } else { diff -Nru strace-4.11/linux/powerpc/syscallent.h strace-4.12/linux/powerpc/syscallent.h --- strace-4.11/linux/powerpc/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/powerpc/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid), "setgid" }, [ 47] = { 0, NF, SEN(getgid), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid), "geteuid" }, [ 50] = { 0, NF, SEN(getegid), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -136,7 +136,7 @@ [107] = { 2, TF, SEN(lstat), "lstat" }, [108] = { 2, TD, SEN(fstat), "fstat" }, [109] = { 1, 0, SEN(olduname), "olduname" }, -[110] = { 5, 0, SEN(printargs), "iopl" }, +[110] = { 1, 0, SEN(iopl), "iopl" }, [111] = { 0, 0, SEN(vhangup), "vhangup" }, [112] = { 0, 0, SEN(idle), "idle" }, [113] = { 5, 0, SEN(vm86), "vm86" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid), "setfsgid" }, @@ -233,7 +233,7 @@ [204] = { 3, TD, SEN(fcntl64), "fcntl64" }, [205] = { 3, TM, SEN(madvise), "madvise" }, [206] = { 3, TM, SEN(mincore), "mincore" }, -[207] = { 0, 0, SEN(gettid), "gettid" }, +[207] = { 0, NF, SEN(gettid), "gettid" }, [208] = { 2, TS, SEN(kill), "tkill" }, [209] = { 5, TF, SEN(setxattr), "setxattr" }, [210] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -304,8 +304,8 @@ [275] = { 0, TD, SEN(inotify_init), "inotify_init" }, [276] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [277] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, -[278] = { 5, 0, SEN(printargs), "spu_run" }, -[279] = { 5, 0, SEN(printargs), "spu_create" }, +[278] = { 3, 0, SEN(printargs), "spu_run" }, +[279] = { 4, 0, SEN(printargs), "spu_create" }, [280] = { 6, TD, SEN(pselect6), "pselect6" }, [281] = { 5, TD, SEN(ppoll), "ppoll" }, [282] = { 1, TP, SEN(unshare), "unshare" }, @@ -405,7 +405,9 @@ [376] = { 3, TI, SEN(shmget), "shmget" }, [377] = { 3, TI, SEN(shmctl), "shmctl" }, [378] = { 3, TM, SEN(mlock2), "mlock2" }, -[379 ... 399] = { }, +[379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[380] = { 6, TD, SEN(preadv2), "preadv2" }, +[381] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/powerpc64/syscallent.h strace-4.12/linux/powerpc64/syscallent.h --- strace-4.11/linux/powerpc64/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/powerpc64/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid), "setuid" }, @@ -74,7 +74,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid), "setgid" }, [ 47] = { 0, NF, SEN(getgid), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid), "geteuid" }, [ 50] = { 0, NF, SEN(getegid), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -136,7 +136,7 @@ [107] = { 2, TF, SEN(lstat), "lstat" }, [108] = { 2, TD, SEN(fstat), "fstat" }, [109] = { 1, 0, SEN(olduname), "olduname" }, -[110] = { 5, 0, SEN(printargs), "iopl" }, +[110] = { 1, 0, SEN(iopl), "iopl" }, [111] = { 0, 0, SEN(vhangup), "vhangup" }, [112] = { 0, 0, SEN(idle), "idle" }, [113] = { 5, 0, SEN(vm86), "vm86" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid), "setfsgid" }, @@ -205,8 +205,8 @@ [176] = { 4, TS, SEN(rt_sigtimedwait), "rt_sigtimedwait" }, [177] = { 3, TS, SEN(rt_sigqueueinfo), "rt_sigqueueinfo" }, [178] = { 2, TS, SEN(rt_sigsuspend), "rt_sigsuspend" }, -[179] = { 6, TD, SEN(pread), "pread64" }, -[180] = { 6, TD, SEN(pwrite), "pwrite64" }, +[179] = { 4, TD, SEN(pread), "pread64" }, +[180] = { 4, TD, SEN(pwrite), "pwrite64" }, [181] = { 3, TF, SEN(chown), "chown" }, [182] = { 2, TF, SEN(getcwd), "getcwd" }, [183] = { 2, 0, SEN(capget), "capget" }, @@ -217,7 +217,7 @@ [188] = { 5, TN, SEN(putpmsg), "putpmsg" }, [189] = { 0, TP, SEN(vfork), "vfork" }, [190] = { 2, 0, SEN(getrlimit), "ugetrlimit" }, -[191] = { 5, TD, SEN(readahead), "readahead" }, +[191] = { 3, TD, SEN(readahead), "readahead" }, [192 ... 197] = { }, [198] = { 5, 0, SEN(printargs), "pciconfig_read" }, [199] = { 5, 0, SEN(printargs), "pciconfig_write" }, @@ -228,7 +228,7 @@ [204] = { }, [205] = { 3, TM, SEN(madvise), "madvise" }, [206] = { 3, TM, SEN(mincore), "mincore" }, -[207] = { 0, 0, SEN(gettid), "gettid" }, +[207] = { 0, NF, SEN(gettid), "gettid" }, [208] = { 2, TS, SEN(kill), "tkill" }, [209] = { 5, TF, SEN(setxattr), "setxattr" }, [210] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -254,9 +254,9 @@ [230] = { 3, 0, SEN(io_submit), "io_submit" }, [231] = { 3, 0, SEN(io_cancel), "io_cancel" }, [232] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, -[233] = { 6, TD, SEN(fadvise64), "fadvise64" }, +[233] = { 4, TD, SEN(fadvise64), "fadvise64" }, [234] = { 1, TP|SE, SEN(exit), "exit_group" }, -[235] = { 4, 0, SEN(lookup_dcookie), "lookup_dcookie" }, +[235] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" }, [236] = { 1, TD, SEN(epoll_create), "epoll_create" }, [237] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" }, [238] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, @@ -299,8 +299,8 @@ [275] = { 0, TD, SEN(inotify_init), "inotify_init" }, [276] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [277] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, -[278] = { 5, 0, SEN(printargs), "spu_run" }, -[279] = { 5, 0, SEN(printargs), "spu_create" }, +[278] = { 3, 0, SEN(printargs), "spu_run" }, +[279] = { 4, 0, SEN(printargs), "spu_create" }, [280] = { 6, TD, SEN(pselect6), "pselect6" }, [281] = { 5, TD, SEN(ppoll), "ppoll" }, [282] = { 1, TP, SEN(unshare), "unshare" }, @@ -329,8 +329,8 @@ [305] = { 3, TD|TS, SEN(signalfd), "signalfd" }, [306] = { 2, TD, SEN(timerfd_create), "timerfd_create" }, [307] = { 1, TD, SEN(eventfd), "eventfd" }, -[308] = { 6, TD, SEN(sync_file_range2), "sync_file_range2" }, -[309] = { 6, TD, SEN(fallocate), "fallocate" }, +[308] = { 4, TD, SEN(sync_file_range2), "sync_file_range2" }, +[309] = { 4, TD, SEN(fallocate), "fallocate" }, [310] = { 3, 0, SEN(subpage_prot), "subpage_prot" }, [311] = { 4, TD, SEN(timerfd_settime), "timerfd_settime" }, [312] = { 2, TD, SEN(timerfd_gettime), "timerfd_gettime" }, @@ -341,11 +341,11 @@ [317] = { 2, TD, SEN(pipe2), "pipe2" }, [318] = { 1, TD, SEN(inotify_init1), "inotify_init1" }, [319] = { 5, TD, SEN(perf_event_open), "perf_event_open" }, -[320] = { 5, TD, SEN(preadv), "preadv" }, -[321] = { 5, TD, SEN(pwritev), "pwritev" }, +[320] = { 4, TD, SEN(preadv), "preadv" }, +[321] = { 4, TD, SEN(pwritev), "pwritev" }, [322] = { 4, TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, [323] = { 2, TD, SEN(fanotify_init), "fanotify_init" }, -[324] = { 6, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, +[324] = { 5, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, [325] = { 4, 0, SEN(prlimit64), "prlimit64" }, [326] = { 3, TN, SEN(socket), "socket" }, [327] = { 3, TN, SEN(bind), "bind" }, @@ -400,7 +400,9 @@ [376] = { 3, TI, SEN(shmget), "shmget" }, [377] = { 3, TI, SEN(shmctl), "shmctl" }, [378] = { 3, TM, SEN(mlock2), "mlock2" }, -[379 ... 399] = { }, +[379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[380] = { 6, TD, SEN(preadv2), "preadv2" }, +[381] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/s390/arch_sigreturn.c strace-4.12/linux/s390/arch_sigreturn.c --- strace-4.11/linux/s390/arch_sigreturn.c 2015-11-28 02:58:29.000000000 +0000 +++ strace-4.12/linux/s390/arch_sigreturn.c 2016-01-12 03:07:39.000000000 +0000 @@ -7,11 +7,6 @@ if (umove(tcp, addr, &mask) < 0) { tprintf("{mask=%#lx}", addr); } else { -#ifdef S390 - long v = mask[0]; - mask[0] = mask[1]; - mask[1] = v; -#endif tprintsigmask_addr("{mask=", mask); tprints("}"); } diff -Nru strace-4.11/linux/s390/get_scno.c strace-4.12/linux/s390/get_scno.c --- strace-4.11/linux/s390/get_scno.c 2015-11-30 01:46:52.000000000 +0000 +++ strace-4.12/linux/s390/get_scno.c 2016-01-13 21:27:48.000000000 +0000 @@ -2,6 +2,7 @@ static int arch_get_scno(struct tcb *tcp) { - tcp->scno = s390_regset.gprs[2]; + tcp->scno = s390_regset.gprs[2] ? + s390_regset.gprs[2] : s390_regset.gprs[1]; return 1; } diff -Nru strace-4.11/linux/s390/syscallent.h strace-4.12/linux/s390/syscallent.h --- strace-4.11/linux/s390/syscallent.h 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/linux/s390/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -28,7 +28,7 @@ * */ -[ 0] = { 0, 0, SEN(setup), "setup" }, +[ 0] = {MA, 0, SEN(setup), "setup" }, [ 1] = { 1, TP|SE, SEN(exit), "exit" }, [ 2] = { 0, TP, SEN(fork), "fork" }, [ 3] = { 3, TD, SEN(read), "read" }, @@ -48,7 +48,7 @@ [ 17] = { }, [ 18] = { }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -76,7 +76,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -88,11 +88,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { }, [ 59] = { }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -118,7 +118,7 @@ [ 87] = { 2, TF, SEN(swapon), "swapon" }, [ 88] = { 4, 0, SEN(reboot), "reboot" }, [ 89] = { 3, TD, SEN(readdir), "readdir" }, -[ 90] = { 6, TD|TM|SI, SEN(old_mmap), "mmap" }, +[ 90] = { 1, TD|TM|SI, SEN(old_mmap), "mmap" }, [ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, [ 92] = { 2, TF, SEN(truncate), "truncate" }, [ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, @@ -138,14 +138,14 @@ [107] = { 2, TF, SEN(lstat), "lstat" }, [108] = { 2, TD, SEN(fstat), "fstat" }, [109] = { }, -[110] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" }, +[110] = { 4, 0, SEN(lookup_dcookie), "lookup_dcookie" }, [111] = { 0, 0, SEN(vhangup), "vhangup" }, [112] = { 0, 0, SEN(idle), "idle" }, [113] = { }, [114] = { 4, TP, SEN(wait4), "wait4" }, [115] = { 1, TF, SEN(swapoff), "swapoff" }, [116] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[117] = { 5, TI, SEN(ipc), "ipc" }, +[117] = { 6, TI, SEN(ipc), "ipc" }, [118] = { 1, TD, SEN(fsync), "fsync" }, [119] = { 0, TS, SEN(sigreturn), "sigreturn" }, [120] = { 5, TP, SEN(clone), "clone" }, @@ -164,7 +164,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -264,7 +264,7 @@ [233] = { 2, TF, SEN(removexattr), "removexattr" }, [234] = { 2, TF, SEN(removexattr), "lremovexattr" }, [235] = { 2, TD, SEN(fremovexattr), "fremovexattr" }, -[236] = { 0, 0, SEN(gettid), "gettid" }, +[236] = { 0, NF, SEN(gettid), "gettid" }, [237] = { 2, TS, SEN(kill), "tkill" }, [238] = { 6, 0, SEN(futex), "futex" }, [239] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" }, @@ -281,7 +281,7 @@ [250] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" }, [251] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, [252] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, -[253] = { 5, TD, SEN(printargs), "fadvise64" }, +[253] = { 5, TD, SEN(fadvise64), "fadvise64" }, [254] = { 3, 0, SEN(timer_create), "timer_create" }, [255] = { 4, 0, SEN(timer_settime), "timer_settime" }, [256] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, @@ -292,7 +292,7 @@ [261] = { 2, 0, SEN(clock_getres), "clock_getres" }, [262] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, [263] = { 5, 0, SEN(vserver), "vserver" }, -[264] = { 1, TD, SEN(printargs), "fadvise64_64" }, +[264] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, [265] = { 3, TF, SEN(statfs64), "statfs64" }, [266] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, [267] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, @@ -403,7 +403,9 @@ [372] = { 3, TN, SEN(recvmsg), "recvmsg" }, [373] = { 2, TN, SEN(shutdown), "shutdown" }, [374] = { 3, TM, SEN(mlock2), "mlock2" }, -[375 ... 399] = { }, +[375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[376] = { 6, TD, SEN(preadv2), "preadv2" }, +[377] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/s390x/syscallent.h strace-4.12/linux/s390x/syscallent.h --- strace-4.11/linux/s390x/syscallent.h 2015-11-24 02:50:40.000000000 +0000 +++ strace-4.12/linux/s390x/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -27,7 +27,7 @@ * */ -[ 0] = { 0, 0, SEN(setup), "setup" }, +[ 0] = {MA, 0, SEN(setup), "setup" }, [ 1] = { 1, TP|SE, SEN(exit), "exit" }, [ 2] = { 0, TP, SEN(fork), "fork" }, [ 3] = { 3, TD, SEN(read), "read" }, @@ -47,7 +47,7 @@ [ 17] = { }, [ 18] = { }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { }, @@ -75,7 +75,7 @@ [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { }, [ 47] = { }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { }, [ 50] = { }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -87,11 +87,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { }, [ 59] = { }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -139,7 +139,7 @@ [114] = { 4, TP, SEN(wait4), "wait4" }, [115] = { 1, TF, SEN(swapoff), "swapoff" }, [116] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[117] = { 5, TI, SEN(ipc), "ipc" }, +[117] = { 6, TI, SEN(ipc), "ipc" }, [118] = { 1, TD, SEN(fsync), "fsync" }, [119] = { 0, TS, SEN(sigreturn), "sigreturn" }, [120] = { 5, TP, SEN(clone), "clone" }, @@ -158,7 +158,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138 ... 140] = { }, [141] = { 3, TD, SEN(getdents), "getdents" }, @@ -248,7 +248,7 @@ [233] = { 2, TF, SEN(removexattr), "removexattr" }, [234] = { 2, TF, SEN(removexattr), "lremovexattr" }, [235] = { 2, TD, SEN(fremovexattr), "fremovexattr" }, -[236] = { 0, 0, SEN(gettid), "gettid" }, +[236] = { 0, NF, SEN(gettid), "gettid" }, [237] = { 2, TS, SEN(kill), "tkill" }, [238] = { 6, 0, SEN(futex), "futex" }, [239] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" }, @@ -387,7 +387,9 @@ [372] = { 3, TN, SEN(recvmsg), "recvmsg" }, [373] = { 2, TN, SEN(shutdown), "shutdown" }, [374] = { 3, TM, SEN(mlock2), "mlock2" }, -[375 ... 399] = { }, +[375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[376] = { 6, TD, SEN(preadv2), "preadv2" }, +[377] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/sh/syscallent.h strace-4.12/linux/sh/syscallent.h --- strace-4.11/linux/sh/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/sh/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -48,7 +48,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -70,13 +70,13 @@ [ 39] = { 2, TF, SEN(mkdir), "mkdir" }, [ 40] = { 1, TF, SEN(rmdir), "rmdir" }, [ 41] = { 1, TD, SEN(dup), "dup" }, -[ 42] = { 1, TD, SEN(pipe), "pipe" }, +[ 42] = { 0, TD, SEN(pipe), "pipe" }, [ 43] = { 1, 0, SEN(times), "times" }, [ 44] = { 0, 0, SEN(prof), "prof" }, [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -88,11 +88,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -145,7 +145,7 @@ [114] = { 4, TP, SEN(wait4), "wait4" }, [115] = { 1, TF, SEN(swapoff), "swapoff" }, [116] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[117] = { 5, TI, SEN(ipc), "ipc" }, +[117] = { 6, TI, SEN(ipc), "ipc" }, [118] = { 1, TD, SEN(fsync), "fsync" }, [119] = { 0, TS, SEN(sigreturn), "sigreturn" }, [120] = { 5, TP, SEN(clone), "clone" }, @@ -164,7 +164,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -181,7 +181,7 @@ [150] = { 2, TM, SEN(mlock), "mlock" }, [151] = { 2, TM, SEN(munlock), "munlock" }, [152] = { 1, TM, SEN(mlockall), "mlockall" }, -[153] = { 1, TM, SEN(munlockall), "munlockall" }, +[153] = { 0, TM, SEN(munlockall), "munlockall" }, [154] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, [155] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, [156] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, @@ -228,13 +228,13 @@ [198] = { 3, TF, SEN(chown), "lchown32" }, [199] = { 0, NF, SEN(getuid), "getuid32" }, [200] = { 0, NF, SEN(getgid), "getgid32" }, -[201] = { 0, 0, SEN(geteuid), "geteuid32" }, -[202] = { 0, 0, SEN(getegid), "getegid32" }, +[201] = { 0, NF, SEN(geteuid), "geteuid32" }, +[202] = { 0, NF, SEN(getegid), "getegid32" }, [203] = { 2, 0, SEN(setreuid), "setreuid32" }, [204] = { 2, 0, SEN(setregid), "setregid32" }, [205] = { 2, 0, SEN(getgroups), "getgroups32" }, [206] = { 2, 0, SEN(setgroups), "setgroups32" }, -[207] = { 3, 0, SEN(fchown), "fchown32" }, +[207] = { 3, TD, SEN(fchown), "fchown32" }, [208] = { 3, 0, SEN(setresuid), "setresuid32" }, [209] = { 3, 0, SEN(getresuid), "getresuid32" }, [210] = { 3, 0, SEN(setresgid), "setresgid32" }, @@ -242,15 +242,15 @@ [212] = { 3, TF, SEN(chown), "chown32" }, [213] = { 1, 0, SEN(setuid), "setuid32" }, [214] = { 1, 0, SEN(setgid), "setgid32" }, -[215] = { 1, 0, SEN(setfsuid), "setfsuid32" }, -[216] = { 1, 0, SEN(setfsgid), "setfsgid32" }, +[215] = { 1, NF, SEN(setfsuid), "setfsuid32" }, +[216] = { 1, NF, SEN(setfsgid), "setfsgid32" }, [217] = { 2, TF, SEN(pivotroot), "pivot_root" }, [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, [221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, -[224] = { 4, 0, SEN(gettid), "gettid" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, [227] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -294,7 +294,7 @@ [266] = { 2, 0, SEN(clock_getres), "clock_getres" }, [267] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, [268] = { 3, TF, SEN(statfs64), "statfs64" }, -[269] = { 2, TD, SEN(fstatfs64), "fstatfs64" }, +[269] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, [270] = { 3, TS, SEN(tgkill), "tgkill" }, [271] = { 2, TF, SEN(utimes), "utimes" }, [272] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, @@ -341,7 +341,7 @@ [313] = { 6, TD, SEN(splice), "splice" }, [314] = { 6, TD, SEN(sync_file_range), "sync_file_range" }, [315] = { 4, TD, SEN(tee), "tee" }, -[316] = { 5, TD, SEN(vmsplice), "vmsplice" }, +[316] = { 4, TD, SEN(vmsplice), "vmsplice" }, [317] = { 6, TM, SEN(move_pages), "move_pages" }, [318] = { 3, 0, SEN(getcpu), "getcpu" }, [319] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, @@ -394,6 +394,6 @@ [366] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, [367] = { 5, 0, SEN(kcmp), "kcmp" }, [368] = { 3, TD, SEN(finit_module), "finit_module" }, -[369 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/sh64/syscallent.h strace-4.12/linux/sh64/syscallent.h --- strace-4.11/linux/sh64/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/sh64/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -46,7 +46,7 @@ [ 17] = { 0, TM, SEN(break), "break" }, [ 18] = { 2, TF, SEN(oldstat), "oldstat" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 5, TF, SEN(mount), "mount" }, [ 22] = { 1, TF, SEN(umount), "umount" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, @@ -68,13 +68,13 @@ [ 39] = { 2, TF, SEN(mkdir), "mkdir" }, [ 40] = { 1, TF, SEN(rmdir), "rmdir" }, [ 41] = { 1, TD, SEN(dup), "dup" }, -[ 42] = { 1, TD, SEN(pipe), "pipe" }, +[ 42] = { 0, TD, SEN(pipe), "pipe" }, [ 43] = { 1, 0, SEN(times), "times" }, [ 44] = { 0, 0, SEN(prof), "prof" }, [ 45] = { 1, TM|SI, SEN(brk), "brk" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, @@ -86,11 +86,11 @@ [ 57] = { 2, 0, SEN(setpgid), "setpgid" }, [ 58] = { 2, 0, SEN(ulimit), "ulimit" }, [ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, 0, SEN(ustat), "ustat" }, [ 63] = { 2, TD, SEN(dup2), "dup2" }, -[ 64] = { 0, 0, SEN(getppid), "getppid" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, [ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, [ 66] = { 0, 0, SEN(setsid), "setsid" }, [ 67] = { 3, TS, SEN(sigaction), "sigaction" }, @@ -143,7 +143,7 @@ [114] = { 4, TP, SEN(wait4), "wait4" }, [115] = { 1, TF, SEN(swapoff), "swapoff" }, [116] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[117] = { 5, TI, SEN(ipc), "ipc" }, +[117] = { 6, TI, SEN(ipc), "ipc" }, [118] = { 1, TD, SEN(fsync), "fsync" }, [119] = { 0, TS, SEN(sigreturn), "sigreturn" }, [120] = { 5, TP, SEN(clone), "clone" }, @@ -162,7 +162,7 @@ [133] = { 1, TD, SEN(fchdir), "fchdir" }, [134] = { 2, 0, SEN(bdflush), "bdflush" }, [135] = { 3, 0, SEN(sysfs), "sysfs" }, -[136] = { 1, 0, SEN(personality), "personality" }, +[136] = { 1, NF, SEN(personality), "personality" }, [137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, [139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, @@ -226,13 +226,13 @@ [198] = { 3, TF, SEN(chown), "lchown32" }, [199] = { 0, NF, SEN(getuid), "getuid32" }, [200] = { 0, NF, SEN(getgid), "getgid32" }, -[201] = { 0, 0, SEN(geteuid), "geteuid32" }, -[202] = { 0, 0, SEN(getegid), "getegid32" }, +[201] = { 0, NF, SEN(geteuid), "geteuid32" }, +[202] = { 0, NF, SEN(getegid), "getegid32" }, [203] = { 2, 0, SEN(setreuid), "setreuid32" }, [204] = { 2, 0, SEN(setregid), "setregid32" }, [205] = { 2, 0, SEN(getgroups), "getgroups32" }, [206] = { 2, 0, SEN(setgroups), "setgroups32" }, -[207] = { 3, 0, SEN(fchown), "fchown32" }, +[207] = { 3, TD, SEN(fchown), "fchown32" }, [208] = { 3, 0, SEN(setresuid), "setresuid32" }, [209] = { 3, 0, SEN(getresuid), "getresuid32" }, [210] = { 3, 0, SEN(setresgid), "setresgid32" }, @@ -240,8 +240,8 @@ [212] = { 3, TF, SEN(chown), "chown32" }, [213] = { 1, 0, SEN(setuid), "setuid32" }, [214] = { 1, 0, SEN(setgid), "setgid32" }, -[215] = { 1, 0, SEN(setfsuid), "setfsuid32" }, -[216] = { 1, 0, SEN(setfsgid), "setfsgid32" }, +[215] = { 1, NF, SEN(setfsuid), "setfsuid32" }, +[216] = { 1, NF, SEN(setfsgid), "setfsgid32" }, [217] = { 2, TF, SEN(pivotroot), "pivot_root" }, [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, @@ -266,17 +266,17 @@ [238] = { 3, TI, SEN(semget), "semget" }, [239] = { 4, TI, SEN(semctl), "semctl" }, [240] = { 4, TI, SEN(msgsnd), "msgsnd" }, -[241] = { 4, TI, SEN(msgrcv), "msgrcv" }, +[241] = { 5, TI, SEN(msgrcv), "msgrcv" }, [242] = { 2, TI, SEN(msgget), "msgget" }, -[243] = { 4, TI, SEN(msgctl), "msgctl" }, -[244] = { 4, TI|TM|SI, SEN(shmat), "shmat" }, -[245] = { 4, TI|TM|SI, SEN(shmdt), "shmdt" }, +[243] = { 3, TI, SEN(msgctl), "msgctl" }, +[244] = { 3, TI|TM|SI, SEN(shmat), "shmat" }, +[245] = { 1, TI|TM|SI, SEN(shmdt), "shmdt" }, [246] = { 3, TI, SEN(shmget), "shmget" }, -[247] = { 4, TI, SEN(shmctl), "shmctl" }, +[247] = { 3, TI, SEN(shmctl), "shmctl" }, [248] = { 3, TD, SEN(getdents64), "getdents64" }, [249] = { 3, TD, SEN(fcntl64), "fcntl64" }, [250 ... 251] = { }, -[252] = { 4, 0, SEN(gettid), "gettid" }, +[252] = { 0, NF, SEN(gettid), "gettid" }, [253] = { 3, TD, SEN(readahead), "readahead" }, [254] = { 5, TF, SEN(setxattr), "setxattr" }, [255] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -320,7 +320,7 @@ [294] = { 2, 0, SEN(clock_getres), "clock_getres" }, [295] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, [296] = { 3, TF, SEN(statfs64), "statfs64" }, -[297] = { 2, TD, SEN(fstatfs64), "fstatfs64" }, +[297] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, [298] = { 3, TS, SEN(tgkill), "tgkill" }, [299] = { 2, TF, SEN(utimes), "utimes" }, [300] = { 4, TD, SEN(fadvise64), "fadvise64_64" }, @@ -367,7 +367,7 @@ [341] = { 6, TD, SEN(splice), "splice" }, [342] = { 4, TD, SEN(sync_file_range), "sync_file_range" }, [343] = { 4, TD, SEN(tee), "tee" }, -[344] = { 5, TD, SEN(vmsplice), "vmsplice" }, +[344] = { 4, TD, SEN(vmsplice), "vmsplice" }, [345] = { 6, TM, SEN(move_pages), "move_pages" }, [346] = { 3, 0, SEN(getcpu), "getcpu" }, [347] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, @@ -403,6 +403,6 @@ [377] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, [378] = { 5, 0, SEN(kcmp), "kcmp" }, [379] = { 3, TD, SEN(finit_module), "finit_module" }, -[380 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/sparc/get_error.c strace-4.12/linux/sparc/get_error.c --- strace-4.11/linux/sparc/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/sparc/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -1,7 +1,7 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && sparc_regs.psr & PSR_C) { + if (sparc_regs.psr & PSR_C) { tcp->u_rval = -1; tcp->u_error = sparc_regs.u_regs[U_REG_O0]; } else { diff -Nru strace-4.11/linux/sparc/syscallent.h strace-4.12/linux/sparc/syscallent.h --- strace-4.11/linux/sparc/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/sparc/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -18,13 +18,13 @@ [ 17] = { 1, TM|SI, SEN(brk), "brk" }, [ 18] = { 4, 0, SEN(printargs), "perfctr" }, [ 19] = { 3, TD, SEN(lseek), "lseek" }, -[ 20] = { 0, 0, SEN(getpid), "getpid" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, [ 21] = { 2, 0, SEN(capget), "capget" }, [ 22] = { 2, 0, SEN(capset), "capset" }, [ 23] = { 1, 0, SEN(setuid16), "setuid" }, [ 24] = { 0, NF, SEN(getuid16), "getuid" }, [ 25] = { 4, TD, SEN(vmsplice), "vmsplice" }, -[ 26] = { 5, 0, SEN(ptrace), "ptrace" }, +[ 26] = { 4, 0, SEN(ptrace), "ptrace" }, [ 27] = { 1, 0, SEN(alarm), "alarm" }, [ 28] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, [ 29] = { 0, TS, SEN(pause), "pause" }, @@ -39,18 +39,18 @@ [ 38] = { 2, TF, SEN(stat), "stat" }, [ 39] = { 4, TD|TN, SEN(sendfile), "sendfile" }, [ 40] = { 2, TF, SEN(lstat), "lstat" }, -[ 41] = { 2, TD, SEN(dup), "dup" }, +[ 41] = { 1, TD, SEN(dup), "dup" }, [ 42] = { 0, TD, SEN(pipe), "pipe" }, [ 43] = { 1, 0, SEN(times), "times" }, [ 44] = { 0, NF, SEN(getuid), "getuid32" }, [ 45] = { 2, TF, SEN(umount2), "umount2" }, [ 46] = { 1, 0, SEN(setgid16), "setgid" }, [ 47] = { 0, NF, SEN(getgid16), "getgid" }, -[ 48] = { 3, TS, SEN(signal), "signal" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, [ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, [ 50] = { 0, NF, SEN(getegid16), "getegid" }, [ 51] = { 1, TF, SEN(acct), "acct" }, -[ 52] = { 2, 0, SEN(printargs), "memory_ordering" }, +[ 52] = { }, [ 53] = { 0, NF, SEN(getgid), "getgid32" }, [ 54] = { 3, TD, SEN(ioctl), "ioctl" }, [ 55] = { 4, 0, SEN(reboot), "reboot" }, @@ -58,7 +58,7 @@ [ 57] = { 2, TF, SEN(symlink), "symlink" }, [ 58] = { 3, TF, SEN(readlink), "readlink" }, [ 59] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, -[ 60] = { 1, 0, SEN(umask), "umask" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, [ 61] = { 1, TF, SEN(chroot), "chroot" }, [ 62] = { 2, TD, SEN(fstat), "fstat" }, [ 63] = { 2, TD, SEN(fstat64), "fstat64" }, @@ -141,7 +141,7 @@ [140] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, [141] = { 3, TN, SEN(getpeername), "getpeername" }, [142] = { 6, 0, SEN(futex), "futex" }, -[143] = { 0, 0, SEN(gettid), "gettid" }, +[143] = { 0, NF, SEN(gettid), "gettid" }, [144] = { 2, 0, SEN(getrlimit), "getrlimit" }, [145] = { 2, 0, SEN(setrlimit), "setrlimit" }, [146] = { 2, TF, SEN(pivotroot), "pivot_root" }, @@ -162,7 +162,7 @@ [161] = { 3, 0, SEN(sched_getaffinity), "sched_get_affinity" }, [162] = { 2, 0, SEN(printargs), "getdomainname" }, [163] = { 2, 0, SEN(setdomainname), "setdomainname" }, -[164] = { 5, 0, SEN(printargs), "utrap_install" }, +[164] = { }, [165] = { 4, TF, SEN(quotactl), "quotactl" }, [166] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, [167] = { 5, TF, SEN(mount), "mount" }, @@ -189,13 +189,13 @@ [188] = { 1, TP|SE, SEN(exit), "exit_group" }, [189] = { 1, 0, SEN(uname), "uname" }, [190] = { 3, 0, SEN(init_module), "init_module" }, -[191] = { 1, 0, SEN(personality), "personality" }, +[191] = { 1, NF, SEN(personality), "personality" }, [192] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, [193] = { 1, TD, SEN(epoll_create), "epoll_create" }, [194] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" }, [195] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, [196] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, -[197] = { 0, 0, SEN(getppid), "getppid" }, +[197] = { 0, NF, SEN(getppid), "getppid" }, [198] = { 3, TS, SEN(sigaction), "sigaction" }, [199] = { 0, TS, SEN(siggetmask), "sgetmask" }, [200] = { 1, TS, SEN(sigsetmask), "ssetmask" }, @@ -213,7 +213,7 @@ [212] = { 3, TP, SEN(waitpid), "waitpid" }, [213] = { 1, TF, SEN(swapoff), "swapoff" }, [214] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[215] = { 5, TI, SEN(ipc), "ipc" }, +[215] = { 6, TI, SEN(ipc), "ipc" }, [216] = { 0, TS, SEN(sigreturn), "sigreturn" }, [217] = { 5, TP, SEN(clone), "clone" }, [218] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, @@ -351,8 +351,13 @@ [350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, [351] = { 2, 0, SEN(membarrier), "membarrier", }, [352] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[353] = { 3, TM, SEN(mlock2), "mlock2" }, -[354 ... 399] = { }, +[353] = { 3, TN, SEN(bind), "bind" }, +[354] = { 2, TN, SEN(listen), "listen" }, +[355] = { 5, TN, SEN(setsockopt), "setsockopt" }, +[356] = { 3, TM, SEN(mlock2), "mlock2" }, +[357] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[358] = { 6, TD, SEN(preadv2), "preadv2" }, +[359] = { 6, TD, SEN(pwritev2), "pwritev2" }, #define SYS_socket_subcall 400 #include "subcall.h" diff -Nru strace-4.11/linux/sparc64/get_error.c strace-4.12/linux/sparc64/get_error.c --- strace-4.11/linux/sparc64/get_error.c 2015-11-29 00:06:45.000000000 +0000 +++ strace-4.12/linux/sparc64/get_error.c 2015-12-27 01:02:53.000000000 +0000 @@ -1,7 +1,7 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && sparc_regs.tstate & 0x1100000000UL) { + if (sparc_regs.tstate & 0x1100000000UL) { tcp->u_rval = -1; tcp->u_error = sparc_regs.u_regs[U_REG_O0]; } else { diff -Nru strace-4.11/linux/sparc64/syscallent.h strace-4.12/linux/sparc64/syscallent.h --- strace-4.11/linux/sparc64/syscallent.h 2007-08-02 01:47:08.000000000 +0000 +++ strace-4.12/linux/sparc64/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -1 +1,361 @@ -#include "../sparc/syscallent.h" +[ 0] = { 0, 0, SEN(restart_syscall), "restart_syscall" }, +[ 1] = { 1, TP|SE, SEN(exit), "exit" }, +[ 2] = { 0, TP, SEN(fork), "fork" }, +[ 3] = { 3, TD, SEN(read), "read" }, +[ 4] = { 3, TD, SEN(write), "write" }, +[ 5] = { 3, TD|TF, SEN(open), "open" }, +[ 6] = { 1, TD, SEN(close), "close" }, +[ 7] = { 4, TP, SEN(wait4), "wait4" }, +[ 8] = { 2, TD|TF, SEN(creat), "creat" }, +[ 9] = { 2, TF, SEN(link), "link" }, +[ 10] = { 1, TF, SEN(unlink), "unlink" }, +[ 11] = { 2, TF|TP|SE|SI, SEN(execv), "execv" }, +[ 12] = { 1, TF, SEN(chdir), "chdir" }, +[ 13] = { 3, TF, SEN(chown16), "chown" }, +[ 14] = { 3, TF, SEN(mknod), "mknod" }, +[ 15] = { 2, TF, SEN(chmod), "chmod" }, +[ 16] = { 3, TF, SEN(chown16), "lchown" }, +[ 17] = { 1, TM|SI, SEN(brk), "brk" }, +[ 18] = { 4, 0, SEN(printargs), "perfctr" }, +[ 19] = { 3, TD, SEN(lseek), "lseek" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, +[ 21] = { 2, 0, SEN(capget), "capget" }, +[ 22] = { 2, 0, SEN(capset), "capset" }, +[ 23] = { 1, 0, SEN(setuid16), "setuid" }, +[ 24] = { 0, NF, SEN(getuid16), "getuid" }, +[ 25] = { 4, TD, SEN(vmsplice), "vmsplice" }, +[ 26] = { 4, 0, SEN(ptrace), "ptrace" }, +[ 27] = { 1, 0, SEN(alarm), "alarm" }, +[ 28] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, +[ 29] = { 0, TS, SEN(pause), "pause" }, +[ 30] = { 2, TF, SEN(utime), "utime" }, +[ 31 ... 32] = { }, +[ 33] = { 2, TF, SEN(access), "access" }, +[ 34] = { 1, 0, SEN(nice), "nice" }, +[ 35] = { }, +[ 36] = { 0, 0, SEN(sync), "sync" }, +[ 37] = { 2, TS, SEN(kill), "kill" }, +[ 38] = { 2, TF, SEN(stat), "stat" }, +[ 39] = { 4, TD|TN, SEN(sendfile), "sendfile" }, +[ 40] = { 2, TF, SEN(lstat), "lstat" }, +[ 41] = { 1, TD, SEN(dup), "dup" }, +[ 42] = { 0, TD, SEN(pipe), "pipe" }, +[ 43] = { 1, 0, SEN(times), "times" }, +[ 44] = { }, +[ 45] = { 2, TF, SEN(umount2), "umount2" }, +[ 46] = { 1, 0, SEN(setgid16), "setgid" }, +[ 47] = { 0, NF, SEN(getgid16), "getgid" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, +[ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, +[ 50] = { 0, NF, SEN(getegid16), "getegid" }, +[ 51] = { 1, TF, SEN(acct), "acct" }, +[ 52] = { 2, 0, SEN(printargs), "memory_ordering" }, +[ 53] = { }, +[ 54] = { 3, TD, SEN(ioctl), "ioctl" }, +[ 55] = { 4, 0, SEN(reboot), "reboot" }, +[ 56] = { }, +[ 57] = { 2, TF, SEN(symlink), "symlink" }, +[ 58] = { 3, TF, SEN(readlink), "readlink" }, +[ 59] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, +[ 61] = { 1, TF, SEN(chroot), "chroot" }, +[ 62] = { 2, TD, SEN(fstat), "fstat" }, +[ 63] = { 2, TD, SEN(fstat64), "fstat64" }, +[ 64] = { 0, 0, SEN(getpagesize), "getpagesize" }, +[ 65] = { 3, TM, SEN(msync), "msync" }, +[ 66] = { 0, TP, SEN(vfork), "vfork" }, +[ 67] = { 4, TD, SEN(pread), "pread64" }, +[ 68] = { 4, TD, SEN(pwrite), "pwrite64" }, +[ 69 ... 70] = { }, +[ 71] = { 6, TD|TM|SI, SEN(mmap), "mmap" }, +[ 72] = { }, +[ 73] = { 2, TM|SI, SEN(munmap), "munmap" }, +[ 74] = { 3, TM|SI, SEN(mprotect), "mprotect" }, +[ 75] = { 3, TM, SEN(madvise), "madvise" }, +[ 76] = { 0, 0, SEN(vhangup), "vhangup" }, +[ 77] = { }, +[ 78] = { 3, TM, SEN(mincore), "mincore" }, +[ 79] = { 2, 0, SEN(getgroups16), "getgroups" }, +[ 80] = { 2, 0, SEN(setgroups16), "setgroups" }, +[ 81] = { 0, 0, SEN(getpgrp), "getpgrp" }, +[ 82] = { }, +[ 83] = { 3, 0, SEN(setitimer), "setitimer" }, +[ 84] = { }, +[ 85] = { 2, TF, SEN(swapon), "swapon" }, +[ 86] = { 2, 0, SEN(getitimer), "getitimer" }, +[ 87] = { }, +[ 88] = { 2, 0, SEN(sethostname), "sethostname" }, +[ 89] = { }, +[ 90] = { 2, TD, SEN(dup2), "dup2" }, +[ 91] = { }, +[ 92] = { 3, TD, SEN(fcntl), "fcntl" }, +[ 93] = { 5, TD, SEN(select), "select" }, +[ 94] = { }, +[ 95] = { 1, TD, SEN(fsync), "fsync" }, +[ 96] = { 3, 0, SEN(setpriority), "setpriority" }, +[ 97] = { 3, TN, SEN(socket), "socket" }, +[ 98] = { 3, TN, SEN(connect), "connect" }, +[ 99] = { 3, TN, SEN(accept), "accept" }, +[100] = { 2, 0, SEN(getpriority), "getpriority" }, +[101] = { 0, TS, SEN(rt_sigreturn), "rt_sigreturn" }, +[102] = { 5, TS, SEN(rt_sigaction), "rt_sigaction" }, +[103] = { 4, TS, SEN(rt_sigprocmask), "rt_sigprocmask" }, +[104] = { 2, TS, SEN(rt_sigpending), "rt_sigpending" }, +[105] = { 4, TS, SEN(rt_sigtimedwait), "rt_sigtimedwait" }, +[106] = { 3, TS, SEN(rt_sigqueueinfo), "rt_sigqueueinfo" }, +[107] = { 2, TS, SEN(rt_sigsuspend), "rt_sigsuspend" }, +[108] = { 3, 0, SEN(setresuid), "setresuid" }, +[109] = { 3, 0, SEN(getresuid), "getresuid" }, +[110] = { 3, 0, SEN(setresgid), "setresgid" }, +[111] = { 3, 0, SEN(getresgid), "getresgid" }, +[112] = { }, +[113] = { 3, TN, SEN(recvmsg), "recvmsg" }, +[114] = { 3, TN, SEN(sendmsg), "sendmsg" }, +[115] = { }, +[116] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, +[117] = { 2, 0, SEN(getrusage), "getrusage" }, +[118] = { 5, TN, SEN(getsockopt), "getsockopt" }, +[119] = { 2, TF, SEN(getcwd), "getcwd" }, +[120] = { 3, TD, SEN(readv), "readv" }, +[121] = { 3, TD, SEN(writev), "writev" }, +[122] = { 2, 0, SEN(settimeofday), "settimeofday" }, +[123] = { 3, TD, SEN(fchown16), "fchown" }, +[124] = { 2, TD, SEN(fchmod), "fchmod" }, +[125] = { 6, TN, SEN(recvfrom), "recvfrom" }, +[126] = { 2, 0, SEN(setreuid16), "setreuid" }, +[127] = { 2, 0, SEN(setregid16), "setregid" }, +[128] = { 2, TF, SEN(rename), "rename" }, +[129] = { 2, TF, SEN(truncate), "truncate" }, +[130] = { 2, TD, SEN(ftruncate), "ftruncate" }, +[131] = { 2, TD, SEN(flock), "flock" }, +[132] = { 2, TF, SEN(lstat64), "lstat64" }, +[133] = { 6, TN, SEN(sendto), "sendto" }, +[134] = { 2, TN, SEN(shutdown), "shutdown" }, +[135] = { 4, TN, SEN(socketpair), "socketpair" }, +[136] = { 2, TF, SEN(mkdir), "mkdir" }, +[137] = { 1, TF, SEN(rmdir), "rmdir" }, +[138] = { 2, TF, SEN(utimes), "utimes" }, +[139] = { 2, TF, SEN(stat64), "stat64" }, +[140] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, +[141] = { 3, TN, SEN(getpeername), "getpeername" }, +[142] = { 6, 0, SEN(futex), "futex" }, +[143] = { 0, NF, SEN(gettid), "gettid" }, +[144] = { 2, 0, SEN(getrlimit), "getrlimit" }, +[145] = { 2, 0, SEN(setrlimit), "setrlimit" }, +[146] = { 2, TF, SEN(pivotroot), "pivot_root" }, +[147] = { 5, 0, SEN(prctl), "prctl" }, +[148] = { 5, 0, SEN(printargs), "pciconfig_read" }, +[149] = { 5, 0, SEN(printargs), "pciconfig_write" }, +[150] = { 3, TN, SEN(getsockname), "getsockname" }, +[151] = { 0, TD, SEN(inotify_init), "inotify_init" }, +[152] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, +[153] = { 3, TD, SEN(poll), "poll" }, +[154] = { 3, TD, SEN(getdents64), "getdents64" }, +[155] = { }, +[156] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, +[157] = { 2, TF, SEN(statfs), "statfs" }, +[158] = { 2, TD, SEN(fstatfs), "fstatfs" }, +[159] = { 1, TF, SEN(umount), "umount" }, +[160] = { 3, 0, SEN(sched_setaffinity), "sched_set_affinity" }, +[161] = { 3, 0, SEN(sched_getaffinity), "sched_get_affinity" }, +[162] = { 2, 0, SEN(printargs), "getdomainname" }, +[163] = { 2, 0, SEN(setdomainname), "setdomainname" }, +[164] = { 5, 0, SEN(printargs), "utrap_install" }, +[165] = { 4, TF, SEN(quotactl), "quotactl" }, +[166] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, +[167] = { 5, TF, SEN(mount), "mount" }, +[168] = { 2, 0, SEN(ustat), "ustat" }, +[169] = { 5, TF, SEN(setxattr), "setxattr" }, +[170] = { 5, TF, SEN(setxattr), "lsetxattr" }, +[171] = { 5, TD, SEN(fsetxattr), "fsetxattr" }, +[172] = { 4, TF, SEN(getxattr), "getxattr" }, +[173] = { 4, TF, SEN(getxattr), "lgetxattr" }, +[174] = { 3, TD, SEN(getdents), "getdents" }, +[175] = { 0, 0, SEN(setsid), "setsid" }, +[176] = { 1, TD, SEN(fchdir), "fchdir" }, +[177] = { 4, TD, SEN(fgetxattr), "fgetxattr" }, +[178] = { 3, TF, SEN(listxattr), "listxattr" }, +[179] = { 3, TF, SEN(listxattr), "llistxattr" }, +[180] = { 3, TD, SEN(flistxattr), "flistxattr" }, +[181] = { 2, TF, SEN(removexattr), "removexattr" }, +[182] = { 2, TF, SEN(removexattr), "lremovexattr" }, +[183] = { 1, TS, SEN(sigpending), "sigpending" }, +[184] = { 5, 0, SEN(query_module), "query_module" }, +[185] = { 2, 0, SEN(setpgid), "setpgid" }, +[186] = { 2, TD, SEN(fremovexattr), "fremovexattr" }, +[187] = { 2, TS, SEN(kill), "tkill" }, +[188] = { 1, TP|SE, SEN(exit), "exit_group" }, +[189] = { 1, 0, SEN(uname), "uname" }, +[190] = { 3, 0, SEN(init_module), "init_module" }, +[191] = { 1, NF, SEN(personality), "personality" }, +[192] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, +[193] = { 1, TD, SEN(epoll_create), "epoll_create" }, +[194] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" }, +[195] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, +[196] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, +[197] = { 0, NF, SEN(getppid), "getppid" }, +[198] = { 3, TS, SEN(sigaction), "sigaction" }, +[199] = { 0, TS, SEN(siggetmask), "sgetmask" }, +[200] = { 1, TS, SEN(sigsetmask), "ssetmask" }, +[201] = { 3, TS, SEN(sigsuspend), "sigsuspend" }, +[202] = { 2, TF, SEN(lstat), "oldlstat" }, +[203] = { 1, TF, SEN(uselib), "uselib" }, +[204] = { 3, TD, SEN(readdir), "readdir" }, +[205] = { 3, TD, SEN(readahead), "readahead" }, +[206] = { 2, TD, SEN(socketcall), "socketcall" }, +[207] = { 3, 0, SEN(syslog), "syslog" }, +[208] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" }, +[209] = { 4, TD, SEN(fadvise64), "fadvise64" }, +[210] = { 4, TD, SEN(fadvise64), "fadvise64_64" }, +[211] = { 3, TS, SEN(tgkill), "tgkill" }, +[212] = { 3, TP, SEN(waitpid), "waitpid" }, +[213] = { 1, TF, SEN(swapoff), "swapoff" }, +[214] = { 1, 0, SEN(sysinfo), "sysinfo" }, +[215] = { 6, TI, SEN(ipc), "ipc" }, +[216] = { 0, TS, SEN(sigreturn), "sigreturn" }, +[217] = { 5, TP, SEN(clone), "clone" }, +[218] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, +[219] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[220] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, +[221] = { 2, 0, SEN(create_module), "create_module" }, +[222] = { 2, 0, SEN(delete_module), "delete_module" }, +[223] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, +[224] = { 1, 0, SEN(getpgid), "getpgid" }, +[225] = { 2, 0, SEN(bdflush), "bdflush" }, +[226] = { 3, 0, SEN(sysfs), "sysfs" }, +[227] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, +[228] = { 1, NF, SEN(setfsuid16), "setfsuid" }, +[229] = { 1, NF, SEN(setfsgid16), "setfsgid" }, +[230] = { 5, TD, SEN(select), "_newselect" }, +[231] = { }, +[232] = { 6, TD, SEN(splice), "splice" }, +[233] = { 1, 0, SEN(stime), "stime" }, +[234] = { 3, TF, SEN(statfs64), "statfs64" }, +[235] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, +[236] = { 5, TD, SEN(llseek), "_llseek" }, +[237] = { 2, TM, SEN(mlock), "mlock" }, +[238] = { 2, TM, SEN(munlock), "munlock" }, +[239] = { 1, TM, SEN(mlockall), "mlockall" }, +[240] = { 0, TM, SEN(munlockall), "munlockall" }, +[241] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, +[242] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, +[243] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, +[244] = { 1, 0, SEN(sched_getscheduler), "sched_getscheduler" }, +[245] = { 0, 0, SEN(sched_yield), "sched_yield" }, +[246] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"}, +[247] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"}, +[248] = { 2, 0, SEN(sched_rr_get_interval), "sched_rr_get_interval" }, +[249] = { 2, 0, SEN(nanosleep), "nanosleep" }, +[250] = { 5, TM|SI, SEN(mremap), "mremap" }, +[251] = { 1, 0, SEN(sysctl), "_sysctl" }, +[252] = { 1, 0, SEN(getsid), "getsid" }, +[253] = { 1, TD, SEN(fdatasync), "fdatasync" }, +[254] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, +[255] = { 4, TD, SEN(sync_file_range), "sync_file_range" }, +[256] = { 2, 0, SEN(clock_settime), "clock_settime" }, +[257] = { 2, 0, SEN(clock_gettime), "clock_gettime" }, +[258] = { 2, 0, SEN(clock_getres), "clock_getres" }, +[259] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, +[260] = { 3, 0, SEN(sched_getaffinity), "sched_getaffinity" }, +[261] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" }, +[262] = { 4, 0, SEN(timer_settime), "timer_settime" }, +[263] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, +[264] = { 1, 0, SEN(timer_getoverrun), "timer_getoverrun" }, +[265] = { 1, 0, SEN(timer_delete), "timer_delete" }, +[266] = { 3, 0, SEN(timer_create), "timer_create" }, +[267] = { }, +[268] = { 2, 0, SEN(io_setup), "io_setup" }, +[269] = { 1, 0, SEN(io_destroy), "io_destroy" }, +[270] = { 3, 0, SEN(io_submit), "io_submit" }, +[271] = { 3, 0, SEN(io_cancel), "io_cancel" }, +[272] = { 5, 0, SEN(io_getevents), "io_getevents" }, +[273] = { 4, 0, SEN(mq_open), "mq_open" }, +[274] = { 1, 0, SEN(mq_unlink), "mq_unlink" }, +[275] = { 5, 0, SEN(mq_timedsend), "mq_timedsend" }, +[276] = { 5, 0, SEN(mq_timedreceive), "mq_timedreceive" }, +[277] = { 2, 0, SEN(mq_notify), "mq_notify" }, +[278] = { 3, 0, SEN(mq_getsetattr), "mq_getsetattr" }, +[279] = { 5, TP, SEN(waitid), "waitid" }, +[280] = { 4, TD, SEN(tee), "tee" }, +[281] = { 5, 0, SEN(add_key), "add_key" }, +[282] = { 4, 0, SEN(request_key), "request_key" }, +[283] = { 5, 0, SEN(keyctl), "keyctl" }, +[284] = { 4, TD|TF, SEN(openat), "openat" }, +[285] = { 3, TD|TF, SEN(mkdirat), "mkdirat" }, +[286] = { 4, TD|TF, SEN(mknodat), "mknodat" }, +[287] = { 5, TD|TF, SEN(fchownat), "fchownat" }, +[288] = { 3, TD|TF, SEN(futimesat), "futimesat" }, +[289] = { 4, TD|TF, SEN(newfstatat), "fstatat64" }, +[290] = { 3, TD|TF, SEN(unlinkat), "unlinkat" }, +[291] = { 4, TD|TF, SEN(renameat), "renameat" }, +[292] = { 5, TD|TF, SEN(linkat), "linkat" }, +[293] = { 3, TD|TF, SEN(symlinkat), "symlinkat" }, +[294] = { 4, TD|TF, SEN(readlinkat), "readlinkat" }, +[295] = { 3, TD|TF, SEN(fchmodat), "fchmodat" }, +[296] = { 3, TD|TF, SEN(faccessat), "faccessat" }, +[297] = { 6, TD, SEN(pselect6), "pselect6" }, +[298] = { 5, TD, SEN(ppoll), "ppoll" }, +[299] = { 1, TP, SEN(unshare), "unshare" }, +[300] = { 2, 0, SEN(set_robust_list), "set_robust_list" }, +[301] = { 3, 0, SEN(get_robust_list), "get_robust_list" }, +[302] = { 4, TM, SEN(migrate_pages), "migrate_pages" }, +[303] = { 6, TM, SEN(mbind), "mbind" }, +[304] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" }, +[305] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" }, +[306] = { 4, 0, SEN(kexec_load), "kexec_load" }, +[307] = { 6, TM, SEN(move_pages), "move_pages" }, +[308] = { 3, 0, SEN(getcpu), "getcpu" }, +[309] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, +[310] = { 4, TD|TF, SEN(utimensat), "utimensat" }, +[311] = { 3, TD|TS, SEN(signalfd), "signalfd" }, +[312] = { 2, TD, SEN(timerfd_create), "timerfd_create" }, +[313] = { 1, TD, SEN(eventfd), "eventfd" }, +[314] = { 4, TD, SEN(fallocate), "fallocate" }, +[315] = { 4, TD, SEN(timerfd_settime), "timerfd_settime" }, +[316] = { 2, TD, SEN(timerfd_gettime), "timerfd_gettime" }, +[317] = { 4, TD|TS, SEN(signalfd4), "signalfd4" }, +[318] = { 2, TD, SEN(eventfd2), "eventfd2" }, +[319] = { 1, TD, SEN(epoll_create1), "epoll_create1" }, +[320] = { 3, TD, SEN(dup3), "dup3" }, +[321] = { 2, TD, SEN(pipe2), "pipe2" }, +[322] = { 1, TD, SEN(inotify_init1), "inotify_init1" }, +[323] = { 4, TN, SEN(accept4), "accept4" }, +[324] = { 4, TD, SEN(preadv), "preadv" }, +[325] = { 4, TD, SEN(pwritev), "pwritev" }, +[326] = { 4, TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, +[327] = { 5, TD, SEN(perf_event_open), "perf_event_open" }, +[328] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, +[329] = { 2, TD, SEN(fanotify_init), "fanotify_init" }, +[330] = { 5, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, +[331] = { 4, 0, SEN(prlimit64), "prlimit64" }, +[332] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, +[333] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, +[334] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[335] = { 1, TD, SEN(syncfs), "syncfs" }, +[336] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, +[337] = { 2, TD, SEN(setns), "setns" }, +[338] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, +[339] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, +[340] = { 0, NF, SEN(printargs), "kern_features" }, +[341] = { 5, 0, SEN(kcmp), "kcmp" }, +[342] = { 3, TD, SEN(finit_module), "finit_module" }, +[343] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, +[344] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, +[345] = { 5, TD|TF, SEN(renameat2), "renameat2" }, +[346] = { 3, 0, SEN(seccomp), "seccomp", }, +[347] = { 3, 0, SEN(getrandom), "getrandom", }, +[348] = { 2, TD, SEN(memfd_create), "memfd_create", }, +[349] = { 3, TD, SEN(bpf), "bpf", }, +[350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[351] = { 2, 0, SEN(membarrier), "membarrier", }, +[352] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, +[353] = { 3, TN, SEN(bind), "bind" }, +[354] = { 2, TN, SEN(listen), "listen" }, +[355] = { 5, TN, SEN(setsockopt), "setsockopt" }, +[356] = { 3, TM, SEN(mlock2), "mlock2" }, +[357] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[358] = { 6, TD, SEN(preadv2), "preadv2" }, +[359] = { 6, TD, SEN(pwritev2), "pwritev2" }, + +#define SYS_socket_subcall 400 +#include "subcall.h" diff -Nru strace-4.11/linux/tile/syscallent1.h strace-4.12/linux/tile/syscallent1.h --- strace-4.11/linux/tile/syscallent1.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/tile/syscallent1.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,6 +1,6 @@ -#define ARCH_mmap mmap_4koff +#define sys_ARCH_mmap sys_mmap_4koff #define ARCH_WANT_SYNC_FILE_RANGE2 1 #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, [245] = { 3, 0, SEN(printargs), "cacheflush" }, -[246 ... 259] = { }, diff -Nru strace-4.11/linux/tile/syscallent.h strace-4.12/linux/tile/syscallent.h --- strace-4.11/linux/tile/syscallent.h 2015-07-12 22:31:40.000000000 +0000 +++ strace-4.12/linux/tile/syscallent.h 2016-04-29 21:51:00.000000000 +0000 @@ -1,4 +1,4 @@ #include "64/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, [245] = { 3, 0, SEN(printargs), "cacheflush" }, -[246 ... 259] = { }, diff -Nru strace-4.11/linux/x32/ioctls_inc0.h strace-4.12/linux/x32/ioctls_inc0.h --- strace-4.11/linux/x32/ioctls_inc0.h 2015-03-02 02:55:14.000000000 +0000 +++ strace-4.12/linux/x32/ioctls_inc0.h 2016-05-24 14:50:43.000000000 +0000 @@ -81,6 +81,18 @@ { "asm-generic/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, { "asm-generic/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, { "asm-generic/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x120 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_OP", _IOC_READ|_IOC_WRITE, 0x6450, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6451, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -118,11 +130,14 @@ { "drm/drm.h", "DRM_IOCTL_MARK_BUFS", _IOC_WRITE, 0x6417, 0x18 }, { "drm/drm.h", "DRM_IOCTL_MODESET_CTL", _IOC_WRITE, 0x6408, 0x08 }, { "drm/drm.h", "DRM_IOCTL_MODE_ADDFB", _IOC_READ|_IOC_WRITE, 0x64ae, 0x1c }, -{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x44 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x68 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATOMIC", _IOC_READ|_IOC_WRITE, 0x64bc, 0x38 }, { "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 }, { "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c }, { "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DESTROY_DUMB", _IOC_READ|_IOC_WRITE, 0x64b4, 0x04 }, { "drm/drm.h", "DRM_IOCTL_MODE_DETACHMODE", _IOC_READ|_IOC_WRITE, 0x64a9, 0x48 }, { "drm/drm.h", "DRM_IOCTL_MODE_DIRTYFB", _IOC_READ|_IOC_WRITE, 0x64b1, 0x18 }, @@ -166,11 +181,21 @@ { "drm/drm.h", "DRM_IOCTL_UPDATE_DRAW", _IOC_WRITE, 0x643f, 0x18 }, { "drm/drm.h", "DRM_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x6400, 0x24 }, { "drm/drm.h", "DRM_IOCTL_WAIT_VBLANK", _IOC_READ|_IOC_WRITE, 0x643a, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", _IOC_READ|_IOC_WRITE, 0x6461, 0x28 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 }, { "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 }, @@ -201,6 +226,8 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x6457, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_CREATE", _IOC_READ|_IOC_WRITE, 0x646d, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY", _IOC_WRITE, 0x646e, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6474, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM", _IOC_READ|_IOC_WRITE, 0x6475, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645b, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 }, @@ -211,7 +238,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_INIT", _IOC_WRITE, 0x6453, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_LEAVEVT", _IOC_NONE, 0x645a, 0x00 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6466, 0x0c }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x28 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP_GTT", _IOC_READ|_IOC_WRITE, 0x6464, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PIN", _IOC_READ|_IOC_WRITE, 0x6455, 0x18 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PREAD", _IOC_WRITE, 0x645c, 0x20 }, @@ -227,7 +254,7 @@ { "drm/i915_drm.h", "DRM_IOCTL_I915_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6446, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID", _IOC_READ|_IOC_WRITE, 0x6465, 0x08 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_RESET_STATS", _IOC_READ|_IOC_WRITE, 0x6472, 0x18 }, -{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646a, 0x14 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_GET_VBLANK_PIPE", _IOC_READ, 0x644e, 0x04 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_HWS_ADDR", _IOC_WRITE, 0x6451, 0x10 }, { "drm/i915_drm.h", "DRM_IOCTL_I915_INIT", _IOC_WRITE, 0x6440, 0x44 }, @@ -352,7 +379,7 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644d, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 }, -{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644c, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, @@ -362,6 +389,13 @@ { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_INCR", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_READ", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 }, @@ -376,6 +410,15 @@ { "drm/via_drm.h", "DRM_IOCTL_VIA_MAP_INIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x14 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_PCICMD", _IOC_WRITE, 0x644a, 0x08 }, { "drm/via_drm.h", "DRM_IOCTL_VIA_WAIT_IRQ", _IOC_READ|_IOC_WRITE, 0x644d, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_EXECBUFFER", _IOC_WRITE, 0x6442, 0x20 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x6449, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", _IOC_READ|_IOC_WRITE, 0x6444, 0x38 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_INFO", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", _IOC_READ|_IOC_WRITE, 0x6447, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_WAIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x08 }, { "linux/agpgart.h", "AGPIOC_ACQUIRE", _IOC_NONE, 0x4101, 0x00 }, { "linux/agpgart.h", "AGPIOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x4106, 0x04 }, { "linux/agpgart.h", "AGPIOC_BIND", _IOC_WRITE, 0x4108, 0x04 }, @@ -387,6 +430,7 @@ { "linux/agpgart.h", "AGPIOC_RESERVE", _IOC_WRITE, 0x4104, 0x04 }, { "linux/agpgart.h", "AGPIOC_SETUP", _IOC_WRITE, 0x4103, 0x04 }, { "linux/agpgart.h", "AGPIOC_UNBIND", _IOC_WRITE, 0x4109, 0x04 }, +{ "linux/am437x-vpfe.h", "VIDIOC_AM437X_CCDC_CFG", _IOC_WRITE, 0x56c1, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE", _IOC_WRITE, 0x6305, 0x04 }, { "linux/android/binder.h", "BC_ACQUIRE_DONE", _IOC_WRITE, 0x6309, 0x10 }, { "linux/android/binder.h", "BC_ACQUIRE_RESULT", _IOC_WRITE, 0x6302, 0x04 }, @@ -672,6 +716,7 @@ { "linux/dm-ioctl.h", "DM_TABLE_STATUS", _IOC_READ|_IOC_WRITE, 0xfd0c, 0x138 }, { "linux/dm-ioctl.h", "DM_TARGET_MSG", _IOC_READ|_IOC_WRITE, 0xfd0e, 0x138 }, { "linux/dm-ioctl.h", "DM_VERSION", _IOC_READ|_IOC_WRITE, 0xfd00, 0x138 }, +{ "linux/dma-buf.h", "DMA_BUF_IOCTL_SYNC", _IOC_WRITE, 0x6200, 0x08 }, { "linux/dn.h", "OSIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, { "linux/dn.h", "OSIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, { "linux/dn.h", "SIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, @@ -840,6 +885,7 @@ { "linux/fs.h", "BLKALIGNOFF", _IOC_NONE, 0x127a, 0x00 }, { "linux/fs.h", "BLKBSZGET", _IOC_READ, 0x1270, 0x04 }, { "linux/fs.h", "BLKBSZSET", _IOC_WRITE, 0x1271, 0x04 }, +{ "linux/fs.h", "BLKDAXGET", _IOC_NONE, 0x1281, 0x00 }, { "linux/fs.h", "BLKDISCARD", _IOC_NONE, 0x1277, 0x00 }, { "linux/fs.h", "BLKDISCARDZEROES", _IOC_NONE, 0x127c, 0x00 }, { "linux/fs.h", "BLKFLSBUF", _IOC_NONE, 0x1261, 0x00 }, @@ -866,6 +912,9 @@ { "linux/fs.h", "BLKTRACETEARDOWN", _IOC_NONE, 0x1276, 0x00 }, { "linux/fs.h", "BLKZEROOUT", _IOC_NONE, 0x127f, 0x00 }, { "linux/fs.h", "FIBMAP", _IOC_NONE, 0x0001, 0x00 }, +{ "linux/fs.h", "FICLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/fs.h", "FICLONERANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/fs.h", "FIDEDUPERANGE", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, { "linux/fs.h", "FIFREEZE", _IOC_READ|_IOC_WRITE, 0x5877, 0x04 }, { "linux/fs.h", "FIGETBSZ", _IOC_NONE, 0x0002, 0x00 }, { "linux/fs.h", "FITHAW", _IOC_READ|_IOC_WRITE, 0x5878, 0x04 }, @@ -875,10 +924,15 @@ { "linux/fs.h", "FS_IOC32_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC32_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_FIEMAP", _IOC_READ|_IOC_WRITE, 0x660b, 0x20 }, +{ "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, +{ "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, { "linux/fsl-diu-fb.h", "MFB_GET_AOID", _IOC_READ, 0x4d04, 0x08 }, { "linux/fsl-diu-fb.h", "MFB_GET_GAMMA", _IOC_READ, 0x4d01, 0x01 }, @@ -897,6 +951,7 @@ { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 }, { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 }, +{ "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 }, { "linux/genwqe/genwqe_card.h", "GENWQE_GET_CARD_STATE", _IOC_READ, 0xa524, 0x04 }, @@ -914,6 +969,8 @@ { "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 }, { "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 }, +{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 }, +{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 }, { "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 }, { "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 }, { "linux/gsmmux.h", "GSMIOC_GETCONF", _IOC_READ, 0x4700, 0x4c }, @@ -982,6 +1039,10 @@ { "linux/hpet.h", "HPET_IE_ON", _IOC_NONE, 0x6801, 0x00 }, { "linux/hpet.h", "HPET_INFO", _IOC_READ, 0x6803, 0x0c }, { "linux/hpet.h", "HPET_IRQFREQ", _IOC_WRITE, 0x6806, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_CONFIG_BUFS", _IOC_WRITE, 0x431f, 0x20 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_IF_VERSION", _IOC_READ, 0x431e, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_STATE", _IOC_READ, 0x4315, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_SET_WAKELINE", _IOC_WRITE, 0x4317, 0x04 }, { "linux/hsi/hsi_char.h", "HSC_GET_RX", _IOC_WRITE, 0x6b14, 0x0c }, { "linux/hsi/hsi_char.h", "HSC_GET_TX", _IOC_WRITE, 0x6b16, 0x10 }, { "linux/hsi/hsi_char.h", "HSC_RESET", _IOC_NONE, 0x6b10, 0x00 }, @@ -1003,10 +1064,6 @@ { "linux/i2o-dev.h", "I2OSWDL", _IOC_READ|_IOC_WRITE, 0x6905, 0x1c }, { "linux/i2o-dev.h", "I2OSWUL", _IOC_READ|_IOC_WRITE, 0x6906, 0x1c }, { "linux/i2o-dev.h", "I2OVALIDATE", _IOC_READ, 0x6908, 0x04 }, -{ "linux/i2o.h", "BLKI2OGRSTRAT", _IOC_READ, 0x3201, 0x04 }, -{ "linux/i2o.h", "BLKI2OGWSTRAT", _IOC_READ, 0x3202, 0x04 }, -{ "linux/i2o.h", "BLKI2OSRSTRAT", _IOC_WRITE, 0x3203, 0x04 }, -{ "linux/i2o.h", "BLKI2OSWSTRAT", _IOC_WRITE, 0x3204, 0x04 }, { "linux/i8k.h", "I8K_BIOS_VERSION", _IOC_READ, 0x6980, 0x04 }, { "linux/i8k.h", "I8K_FN_STATUS", _IOC_READ, 0x6983, 0x04 }, { "linux/i8k.h", "I8K_GET_FAN", _IOC_READ|_IOC_WRITE, 0x6986, 0x04 }, @@ -1023,6 +1080,7 @@ { "linux/if_tun.h", "TUNGETFILTER", _IOC_READ, 0x54db, 0x08 }, { "linux/if_tun.h", "TUNGETIFF", _IOC_READ, 0x54d2, 0x04 }, { "linux/if_tun.h", "TUNGETSNDBUF", _IOC_READ, 0x54d3, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETBE", _IOC_READ, 0x54df, 0x04 }, { "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 }, { "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 }, { "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 }, @@ -1037,6 +1095,7 @@ { "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 }, { "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 }, { "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 }, { "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 }, { "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 }, { "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 }, @@ -1044,6 +1103,7 @@ { "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 }, { "linux/input.h", "EVIOCGKEYCODE_V2", _IOC_READ, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCGMASK", _IOC_READ, 0x4592, 0x10 }, { "linux/input.h", "EVIOCGRAB", _IOC_WRITE, 0x4590, 0x04 }, { "linux/input.h", "EVIOCGREP", _IOC_READ, 0x4503, 0x08 }, { "linux/input.h", "EVIOCGVERSION", _IOC_READ, 0x4501, 0x04 }, @@ -1053,6 +1113,7 @@ { "linux/input.h", "EVIOCSFF", _IOC_WRITE, 0x4580, 0x2c }, { "linux/input.h", "EVIOCSKEYCODE", _IOC_WRITE, 0x4504, 0x08 }, { "linux/input.h", "EVIOCSKEYCODE_V2", _IOC_WRITE, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCSMASK", _IOC_WRITE, 0x4593, 0x10 }, { "linux/input.h", "EVIOCSREP", _IOC_WRITE, 0x4503, 0x08 }, { "linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", _IOC_READ, 0x691e, 0x04 }, { "linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", _IOC_READ, 0x6912, 0x04 }, @@ -1167,6 +1228,9 @@ { "linux/joystick.h", "JSIOCSAXMAP", _IOC_WRITE, 0x6a31, 0x40 }, { "linux/joystick.h", "JSIOCSBTNMAP", _IOC_WRITE, 0x6a33, 0x400 }, { "linux/joystick.h", "JSIOCSCORR", _IOC_WRITE, 0x6a21, 0x24 }, +{ "linux/kcov.h", "KCOV_DISABLE", _IOC_NONE, 0x6365, 0x00 }, +{ "linux/kcov.h", "KCOV_ENABLE", _IOC_NONE, 0x6364, 0x00 }, +{ "linux/kcov.h", "KCOV_INIT_TRACE", _IOC_READ, 0x6301, 0x04 }, { "linux/kd.h", "GIO_CMAP", 0, 0x4B70, 0 }, { "linux/kd.h", "GIO_FONT", 0, 0x4B60, 0 }, { "linux/kd.h", "GIO_FONTX", 0, 0x4B6B, 0 }, @@ -1213,13 +1277,22 @@ { "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 }, { "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 }, { "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_REGISTER", _IOC_WRITE, 0x4b0d, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_UNREGISTER", _IOC_WRITE, 0x4b0e, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, { "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, { "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, { "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, @@ -1235,6 +1308,7 @@ { "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, { "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, { "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, { "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, { "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, { "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, @@ -1284,9 +1358,15 @@ { "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, { "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, { "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, { "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, { "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, { "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, { "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, { "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, { "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, @@ -1322,6 +1402,7 @@ { "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, { "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, { "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, { "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, { "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, { "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, @@ -1329,6 +1410,46 @@ { "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, { "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, { "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, +{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, +{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, +{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, +{ "linux/lightnvm.h", "NVM_DEV_REMOVE", _IOC_WRITE, 0x4c23, 0x24 }, +{ "linux/lightnvm.h", "NVM_GET_DEVICES", _IOC_READ, 0x4c21, 0x1000 }, +{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 }, +{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, +{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, +{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, +{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, { "linux/loop.h", "LOOP_CHANGE_FD", 0, 0x4C06, 0 }, { "linux/loop.h", "LOOP_CLR_FD", 0, 0x4C01, 0 }, { "linux/loop.h", "LOOP_CTL_ADD", 0, 0x4C80, 0 }, @@ -1337,6 +1458,7 @@ { "linux/loop.h", "LOOP_GET_STATUS", 0, 0x4C03, 0 }, { "linux/loop.h", "LOOP_GET_STATUS64", 0, 0x4C05, 0 }, { "linux/loop.h", "LOOP_SET_CAPACITY", 0, 0x4C07, 0 }, +{ "linux/loop.h", "LOOP_SET_DIRECT_IO", 0, 0x4C08, 0 }, { "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 }, { "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 }, { "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 }, @@ -1358,8 +1480,11 @@ { "linux/media.h", "MEDIA_IOC_DEVICE_INFO", _IOC_READ|_IOC_WRITE, 0x7c00, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 }, { "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c }, +{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 }, { "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 }, { "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 }, { "linux/meye.h", "MEYEIOC_G_PARAMS", _IOC_READ, 0x76c0, 0x06 }, { "linux/meye.h", "MEYEIOC_QBUF_CAPT", _IOC_WRITE, 0x76c2, 0x04 }, { "linux/meye.h", "MEYEIOC_STILLCAPT", _IOC_NONE, 0x76c4, 0x00 }, @@ -1370,6 +1495,7 @@ { "linux/mic_ioctl.h", "MIC_VIRTIO_CONFIG_CHANGE", _IOC_READ|_IOC_WRITE, 0x7305, 0x04 }, { "linux/mic_ioctl.h", "MIC_VIRTIO_COPY_DESC", _IOC_READ|_IOC_WRITE, 0x7302, 0x04 }, { "linux/mmc/ioctl.h", "MMC_IOC_CMD", _IOC_READ|_IOC_WRITE, 0xb300, 0x48 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_MULTI_CMD", _IOC_READ|_IOC_WRITE, 0xb301, 0x08 }, { "linux/mmtimer.h", "MMTIMER_GETBITS", _IOC_NONE, 0x6d04, 0x00 }, { "linux/mmtimer.h", "MMTIMER_GETCOUNTER", _IOC_READ, 0x6d09, 0x04 }, { "linux/mmtimer.h", "MMTIMER_GETFREQ", _IOC_READ, 0x6d02, 0x04 }, @@ -1381,8 +1507,6 @@ { "linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", _IOC_WRITE, 0x7211, 0x04 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", _IOC_READ, 0x7201, 0x230 }, { "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", _IOC_READ, 0x7202, 0x230 }, -{ "linux/msm_mdp.h", "MSMFB_BLIT", _IOC_WRITE, 0x6d02, 0x04 }, -{ "linux/msm_mdp.h", "MSMFB_GRP_DISP", _IOC_WRITE, 0x6d01, 0x04 }, { "linux/mtio.h", "MTIOCGET", _IOC_READ, 0x6d02, 0x1c }, { "linux/mtio.h", "MTIOCPOS", _IOC_READ, 0x6d03, 0x04 }, { "linux/mtio.h", "MTIOCTOP", _IOC_WRITE, 0x6d01, 0x08 }, @@ -1417,6 +1541,17 @@ { "linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", _IOC_WRITE, 0x6e06, 0x04 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", _IOC_READ, 0x6e05, 0x18 }, { "linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", _IOC_READ, 0x6e06, 0x04 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_CAP", _IOC_READ|_IOC_WRITE, 0x4e01, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_START", _IOC_READ|_IOC_WRITE, 0x4e02, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_STATUS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x30 }, +{ "linux/ndctl.h", "ND_IOCTL_CLEAR_ERROR", _IOC_READ|_IOC_WRITE, 0x4e04, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_DIMM_FLAGS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 }, @@ -1430,10 +1565,12 @@ { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, -{ "linux/nvme.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, -{ "linux/nvme.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, -{ "linux/nvme.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESET", _IOC_NONE, 0x4e44, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x30 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBSYS_RESET", _IOC_NONE, 0x4e45, 0x00 }, { "linux/nvram.h", "NVRAM_INIT", _IOC_NONE, 0x7040, 0x00 }, { "linux/nvram.h", "NVRAM_SETCKS", _IOC_NONE, 0x7041, 0x00 }, { "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AEWB_CFG", _IOC_READ|_IOC_WRITE, 0x56c3, 0x20 }, @@ -1472,6 +1609,7 @@ { "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 }, { "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 }, { "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", _IOC_WRITE, 0x2406, 0x04 }, { "linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", _IOC_NONE, 0x2405, 0x00 }, { "linux/phantom.h", "PHN_GETREG", _IOC_READ|_IOC_WRITE, 0x7005, 0x08 }, @@ -1484,6 +1622,7 @@ { "linux/phantom.h", "PHN_SET_REG", _IOC_WRITE, 0x7001, 0x04 }, { "linux/phantom.h", "PHN_SET_REGS", _IOC_WRITE, 0x7003, 0x04 }, { "linux/pktcdvd.h", "PACKET_CTRL_CMD", _IOC_READ|_IOC_WRITE, 0x5801, 0x18 }, +{ "linux/platform_data/media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, { "linux/pmu.h", "PMU_IOC_CAN_SLEEP", _IOC_READ, 0x4205, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", _IOC_READ, 0x4201, 0x04 }, { "linux/pmu.h", "PMU_IOC_GET_MODEL", _IOC_READ, 0x4203, 0x04 }, @@ -1549,6 +1688,12 @@ { "linux/pps.h", "PPS_GETPARAMS", _IOC_READ, 0x70a1, 0x04 }, { "linux/pps.h", "PPS_KC_BIND", _IOC_WRITE, 0x70a5, 0x04 }, { "linux/pps.h", "PPS_SETPARAMS", _IOC_WRITE, 0x70a2, 0x04 }, +{ "linux/pr.h", "IOC_PR_CLEAR", _IOC_WRITE, 0x70cd, 0x10 }, +{ "linux/pr.h", "IOC_PR_PREEMPT", _IOC_WRITE, 0x70cb, 0x18 }, +{ "linux/pr.h", "IOC_PR_PREEMPT_ABORT", _IOC_WRITE, 0x70cc, 0x18 }, +{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 }, +{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 }, +{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 }, { "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 }, { "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 }, { "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 }, @@ -1556,10 +1701,12 @@ { "linux/ptp_clock.h", "PTP_PIN_GETFUNC", _IOC_READ|_IOC_WRITE, 0x3d06, 0x60 }, { "linux/ptp_clock.h", "PTP_PIN_SETFUNC", _IOC_WRITE, 0x3d07, 0x60 }, { "linux/ptp_clock.h", "PTP_SYS_OFFSET", _IOC_WRITE, 0x3d05, 0x340 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET_PRECISE", _IOC_READ|_IOC_WRITE, 0x3d08, 0x40 }, { "linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", _IOC_READ, 0x4003, 0x04 }, { "linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", _IOC_WRITE, 0x4004, 0x04 }, { "linux/raid/md_u.h", "ADD_NEW_DISK", _IOC_WRITE, 0x0921, 0x14 }, { "linux/raid/md_u.h", "CLEAR_ARRAY", _IOC_NONE, 0x0920, 0x00 }, +{ "linux/raid/md_u.h", "CLUSTERED_DISK_NACK", _IOC_NONE, 0x0935, 0x00 }, { "linux/raid/md_u.h", "GET_ARRAY_INFO", _IOC_READ, 0x0911, 0x48 }, { "linux/raid/md_u.h", "GET_BITMAP_FILE", _IOC_READ, 0x0915, 0x1000 }, { "linux/raid/md_u.h", "GET_DISK_INFO", _IOC_READ, 0x0912, 0x14 }, @@ -1589,6 +1736,30 @@ { "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 }, { "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 }, { "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 }, +{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d0a, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0c, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d09, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0b, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_FREE_DMA", _IOC_WRITE, 0x6d14, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_GET_EVENT_MASK", _IOC_READ, 0x6d0e, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_INBOUND", _IOC_READ|_IOC_WRITE, 0x6d11, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_OUTBOUND", _IOC_READ|_IOC_WRITE, 0x6d0f, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_GET_PROPERTIES", _IOC_READ, 0x6d04, 0x30 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_COMPTAG_SET", _IOC_WRITE, 0x6d02, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_HDID_SET", _IOC_WRITE, 0x6d01, 0x02 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_PORT_IDX_GET", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_LOCAL", _IOC_READ, 0x6d05, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_REMOTE", _IOC_READ, 0x6d07, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_LOCAL", _IOC_WRITE, 0x6d06, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_REMOTE", _IOC_WRITE, 0x6d08, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_SET_EVENT_MASK", _IOC_WRITE, 0x6d0d, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_TRANSFER", _IOC_READ|_IOC_WRITE, 0x6d15, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_INBOUND", _IOC_WRITE, 0x6d12, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_OUTBOUND", _IOC_WRITE, 0x6d10, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_WAIT_FOR_ASYNC", _IOC_WRITE, 0x6d16, 0x08 }, { "linux/rtc.h", "RTC_AIE_OFF", _IOC_NONE, 0x7002, 0x00 }, { "linux/rtc.h", "RTC_AIE_ON", _IOC_NONE, 0x7001, 0x00 }, { "linux/rtc.h", "RTC_ALM_READ", _IOC_READ, 0x7008, 0x24 }, @@ -1611,6 +1782,23 @@ { "linux/rtc.h", "RTC_WIE_ON", _IOC_NONE, 0x700f, 0x00 }, { "linux/rtc.h", "RTC_WKALM_RD", _IOC_READ, 0x7010, 0x28 }, { "linux/rtc.h", "RTC_WKALM_SET", _IOC_WRITE, 0x700f, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREG", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREQ", _IOC_READ|_IOC_WRITE, 0x7304, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_BIND", _IOC_READ|_IOC_WRITE, 0x7301, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_CONNECT", _IOC_READ|_IOC_WRITE, 0x7303, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_MARK", _IOC_READ|_IOC_WRITE, 0x730f, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_SIGNAL", _IOC_READ|_IOC_WRITE, 0x7311, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_WAIT", _IOC_READ|_IOC_WRITE, 0x7310, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_GET_NODEIDS", _IOC_READ|_IOC_WRITE, 0x730e, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_LISTEN", _IOC_WRITE, 0x7302, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_READFROM", _IOC_READ|_IOC_WRITE, 0x730a, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_RECV", _IOC_READ|_IOC_WRITE, 0x7307, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_REG", _IOC_READ|_IOC_WRITE, 0x7308, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_SEND", _IOC_READ|_IOC_WRITE, 0x7306, 0x18 }, +{ "linux/scif_ioctl.h", "SCIF_UNREG", _IOC_READ|_IOC_WRITE, 0x7309, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_VREADFROM", _IOC_READ|_IOC_WRITE, 0x730c, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_VWRITETO", _IOC_READ|_IOC_WRITE, 0x730d, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_WRITETO", _IOC_READ|_IOC_WRITE, 0x730b, 0x28 }, { "linux/serio.h", "SPIOCSTYPE", _IOC_WRITE, 0x7101, 0x04 }, { "linux/sockios.h", "SIOCADDDLCI", 0, 0x8980, 0 }, { "linux/sockios.h", "SIOCADDMULTI", 0, 0x8931, 0 }, @@ -1805,6 +1993,9 @@ { "linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", _IOC_WRITE, 0x6b04, 0x04 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE", _IOC_WRITE, 0x6b01, 0x01 }, { "linux/spi/spidev.h", "SPI_IOC_WR_MODE32", _IOC_WRITE, 0x6b05, 0x04 }, +{ "linux/stm.h", "STP_POLICY_ID_GET", _IOC_READ, 0x2501, 0x10 }, +{ "linux/stm.h", "STP_POLICY_ID_SET", _IOC_READ|_IOC_WRITE, 0x2500, 0x10 }, +{ "linux/stm.h", "STP_SET_OPTIONS", _IOC_WRITE, 0x2502, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", _IOC_READ, 0x3314, 0x08 }, { "linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", _IOC_NONE, 0x3304, 0x00 }, { "linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", _IOC_READ, 0x3313, 0x08 }, @@ -1887,15 +2078,18 @@ { "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 }, { "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 }, { "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 }, -{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x04 }, +{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 }, +{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 }, { "linux/udf_fs_i.h", "UDF_GETEABLOCK", _IOC_READ, 0x6c41, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 }, { "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 }, { "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 }, +{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c }, { "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c }, { "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x60 }, { "linux/uinput.h", "UI_DEV_CREATE", _IOC_NONE, 0x5501, 0x00 }, { "linux/uinput.h", "UI_DEV_DESTROY", _IOC_NONE, 0x5502, 0x00 }, +{ "linux/uinput.h", "UI_DEV_SETUP", _IOC_WRITE, 0x5503, 0x5c }, { "linux/uinput.h", "UI_END_FF_ERASE", _IOC_WRITE, 0x55cb, 0x0c }, { "linux/uinput.h", "UI_END_FF_UPLOAD", _IOC_WRITE, 0x55c9, 0x60 }, { "linux/uinput.h", "UI_GET_VERSION", _IOC_READ, 0x552d, 0x04 }, @@ -1925,6 +2119,11 @@ { "linux/usb/iowarrior.h", "IOW_GETINFO", _IOC_READ, 0xc003, 0x28 }, { "linux/usb/iowarrior.h", "IOW_READ", _IOC_WRITE, 0xc002, 0x04 }, { "linux/usb/iowarrior.h", "IOW_WRITE", _IOC_WRITE, 0xc001, 0x04 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GET_CAPS", _IOC_READ, 0x5b11, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GOTO_LOCAL", _IOC_NONE, 0x5b14, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_LOCAL_LOCKOUT", _IOC_NONE, 0x5b15, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 }, { "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 }, @@ -1946,6 +2145,7 @@ { "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", _IOC_READ, 0x551b, 0x108 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", _IOC_READ, 0x550e, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DROP_PRIVILEGES", _IOC_WRITE, 0x551e, 0x04 }, { "linux/usbdevice_fs.h", "USBDEVFS_FREE_STREAMS", _IOC_READ, 0x551d, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", _IOC_WRITE, 0x5508, 0x104 }, { "linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", _IOC_READ, 0x551a, 0x04 }, @@ -1964,6 +2164,12 @@ { "linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", _IOC_READ, 0x5504, 0x08 }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", _IOC_READ, 0x550a, 0x2c }, { "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", _IOC_READ, 0x550a, 0x2a }, +{ "linux/userfaultfd.h", "UFFDIO_API", _IOC_READ|_IOC_WRITE, 0xaa3f, 0x18 }, +{ "linux/userfaultfd.h", "UFFDIO_COPY", _IOC_READ|_IOC_WRITE, 0xaa03, 0x28 }, +{ "linux/userfaultfd.h", "UFFDIO_REGISTER", _IOC_READ|_IOC_WRITE, 0xaa00, 0x20 }, +{ "linux/userfaultfd.h", "UFFDIO_UNREGISTER", _IOC_READ, 0xaa01, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_WAKE", _IOC_READ, 0xaa02, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_ZEROPAGE", _IOC_READ|_IOC_WRITE, 0xaa04, 0x20 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_MAP", _IOC_READ|_IOC_WRITE, 0x7520, 0x58 }, { "linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", _IOC_READ|_IOC_WRITE, 0x7521, 0x0c }, { "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, @@ -2002,11 +2208,17 @@ { "linux/vfio.h", "VFIO_IOMMU_ENABLE", _IOC_NONE, 0x3b73, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_MAP_DMA", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_REGISTER_MEMORY", _IOC_NONE, 0x3b75, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_CREATE", _IOC_NONE, 0x3b77, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_REMOVE", _IOC_NONE, 0x3b78, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY", _IOC_NONE, 0x3b76, 0x00 }, { "linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", _IOC_NONE, 0x3b72, 0x00 }, { "linux/vfio.h", "VFIO_SET_IOMMU", _IOC_NONE, 0x3b66, 0x00 }, { "linux/vhost.h", "VHOST_GET_FEATURES", _IOC_READ, 0xaf00, 0x08 }, { "linux/vhost.h", "VHOST_GET_VRING_BASE", _IOC_READ|_IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf24, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_ENDIAN", _IOC_WRITE, 0xaf14, 0x08 }, { "linux/vhost.h", "VHOST_NET_SET_BACKEND", _IOC_WRITE, 0xaf30, 0x08 }, { "linux/vhost.h", "VHOST_RESET_OWNER", _IOC_NONE, 0xaf02, 0x00 }, { "linux/vhost.h", "VHOST_SCSI_CLEAR_ENDPOINT", _IOC_WRITE, 0xaf41, 0xe8 }, @@ -2021,7 +2233,9 @@ { "linux/vhost.h", "VHOST_SET_OWNER", _IOC_NONE, 0xaf01, 0x00 }, { "linux/vhost.h", "VHOST_SET_VRING_ADDR", _IOC_WRITE, 0xaf11, 0x28 }, { "linux/vhost.h", "VHOST_SET_VRING_BASE", _IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf23, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_CALL", _IOC_WRITE, 0xaf21, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ENDIAN", _IOC_WRITE, 0xaf13, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 }, { "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 }, @@ -2211,55 +2425,24 @@ { "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 }, { "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 }, { "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 }, -{ "media/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, -{ "media/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, { "media/davinci/vpfe_capture.h", "VPFE_CMD_S_CCDC_RAW_PARAMS", _IOC_WRITE, 0x56c1, 0x04 }, -{ "media/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, -{ "media/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, -{ "media/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 }, -{ "media/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, -{ "media/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 }, -{ "media/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, -{ "media/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 }, -{ "media/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 }, -{ "media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, -{ "media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, -{ "media/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, -{ "media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, -{ "media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, -{ "media/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, -{ "media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, +{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, +{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, { "media/v4l2-common.h", "TUNER_SET_CONFIG", _IOC_WRITE, 0x645c, 0x08 }, { "media/v4l2-common.h", "VIDIOC_INT_RESET", _IOC_WRITE, 0x6466, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_DEVICE_NOTIFY_EVENT", _IOC_WRITE, 0x7602, 0x88 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", _IOC_WRITE, 0x7600, 0x04 }, { "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", _IOC_WRITE, 0x7601, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_DOWNLOAD_IMAGE", _IOC_WRITE, 0xca0a, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_AFU_ID", _IOC_READ, 0xca02, 0x40 }, { "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 }, { "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 }, { "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 }, { "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 }, { "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 }, @@ -2324,10 +2507,21 @@ { "net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", _IOC_READ, 0x52d2, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", _IOC_WRITE, 0x52c9, 0x04 }, { "net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", _IOC_WRITE, 0x52dc, 0x04 }, +{ "net/nfc/nci_core.h", "NCIUARTSETDRIVER", _IOC_WRITE, 0x5500, 0x04 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", _IOC_NONE, 0x1b03, 0x00 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c }, { "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 }, { "rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RECOVER_AFU", _IOC_READ|_IOC_WRITE, 0xca85, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RELEASE", _IOC_READ|_IOC_WRITE, 0xca82, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_DIRECT", _IOC_READ|_IOC_WRITE, 0xca81, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_VIRTUAL", _IOC_READ|_IOC_WRITE, 0xca87, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VERIFY", _IOC_READ|_IOC_WRITE, 0xca84, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_CLONE", _IOC_READ|_IOC_WRITE, 0xca89, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_RESIZE", _IOC_READ|_IOC_WRITE, 0xca88, 0x78 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0, 0x5386, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0, 0x5382, 0 }, { "scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0, 0x5387, 0 }, @@ -2370,7 +2564,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", _IOC_READ|_IOC_WRITE, 0x5322, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", _IOC_READ|_IOC_WRITE, 0x5349, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5334, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", _IOC_READ|_IOC_WRITE, 0x5343, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", _IOC_READ|_IOC_WRITE, 0x5340, 0x5c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", _IOC_READ|_IOC_WRITE, 0x5341, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", _IOC_READ|_IOC_WRITE, 0x5345, 0x60 }, @@ -2386,7 +2579,6 @@ { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", _IOC_WRITE, 0x5323, 0xa4 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", _IOC_WRITE, 0x534a, 0x4c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5335, 0x8c }, -{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", _IOC_WRITE, 0x5344, 0x00 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", _IOC_WRITE, 0x5342, 0x2c }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", _IOC_WRITE, 0x5346, 0x60 }, { "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", _IOC_WRITE, 0x5330, 0x50 }, @@ -2442,6 +2634,7 @@ { "sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", _IOC_WRITE, 0x4146, 0x04 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_START", _IOC_NONE, 0x4142, 0x00 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", _IOC_READ, 0x4120, 0x80 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS_EXT", _IOC_READ|_IOC_WRITE, 0x4124, 0x80 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4113, 0x68 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", _IOC_READ|_IOC_WRITE, 0x4123, 0x88 }, { "sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", _IOC_WRITE, 0x4102, 0x04 }, @@ -2539,8 +2732,7 @@ { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", _IOC_NONE, 0x4883, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", _IOC_NONE, 0x4882, 0x00 }, { "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", _IOC_READ, 0x4880, 0x04 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_SET_RTC", _IOC_WRITE, 0x6105, 0x10 }, -{ "staging/android/android_alarm.h", "ANDROID_ALARM_WAIT", _IOC_NONE, 0x6101, 0x00 }, +{ "sound/usb_stream.h", "SNDRV_USB_STREAM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4890, 0x10 }, { "staging/android/ashmem.h", "ASHMEM_GET_NAME", _IOC_READ, 0x7702, 0x100 }, { "staging/android/ashmem.h", "ASHMEM_GET_PIN_STATUS", _IOC_NONE, 0x7709, 0x00 }, { "staging/android/ashmem.h", "ASHMEM_GET_PROT_MASK", _IOC_NONE, 0x7706, 0x00 }, @@ -2561,17 +2753,10 @@ { "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 }, { "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 }, -{ "staging/android/logger.h", "LOGGER_FLUSH_LOG", _IOC_NONE, 0xae04, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_BUF_SIZE", _IOC_NONE, 0xae01, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_LOG_LEN", _IOC_NONE, 0xae02, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_NEXT_ENTRY_LEN", _IOC_NONE, 0xae03, 0x00 }, -{ "staging/android/logger.h", "LOGGER_GET_VERSION", _IOC_NONE, 0xae05, 0x00 }, -{ "staging/android/logger.h", "LOGGER_SET_VERSION", _IOC_NONE, 0xae06, 0x00 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 }, { "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 }, { "staging/android/sync.h", "SYNC_IOC_FENCE_INFO", _IOC_READ|_IOC_WRITE, 0x3e02, 0x28 }, { "staging/android/sync.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e01, 0x28 }, -{ "staging/android/sync.h", "SYNC_IOC_WAIT", _IOC_WRITE, 0x3e00, 0x04 }, { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 }, { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 }, { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 }, @@ -2613,5 +2798,11 @@ { "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 }, { "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 }, { "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_MAP_GRANT_REF", _IOC_NONE, 0x4700, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_MAX_GRANTS", _IOC_NONE, 0x4703, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_UNMAP_NOTIFY", _IOC_NONE, 0x4707, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_UNMAP_GRANT_REF", _IOC_NONE, 0x4701, 0x10 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_EVTCHN", _IOC_NONE, 0x4200, 0x00 }, { "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_SETUP", _IOC_NONE, 0x4201, 0x00 }, diff -Nru strace-4.11/linux/x32/syscallent.h strace-4.12/linux/x32/syscallent.h --- strace-4.11/linux/x32/syscallent.h 2015-12-08 21:19:35.000000000 +0000 +++ strace-4.12/linux/x32/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -37,7 +37,7 @@ [ 36] = { 2, 0, SEN(getitimer), "getitimer" }, [ 37] = { 1, 0, SEN(alarm), "alarm" }, [ 38] = { 3, 0, SEN(setitimer), "setitimer" }, -[ 39] = { 0, 0, SEN(getpid), "getpid" }, +[ 39] = { 0, NF, SEN(getpid), "getpid" }, [ 40] = { 4, TD|TN, SEN(sendfile64), "sendfile" }, [ 41] = { 3, TN, SEN(socket), "socket" }, [ 42] = { 3, TN, SEN(connect), "connect" }, @@ -45,7 +45,7 @@ [ 44] = { 6, TN, SEN(sendto), "sendto" }, [ 45] = { 6, TN, SEN(printargs), "64:recvfrom" }, [ 46] = { 3, TN, SEN(printargs), "64:sendmsg" }, -[ 47] = { 5, TN, SEN(printargs), "64:recvmsg" }, +[ 47] = { 3, TN, SEN(printargs), "64:recvmsg" }, [ 48] = { 2, TN, SEN(shutdown), "shutdown" }, [ 49] = { 3, TN, SEN(bind), "bind" }, [ 50] = { 2, TN, SEN(listen), "listen" }, @@ -93,7 +93,7 @@ [ 92] = { 3, TF, SEN(chown), "chown" }, [ 93] = { 3, TD, SEN(fchown), "fchown" }, [ 94] = { 3, TF, SEN(chown), "lchown" }, -[ 95] = { 1, 0, SEN(umask), "umask" }, +[ 95] = { 1, NF, SEN(umask), "umask" }, [ 96] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [ 97] = { 2, 0, SEN(getrlimit), "getrlimit" }, [ 98] = { 2, 0, SEN(getrusage), "getrusage" }, @@ -108,7 +108,7 @@ [107] = { 0, NF, SEN(geteuid), "geteuid" }, [108] = { 0, NF, SEN(getegid), "getegid" }, [109] = { 2, 0, SEN(setpgid), "setpgid" }, -[110] = { 0, 0, SEN(getppid), "getppid" }, +[110] = { 0, NF, SEN(getppid), "getppid" }, [111] = { 0, 0, SEN(getpgrp), "getpgrp" }, [112] = { 0, 0, SEN(setsid), "setsid" }, [113] = { 2, 0, SEN(setreuid), "setreuid" }, @@ -133,7 +133,7 @@ [132] = { 2, TF, SEN(utime), "utime" }, [133] = { 3, TF, SEN(mknod), "mknod" }, [134] = { 1, TF, SEN(printargs), "64:uselib" }, -[135] = { 1, 0, SEN(personality), "personality" }, +[135] = { 1, NF, SEN(personality), "personality" }, [136] = { 2, 0, SEN(ustat), "ustat" }, [137] = { 2, TF, SEN(statfs), "statfs" }, [138] = { 2, TD, SEN(fstatfs), "fstatfs" }, @@ -184,7 +184,7 @@ [183] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [184] = { 3, 0, SEN(tuxcall), "tuxcall" }, [185] = { 3, 0, SEN(security), "security" }, -[186] = { 0, 0, SEN(gettid), "gettid" }, +[186] = { 0, NF, SEN(gettid), "gettid" }, [187] = { 3, TD, SEN(readahead), "readahead" }, [188] = { 5, TF, SEN(setxattr), "setxattr" }, [189] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -324,7 +324,10 @@ [323] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [324] = { 2, 0, SEN(membarrier), "membarrier", }, [325] = { 3, TM, SEN(mlock2), "mlock2" }, -[326 ... 511] = { }, +[326] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[327] = { 6, TD, SEN(printargs), "64:preadv2" }, +[328] = { 6, TD, SEN(printargs), "64:pwritev2" }, +[327 ... 511] = { }, /* * x32-specific system call numbers start at 512 to avoid cache impact * for native 64-bit operation. diff -Nru strace-4.11/linux/x86_64/syscallent.h strace-4.12/linux/x86_64/syscallent.h --- strace-4.11/linux/x86_64/syscallent.h 2015-12-08 21:19:35.000000000 +0000 +++ strace-4.12/linux/x86_64/syscallent.h 2016-05-11 00:58:06.000000000 +0000 @@ -37,7 +37,7 @@ [ 36] = { 2, 0, SEN(getitimer), "getitimer" }, [ 37] = { 1, 0, SEN(alarm), "alarm" }, [ 38] = { 3, 0, SEN(setitimer), "setitimer" }, -[ 39] = { 0, 0, SEN(getpid), "getpid" }, +[ 39] = { 0, NF, SEN(getpid), "getpid" }, [ 40] = { 4, TD|TN, SEN(sendfile64), "sendfile" }, [ 41] = { 3, TN, SEN(socket), "socket" }, [ 42] = { 3, TN, SEN(connect), "connect" }, @@ -93,7 +93,7 @@ [ 92] = { 3, TF, SEN(chown), "chown" }, [ 93] = { 3, TD, SEN(fchown), "fchown" }, [ 94] = { 3, TF, SEN(chown), "lchown" }, -[ 95] = { 1, 0, SEN(umask), "umask" }, +[ 95] = { 1, NF, SEN(umask), "umask" }, [ 96] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [ 97] = { 2, 0, SEN(getrlimit), "getrlimit" }, [ 98] = { 2, 0, SEN(getrusage), "getrusage" }, @@ -108,7 +108,7 @@ [107] = { 0, NF, SEN(geteuid), "geteuid" }, [108] = { 0, NF, SEN(getegid), "getegid" }, [109] = { 2, 0, SEN(setpgid), "setpgid" }, -[110] = { 0, 0, SEN(getppid), "getppid" }, +[110] = { 0, NF, SEN(getppid), "getppid" }, [111] = { 0, 0, SEN(getpgrp), "getpgrp" }, [112] = { 0, 0, SEN(setsid), "setsid" }, [113] = { 2, 0, SEN(setreuid), "setreuid" }, @@ -133,7 +133,7 @@ [132] = { 2, TF, SEN(utime), "utime" }, [133] = { 3, TF, SEN(mknod), "mknod" }, [134] = { 1, TF, SEN(uselib), "uselib" }, -[135] = { 1, 0, SEN(personality), "personality" }, +[135] = { 1, NF, SEN(personality), "personality" }, [136] = { 2, 0, SEN(ustat), "ustat" }, [137] = { 2, TF, SEN(statfs), "statfs" }, [138] = { 2, TD, SEN(fstatfs), "fstatfs" }, @@ -184,7 +184,7 @@ [183] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, [184] = { 3, 0, SEN(tuxcall), "tuxcall" }, [185] = { 3, 0, SEN(security), "security" }, -[186] = { 0, 0, SEN(gettid), "gettid" }, +[186] = { 0, NF, SEN(gettid), "gettid" }, [187] = { 3, TD, SEN(readahead), "readahead" }, [188] = { 5, TF, SEN(setxattr), "setxattr" }, [189] = { 5, TF, SEN(setxattr), "lsetxattr" }, @@ -324,3 +324,6 @@ [323] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, [324] = { 2, 0, SEN(membarrier), "membarrier", }, [325] = { 3, TM, SEN(mlock2), "mlock2" }, +[326] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[327] = { 6, TD, SEN(preadv2), "preadv2" }, +[328] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff -Nru strace-4.11/linux/xtensa/syscallent.h strace-4.12/linux/xtensa/syscallent.h --- strace-4.11/linux/xtensa/syscallent.h 2015-12-08 21:19:53.000000000 +0000 +++ strace-4.12/linux/xtensa/syscallent.h 2016-02-13 00:57:00.000000000 +0000 @@ -51,7 +51,7 @@ [ 55] = { 2, TD, SEN(fstat64), "fstat64" }, [ 56] = { 2, TD, SEN(flock), "flock" }, [ 57] = { 2, TF, SEN(access), "access" }, -[ 58] = { 1, 0, SEN(umask), "umask" }, +[ 58] = { 1, NF, SEN(umask), "umask" }, [ 59] = { 3, TD, SEN(getdents), "getdents" }, [ 60] = { 3, TD, SEN(getdents64), "getdents64" }, [ 61] = { 3, TD, SEN(fcntl64), "fcntl64" }, @@ -81,7 +81,7 @@ [ 85] = { 2, TM, SEN(munlock), "munlock" }, [ 86] = { 1, TM, SEN(mlockall), "mlockall" }, [ 87] = { 0, TM, SEN(munlockall), "munlockall" }, -[ 88] = { 4, TM|SI, SEN(mremap), "mremap" }, +[ 88] = { 5, TM|SI, SEN(mremap), "mremap" }, [ 89] = { 3, TM, SEN(msync), "msync" }, [ 90] = { 3, TM, SEN(mincore), "mincore" }, [ 91] = { 3, TM, SEN(madvise), "madvise" }, @@ -113,18 +113,18 @@ [117] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, [118] = { 1, TP|SE, SEN(exit), "exit" }, [119] = { 1, TP|SE, SEN(exit), "exit_group" }, -[120] = { 0, 0, SEN(getpid), "getpid" }, +[120] = { 0, NF, SEN(getpid), "getpid" }, [121] = { 4, TP, SEN(wait4), "wait4" }, [122] = { 5, TP, SEN(waitid), "waitid" }, [123] = { 2, TS, SEN(kill), "kill" }, [124] = { 2, TS, SEN(kill), "tkill" }, [125] = { 3, TS, SEN(tgkill), "tgkill" }, [126] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, -[127] = { 0, 0, SEN(gettid), "gettid" }, +[127] = { 0, NF, SEN(gettid), "gettid" }, [128] = { 0, 0, SEN(setsid), "setsid" }, [129] = { 1, 0, SEN(getsid), "getsid" }, [130] = { 5, 0, SEN(prctl), "prctl" }, -[131] = { 1, 0, SEN(personality), "personality" }, +[131] = { 1, NF, SEN(personality), "personality" }, [132] = { 2, 0, SEN(getpriority), "getpriority" }, [133] = { 3, 0, SEN(setpriority), "setpriority" }, [134] = { 3, 0, SEN(setitimer), "setitimer" }, @@ -143,7 +143,7 @@ [147] = { 3, 0, SEN(getresgid), "getresgid" }, [148] = { 2, 0, SEN(setpgid), "setpgid" }, [149] = { 1, 0, SEN(getpgid), "getpgid" }, -[150] = { 0, 0, SEN(getppid), "getppid" }, +[150] = { 0, NF, SEN(getppid), "getppid" }, [151] = { 0, 0, SEN(getpgrp), "getpgrp" }, [152 ... 153] = { }, [154] = { 1, 0, SEN(times), "times" }, @@ -183,7 +183,7 @@ [188] = { 2, 0, SEN(setrlimit), "setrlimit" }, [189] = { 2, 0, SEN(getrlimit), "getrlimit" }, [190] = { 2, 0, SEN(getrusage), "getrusage" }, -[191] = { 5, 0, SEN(futex), "futex" }, +[191] = { 6, 0, SEN(futex), "futex" }, [192] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [193] = { 2, 0, SEN(settimeofday), "settimeofday" }, [194] = { 1, 0, SEN(adjtimex), "adjtimex" }, @@ -195,15 +195,15 @@ [200] = { 3, 0, SEN(syslog), "syslog" }, [201] = { 0, 0, SEN(vhangup), "vhangup" }, [202] = { 1, TF, SEN(uselib), "uselib" }, -[203] = { 3, 0, SEN(reboot), "reboot" }, +[203] = { 4, 0, SEN(reboot), "reboot" }, [204] = { 4, TF, SEN(quotactl), "quotactl" }, [205] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, [206] = { 1, 0, SEN(sysctl), "_sysctl" }, [207] = { 2, 0, SEN(bdflush), "bdflush" }, [208] = { 1, 0, SEN(uname), "uname" }, [209] = { 1, 0, SEN(sysinfo), "sysinfo" }, -[210] = { 2, 0, SEN(init_module), "init_module" }, -[211] = { 1, 0, SEN(delete_module), "delete_module" }, +[210] = { 3, 0, SEN(init_module), "init_module" }, +[211] = { 2, 0, SEN(delete_module), "delete_module" }, [212] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, [213] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, [214] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, @@ -247,7 +247,7 @@ [254] = { 4, 0, SEN(lookup_dcookie), "lookup_dcookie" }, [255] = { }, [256] = { 5, 0, SEN(add_key), "add_key" }, -[257] = { 5, 0, SEN(request_key), "request_key" }, +[257] = { 4, 0, SEN(request_key), "request_key" }, [258] = { 5, 0, SEN(keyctl), "keyctl" }, [259] = { }, [260] = { 5, TD, SEN(readahead), "readahead" }, @@ -270,10 +270,10 @@ [277] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [278] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, [279] = { 1, TD, SEN(inotify_init1), "inotify_init1" }, -[280] = { 0, 0, SEN(getcpu), "getcpu" }, +[280] = { 3, 0, SEN(getcpu), "getcpu" }, [281] = { 4, 0, SEN(kexec_load), "kexec_load" }, -[282] = { 2, 0, SEN(ioprio_set), "ioprio_set" }, -[283] = { 3, 0, SEN(ioprio_get), "ioprio_get" }, +[282] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, +[283] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, [284] = { 2, 0, SEN(set_robust_list), "set_robust_list" }, [285] = { 3, 0, SEN(get_robust_list), "get_robust_list" }, [286 ... 287] = { }, @@ -285,12 +285,12 @@ [293] = { 5, TD|TF, SEN(linkat), "linkat" }, [294] = { 3, TD|TF, SEN(symlinkat), "symlinkat" }, [295] = { 4, TD|TF, SEN(readlinkat), "readlinkat" }, -[296] = { 0, TD|TF, SEN(utimensat), "utimensat" }, +[296] = { 4, TD|TF, SEN(utimensat), "utimensat" }, [297] = { 5, TD|TF, SEN(fchownat), "fchownat" }, -[298] = { 4, TD|TF, SEN(futimesat), "futimesat" }, +[298] = { 3, TD|TF, SEN(futimesat), "futimesat" }, [299] = { 4, TD|TF, SEN(newfstatat), "fstatat64" }, -[300] = { 4, TD|TF, SEN(fchmodat), "fchmodat" }, -[301] = { 4, TD|TF, SEN(faccessat), "faccessat" }, +[300] = { 3, TD|TF, SEN(fchmodat), "fchmodat" }, +[301] = { 3, TD|TF, SEN(faccessat), "faccessat" }, [302 ... 303] = { }, [304] = { 3, TD|TS, SEN(signalfd), "signalfd" }, [305] = { }, diff -Nru strace-4.11/loop.c strace-4.12/loop.c --- strace-4.11/loop.c 2015-07-09 02:04:34.000000000 +0000 +++ strace-4.12/loop.c 2016-05-29 22:58:56.000000000 +0000 @@ -41,40 +41,40 @@ if (umove_or_printaddr(tcp, addr, &info)) return; - tprintf("{number=%d", info.lo_number); + tprintf("{lo_number=%d", info.lo_number); if (!abbrev(tcp)) { - tprintf(", device=%#lx, inode=%lu, rdevice=%#lx", + tprintf(", lo_device=%#lx, lo_inode=%lu, lo_rdevice=%#lx", (unsigned long) info.lo_device, info.lo_inode, (unsigned long) info.lo_rdevice); } - tprintf(", offset=%#x", info.lo_offset); + tprintf(", lo_offset=%#x", info.lo_offset); if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) { - tprints(", encrypt_type="); + tprints(", lo_encrypt_type="); printxval(loop_crypt_type_options, info.lo_encrypt_type, "LO_CRYPT_???"); - tprintf(", encrypt_key_size=%d", info.lo_encrypt_key_size); + tprintf(", lo_encrypt_key_size=%d", info.lo_encrypt_key_size); } - tprints(", flags="); + tprints(", lo_flags="); printflags(loop_flags_options, info.lo_flags, "LO_FLAGS_???"); - tprints(", name="); + tprints(", lo_name="); print_quoted_string(info.lo_name, LO_NAME_SIZE, QUOTE_0_TERMINATED); if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) { - tprints(", encrypt_key="); + tprints(", lo_encrypt_key="); print_quoted_string((void *) info.lo_encrypt_key, LO_KEY_SIZE, 0); } if (!abbrev(tcp)) - tprintf(", init={%#lx, %#lx}" - ", reserved={%#x, %#x, %#x, %#x}}", + tprintf(", lo_init=[%#lx, %#lx]" + ", reserved=[%#x, %#x, %#x, %#x]}", info.lo_init[0], info.lo_init[1], info.reserved[0], info.reserved[1], info.reserved[2], info.reserved[3]); @@ -92,9 +92,9 @@ return; if (!abbrev(tcp)) { - tprintf("{device=%" PRIu64 ", inode=%" PRIu64 ", " - "rdevice=%" PRIu64 ", offset=%#" PRIx64 ", " - "sizelimit=%" PRIu64 ", number=%" PRIu32, + tprintf("{lo_device=%" PRIu64 ", lo_inode=%" PRIu64 + ", lo_rdevice=%" PRIu64 ", lo_offset=%#" PRIx64 + ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32, (uint64_t) info64.lo_device, (uint64_t) info64.lo_inode, (uint64_t) info64.lo_rdevice, @@ -102,37 +102,37 @@ (uint64_t) info64.lo_sizelimit, (uint32_t) info64.lo_number); } else { - tprintf("{offset=%#" PRIx64 ", number=%" PRIu32, + tprintf("{lo_offset=%#" PRIx64 ", lo_number=%" PRIu32, (uint64_t) info64.lo_offset, (uint32_t) info64.lo_number); } if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) { - tprints(", encrypt_type="); + tprints(", lo_encrypt_type="); printxval(loop_crypt_type_options, info64.lo_encrypt_type, "LO_CRYPT_???"); - tprintf(", encrypt_key_size=%" PRIu32, + tprintf(", lo_encrypt_key_size=%" PRIu32, info64.lo_encrypt_key_size); } - tprints(", flags="); + tprints(", lo_flags="); printflags(loop_flags_options, info64.lo_flags, "LO_FLAGS_???"); - tprints(", file_name="); + tprints(", lo_file_name="); print_quoted_string((void *) info64.lo_file_name, LO_NAME_SIZE, QUOTE_0_TERMINATED); if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) { - tprints(", crypt_name="); + tprints(", lo_crypt_name="); print_quoted_string((void *) info64.lo_crypt_name, LO_NAME_SIZE, QUOTE_0_TERMINATED); - tprints(", encrypt_key="); + tprints(", lo_encrypt_key="); print_quoted_string((void *) info64.lo_encrypt_key, LO_KEY_SIZE, 0); } if (!abbrev(tcp)) - tprintf(", init={%#" PRIx64 ", %#" PRIx64 "}}", + tprintf(", lo_init=[%#" PRIx64 ", %#" PRIx64 "]}", (uint64_t) info64.lo_init[0], (uint64_t) info64.lo_init[1]); else @@ -146,23 +146,19 @@ return RVAL_DECODED; switch (code) { - case LOOP_SET_STATUS: - decode_loop_info(tcp, arg); - break; - case LOOP_GET_STATUS: if (entering(tcp)) return 0; + /* fall through */ + case LOOP_SET_STATUS: decode_loop_info(tcp, arg); break; - case LOOP_SET_STATUS64: - decode_loop_info64(tcp, arg); - break; - case LOOP_GET_STATUS64: if (entering(tcp)) return 0; + /* fall through */ + case LOOP_SET_STATUS64: decode_loop_info64(tcp, arg); break; @@ -191,6 +187,12 @@ break; #endif +#ifdef LOOP_SET_DIRECT_IO + case LOOP_SET_DIRECT_IO: + tprintf(", %lu", arg); + break; +#endif + default: return RVAL_DECODED; } diff -Nru strace-4.11/lseek.c strace-4.12/lseek.c --- strace-4.11/lseek.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/lseek.c 2016-05-26 14:44:13.000000000 +0000 @@ -7,7 +7,7 @@ * Copyright (c) 2009 Andreas Schwab * Copyright (c) 2012 H.J. Lu * Copyright (c) 2013 Denys Vlasenko - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,9 @@ #if defined(LINUX_MIPSN32) || defined(X32) SYS_FUNC(lseek) { - long long offset; - int whence; - printfd(tcp, tcp->u_arg[0]); + + long long offset; # ifdef X32 /* tcp->ext_arg is not initialized for i386 personality */ if (current_personality == 1) @@ -58,11 +57,9 @@ else # endif offset = tcp->ext_arg[1]; - whence = tcp->u_arg[2]; - if (whence == SEEK_SET) - tprintf(", %llu, ", offset); - else - tprintf(", %lld, ", offset); + int whence = tcp->u_arg[2]; + + tprintf(", %lld, ", offset); printxval(whence_codes, whence, "SEEK_???"); return RVAL_DECODED | RVAL_LUDECIMAL; @@ -70,16 +67,23 @@ #else SYS_FUNC(lseek) { - long offset; - int whence; - printfd(tcp, tcp->u_arg[0]); - offset = tcp->u_arg[1]; - whence = tcp->u_arg[2]; - if (whence == SEEK_SET) - tprintf(", %lu, ", offset); - else - tprintf(", %ld, ", offset); + + long offset = +# if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +# ifdef X86_64 + current_personality == 1 ? + (long)(int) tcp->u_arg[1] : tcp->u_arg[1]; +# else + current_wordsize == 4 ? + (long)(int) tcp->u_arg[1] : tcp->u_arg[1]; +# endif +# else + tcp->u_arg[1]; +# endif + int whence = tcp->u_arg[2]; + + tprintf(", %ld, ", offset); printxval(whence_codes, whence, "SEEK_???"); return RVAL_DECODED | RVAL_UDECIMAL; @@ -103,14 +107,9 @@ { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); - if (tcp->u_arg[4] == SEEK_SET) - tprintf(", %llu, ", - ((long long) tcp->u_arg[1]) << 32 | - (unsigned long long) (unsigned) tcp->u_arg[2]); - else - tprintf(", %lld, ", - ((long long) tcp->u_arg[1]) << 32 | - (unsigned long long) (unsigned) tcp->u_arg[2]); + tprintf(", %lld, ", + (widen_to_ull(tcp->u_arg[1]) << 32) + | widen_to_ull(tcp->u_arg[2])); } else { printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64); tprints(", "); diff -Nru strace-4.11/m4/ax_code_coverage.m4 strace-4.12/m4/ax_code_coverage.m4 --- strace-4.11/m4/ax_code_coverage.m4 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/m4/ax_code_coverage.m4 2016-05-10 09:51:56.000000000 +0000 @@ -0,0 +1,274 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LDFLAGS which should be +# included in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LDFLAGS variables of +# every build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. +# +# Test also for gcov program and create GCOV variable that could be +# substituted. +# +# Note that all optimisation flags in CFLAGS must be disabled when code +# coverage is enabled. +# +# Usage example: +# +# configure.ac: +# +# AX_CODE_COVERAGE +# +# Makefile.am: +# +# @CODE_COVERAGE_RULES@ +# my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... +# +# This results in a "check-code-coverage" rule being added to any +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module +# has been configured with --enable-code-coverage). Running `make +# check-code-coverage` in that directory will run the module's test suite +# (`make check`) and build a code coverage report detailing the code which +# was touched, then print the URI for the report. +# +# This code was derived from Makefile.decl in GLib, originally licenced +# under LGPLv2.1+. +# +# LICENSE +# +# Copyright (c) 2012, 2016 Philip Withnall +# Copyright (c) 2012 Xan Lopez +# Copyright (c) 2012 Christian Persch +# Copyright (c) 2012 Paolo Borelli +# Copyright (c) 2012 Dan Winship +# Copyright (c) 2015 Bastien ROUCARIES +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +#serial 16 + +AC_DEFUN([AX_CODE_COVERAGE],[ + dnl Check for --enable-code-coverage + AC_REQUIRE([AC_PROG_SED]) + + # allow to override gcov location + AC_ARG_WITH([gcov], + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) + + AC_MSG_CHECKING([whether to build with code coverage support]) + AC_ARG_ENABLE([code-coverage], + AS_HELP_STRING([--enable-code-coverage], + [Whether to enable code coverage support]),, + enable_code_coverage=no) + + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) + AC_MSG_RESULT($enable_code_coverage) + + AS_IF([ test "$enable_code_coverage" = "yes" ], [ + # check for gcov + AC_CHECK_TOOL([GCOV], + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], + [:]) + AS_IF([test "X$GCOV" = "X:"], + [AC_MSG_ERROR([gcov is needed to do coverage])]) + AC_SUBST([GCOV]) + + dnl Check if gcc is being used + AS_IF([ test "$GCC" = "no" ], [ + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) + ]) + + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + + AC_CHECK_PROG([LCOV], [lcov], [lcov]) + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) + + AS_IF([ test "$LCOV" ], [ + AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [ + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + ]) + ], [ + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + AC_MSG_ERROR([$lcov_msg]) + ]) + + case $ax_cv_lcov_version in + ""|invalid[)] + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + AC_MSG_ERROR([$lcov_msg]) + LCOV="exit 0;" + ;; + esac + + AS_IF([ test -z "$GENHTML" ], [ + AC_MSG_ERROR([Could not find genhtml from the lcov package]) + ]) + + dnl Build the code coverage flags + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LDFLAGS="-lgcov" + + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) + AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LDFLAGS]) + ]) + +[CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +'] + + AC_SUBST([CODE_COVERAGE_RULES]) + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) +]) diff -Nru strace-4.11/maint/ioctls_sym.sh strace-4.12/maint/ioctls_sym.sh --- strace-4.11/maint/ioctls_sym.sh 2015-05-21 17:48:38.000000000 +0000 +++ strace-4.12/maint/ioctls_sym.sh 2016-05-18 09:26:01.000000000 +0000 @@ -177,9 +177,12 @@ #include __EOF__ ;; - *drm/*_drm.h) + drm/sis_drm.h) echo '#include ' ;; + *drm/*_drm.h) + echo '#include ' > "$tmpdir/drm.h" + ;; fbio.h|*/fbio.h) cat <<'__EOF__' #include @@ -228,7 +231,7 @@ *linux/isdn_ppp.h|*linux/gsmmux.h) echo '#include ' ;; - *media/saa6588.h) + *media*/saa6588.h) echo 'typedef struct poll_table_struct poll_table;' ;; *linux/ivtvfb.h|*linux/meye.h|*media/*.h) @@ -236,26 +239,28 @@ ;; *linux/kvm.h) cat <<'__EOF__' -#if defined __x86_64__ || defined __i386__ +#if !(defined __powerpc__) struct kvm_allocate_rma { __u32 unused[2]; }; struct kvm_create_spapr_tce { __u32 unused[3]; }; +struct kvm_create_spapr_tce_64 { __u32 unused[8]; }; struct kvm_get_htab_fd { __u32 unused[8]; }; struct kvm_rtas_token_args { __u8 unused[128]; }; +#endif + +#if !(defined __arm64__ || defined __arm__) struct kvm_vcpu_init { __u32 unused[8]; }; -#elif defined __arm64__ || defined __arm__ -struct kvm_allocate_rma { __u32 unused[2]; }; +#endif + +#if !(defined __x86_64__ || defined __i386__) struct kvm_cpuid { __u32 unused[2]; }; struct kvm_cpuid2 { __u32 unused[2]; }; -struct kvm_create_spapr_tce { __u32 unused[3]; }; struct kvm_debugregs { __u32 unused[32]; }; -struct kvm_get_htab_fd { __u32 unused[8]; }; struct kvm_lapic_state { __u32 unused[256]; }; struct kvm_memory_alias { __u32 unused[8]; }; struct kvm_msr_list { __u32 unused[1]; }; struct kvm_msrs { __u32 unused[2]; }; struct kvm_pit_state { __u32 unused[18]; }; struct kvm_pit_state2 { __u32 unused[28]; }; -struct kvm_rtas_token_args { __u32 unused[128]; }; struct kvm_vcpu_events { __u32 unused[16]; }; struct kvm_x86_mce { __u32 unused[16]; }; struct kvm_xcrs { __u32 unused[98]; }; @@ -298,6 +303,12 @@ *video/sstfb.h) echo 'struct fb_info;' ;; + *xen/gntdev.h) + cat <<'__EOF__' +typedef uint32_t grant_ref_t; +typedef uint16_t domid_t; +__EOF__ + ;; *xen/interface/*.h) return 0 # false positives ;; @@ -327,7 +338,7 @@ mkdir -p "$tmpdir/${f%/*}" # Hard workarounds for some processed files. Very fragile. case "$f" in - *acpi/*|*linux/i2o.h|*media/exynos-fimc.h|*media/v4l2-subdev.h|*net/bluetooth/*) + *acpi/*|*linux/i2o.h|*media*/exynos-fimc.h|*media/v4l2-subdev.h|*net/bluetooth/*|net/nfc/nci_core.h) # Fetch macros only. grep "${r_define}${r_cmd_name}" < "$s" > "$tmpdir/$f" ;; diff -Nru strace-4.11/Makefile.am strace-4.12/Makefile.am --- strace-4.11/Makefile.am 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/Makefile.am 2016-05-28 10:29:30.000000000 +0000 @@ -1,7 +1,7 @@ # Automake input for strace. # # Copyright (c) 2002-2009 Roland McGrath -# Copyright (c) 2006-2015 Dmitry V. Levin +# Copyright (c) 2006-2016 Dmitry V. Levin # Copyright (c) 2008-2015 Mike Frysinger # Copyright (c) 2015 Elvira Khabirova # All rights reserved. @@ -56,17 +56,32 @@ include xlat/Makemodule.am strace_CPPFLAGS = $(AM_CPPFLAGS) +strace_CFLAGS = $(AM_CFLAGS) strace_LDFLAGS = -strace_LDADD = -noinst_LIBRARIES = +strace_LDADD = libstrace.a +noinst_LIBRARIES = libstrace.a + +libstrace_a_CPPFLAGS = $(strace_CPPFLAGS) +libstrace_a_CFLAGS = $(strace_CFLAGS) +libstrace_a_SOURCES = \ + fstatfs.c \ + fstatfs64.c \ + statfs.c \ + statfs64.c \ + sync_file_range.c \ + sync_file_range2.c \ + upeek.c \ + # end of libstrace_a_SOURCES strace_SOURCES = \ access.c \ affinity.c \ aio.c \ + alpha.c \ bjm.c \ block.c \ bpf.c \ + btrfs.c \ cacheflush.c \ capability.c \ caps0.h \ @@ -74,7 +89,9 @@ chdir.c \ chmod.c \ clone.c \ + copy_file_range.c \ count.c \ + defs.h \ desc.c \ dirent.c \ dirent64.c \ @@ -91,15 +108,20 @@ fcntl.c \ fetch_seccomp_fprog.c \ fetch_struct_flock.c \ + fetch_struct_statfs.c \ file.c \ file_handle.c \ + file_ioctl.c \ + fs_x_ioctl.c \ flock.c \ flock.h \ futex.c \ + gcc_compat.h \ get_robust_list.c \ getcpu.c \ getcwd.c \ getrandom.c \ + hdio.c \ hostname.c \ inotify.c \ io.c \ @@ -134,6 +156,7 @@ mtd.c \ native_defs.h \ net.c \ + numa.c \ open.c \ or1k_atomic.c \ pathtrace.c \ @@ -144,6 +167,7 @@ print_mq_attr.c \ print_msgbuf.c \ print_sigevent.c \ + print_statfs.c \ print_time.c \ print_timex.c \ printmode.c \ @@ -169,6 +193,7 @@ seccomp_fprog.h \ sendfile.c \ sigaltstack.c \ + sigevent.h \ signal.c \ signalfd.c \ sigreturn.c \ @@ -176,9 +201,9 @@ socketutils.c \ sram_alloc.c \ statfs.c \ + statfs.h \ strace.c \ swapon.c \ - sync_file_range.c \ syscall.c \ sysctl.c \ sysinfo.c \ @@ -188,6 +213,7 @@ time.c \ times.c \ truncate.c \ + ubi.c \ uid.c \ uid16.c \ umask.c \ @@ -201,6 +227,7 @@ vsprintf.c \ wait.c \ xattr.c \ + xlat.h \ xmalloc.c \ # end of strace_SOURCES @@ -211,9 +238,17 @@ strace_LDADD += $(libunwind_LIBS) endif -noinst_HEADERS = defs.h +@CODE_COVERAGE_RULES@ +CODE_COVERAGE_BRANCH_COVERAGE = 1 +CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ + --prefix $(shell realpath -Ls $(abs_top_srcdir)/..) +CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*' +strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS) +strace_CFLAGS += $(CODE_COVERAGE_CFLAGS) +strace_LDADD += $(CODE_COVERAGE_LDFLAGS) + # Enable this to get link map generated -#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile +#strace_LDFLAGS += -Wl,-Map=strace.mapfile EXTRA_DIST = \ $(man_MANS) \ @@ -406,6 +441,7 @@ linux/mips/syscallent.h \ linux/mips/userent.h \ linux/mtd-abi.h \ + linux/netlink_diag.h \ linux/nios2/arch_regs.c \ linux/nios2/get_error.c \ linux/nios2/get_scno.c \ @@ -621,7 +657,8 @@ $(srcdir)/.version: $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@ -strace_SOURCES_c = $(filter %.c,$(strace_SOURCES)) +strace_SOURCES_c = \ + $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES)) sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c)) for f in $^; do \ @@ -662,6 +699,15 @@ ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) +ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h))) + +ioctl_redefs%.h: ioctlent%.h ioctlent0.h + sort $< > $<-t + sort ioctlent0.h | comm -23 $<-t - | \ + sed -n 's/^{ "\([^"]\+\)", \(0x[[:xdigit:]]\+\) },$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \ + > $@-t + rm -f $<-t + mv $@-t $@ ioctlent%.h: ioctlsort% ./$< > $@ @@ -675,13 +721,16 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h cat $^ > $@ -BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version -CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h +BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version +CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h # defines mpers_source_files include mpers.am srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files)) +mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i) mpers_NAME = mpers_PREFIX = $(mpers_NAME)_ @@ -689,7 +738,8 @@ mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS) mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS) -libmpers_CPPFLAGS = $(AM_CPPFLAGS) -DIN_MPERS +libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS +libmpers_CFLAGS = $(strace_CFLAGS) # mpers targets @@ -708,6 +758,7 @@ echo '#undef MPERS_PRINTER_NAME' >> $@-t echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t + echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t mv $@-t $@ m%_funcs.h: $(srcdir_mpers_source_files) @@ -719,28 +770,36 @@ # printers -printers.h: $(srcdir_mpers_source_files) +%.c.mpers.i: $(srcdir)/%.c + $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@ + +mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL(\([^,)]\+\),[[:space:]]*\([^,)]\+\),[[:space:]]*\([^)]\+\))$$ + +printers.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t echo 'typedef struct {' >> $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \ + || exit; \ done >> $@-t echo '} struct_printers;' >> $@-t echo 'extern const struct_printers *printers;' >> $@-t echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t mv $@-t $@ -%_printer_decls.h: $(srcdir_mpers_source_files) +%_printer_decls.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \ + || exit; \ done >> $@-t mv $@-t $@ -%_printer_defs.h: $(srcdir_mpers_source_files) +%_printer_defs.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/\.\2 = $(mpers_PREFIX)\2,/p' $$f \ + || exit; \ done >> $@-t mv $@-t $@ @@ -752,6 +811,7 @@ noinst_LIBRARIES += libmpers-m32.a libmpers_m32_a_SOURCES = $(mpers_source_files) libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32 +libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS) mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h BUILT_SOURCES += $(mpers_m32_targets) @@ -767,6 +827,7 @@ noinst_LIBRARIES += libmpers-mx32.a libmpers_mx32_a_SOURCES = $(mpers_source_files) libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32 +libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS) mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h BUILT_SOURCES += $(mpers_mx32_targets) diff -Nru strace-4.11/Makefile.in strace-4.12/Makefile.in --- strace-4.11/Makefile.in 2015-12-21 23:24:05.000000000 +0000 +++ strace-4.12/Makefile.in 2016-05-31 11:35:57.000000000 +0000 @@ -17,7 +17,7 @@ # Automake input for strace. # # Copyright (c) 2002-2009 Roland McGrath -# Copyright (c) 2006-2015 Dmitry V. Levin +# Copyright (c) 2006-2016 Dmitry V. Levin # Copyright (c) 2008-2015 Mike Frysinger # Copyright (c) 2015 Elvira Khabirova # All rights reserved. @@ -46,7 +46,6 @@ - VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -115,9 +114,8 @@ DIST_COMMON = $(srcdir)/xlat/Makemodule.am $(srcdir)/mpers.am \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in depcomp $(noinst_HEADERS) AUTHORS \ - COPYING INSTALL NEWS README compile config.guess config.sub \ - install-sh missing + $(srcdir)/config.h.in depcomp AUTHORS COPYING INSTALL NEWS \ + README compile config.guess config.sub install-sh missing @USE_LIBUNWIND_TRUE@am__append_1 = unwind.c @USE_LIBUNWIND_TRUE@am__append_2 = $(libunwind_CPPFLAGS) @USE_LIBUNWIND_TRUE@am__append_3 = $(libunwind_LDFLAGS) @@ -132,7 +130,8 @@ @HAVE_MX32_MPERS_TRUE@am__append_12 = $(mpers_mx32_targets) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/mpers.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -152,16 +151,22 @@ am__v_AR_1 = libmpers_m32_a_AR = $(AR) $(ARFLAGS) libmpers_m32_a_LIBADD = -am__libmpers_m32_a_SOURCES_DIST = dirent.c fetch_seccomp_fprog.c \ - fetch_struct_flock.c ipc_msgctl.c ipc_shmctl.c print_mq_attr.c \ - print_msgbuf.c print_sigevent.c print_time.c print_timex.c \ - printrusage.c printsiginfo.c sigaltstack.c sysinfo.c times.c \ - utime.c -am__objects_1 = libmpers_m32_a-dirent.$(OBJEXT) \ +am__libmpers_m32_a_SOURCES_DIST = block.c btrfs.c dirent.c evdev.c \ + fetch_seccomp_fprog.c fetch_struct_flock.c \ + fetch_struct_statfs.c hdio.c ipc_msgctl.c ipc_shmctl.c mtd.c \ + print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c \ + print_timex.c printrusage.c printsiginfo.c rtc.c sigaltstack.c \ + sysinfo.c times.c utime.c v4l2.c +am__objects_1 = libmpers_m32_a-block.$(OBJEXT) \ + libmpers_m32_a-btrfs.$(OBJEXT) libmpers_m32_a-dirent.$(OBJEXT) \ + libmpers_m32_a-evdev.$(OBJEXT) \ libmpers_m32_a-fetch_seccomp_fprog.$(OBJEXT) \ libmpers_m32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_m32_a-hdio.$(OBJEXT) \ libmpers_m32_a-ipc_msgctl.$(OBJEXT) \ libmpers_m32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_m32_a-mtd.$(OBJEXT) \ libmpers_m32_a-print_mq_attr.$(OBJEXT) \ libmpers_m32_a-print_msgbuf.$(OBJEXT) \ libmpers_m32_a-print_sigevent.$(OBJEXT) \ @@ -169,23 +174,32 @@ libmpers_m32_a-print_timex.$(OBJEXT) \ libmpers_m32_a-printrusage.$(OBJEXT) \ libmpers_m32_a-printsiginfo.$(OBJEXT) \ + libmpers_m32_a-rtc.$(OBJEXT) \ libmpers_m32_a-sigaltstack.$(OBJEXT) \ libmpers_m32_a-sysinfo.$(OBJEXT) \ - libmpers_m32_a-times.$(OBJEXT) libmpers_m32_a-utime.$(OBJEXT) + libmpers_m32_a-times.$(OBJEXT) libmpers_m32_a-utime.$(OBJEXT) \ + libmpers_m32_a-v4l2.$(OBJEXT) @HAVE_M32_MPERS_TRUE@am_libmpers_m32_a_OBJECTS = $(am__objects_1) libmpers_m32_a_OBJECTS = $(am_libmpers_m32_a_OBJECTS) libmpers_mx32_a_AR = $(AR) $(ARFLAGS) libmpers_mx32_a_LIBADD = -am__libmpers_mx32_a_SOURCES_DIST = dirent.c fetch_seccomp_fprog.c \ - fetch_struct_flock.c ipc_msgctl.c ipc_shmctl.c print_mq_attr.c \ - print_msgbuf.c print_sigevent.c print_time.c print_timex.c \ - printrusage.c printsiginfo.c sigaltstack.c sysinfo.c times.c \ - utime.c -am__objects_2 = libmpers_mx32_a-dirent.$(OBJEXT) \ +am__libmpers_mx32_a_SOURCES_DIST = block.c btrfs.c dirent.c evdev.c \ + fetch_seccomp_fprog.c fetch_struct_flock.c \ + fetch_struct_statfs.c hdio.c ipc_msgctl.c ipc_shmctl.c mtd.c \ + print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c \ + print_timex.c printrusage.c printsiginfo.c rtc.c sigaltstack.c \ + sysinfo.c times.c utime.c v4l2.c +am__objects_2 = libmpers_mx32_a-block.$(OBJEXT) \ + libmpers_mx32_a-btrfs.$(OBJEXT) \ + libmpers_mx32_a-dirent.$(OBJEXT) \ + libmpers_mx32_a-evdev.$(OBJEXT) \ libmpers_mx32_a-fetch_seccomp_fprog.$(OBJEXT) \ libmpers_mx32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_mx32_a-hdio.$(OBJEXT) \ libmpers_mx32_a-ipc_msgctl.$(OBJEXT) \ libmpers_mx32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_mx32_a-mtd.$(OBJEXT) \ libmpers_mx32_a-print_mq_attr.$(OBJEXT) \ libmpers_mx32_a-print_msgbuf.$(OBJEXT) \ libmpers_mx32_a-print_sigevent.$(OBJEXT) \ @@ -193,78 +207,96 @@ libmpers_mx32_a-print_timex.$(OBJEXT) \ libmpers_mx32_a-printrusage.$(OBJEXT) \ libmpers_mx32_a-printsiginfo.$(OBJEXT) \ + libmpers_mx32_a-rtc.$(OBJEXT) \ libmpers_mx32_a-sigaltstack.$(OBJEXT) \ libmpers_mx32_a-sysinfo.$(OBJEXT) \ libmpers_mx32_a-times.$(OBJEXT) \ - libmpers_mx32_a-utime.$(OBJEXT) + libmpers_mx32_a-utime.$(OBJEXT) libmpers_mx32_a-v4l2.$(OBJEXT) @HAVE_MX32_MPERS_TRUE@am_libmpers_mx32_a_OBJECTS = $(am__objects_2) libmpers_mx32_a_OBJECTS = $(am_libmpers_mx32_a_OBJECTS) +libstrace_a_AR = $(AR) $(ARFLAGS) +libstrace_a_LIBADD = +am_libstrace_a_OBJECTS = libstrace_a-fstatfs.$(OBJEXT) \ + libstrace_a-fstatfs64.$(OBJEXT) libstrace_a-statfs.$(OBJEXT) \ + libstrace_a-statfs64.$(OBJEXT) \ + libstrace_a-sync_file_range.$(OBJEXT) \ + libstrace_a-sync_file_range2.$(OBJEXT) \ + libstrace_a-upeek.$(OBJEXT) +libstrace_a_OBJECTS = $(am_libstrace_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) -am__strace_SOURCES_DIST = access.c affinity.c aio.c bjm.c block.c \ - bpf.c cacheflush.c capability.c caps0.h caps1.h chdir.c \ - chmod.c clone.c count.c desc.c dirent.c dirent64.c empty.h \ - epoll.c evdev.c eventfd.c execve.c exit.c fadvise.c \ - fallocate.c fanotify.c fchownat.c fcntl.c \ - fetch_seccomp_fprog.c fetch_struct_flock.c file.c \ - file_handle.c flock.c flock.h futex.c get_robust_list.c \ - getcpu.c getcwd.c getrandom.c hostname.c inotify.c io.c \ - ioctl.c ioperm.c iopl.c ioprio.c ipc_defs.h ipc_msg.c \ - ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \ - kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \ - linux/x32/asm_stat.h lookup_dcookie.c loop.c lseek.c mem.c \ - membarrier.c memfd_create.c mknod.c mount.c mpers_type.h mq.c \ - mtd.c native_defs.h net.c open.c or1k_atomic.c pathtrace.c \ - perf.c personality.c poll.c prctl.c print_mq_attr.c \ - print_msgbuf.c print_sigevent.c print_time.c print_timex.c \ - printmode.c printrusage.c printsiginfo.c printsiginfo.h \ - printstat.h process.c process_vm.c ptp.c ptrace.h quota.c \ - readahead.c readlink.c reboot.c regs.h renameat.c resource.c \ - rtc.c sched.c scsi.c seccomp.c seccomp_fprog.h sendfile.c \ - sigaltstack.c signal.c signalfd.c sigreturn.c sock.c \ - socketutils.c sram_alloc.c statfs.c strace.c swapon.c \ - sync_file_range.c syscall.c sysctl.c sysinfo.c syslog.c \ - sysmips.c term.c time.c times.c truncate.c uid.c uid16.c \ - umask.c umount.c uname.c userfaultfd.c util.c utime.c utimes.c \ - v4l2.c vsprintf.c wait.c xattr.c xmalloc.c unwind.c +am__strace_SOURCES_DIST = access.c affinity.c aio.c alpha.c bjm.c \ + block.c bpf.c btrfs.c cacheflush.c capability.c caps0.h \ + caps1.h chdir.c chmod.c clone.c copy_file_range.c count.c \ + defs.h desc.c dirent.c dirent64.c empty.h epoll.c evdev.c \ + eventfd.c execve.c exit.c fadvise.c fallocate.c fanotify.c \ + fchownat.c fcntl.c fetch_seccomp_fprog.c fetch_struct_flock.c \ + fetch_struct_statfs.c file.c file_handle.c file_ioctl.c \ + fs_x_ioctl.c flock.c flock.h futex.c gcc_compat.h \ + get_robust_list.c getcpu.c getcwd.c getrandom.c hdio.c \ + hostname.c inotify.c io.c ioctl.c ioperm.c iopl.c ioprio.c \ + ipc_defs.h ipc_msg.c ipc_msgctl.c ipc_sem.c ipc_shm.c \ + ipc_shmctl.c kcmp.c kernel_types.h kexec.c keyctl.c ldt.c \ + link.c linux/asm_stat.h linux/x32/asm_stat.h lookup_dcookie.c \ + loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ + mount.c mpers_type.h mq.c mtd.c native_defs.h net.c numa.c \ + open.c or1k_atomic.c pathtrace.c perf.c personality.c poll.c \ + prctl.c print_mq_attr.c print_msgbuf.c print_sigevent.c \ + print_statfs.c print_time.c print_timex.c printmode.c \ + printrusage.c printsiginfo.c printsiginfo.h printstat.h \ + process.c process_vm.c ptp.c ptrace.h quota.c readahead.c \ + readlink.c reboot.c regs.h renameat.c resource.c rtc.c sched.c \ + scsi.c seccomp.c seccomp_fprog.h sendfile.c sigaltstack.c \ + sigevent.h signal.c signalfd.c sigreturn.c sock.c \ + socketutils.c sram_alloc.c statfs.c statfs.h strace.c swapon.c \ + syscall.c sysctl.c sysinfo.c syslog.c sysmips.c term.c time.c \ + times.c truncate.c ubi.c uid.c uid16.c umask.c umount.c \ + uname.c userfaultfd.c util.c utime.c utimes.c v4l2.c \ + vsprintf.c wait.c xattr.c xlat.h xmalloc.c unwind.c @USE_LIBUNWIND_TRUE@am__objects_3 = strace-unwind.$(OBJEXT) am_strace_OBJECTS = strace-access.$(OBJEXT) strace-affinity.$(OBJEXT) \ - strace-aio.$(OBJEXT) strace-bjm.$(OBJEXT) \ - strace-block.$(OBJEXT) strace-bpf.$(OBJEXT) \ + strace-aio.$(OBJEXT) strace-alpha.$(OBJEXT) \ + strace-bjm.$(OBJEXT) strace-block.$(OBJEXT) \ + strace-bpf.$(OBJEXT) strace-btrfs.$(OBJEXT) \ strace-cacheflush.$(OBJEXT) strace-capability.$(OBJEXT) \ strace-chdir.$(OBJEXT) strace-chmod.$(OBJEXT) \ - strace-clone.$(OBJEXT) strace-count.$(OBJEXT) \ - strace-desc.$(OBJEXT) strace-dirent.$(OBJEXT) \ - strace-dirent64.$(OBJEXT) strace-epoll.$(OBJEXT) \ - strace-evdev.$(OBJEXT) strace-eventfd.$(OBJEXT) \ - strace-execve.$(OBJEXT) strace-exit.$(OBJEXT) \ - strace-fadvise.$(OBJEXT) strace-fallocate.$(OBJEXT) \ - strace-fanotify.$(OBJEXT) strace-fchownat.$(OBJEXT) \ - strace-fcntl.$(OBJEXT) strace-fetch_seccomp_fprog.$(OBJEXT) \ - strace-fetch_struct_flock.$(OBJEXT) strace-file.$(OBJEXT) \ - strace-file_handle.$(OBJEXT) strace-flock.$(OBJEXT) \ + strace-clone.$(OBJEXT) strace-copy_file_range.$(OBJEXT) \ + strace-count.$(OBJEXT) strace-desc.$(OBJEXT) \ + strace-dirent.$(OBJEXT) strace-dirent64.$(OBJEXT) \ + strace-epoll.$(OBJEXT) strace-evdev.$(OBJEXT) \ + strace-eventfd.$(OBJEXT) strace-execve.$(OBJEXT) \ + strace-exit.$(OBJEXT) strace-fadvise.$(OBJEXT) \ + strace-fallocate.$(OBJEXT) strace-fanotify.$(OBJEXT) \ + strace-fchownat.$(OBJEXT) strace-fcntl.$(OBJEXT) \ + strace-fetch_seccomp_fprog.$(OBJEXT) \ + strace-fetch_struct_flock.$(OBJEXT) \ + strace-fetch_struct_statfs.$(OBJEXT) strace-file.$(OBJEXT) \ + strace-file_handle.$(OBJEXT) strace-file_ioctl.$(OBJEXT) \ + strace-fs_x_ioctl.$(OBJEXT) strace-flock.$(OBJEXT) \ strace-futex.$(OBJEXT) strace-get_robust_list.$(OBJEXT) \ strace-getcpu.$(OBJEXT) strace-getcwd.$(OBJEXT) \ - strace-getrandom.$(OBJEXT) strace-hostname.$(OBJEXT) \ - strace-inotify.$(OBJEXT) strace-io.$(OBJEXT) \ - strace-ioctl.$(OBJEXT) strace-ioperm.$(OBJEXT) \ - strace-iopl.$(OBJEXT) strace-ioprio.$(OBJEXT) \ - strace-ipc_msg.$(OBJEXT) strace-ipc_msgctl.$(OBJEXT) \ - strace-ipc_sem.$(OBJEXT) strace-ipc_shm.$(OBJEXT) \ - strace-ipc_shmctl.$(OBJEXT) strace-kcmp.$(OBJEXT) \ - strace-kexec.$(OBJEXT) strace-keyctl.$(OBJEXT) \ - strace-ldt.$(OBJEXT) strace-link.$(OBJEXT) \ - strace-lookup_dcookie.$(OBJEXT) strace-loop.$(OBJEXT) \ - strace-lseek.$(OBJEXT) strace-mem.$(OBJEXT) \ - strace-membarrier.$(OBJEXT) strace-memfd_create.$(OBJEXT) \ - strace-mknod.$(OBJEXT) strace-mount.$(OBJEXT) \ - strace-mq.$(OBJEXT) strace-mtd.$(OBJEXT) strace-net.$(OBJEXT) \ - strace-open.$(OBJEXT) strace-or1k_atomic.$(OBJEXT) \ - strace-pathtrace.$(OBJEXT) strace-perf.$(OBJEXT) \ - strace-personality.$(OBJEXT) strace-poll.$(OBJEXT) \ - strace-prctl.$(OBJEXT) strace-print_mq_attr.$(OBJEXT) \ - strace-print_msgbuf.$(OBJEXT) strace-print_sigevent.$(OBJEXT) \ + strace-getrandom.$(OBJEXT) strace-hdio.$(OBJEXT) \ + strace-hostname.$(OBJEXT) strace-inotify.$(OBJEXT) \ + strace-io.$(OBJEXT) strace-ioctl.$(OBJEXT) \ + strace-ioperm.$(OBJEXT) strace-iopl.$(OBJEXT) \ + strace-ioprio.$(OBJEXT) strace-ipc_msg.$(OBJEXT) \ + strace-ipc_msgctl.$(OBJEXT) strace-ipc_sem.$(OBJEXT) \ + strace-ipc_shm.$(OBJEXT) strace-ipc_shmctl.$(OBJEXT) \ + strace-kcmp.$(OBJEXT) strace-kexec.$(OBJEXT) \ + strace-keyctl.$(OBJEXT) strace-ldt.$(OBJEXT) \ + strace-link.$(OBJEXT) strace-lookup_dcookie.$(OBJEXT) \ + strace-loop.$(OBJEXT) strace-lseek.$(OBJEXT) \ + strace-mem.$(OBJEXT) strace-membarrier.$(OBJEXT) \ + strace-memfd_create.$(OBJEXT) strace-mknod.$(OBJEXT) \ + strace-mount.$(OBJEXT) strace-mq.$(OBJEXT) \ + strace-mtd.$(OBJEXT) strace-net.$(OBJEXT) \ + strace-numa.$(OBJEXT) strace-open.$(OBJEXT) \ + strace-or1k_atomic.$(OBJEXT) strace-pathtrace.$(OBJEXT) \ + strace-perf.$(OBJEXT) strace-personality.$(OBJEXT) \ + strace-poll.$(OBJEXT) strace-prctl.$(OBJEXT) \ + strace-print_mq_attr.$(OBJEXT) strace-print_msgbuf.$(OBJEXT) \ + strace-print_sigevent.$(OBJEXT) strace-print_statfs.$(OBJEXT) \ strace-print_time.$(OBJEXT) strace-print_timex.$(OBJEXT) \ strace-printmode.$(OBJEXT) strace-printrusage.$(OBJEXT) \ strace-printsiginfo.$(OBJEXT) strace-process.$(OBJEXT) \ @@ -279,12 +311,12 @@ strace-sigreturn.$(OBJEXT) strace-sock.$(OBJEXT) \ strace-socketutils.$(OBJEXT) strace-sram_alloc.$(OBJEXT) \ strace-statfs.$(OBJEXT) strace-strace.$(OBJEXT) \ - strace-swapon.$(OBJEXT) strace-sync_file_range.$(OBJEXT) \ - strace-syscall.$(OBJEXT) strace-sysctl.$(OBJEXT) \ - strace-sysinfo.$(OBJEXT) strace-syslog.$(OBJEXT) \ - strace-sysmips.$(OBJEXT) strace-term.$(OBJEXT) \ - strace-time.$(OBJEXT) strace-times.$(OBJEXT) \ - strace-truncate.$(OBJEXT) strace-uid.$(OBJEXT) \ + strace-swapon.$(OBJEXT) strace-syscall.$(OBJEXT) \ + strace-sysctl.$(OBJEXT) strace-sysinfo.$(OBJEXT) \ + strace-syslog.$(OBJEXT) strace-sysmips.$(OBJEXT) \ + strace-term.$(OBJEXT) strace-time.$(OBJEXT) \ + strace-times.$(OBJEXT) strace-truncate.$(OBJEXT) \ + strace-ubi.$(OBJEXT) strace-uid.$(OBJEXT) \ strace-uid16.$(OBJEXT) strace-umask.$(OBJEXT) \ strace-umount.$(OBJEXT) strace-uname.$(OBJEXT) \ strace-userfaultfd.$(OBJEXT) strace-util.$(OBJEXT) \ @@ -295,9 +327,9 @@ strace_OBJECTS = $(am_strace_OBJECTS) am__DEPENDENCIES_1 = @USE_LIBUNWIND_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -strace_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__append_5) \ - $(am__append_9) -strace_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(strace_LDFLAGS) \ +strace_DEPENDENCIES = libstrace.a $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) $(am__append_5) $(am__append_9) +strace_LINK = $(CCLD) $(strace_CFLAGS) $(CFLAGS) $(strace_LDFLAGS) \ $(LDFLAGS) -o $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -360,9 +392,10 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmpers_m32_a_SOURCES) $(libmpers_mx32_a_SOURCES) \ - $(strace_SOURCES) + $(libstrace_a_SOURCES) $(strace_SOURCES) DIST_SOURCES = $(am__libmpers_m32_a_SOURCES_DIST) \ - $(am__libmpers_mx32_a_SOURCES_DIST) $(am__strace_SOURCES_DIST) + $(am__libmpers_mx32_a_SOURCES_DIST) $(libstrace_a_SOURCES) \ + $(am__strace_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -379,7 +412,6 @@ man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) -HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -466,6 +498,11 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ @@ -478,12 +515,15 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBOBJS = @LIBOBJS@ @@ -503,6 +543,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -594,27 +635,44 @@ xlat/bpf_mode.in xlat/bpf_op_alu.in xlat/bpf_op_jmp.in \ xlat/bpf_prog_types.in xlat/bpf_rval.in xlat/bpf_size.in \ xlat/bpf_src.in xlat/bsg_protocol.in xlat/bsg_subprotocol.in \ - xlat/bt_protocols.in xlat/cacheflush_scope.in xlat/cap.in \ - xlat/cap_mask0.in xlat/cap_mask1.in xlat/cap_version.in \ - xlat/clockflags.in xlat/clocknames.in xlat/clone_flags.in \ - xlat/cpuclocknames.in xlat/delete_module_flags.in \ - xlat/dirent_types.in xlat/domains.in xlat/efd_flags.in \ - xlat/epollctls.in xlat/epollevents.in xlat/epollflags.in \ - xlat/evdev_abs.in xlat/evdev_autorepeat.in xlat/evdev_ev.in \ - xlat/evdev_ff_status.in xlat/evdev_ff_types.in \ - xlat/evdev_keycode.in xlat/evdev_leds.in xlat/evdev_misc.in \ - xlat/evdev_mtslots.in xlat/evdev_prop.in \ - xlat/evdev_relative_axes.in xlat/evdev_snd.in \ - xlat/evdev_switch.in xlat/evdev_sync.in xlat/f_owner_types.in \ - xlat/f_seals.in xlat/falloc_flags.in xlat/fan_classes.in \ - xlat/fan_event_flags.in xlat/fan_init_flags.in \ - xlat/fan_mark_flags.in xlat/fcntl64cmds.in xlat/fcntlcmds.in \ - xlat/fdflags.in xlat/flockcmds.in xlat/fsmagic.in \ - xlat/futexops.in xlat/futexwakecmps.in xlat/futexwakeops.in \ + xlat/bt_protocols.in xlat/btrfs_balance_args.in \ + xlat/btrfs_balance_ctl_cmds.in xlat/btrfs_balance_flags.in \ + xlat/btrfs_balance_state.in xlat/btrfs_compress_types.in \ + xlat/btrfs_defrag_flags.in xlat/btrfs_dev_replace_cmds.in \ + xlat/btrfs_dev_replace_results.in \ + xlat/btrfs_dev_replace_state.in xlat/btrfs_dev_stats_flags.in \ + xlat/btrfs_dev_stats_values.in xlat/btrfs_features_compat.in \ + xlat/btrfs_features_compat_ro.in \ + xlat/btrfs_features_incompat.in xlat/btrfs_key_types.in \ + xlat/btrfs_qgroup_ctl_cmds.in \ + xlat/btrfs_qgroup_inherit_flags.in \ + xlat/btrfs_qgroup_limit_flags.in \ + xlat/btrfs_qgroup_status_flags.in xlat/btrfs_scrub_flags.in \ + xlat/btrfs_send_flags.in xlat/btrfs_snap_flags_v2.in \ + xlat/btrfs_space_info_flags.in xlat/btrfs_tree_objectids.in \ + xlat/cacheflush_scope.in xlat/cap.in xlat/cap_mask0.in \ + xlat/cap_mask1.in xlat/cap_version.in xlat/clockflags.in \ + xlat/clocknames.in xlat/clone_flags.in xlat/cpuclocknames.in \ + xlat/delete_module_flags.in xlat/dirent_types.in \ + xlat/efd_flags.in xlat/epollctls.in xlat/epollevents.in \ + xlat/epollflags.in xlat/evdev_abs.in xlat/evdev_autorepeat.in \ + xlat/evdev_ev.in xlat/evdev_ff_status.in \ + xlat/evdev_ff_types.in xlat/evdev_keycode.in \ + xlat/evdev_leds.in xlat/evdev_misc.in xlat/evdev_mtslots.in \ + xlat/evdev_prop.in xlat/evdev_relative_axes.in \ + xlat/evdev_snd.in xlat/evdev_switch.in xlat/evdev_sync.in \ + xlat/f_owner_types.in xlat/f_seals.in xlat/falloc_flags.in \ + xlat/fan_classes.in xlat/fan_event_flags.in \ + xlat/fan_init_flags.in xlat/fan_mark_flags.in \ + xlat/fcntl64cmds.in xlat/fcntlcmds.in xlat/fdflags.in \ + xlat/fiemap_extent_flags.in xlat/fiemap_flags.in \ + xlat/flockcmds.in xlat/fsmagic.in xlat/futexops.in \ + xlat/futexwakecmps.in xlat/futexwakeops.in \ xlat/getrandom_flags.in xlat/getsockipoptions.in \ xlat/getsockipv6options.in xlat/icmpfilterflags.in \ - xlat/if_dqblk_valid.in xlat/if_dqinfo_valid.in \ - xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in \ + xlat/if_dqblk_valid.in xlat/if_dqinfo_flags.in \ + xlat/if_dqinfo_valid.in xlat/iffflags.in \ + xlat/inet_protocols.in xlat/inotify_flags.in \ xlat/inotify_init_flags.in xlat/ioctl_dirs.in \ xlat/ioprio_class.in xlat/ioprio_who.in xlat/ip_cmsg_types.in \ xlat/ipc_msg_flags.in xlat/itimer_which.in xlat/kcmp_types.in \ @@ -637,39 +695,40 @@ xlat/nt_descriptor_types.in xlat/open_access_modes.in \ xlat/open_mode_flags.in xlat/openmodessol.in \ xlat/packet_mreq_type.in xlat/perf_event_open_flags.in \ - xlat/personality_options.in xlat/policies.in xlat/pollflags.in \ - xlat/pr_cap_ambient.in xlat/pr_mce_kill.in \ - xlat/pr_mce_kill_policy.in xlat/pr_set_mm.in xlat/pr_tsc.in \ - xlat/pr_unalign_flags.in xlat/prctl_options.in \ - xlat/priorities.in xlat/ptp_flags_options.in \ - xlat/ptrace_cmds.in xlat/ptrace_events.in \ + xlat/personality_flags.in xlat/personality_types.in \ + xlat/policies.in xlat/pollflags.in xlat/pr_cap_ambient.in \ + xlat/pr_mce_kill.in xlat/pr_mce_kill_policy.in \ + xlat/pr_set_mm.in xlat/pr_tsc.in xlat/pr_unalign_flags.in \ + xlat/prctl_options.in xlat/priorities.in \ + xlat/ptp_flags_options.in xlat/ptrace_cmds.in \ + xlat/ptrace_events.in xlat/ptrace_peeksiginfo_flags.in \ xlat/ptrace_setoptions_flags.in xlat/quota_formats.in \ xlat/quotacmds.in xlat/quotatypes.in xlat/rename_flags.in \ - xlat/resource_flags.in xlat/resources.in xlat/sched_flags.in \ - xlat/schedulers.in xlat/scmvals.in xlat/secbits.in \ - xlat/seccomp_filter_flags.in xlat/seccomp_mode.in \ - xlat/seccomp_ops.in xlat/seccomp_ret_action.in \ - xlat/semctl_flags.in xlat/semop_flags.in \ - xlat/setsockipoptions.in xlat/setsockipv6options.in \ - xlat/sfd_flags.in xlat/sg_io_dxfer_direction.in \ - xlat/shm_flags.in xlat/shm_resource_flags.in \ - xlat/shmctl_flags.in xlat/shutdown_modes.in \ - xlat/sigact_flags.in xlat/sigaltstack_flags.in \ - xlat/sigbus_codes.in xlat/sigchld_codes.in \ - xlat/sigemt_codes.in xlat/sigev_value.in xlat/sigfpe_codes.in \ - xlat/sigill_codes.in xlat/siginfo_codes.in \ - xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in \ - xlat/sigprof_codes.in xlat/sigsegv_codes.in \ - xlat/sigsys_codes.in xlat/sigtrap_codes.in \ - xlat/sock_type_flags.in xlat/socketlayers.in \ - xlat/sockipoptions.in xlat/sockipv6options.in \ - xlat/sockipxoptions.in xlat/sockoptions.in \ - xlat/sockpacketoptions.in xlat/sockrawoptions.in \ - xlat/socksctpoptions.in xlat/socktcpoptions.in \ - xlat/socktypes.in xlat/splice_flags.in \ - xlat/sram_alloc_flags.in xlat/swap_flags.in \ - xlat/sync_file_range_flags.in xlat/sysctl_kern.in \ - xlat/sysctl_net.in xlat/sysctl_net_core.in \ + xlat/resource_flags.in xlat/resources.in xlat/rwf_flags.in \ + xlat/sched_flags.in xlat/schedulers.in xlat/scmvals.in \ + xlat/secbits.in xlat/seccomp_filter_flags.in \ + xlat/seccomp_mode.in xlat/seccomp_ops.in \ + xlat/seccomp_ret_action.in xlat/semctl_flags.in \ + xlat/semop_flags.in xlat/setsockipoptions.in \ + xlat/setsockipv6options.in xlat/sfd_flags.in \ + xlat/sg_io_dxfer_direction.in xlat/shm_flags.in \ + xlat/shm_resource_flags.in xlat/shmctl_flags.in \ + xlat/shutdown_modes.in xlat/sigact_flags.in \ + xlat/sigaltstack_flags.in xlat/sigbus_codes.in \ + xlat/sigchld_codes.in xlat/sigemt_codes.in xlat/sigev_value.in \ + xlat/sigfpe_codes.in xlat/sigill_codes.in \ + xlat/siginfo_codes.in xlat/sigpoll_codes.in \ + xlat/sigprocmaskcmds.in xlat/sigprof_codes.in \ + xlat/sigsegv_codes.in xlat/sigsys_codes.in \ + xlat/sigtrap_codes.in xlat/sock_type_flags.in \ + xlat/socketlayers.in xlat/sockipoptions.in \ + xlat/sockipv6options.in xlat/sockipxoptions.in \ + xlat/sockoptions.in xlat/sockpacketoptions.in \ + xlat/sockrawoptions.in xlat/socksctpoptions.in \ + xlat/socktcpoptions.in xlat/socktypes.in xlat/splice_flags.in \ + xlat/sram_alloc_flags.in xlat/statfs_flags.in \ + xlat/swap_flags.in xlat/sync_file_range_flags.in \ + xlat/sysctl_kern.in xlat/sysctl_net.in xlat/sysctl_net_core.in \ xlat/sysctl_net_ipv4.in xlat/sysctl_net_ipv4_conf.in \ xlat/sysctl_net_ipv4_route.in xlat/sysctl_net_ipv6.in \ xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in \ @@ -677,7 +736,10 @@ xlat/syslog_action_type.in xlat/sysmips_operations.in \ xlat/tcflsh_options.in xlat/tcxonc_options.in \ xlat/timerfdflags.in xlat/ubi_volume_props.in \ - xlat/ubi_volume_types.in xlat/uffd_flags.in \ + xlat/ubi_volume_types.in xlat/uffd_api_flags.in \ + xlat/uffd_copy_flags.in xlat/uffd_flags.in \ + xlat/uffd_register_ioctl_flags.in \ + xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in \ xlat/umount_flags.in xlat/usagewho.in xlat/v4l2_buf_flags.in \ xlat/v4l2_buf_types.in xlat/v4l2_capture_modes.in \ xlat/v4l2_colorspaces.in xlat/v4l2_control_classes.in \ @@ -701,14 +763,27 @@ xlat/bpf_mode.h xlat/bpf_op_alu.h xlat/bpf_op_jmp.h \ xlat/bpf_prog_types.h xlat/bpf_rval.h xlat/bpf_size.h \ xlat/bpf_src.h xlat/bsg_protocol.h xlat/bsg_subprotocol.h \ - xlat/bt_protocols.h xlat/cacheflush_scope.h xlat/cap.h \ - xlat/cap_mask0.h xlat/cap_mask1.h xlat/cap_version.h \ - xlat/clockflags.h xlat/clocknames.h xlat/clone_flags.h \ - xlat/cpuclocknames.h xlat/delete_module_flags.h \ - xlat/dirent_types.h xlat/domains.h xlat/efd_flags.h \ - xlat/epollctls.h xlat/epollevents.h xlat/epollflags.h \ - xlat/evdev_abs.h xlat/evdev_autorepeat.h xlat/evdev_ev.h \ - xlat/evdev_ff_status.h xlat/evdev_ff_types.h \ + xlat/bt_protocols.h xlat/btrfs_balance_args.h \ + xlat/btrfs_balance_ctl_cmds.h xlat/btrfs_balance_flags.h \ + xlat/btrfs_balance_state.h xlat/btrfs_compress_types.h \ + xlat/btrfs_defrag_flags.h xlat/btrfs_dev_replace_cmds.h \ + xlat/btrfs_dev_replace_results.h \ + xlat/btrfs_dev_replace_state.h xlat/btrfs_dev_stats_flags.h \ + xlat/btrfs_dev_stats_values.h xlat/btrfs_features_compat.h \ + xlat/btrfs_features_compat_ro.h xlat/btrfs_features_incompat.h \ + xlat/btrfs_key_types.h xlat/btrfs_qgroup_ctl_cmds.h \ + xlat/btrfs_qgroup_inherit_flags.h \ + xlat/btrfs_qgroup_limit_flags.h \ + xlat/btrfs_qgroup_status_flags.h xlat/btrfs_scrub_flags.h \ + xlat/btrfs_send_flags.h xlat/btrfs_snap_flags_v2.h \ + xlat/btrfs_space_info_flags.h xlat/btrfs_tree_objectids.h \ + xlat/cacheflush_scope.h xlat/cap.h xlat/cap_mask0.h \ + xlat/cap_mask1.h xlat/cap_version.h xlat/clockflags.h \ + xlat/clocknames.h xlat/clone_flags.h xlat/cpuclocknames.h \ + xlat/delete_module_flags.h xlat/dirent_types.h \ + xlat/efd_flags.h xlat/epollctls.h xlat/epollevents.h \ + xlat/epollflags.h xlat/evdev_abs.h xlat/evdev_autorepeat.h \ + xlat/evdev_ev.h xlat/evdev_ff_status.h xlat/evdev_ff_types.h \ xlat/evdev_keycode.h xlat/evdev_leds.h xlat/evdev_misc.h \ xlat/evdev_mtslots.h xlat/evdev_prop.h \ xlat/evdev_relative_axes.h xlat/evdev_snd.h \ @@ -716,18 +791,20 @@ xlat/f_seals.h xlat/falloc_flags.h xlat/fan_classes.h \ xlat/fan_event_flags.h xlat/fan_init_flags.h \ xlat/fan_mark_flags.h xlat/fcntl64cmds.h xlat/fcntlcmds.h \ - xlat/fdflags.h xlat/flockcmds.h xlat/fsmagic.h xlat/futexops.h \ + xlat/fdflags.h xlat/fiemap_extent_flags.h xlat/fiemap_flags.h \ + xlat/flockcmds.h xlat/fsmagic.h xlat/futexops.h \ xlat/futexwakecmps.h xlat/futexwakeops.h \ xlat/getrandom_flags.h xlat/getsockipoptions.h \ xlat/getsockipv6options.h xlat/icmpfilterflags.h \ - xlat/if_dqblk_valid.h xlat/if_dqinfo_valid.h xlat/iffflags.h \ - xlat/inet_protocols.h xlat/inotify_flags.h \ - xlat/inotify_init_flags.h xlat/ioctl_dirs.h \ - xlat/ioprio_class.h xlat/ioprio_who.h xlat/ip_cmsg_types.h \ - xlat/ipc_msg_flags.h xlat/itimer_which.h xlat/kcmp_types.h \ - xlat/kexec_arch_values.h xlat/kexec_file_load_flags.h \ - xlat/kexec_load_flags.h xlat/key_perms.h xlat/key_reqkeys.h \ - xlat/key_spec.h xlat/keyctl_commands.h xlat/lockfcmds.h \ + xlat/if_dqblk_valid.h xlat/if_dqinfo_flags.h \ + xlat/if_dqinfo_valid.h xlat/iffflags.h xlat/inet_protocols.h \ + xlat/inotify_flags.h xlat/inotify_init_flags.h \ + xlat/ioctl_dirs.h xlat/ioprio_class.h xlat/ioprio_who.h \ + xlat/ip_cmsg_types.h xlat/ipc_msg_flags.h xlat/itimer_which.h \ + xlat/kcmp_types.h xlat/kexec_arch_values.h \ + xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h \ + xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h \ + xlat/keyctl_commands.h xlat/lockfcmds.h \ xlat/loop_crypt_type_options.h xlat/loop_flags_options.h \ xlat/madvise_cmds.h xlat/mbindflags.h xlat/mctl_sync.h \ xlat/membarrier_cmds.h xlat/memfd_create_flags.h \ @@ -742,14 +819,16 @@ xlat/notifyflags.h xlat/nt_descriptor_types.h \ xlat/open_access_modes.h xlat/open_mode_flags.h \ xlat/openmodessol.h xlat/packet_mreq_type.h \ - xlat/perf_event_open_flags.h xlat/personality_options.h \ - xlat/policies.h xlat/pollflags.h xlat/pr_cap_ambient.h \ - xlat/pr_mce_kill.h xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h \ - xlat/pr_tsc.h xlat/pr_unalign_flags.h xlat/prctl_options.h \ - xlat/priorities.h xlat/ptp_flags_options.h xlat/ptrace_cmds.h \ - xlat/ptrace_events.h xlat/ptrace_setoptions_flags.h \ - xlat/quota_formats.h xlat/quotacmds.h xlat/quotatypes.h \ - xlat/rename_flags.h xlat/resource_flags.h xlat/resources.h \ + xlat/perf_event_open_flags.h xlat/personality_flags.h \ + xlat/personality_types.h xlat/policies.h xlat/pollflags.h \ + xlat/pr_cap_ambient.h xlat/pr_mce_kill.h \ + xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h xlat/pr_tsc.h \ + xlat/pr_unalign_flags.h xlat/prctl_options.h xlat/priorities.h \ + xlat/ptp_flags_options.h xlat/ptrace_cmds.h \ + xlat/ptrace_events.h xlat/ptrace_peeksiginfo_flags.h \ + xlat/ptrace_setoptions_flags.h xlat/quota_formats.h \ + xlat/quotacmds.h xlat/quotatypes.h xlat/rename_flags.h \ + xlat/resource_flags.h xlat/resources.h xlat/rwf_flags.h \ xlat/sched_flags.h xlat/schedulers.h xlat/scmvals.h \ xlat/secbits.h xlat/seccomp_filter_flags.h xlat/seccomp_mode.h \ xlat/seccomp_ops.h xlat/seccomp_ret_action.h \ @@ -769,7 +848,7 @@ xlat/sockoptions.h xlat/sockpacketoptions.h \ xlat/sockrawoptions.h xlat/socksctpoptions.h \ xlat/socktcpoptions.h xlat/socktypes.h xlat/splice_flags.h \ - xlat/sram_alloc_flags.h xlat/swap_flags.h \ + xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/swap_flags.h \ xlat/sync_file_range_flags.h xlat/sysctl_kern.h \ xlat/sysctl_net.h xlat/sysctl_net_core.h \ xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_conf.h \ @@ -779,11 +858,14 @@ xlat/sysmips_operations.h xlat/tcflsh_options.h \ xlat/tcxonc_options.h xlat/timerfdflags.h \ xlat/ubi_volume_props.h xlat/ubi_volume_types.h \ - xlat/uffd_flags.h xlat/umount_flags.h xlat/usagewho.h \ - xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h \ - xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h \ - xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h \ - xlat/v4l2_control_ids.h xlat/v4l2_control_types.h \ + xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h \ + xlat/uffd_register_ioctl_flags.h \ + xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h \ + xlat/umount_flags.h xlat/usagewho.h xlat/v4l2_buf_flags.h \ + xlat/v4l2_buf_types.h xlat/v4l2_capture_modes.h \ + xlat/v4l2_colorspaces.h xlat/v4l2_control_classes.h \ + xlat/v4l2_control_flags.h xlat/v4l2_control_ids.h \ + xlat/v4l2_control_types.h \ xlat/v4l2_device_capabilities_flags.h xlat/v4l2_fields.h \ xlat/v4l2_format_description_flags.h \ xlat/v4l2_frameinterval_types.h xlat/v4l2_framesize_types.h \ @@ -791,39 +873,61 @@ xlat/v4l2_streaming_capabilities.h xlat/wait4_options.h \ xlat/waitid_types.h xlat/whence_codes.h xlat/xattrflags.h \ xlat/xfs_dqblk_flags.h xlat/xfs_quota_flags.h -strace_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_2) +strace_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_2) \ + $(CODE_COVERAGE_CPPFLAGS) +strace_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS) strace_LDFLAGS = $(am__append_3) -strace_LDADD = $(am__append_4) $(am__append_5) $(am__append_9) -noinst_LIBRARIES = $(am__append_6) $(am__append_10) -strace_SOURCES = access.c affinity.c aio.c bjm.c block.c bpf.c \ - cacheflush.c capability.c caps0.h caps1.h chdir.c chmod.c \ - clone.c count.c desc.c dirent.c dirent64.c empty.h epoll.c \ - evdev.c eventfd.c execve.c exit.c fadvise.c fallocate.c \ - fanotify.c fchownat.c fcntl.c fetch_seccomp_fprog.c \ - fetch_struct_flock.c file.c file_handle.c flock.c flock.h \ - futex.c get_robust_list.c getcpu.c getcwd.c getrandom.c \ +strace_LDADD = libstrace.a $(am__append_4) $(CODE_COVERAGE_LDFLAGS) \ + $(am__append_5) $(am__append_9) +noinst_LIBRARIES = libstrace.a $(am__append_6) $(am__append_10) +libstrace_a_CPPFLAGS = $(strace_CPPFLAGS) +libstrace_a_CFLAGS = $(strace_CFLAGS) +libstrace_a_SOURCES = \ + fstatfs.c \ + fstatfs64.c \ + statfs.c \ + statfs64.c \ + sync_file_range.c \ + sync_file_range2.c \ + upeek.c \ + # end of libstrace_a_SOURCES + +strace_SOURCES = access.c affinity.c aio.c alpha.c bjm.c block.c bpf.c \ + btrfs.c cacheflush.c capability.c caps0.h caps1.h chdir.c \ + chmod.c clone.c copy_file_range.c count.c defs.h desc.c \ + dirent.c dirent64.c empty.h epoll.c evdev.c eventfd.c execve.c \ + exit.c fadvise.c fallocate.c fanotify.c fchownat.c fcntl.c \ + fetch_seccomp_fprog.c fetch_struct_flock.c \ + fetch_struct_statfs.c file.c file_handle.c file_ioctl.c \ + fs_x_ioctl.c flock.c flock.h futex.c gcc_compat.h \ + get_robust_list.c getcpu.c getcwd.c getrandom.c hdio.c \ hostname.c inotify.c io.c ioctl.c ioperm.c iopl.c ioprio.c \ ipc_defs.h ipc_msg.c ipc_msgctl.c ipc_sem.c ipc_shm.c \ ipc_shmctl.c kcmp.c kernel_types.h kexec.c keyctl.c ldt.c \ link.c linux/asm_stat.h linux/x32/asm_stat.h lookup_dcookie.c \ loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ - mount.c mpers_type.h mq.c mtd.c native_defs.h net.c open.c \ - or1k_atomic.c pathtrace.c perf.c personality.c poll.c prctl.c \ - print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c \ - print_timex.c printmode.c printrusage.c printsiginfo.c \ - printsiginfo.h printstat.h process.c process_vm.c ptp.c \ - ptrace.h quota.c readahead.c readlink.c reboot.c regs.h \ - renameat.c resource.c rtc.c sched.c scsi.c seccomp.c \ - seccomp_fprog.h sendfile.c sigaltstack.c signal.c signalfd.c \ - sigreturn.c sock.c socketutils.c sram_alloc.c statfs.c \ - strace.c swapon.c sync_file_range.c syscall.c sysctl.c \ - sysinfo.c syslog.c sysmips.c term.c time.c times.c truncate.c \ - uid.c uid16.c umask.c umount.c uname.c userfaultfd.c util.c \ - utime.c utimes.c v4l2.c vsprintf.c wait.c xattr.c xmalloc.c \ - $(am__append_1) -noinst_HEADERS = defs.h + mount.c mpers_type.h mq.c mtd.c native_defs.h net.c numa.c \ + open.c or1k_atomic.c pathtrace.c perf.c personality.c poll.c \ + prctl.c print_mq_attr.c print_msgbuf.c print_sigevent.c \ + print_statfs.c print_time.c print_timex.c printmode.c \ + printrusage.c printsiginfo.c printsiginfo.h printstat.h \ + process.c process_vm.c ptp.c ptrace.h quota.c readahead.c \ + readlink.c reboot.c regs.h renameat.c resource.c rtc.c sched.c \ + scsi.c seccomp.c seccomp_fprog.h sendfile.c sigaltstack.c \ + sigevent.h signal.c signalfd.c sigreturn.c sock.c \ + socketutils.c sram_alloc.c statfs.c statfs.h strace.c swapon.c \ + syscall.c sysctl.c sysinfo.c syslog.c sysmips.c term.c time.c \ + times.c truncate.c ubi.c uid.c uid16.c umask.c umount.c \ + uname.c userfaultfd.c util.c utime.c utimes.c v4l2.c \ + vsprintf.c wait.c xattr.c xlat.h xmalloc.c $(am__append_1) +CODE_COVERAGE_BRANCH_COVERAGE = 1 +CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ + --prefix $(shell realpath -Ls $(abs_top_srcdir)/..) + +CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*' + # Enable this to get link map generated -#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile +#strace_LDFLAGS += -Wl,-Map=strace.mapfile EXTRA_DIST = \ $(man_MANS) \ .version \ @@ -1015,6 +1119,7 @@ linux/mips/syscallent.h \ linux/mips/userent.h \ linux/mtd-abi.h \ + linux/netlink_diag.h \ linux/nios2/arch_regs.c \ linux/nios2/get_error.c \ linux/nios2/get_scno.c \ @@ -1223,7 +1328,9 @@ xlat/gen.sh \ xlate.el -strace_SOURCES_c = $(filter %.c,$(strace_SOURCES)) +strace_SOURCES_c = \ + $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES)) + syscallent_names = subcall.h syscallent.h syscallent1.h \ syscallent-n32.h syscallent-n64.h syscallent-o32.h @@ -1240,31 +1347,37 @@ ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) -BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h \ +ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h))) +BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ native_printer_defs.h printers.h sen.h sys_func.h .version \ $(am__append_7) $(am__append_11) -CLEANFILES = $(ioctlent_h) native_printer_decls.h \ - native_printer_defs.h printers.h sen.h sys_func.h \ - $(am__append_8) $(am__append_12) +CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ + native_printer_decls.h native_printer_defs.h printers.h sen.h \ + sys_func.h $(am__append_8) $(am__append_12) DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h # Generated by ./generate_mpers_am.sh; do not edit. -mpers_source_files = dirent.c fetch_seccomp_fprog.c fetch_struct_flock.c ipc_msgctl.c ipc_shmctl.c print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c print_timex.c printrusage.c printsiginfo.c sigaltstack.c sysinfo.c times.c utime.c +mpers_source_files = block.c btrfs.c dirent.c evdev.c fetch_seccomp_fprog.c fetch_struct_flock.c fetch_struct_statfs.c hdio.c ipc_msgctl.c ipc_shmctl.c mtd.c print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c print_timex.c printrusage.c printsiginfo.c rtc.c sigaltstack.c sysinfo.c times.c utime.c v4l2.c # defines mpers_source_files srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files)) +mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i) mpers_NAME = mpers_PREFIX = $(mpers_NAME)_ mpers_DEFS = $(DEFS) mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS) mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS) -libmpers_CPPFLAGS = $(AM_CPPFLAGS) -DIN_MPERS +libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS +libmpers_CFLAGS = $(strace_CFLAGS) +mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL(\([^,)]\+\),[[:space:]]*\([^,)]\+\),[[:space:]]*\([^)]\+\))$$ @HAVE_M32_MPERS_TRUE@libmpers_m32_a_SOURCES = $(mpers_source_files) @HAVE_M32_MPERS_TRUE@libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32 +@HAVE_M32_MPERS_TRUE@libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS) @HAVE_M32_MPERS_TRUE@mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h @HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_SOURCES = $(mpers_source_files) @HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32 +@HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS) @HAVE_MX32_MPERS_TRUE@mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h @MAINTAINER_MODE_TRUE@gen_changelog_start_date = 2009-07-08 20:00 all: $(BUILT_SOURCES) config.h @@ -1335,6 +1448,11 @@ $(AM_V_at)-rm -f libmpers-mx32.a $(AM_V_AR)$(libmpers_mx32_a_AR) libmpers-mx32.a $(libmpers_mx32_a_OBJECTS) $(libmpers_mx32_a_LIBADD) $(AM_V_at)$(RANLIB) libmpers-mx32.a + +libstrace.a: $(libstrace_a_OBJECTS) $(libstrace_a_DEPENDENCIES) $(EXTRA_libstrace_a_DEPENDENCIES) + $(AM_V_at)-rm -f libstrace.a + $(AM_V_AR)$(libstrace_a_AR) libstrace.a $(libstrace_a_OBJECTS) $(libstrace_a_LIBADD) + $(AM_V_at)$(RANLIB) libstrace.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -1423,11 +1541,17 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-dirent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-evdev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-hdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-mtd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_mq_attr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_sigevent.Po@am__quote@ @@ -1435,15 +1559,23 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_timex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-printrusage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-printsiginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-rtc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sigaltstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sysinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-dirent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-evdev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-hdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-mtd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_sigevent.Po@am__quote@ @@ -1451,21 +1583,33 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_timex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-printrusage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-printsiginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-rtc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sigaltstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sysinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-sync_file_range2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-upeek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-access.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-affinity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-alpha.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-bjm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-block.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-cacheflush.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-capability.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-chdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-chmod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-clone.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-copy_file_range.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-count.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-desc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dirent.Po@am__quote@ @@ -1482,14 +1626,18 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_seccomp_fprog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_statfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-file_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fs_x_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-futex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-get_robust_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getcpu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-hdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-hostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-inotify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-io.Po@am__quote@ @@ -1518,6 +1666,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mtd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-net.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-numa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-or1k_atomic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-pathtrace.Po@am__quote@ @@ -1528,6 +1677,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_mq_attr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_sigevent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_statfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_timex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-printmode.Po@am__quote@ @@ -1557,7 +1707,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-statfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-strace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-swapon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sync_file_range.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-syscall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sysctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sysinfo.Po@am__quote@ @@ -1567,6 +1716,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-truncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ubi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-uid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-uid16.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-umask.Po@am__quote@ @@ -1597,2231 +1747,2679 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +libmpers_m32_a-block.o: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_m32_a-block.obj: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_m32_a-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_m32_a-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + libmpers_m32_a-dirent.o: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c libmpers_m32_a-dirent.obj: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_m32_a-evdev.o: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_m32_a-evdev.obj: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` libmpers_m32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c libmpers_m32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` libmpers_m32_a-fetch_struct_flock.o: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c libmpers_m32_a-fetch_struct_flock.obj: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_m32_a-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_m32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_m32_a-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_m32_a-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` libmpers_m32_a-ipc_msgctl.o: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c libmpers_m32_a-ipc_msgctl.obj: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` libmpers_m32_a-ipc_shmctl.o: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c libmpers_m32_a-ipc_shmctl.obj: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_m32_a-mtd.o: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_m32_a-mtd.obj: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` libmpers_m32_a-print_mq_attr.o: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c libmpers_m32_a-print_mq_attr.obj: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` libmpers_m32_a-print_msgbuf.o: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c libmpers_m32_a-print_msgbuf.obj: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` libmpers_m32_a-print_sigevent.o: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c libmpers_m32_a-print_sigevent.obj: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` libmpers_m32_a-print_time.o: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c libmpers_m32_a-print_time.obj: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` libmpers_m32_a-print_timex.o: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c libmpers_m32_a-print_timex.obj: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` libmpers_m32_a-printrusage.o: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c libmpers_m32_a-printrusage.obj: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` libmpers_m32_a-printsiginfo.o: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c libmpers_m32_a-printsiginfo.obj: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_m32_a-rtc.o: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_m32_a-rtc.obj: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` libmpers_m32_a-sigaltstack.o: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c libmpers_m32_a-sigaltstack.obj: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` libmpers_m32_a-sysinfo.o: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c libmpers_m32_a-sysinfo.obj: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` libmpers_m32_a-times.o: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c libmpers_m32_a-times.obj: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` libmpers_m32_a-utime.o: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c libmpers_m32_a-utime.obj: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_m32_a-v4l2.o: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_m32_a-v4l2.obj: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libmpers_mx32_a-block.o: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_mx32_a-block.obj: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_mx32_a-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_mx32_a-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` libmpers_mx32_a-dirent.o: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c libmpers_mx32_a-dirent.obj: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_mx32_a-evdev.o: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_mx32_a-evdev.obj: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` libmpers_mx32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c libmpers_mx32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` libmpers_mx32_a-fetch_struct_flock.o: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c libmpers_mx32_a-fetch_struct_flock.obj: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_mx32_a-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_mx32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_mx32_a-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_mx32_a-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` libmpers_mx32_a-ipc_msgctl.o: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c libmpers_mx32_a-ipc_msgctl.obj: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` libmpers_mx32_a-ipc_shmctl.o: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c libmpers_mx32_a-ipc_shmctl.obj: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_mx32_a-mtd.o: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_mx32_a-mtd.obj: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` libmpers_mx32_a-print_mq_attr.o: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c libmpers_mx32_a-print_mq_attr.obj: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` libmpers_mx32_a-print_msgbuf.o: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c libmpers_mx32_a-print_msgbuf.obj: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` libmpers_mx32_a-print_sigevent.o: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c libmpers_mx32_a-print_sigevent.obj: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` libmpers_mx32_a-print_time.o: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c libmpers_mx32_a-print_time.obj: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` libmpers_mx32_a-print_timex.o: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c libmpers_mx32_a-print_timex.obj: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` libmpers_mx32_a-printrusage.o: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c libmpers_mx32_a-printrusage.obj: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` libmpers_mx32_a-printsiginfo.o: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c libmpers_mx32_a-printsiginfo.obj: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_mx32_a-rtc.o: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_mx32_a-rtc.obj: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` libmpers_mx32_a-sigaltstack.o: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c libmpers_mx32_a-sigaltstack.obj: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` libmpers_mx32_a-sysinfo.o: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c libmpers_mx32_a-sysinfo.obj: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` libmpers_mx32_a-times.o: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c libmpers_mx32_a-times.obj: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` libmpers_mx32_a-utime.o: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c libmpers_mx32_a-utime.obj: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_mx32_a-v4l2.o: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_mx32_a-v4l2.obj: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libstrace_a-fstatfs.o: fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c + +libstrace_a-fstatfs.obj: fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` + +libstrace_a-fstatfs64.o: fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c + +libstrace_a-fstatfs64.obj: fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` + +libstrace_a-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +libstrace_a-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +libstrace_a-statfs64.o: statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c + +libstrace_a-statfs64.obj: statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` + +libstrace_a-sync_file_range.o: sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c + +libstrace_a-sync_file_range.obj: sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` + +libstrace_a-sync_file_range2.o: sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c + +libstrace_a-sync_file_range2.obj: sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` + +libstrace_a-upeek.o: upeek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.o -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c + +libstrace_a-upeek.obj: upeek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.obj -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` strace-access.o: access.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-access.o -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.o -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='access.c' object='strace-access.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c strace-access.obj: access.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-access.obj -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.obj -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='access.c' object='strace-access.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` strace-affinity.o: affinity.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-affinity.o -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.o -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='affinity.c' object='strace-affinity.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c strace-affinity.obj: affinity.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-affinity.obj -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.obj -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='affinity.c' object='strace-affinity.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` strace-aio.o: aio.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-aio.o -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.o -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aio.c' object='strace-aio.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c strace-aio.obj: aio.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-aio.obj -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.obj -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aio.c' object='strace-aio.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` + +strace-alpha.o: alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.o -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='alpha.c' object='strace-alpha.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c + +strace-alpha.obj: alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.obj -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='alpha.c' object='strace-alpha.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` strace-bjm.o: bjm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-bjm.o -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.o -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bjm.c' object='strace-bjm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c strace-bjm.obj: bjm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-bjm.obj -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.obj -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bjm.c' object='strace-bjm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` strace-block.o: block.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-block.o -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.o -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='strace-block.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c strace-block.obj: block.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-block.obj -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.obj -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='strace-block.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` strace-bpf.o: bpf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-bpf.o -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.o -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bpf.c' object='strace-bpf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c strace-bpf.obj: bpf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-bpf.obj -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.obj -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bpf.c' object='strace-bpf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` + +strace-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.o -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='strace-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +strace-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.obj -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='strace-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` strace-cacheflush.o: cacheflush.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-cacheflush.o -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.o -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c strace-cacheflush.obj: cacheflush.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-cacheflush.obj -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.obj -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` strace-capability.o: capability.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-capability.o -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.o -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='capability.c' object='strace-capability.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c strace-capability.obj: capability.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-capability.obj -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.obj -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='capability.c' object='strace-capability.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` strace-chdir.o: chdir.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-chdir.o -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.o -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chdir.c' object='strace-chdir.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c strace-chdir.obj: chdir.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-chdir.obj -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.obj -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chdir.c' object='strace-chdir.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` strace-chmod.o: chmod.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-chmod.o -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.o -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chmod.c' object='strace-chmod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c strace-chmod.obj: chmod.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-chmod.obj -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.obj -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chmod.c' object='strace-chmod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` strace-clone.o: clone.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-clone.o -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.o -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clone.c' object='strace-clone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c strace-clone.obj: clone.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-clone.obj -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.obj -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clone.c' object='strace-clone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` + +strace-copy_file_range.o: copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.o -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c + +strace-copy_file_range.obj: copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.obj -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` strace-count.o: count.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-count.o -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.o -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='count.c' object='strace-count.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c strace-count.obj: count.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-count.obj -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.obj -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='count.c' object='strace-count.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` strace-desc.o: desc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-desc.o -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.o -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desc.c' object='strace-desc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c strace-desc.obj: desc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-desc.obj -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.obj -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desc.c' object='strace-desc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` strace-dirent.o: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-dirent.o -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.o -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='strace-dirent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c strace-dirent.obj: dirent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-dirent.obj -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.obj -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='strace-dirent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` strace-dirent64.o: dirent64.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-dirent64.o -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.o -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent64.c' object='strace-dirent64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c strace-dirent64.obj: dirent64.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-dirent64.obj -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.obj -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent64.c' object='strace-dirent64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` strace-epoll.o: epoll.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-epoll.o -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.o -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='epoll.c' object='strace-epoll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c strace-epoll.obj: epoll.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-epoll.obj -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.obj -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='epoll.c' object='strace-epoll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` strace-evdev.o: evdev.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-evdev.o -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.o -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='strace-evdev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c strace-evdev.obj: evdev.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-evdev.obj -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.obj -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='strace-evdev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` strace-eventfd.o: eventfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-eventfd.o -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.o -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='eventfd.c' object='strace-eventfd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c strace-eventfd.obj: eventfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-eventfd.obj -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.obj -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='eventfd.c' object='strace-eventfd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` strace-execve.o: execve.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-execve.o -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.o -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='execve.c' object='strace-execve.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c strace-execve.obj: execve.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-execve.obj -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.obj -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='execve.c' object='strace-execve.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` strace-exit.o: exit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-exit.o -MD -MP -MF $(DEPDIR)/strace-exit.Tpo -c -o strace-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-exit.o -MD -MP -MF $(DEPDIR)/strace-exit.Tpo -c -o strace-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-exit.Tpo $(DEPDIR)/strace-exit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='exit.c' object='strace-exit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c strace-exit.obj: exit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-exit.obj -MD -MP -MF $(DEPDIR)/strace-exit.Tpo -c -o strace-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-exit.obj -MD -MP -MF $(DEPDIR)/strace-exit.Tpo -c -o strace-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-exit.Tpo $(DEPDIR)/strace-exit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='exit.c' object='strace-exit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi` strace-fadvise.o: fadvise.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fadvise.o -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.o -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fadvise.c' object='strace-fadvise.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c strace-fadvise.obj: fadvise.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fadvise.obj -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.obj -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fadvise.c' object='strace-fadvise.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` strace-fallocate.o: fallocate.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fallocate.o -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.o -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fallocate.c' object='strace-fallocate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c strace-fallocate.obj: fallocate.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fallocate.obj -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.obj -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fallocate.c' object='strace-fallocate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` strace-fanotify.o: fanotify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fanotify.o -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.o -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fanotify.c' object='strace-fanotify.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c strace-fanotify.obj: fanotify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fanotify.obj -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.obj -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fanotify.c' object='strace-fanotify.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` strace-fchownat.o: fchownat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fchownat.o -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.o -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fchownat.c' object='strace-fchownat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c strace-fchownat.obj: fchownat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fchownat.obj -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.obj -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fchownat.c' object='strace-fchownat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` strace-fcntl.o: fcntl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fcntl.o -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.o -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcntl.c' object='strace-fcntl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c strace-fcntl.obj: fcntl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fcntl.obj -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.obj -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcntl.c' object='strace-fcntl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` strace-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c strace-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` strace-fetch_struct_flock.o: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c strace-fetch_struct_flock.obj: fetch_struct_flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +strace-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +strace-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` strace-file.o: file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-file.o -MD -MP -MF $(DEPDIR)/strace-file.Tpo -c -o strace-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file.o -MD -MP -MF $(DEPDIR)/strace-file.Tpo -c -o strace-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file.Tpo $(DEPDIR)/strace-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file.c' object='strace-file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c strace-file.obj: file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-file.obj -MD -MP -MF $(DEPDIR)/strace-file.Tpo -c -o strace-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file.obj -MD -MP -MF $(DEPDIR)/strace-file.Tpo -c -o strace-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file.Tpo $(DEPDIR)/strace-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file.c' object='strace-file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` strace-file_handle.o: file_handle.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-file_handle.o -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.o -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_handle.c' object='strace-file_handle.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c strace-file_handle.obj: file_handle.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-file_handle.obj -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.obj -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_handle.c' object='strace-file_handle.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` + +strace-file_ioctl.o: file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.o -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c + +strace-file_ioctl.obj: file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` + +strace-fs_x_ioctl.o: fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.o -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c + +strace-fs_x_ioctl.obj: fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` strace-flock.o: flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-flock.o -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.o -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flock.c' object='strace-flock.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c strace-flock.obj: flock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-flock.obj -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.obj -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flock.c' object='strace-flock.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` strace-futex.o: futex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-futex.o -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.o -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='futex.c' object='strace-futex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c strace-futex.obj: futex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-futex.obj -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.obj -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='futex.c' object='strace-futex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` strace-get_robust_list.o: get_robust_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.o -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.o -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c strace-get_robust_list.obj: get_robust_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.obj -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.obj -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` strace-getcpu.o: getcpu.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getcpu.o -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.o -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcpu.c' object='strace-getcpu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c strace-getcpu.obj: getcpu.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getcpu.obj -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.obj -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcpu.c' object='strace-getcpu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` strace-getcwd.o: getcwd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getcwd.o -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.o -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcwd.c' object='strace-getcwd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c strace-getcwd.obj: getcwd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getcwd.obj -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.obj -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcwd.c' object='strace-getcwd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` strace-getrandom.o: getrandom.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getrandom.o -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.o -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getrandom.c' object='strace-getrandom.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c strace-getrandom.obj: getrandom.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-getrandom.obj -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.obj -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getrandom.c' object='strace-getrandom.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` + +strace-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.o -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='strace-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +strace-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.obj -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='strace-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` strace-hostname.o: hostname.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-hostname.o -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.o -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostname.c' object='strace-hostname.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c strace-hostname.obj: hostname.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-hostname.obj -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.obj -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostname.c' object='strace-hostname.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` strace-inotify.o: inotify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-inotify.o -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.o -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inotify.c' object='strace-inotify.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c strace-inotify.obj: inotify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-inotify.obj -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.obj -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inotify.c' object='strace-inotify.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` strace-io.o: io.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-io.o -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.o -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io.c' object='strace-io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c strace-io.obj: io.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-io.obj -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.obj -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io.c' object='strace-io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` strace-ioctl.o: ioctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioctl.o -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.o -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioctl.c' object='strace-ioctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c strace-ioctl.obj: ioctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioctl.obj -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.obj -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioctl.c' object='strace-ioctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` strace-ioperm.o: ioperm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioperm.o -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.o -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioperm.c' object='strace-ioperm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c strace-ioperm.obj: ioperm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioperm.obj -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.obj -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioperm.c' object='strace-ioperm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` strace-iopl.o: iopl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-iopl.o -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.o -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iopl.c' object='strace-iopl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c strace-iopl.obj: iopl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-iopl.obj -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.obj -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iopl.c' object='strace-iopl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` strace-ioprio.o: ioprio.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioprio.o -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.o -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioprio.c' object='strace-ioprio.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c strace-ioprio.obj: ioprio.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ioprio.obj -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.obj -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioprio.c' object='strace-ioprio.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` strace-ipc_msg.o: ipc_msg.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.o -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.o -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c strace-ipc_msg.obj: ipc_msg.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` strace-ipc_msgctl.o: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c strace-ipc_msgctl.obj: ipc_msgctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` strace-ipc_sem.o: ipc_sem.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.o -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.o -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c strace-ipc_sem.obj: ipc_sem.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.obj -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.obj -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` strace-ipc_shm.o: ipc_shm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.o -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.o -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c strace-ipc_shm.obj: ipc_shm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` strace-ipc_shmctl.o: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c strace-ipc_shmctl.obj: ipc_shmctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` strace-kcmp.o: kcmp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-kcmp.o -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.o -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kcmp.c' object='strace-kcmp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c strace-kcmp.obj: kcmp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-kcmp.obj -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.obj -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kcmp.c' object='strace-kcmp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` strace-kexec.o: kexec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-kexec.o -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.o -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kexec.c' object='strace-kexec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c strace-kexec.obj: kexec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-kexec.obj -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.obj -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kexec.c' object='strace-kexec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` strace-keyctl.o: keyctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-keyctl.o -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.o -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyctl.c' object='strace-keyctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c strace-keyctl.obj: keyctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-keyctl.obj -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.obj -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyctl.c' object='strace-keyctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` strace-ldt.o: ldt.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ldt.o -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.o -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ldt.c' object='strace-ldt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c strace-ldt.obj: ldt.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ldt.obj -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.obj -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ldt.c' object='strace-ldt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` strace-link.o: link.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-link.o -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.o -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='link.c' object='strace-link.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c strace-link.obj: link.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-link.obj -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.obj -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='link.c' object='strace-link.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` strace-lookup_dcookie.o: lookup_dcookie.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.o -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.o -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c strace-lookup_dcookie.obj: lookup_dcookie.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.obj -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.obj -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` strace-loop.o: loop.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-loop.o -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.o -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='strace-loop.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c strace-loop.obj: loop.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-loop.obj -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.obj -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='strace-loop.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` strace-lseek.o: lseek.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-lseek.o -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.o -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lseek.c' object='strace-lseek.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c strace-lseek.obj: lseek.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-lseek.obj -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.obj -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lseek.c' object='strace-lseek.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` strace-mem.o: mem.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mem.o -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.o -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mem.c' object='strace-mem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c strace-mem.obj: mem.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mem.obj -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.obj -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mem.c' object='strace-mem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` strace-membarrier.o: membarrier.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-membarrier.o -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.o -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='membarrier.c' object='strace-membarrier.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c strace-membarrier.obj: membarrier.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-membarrier.obj -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.obj -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='membarrier.c' object='strace-membarrier.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` strace-memfd_create.o: memfd_create.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-memfd_create.o -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.o -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c strace-memfd_create.obj: memfd_create.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-memfd_create.obj -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.obj -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` strace-mknod.o: mknod.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mknod.o -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.o -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mknod.c' object='strace-mknod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c strace-mknod.obj: mknod.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mknod.obj -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.obj -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mknod.c' object='strace-mknod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` strace-mount.o: mount.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mount.o -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.o -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mount.c' object='strace-mount.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c strace-mount.obj: mount.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mount.obj -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.obj -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mount.c' object='strace-mount.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` strace-mq.o: mq.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mq.o -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.o -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mq.c' object='strace-mq.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c strace-mq.obj: mq.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mq.obj -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.obj -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mq.c' object='strace-mq.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` strace-mtd.o: mtd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mtd.o -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.o -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='strace-mtd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c strace-mtd.obj: mtd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-mtd.obj -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.obj -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='strace-mtd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` strace-net.o: net.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-net.o -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.o -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='net.c' object='strace-net.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c strace-net.obj: net.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-net.obj -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.obj -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='net.c' object='strace-net.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` + +strace-numa.o: numa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.o -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numa.c' object='strace-numa.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c + +strace-numa.obj: numa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.obj -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numa.c' object='strace-numa.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` strace-open.o: open.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-open.o -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.o -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='open.c' object='strace-open.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c strace-open.obj: open.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-open.obj -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.obj -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='open.c' object='strace-open.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` strace-or1k_atomic.o: or1k_atomic.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.o -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.o -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c strace-or1k_atomic.obj: or1k_atomic.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.obj -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.obj -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` strace-pathtrace.o: pathtrace.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-pathtrace.o -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.o -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c strace-pathtrace.obj: pathtrace.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-pathtrace.obj -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.obj -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` strace-perf.o: perf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-perf.o -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.o -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='perf.c' object='strace-perf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c strace-perf.obj: perf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-perf.obj -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.obj -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='perf.c' object='strace-perf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` strace-personality.o: personality.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-personality.o -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.o -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='personality.c' object='strace-personality.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c strace-personality.obj: personality.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-personality.obj -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.obj -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='personality.c' object='strace-personality.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` strace-poll.o: poll.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-poll.o -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.o -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='poll.c' object='strace-poll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c strace-poll.obj: poll.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-poll.obj -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.obj -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='poll.c' object='strace-poll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` strace-prctl.o: prctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-prctl.o -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.o -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prctl.c' object='strace-prctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c strace-prctl.obj: prctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-prctl.obj -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.obj -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prctl.c' object='strace-prctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` strace-print_mq_attr.o: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.o -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.o -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c strace-print_mq_attr.obj: print_mq_attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` strace-print_msgbuf.o: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.o -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.o -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c strace-print_msgbuf.obj: print_msgbuf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` strace-print_sigevent.o: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.o -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.o -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c strace-print_sigevent.obj: print_sigevent.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.obj -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.obj -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +strace-print_statfs.o: print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.o -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c + +strace-print_statfs.obj: print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.obj -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` strace-print_time.o: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_time.o -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.o -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='strace-print_time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c strace-print_time.obj: print_time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_time.obj -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.obj -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='strace-print_time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` strace-print_timex.o: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_timex.o -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.o -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='strace-print_timex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c strace-print_timex.obj: print_timex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-print_timex.obj -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.obj -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='strace-print_timex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` strace-printmode.o: printmode.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printmode.o -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.o -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printmode.c' object='strace-printmode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c strace-printmode.obj: printmode.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printmode.obj -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.obj -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printmode.c' object='strace-printmode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` strace-printrusage.o: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printrusage.o -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.o -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='strace-printrusage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c strace-printrusage.obj: printrusage.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printrusage.obj -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.obj -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='strace-printrusage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` strace-printsiginfo.o: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.o -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.o -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c strace-printsiginfo.obj: printsiginfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.obj -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.obj -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` strace-process.o: process.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-process.o -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.o -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process.c' object='strace-process.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c strace-process.obj: process.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-process.obj -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.obj -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process.c' object='strace-process.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` strace-process_vm.o: process_vm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-process_vm.o -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.o -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process_vm.c' object='strace-process_vm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c strace-process_vm.obj: process_vm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-process_vm.obj -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.obj -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process_vm.c' object='strace-process_vm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` strace-ptp.o: ptp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ptp.o -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.o -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptp.c' object='strace-ptp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c strace-ptp.obj: ptp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-ptp.obj -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.obj -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptp.c' object='strace-ptp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` strace-quota.o: quota.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-quota.o -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.o -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='quota.c' object='strace-quota.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c strace-quota.obj: quota.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-quota.obj -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.obj -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='quota.c' object='strace-quota.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` strace-readahead.o: readahead.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-readahead.o -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.o -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readahead.c' object='strace-readahead.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c strace-readahead.obj: readahead.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-readahead.obj -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.obj -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readahead.c' object='strace-readahead.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` strace-readlink.o: readlink.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-readlink.o -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.o -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readlink.c' object='strace-readlink.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c strace-readlink.obj: readlink.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-readlink.obj -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.obj -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readlink.c' object='strace-readlink.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` strace-reboot.o: reboot.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-reboot.o -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.o -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='reboot.c' object='strace-reboot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c strace-reboot.obj: reboot.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-reboot.obj -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.obj -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='reboot.c' object='strace-reboot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` strace-renameat.o: renameat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-renameat.o -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.o -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='renameat.c' object='strace-renameat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c strace-renameat.obj: renameat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-renameat.obj -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.obj -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='renameat.c' object='strace-renameat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` strace-resource.o: resource.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-resource.o -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.o -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resource.c' object='strace-resource.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c strace-resource.obj: resource.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-resource.obj -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.obj -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resource.c' object='strace-resource.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` strace-rtc.o: rtc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-rtc.o -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.o -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='strace-rtc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c strace-rtc.obj: rtc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-rtc.obj -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.obj -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='strace-rtc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` strace-sched.o: sched.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sched.o -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.o -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sched.c' object='strace-sched.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c strace-sched.obj: sched.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sched.obj -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.obj -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sched.c' object='strace-sched.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` strace-scsi.o: scsi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-scsi.o -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.o -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scsi.c' object='strace-scsi.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c strace-scsi.obj: scsi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-scsi.obj -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.obj -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scsi.c' object='strace-scsi.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` strace-seccomp.o: seccomp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-seccomp.o -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.o -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='seccomp.c' object='strace-seccomp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c strace-seccomp.obj: seccomp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-seccomp.obj -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.obj -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='seccomp.c' object='strace-seccomp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` strace-sendfile.o: sendfile.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sendfile.o -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.o -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sendfile.c' object='strace-sendfile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c strace-sendfile.obj: sendfile.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sendfile.obj -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.obj -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sendfile.c' object='strace-sendfile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` strace-sigaltstack.o: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.o -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.o -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c strace-sigaltstack.obj: sigaltstack.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.obj -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.obj -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` strace-signal.o: signal.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-signal.o -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.o -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal.c' object='strace-signal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c strace-signal.obj: signal.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-signal.obj -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.obj -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal.c' object='strace-signal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` strace-signalfd.o: signalfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-signalfd.o -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.o -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signalfd.c' object='strace-signalfd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c strace-signalfd.obj: signalfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-signalfd.obj -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.obj -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signalfd.c' object='strace-signalfd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` strace-sigreturn.o: sigreturn.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sigreturn.o -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.o -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c strace-sigreturn.obj: sigreturn.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sigreturn.obj -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.obj -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` strace-sock.o: sock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sock.o -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.o -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='strace-sock.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c strace-sock.obj: sock.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sock.obj -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.obj -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='strace-sock.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` strace-socketutils.o: socketutils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-socketutils.o -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.o -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketutils.c' object='strace-socketutils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c strace-socketutils.obj: socketutils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-socketutils.obj -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.obj -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketutils.c' object='strace-socketutils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` strace-sram_alloc.o: sram_alloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.o -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.o -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c strace-sram_alloc.obj: sram_alloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.obj -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.obj -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` strace-statfs.o: statfs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-statfs.o -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.o -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='strace-statfs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c strace-statfs.obj: statfs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-statfs.obj -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.obj -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='strace-statfs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` strace-strace.o: strace.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-strace.o -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.o -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strace.c' object='strace-strace.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c strace-strace.obj: strace.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-strace.obj -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.obj -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strace.c' object='strace-strace.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` strace-swapon.o: swapon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-swapon.o -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.o -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='swapon.c' object='strace-swapon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c strace-swapon.obj: swapon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-swapon.obj -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.obj -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='swapon.c' object='strace-swapon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` - -strace-sync_file_range.o: sync_file_range.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sync_file_range.o -MD -MP -MF $(DEPDIR)/strace-sync_file_range.Tpo -c -o strace-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sync_file_range.Tpo $(DEPDIR)/strace-sync_file_range.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='strace-sync_file_range.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c - -strace-sync_file_range.obj: sync_file_range.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sync_file_range.obj -MD -MP -MF $(DEPDIR)/strace-sync_file_range.Tpo -c -o strace-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sync_file_range.Tpo $(DEPDIR)/strace-sync_file_range.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='strace-sync_file_range.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` strace-syscall.o: syscall.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-syscall.o -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.o -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscall.c' object='strace-syscall.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c strace-syscall.obj: syscall.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-syscall.obj -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.obj -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscall.c' object='strace-syscall.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` strace-sysctl.o: sysctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysctl.o -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.o -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysctl.c' object='strace-sysctl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c strace-sysctl.obj: sysctl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysctl.obj -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.obj -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysctl.c' object='strace-sysctl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` strace-sysinfo.o: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysinfo.o -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.o -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c strace-sysinfo.obj: sysinfo.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysinfo.obj -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.obj -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` strace-syslog.o: syslog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-syslog.o -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.o -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syslog.c' object='strace-syslog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c strace-syslog.obj: syslog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-syslog.obj -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.obj -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syslog.c' object='strace-syslog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` strace-sysmips.o: sysmips.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysmips.o -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.o -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysmips.c' object='strace-sysmips.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c strace-sysmips.obj: sysmips.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-sysmips.obj -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.obj -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysmips.c' object='strace-sysmips.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` strace-term.o: term.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-term.o -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.o -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='term.c' object='strace-term.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c strace-term.obj: term.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-term.obj -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.obj -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='term.c' object='strace-term.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` strace-time.o: time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-time.o -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.o -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time.c' object='strace-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c strace-time.obj: time.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-time.obj -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.obj -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time.c' object='strace-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` strace-times.o: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-times.o -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.o -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='strace-times.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c strace-times.obj: times.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-times.obj -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.obj -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='strace-times.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` strace-truncate.o: truncate.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-truncate.o -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.o -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate.c' object='strace-truncate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c strace-truncate.obj: truncate.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-truncate.obj -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.obj -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate.c' object='strace-truncate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` + +strace-ubi.o: ubi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.o -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ubi.c' object='strace-ubi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c + +strace-ubi.obj: ubi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.obj -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ubi.c' object='strace-ubi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` strace-uid.o: uid.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uid.o -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.o -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid.c' object='strace-uid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c strace-uid.obj: uid.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uid.obj -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.obj -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid.c' object='strace-uid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` strace-uid16.o: uid16.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uid16.o -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.o -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid16.c' object='strace-uid16.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c strace-uid16.obj: uid16.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uid16.obj -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.obj -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid16.c' object='strace-uid16.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` strace-umask.o: umask.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-umask.o -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.o -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umask.c' object='strace-umask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c strace-umask.obj: umask.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-umask.obj -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.obj -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umask.c' object='strace-umask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` strace-umount.o: umount.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-umount.o -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.o -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umount.c' object='strace-umount.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c strace-umount.obj: umount.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-umount.obj -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.obj -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umount.c' object='strace-umount.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` strace-uname.o: uname.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uname.o -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.o -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uname.c' object='strace-uname.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c strace-uname.obj: uname.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-uname.obj -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.obj -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uname.c' object='strace-uname.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` strace-userfaultfd.o: userfaultfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.o -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.o -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c strace-userfaultfd.obj: userfaultfd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.obj -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.obj -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` strace-util.o: util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-util.o -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.o -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='strace-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c strace-util.obj: util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-util.obj -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.obj -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='strace-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` strace-utime.o: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-utime.o -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.o -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='strace-utime.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c strace-utime.obj: utime.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-utime.obj -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.obj -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='strace-utime.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` strace-utimes.o: utimes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-utimes.o -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.o -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utimes.c' object='strace-utimes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c strace-utimes.obj: utimes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-utimes.obj -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.obj -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utimes.c' object='strace-utimes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` strace-v4l2.o: v4l2.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-v4l2.o -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.o -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='strace-v4l2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c strace-v4l2.obj: v4l2.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-v4l2.obj -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.obj -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='strace-v4l2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` strace-vsprintf.o: vsprintf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-vsprintf.o -MD -MP -MF $(DEPDIR)/strace-vsprintf.Tpo -c -o strace-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-vsprintf.o -MD -MP -MF $(DEPDIR)/strace-vsprintf.Tpo -c -o strace-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-vsprintf.Tpo $(DEPDIR)/strace-vsprintf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vsprintf.c' object='strace-vsprintf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c strace-vsprintf.obj: vsprintf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-vsprintf.obj -MD -MP -MF $(DEPDIR)/strace-vsprintf.Tpo -c -o strace-vsprintf.obj `if test -f 'vsprintf.c'; then $(CYGPATH_W) 'vsprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-vsprintf.obj -MD -MP -MF $(DEPDIR)/strace-vsprintf.Tpo -c -o strace-vsprintf.obj `if test -f 'vsprintf.c'; then $(CYGPATH_W) 'vsprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsprintf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-vsprintf.Tpo $(DEPDIR)/strace-vsprintf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vsprintf.c' object='strace-vsprintf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-vsprintf.obj `if test -f 'vsprintf.c'; then $(CYGPATH_W) 'vsprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsprintf.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-vsprintf.obj `if test -f 'vsprintf.c'; then $(CYGPATH_W) 'vsprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsprintf.c'; fi` strace-wait.o: wait.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-wait.o -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.o -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wait.c' object='strace-wait.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c strace-wait.obj: wait.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-wait.obj -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.obj -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wait.c' object='strace-wait.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` strace-xattr.o: xattr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-xattr.o -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.o -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xattr.c' object='strace-xattr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c strace-xattr.obj: xattr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-xattr.obj -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.obj -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xattr.c' object='strace-xattr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` strace-xmalloc.o: xmalloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-xmalloc.o -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.o -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c strace-xmalloc.obj: xmalloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-xmalloc.obj -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.obj -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` strace-unwind.o: unwind.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-unwind.o -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.o -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unwind.c' object='strace-unwind.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c strace-unwind.obj: unwind.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strace-unwind.obj -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.obj -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unwind.c' object='strace-unwind.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ @@ -4165,8 +4763,7 @@ check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) \ - $(HEADERS) config.h +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ @@ -4368,6 +4965,54 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bt_protocols.h: $(top_srcdir)/xlat/bt_protocols.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_args.h: $(top_srcdir)/xlat/btrfs_balance_args.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_balance_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_flags.h: $(top_srcdir)/xlat/btrfs_balance_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_state.h: $(top_srcdir)/xlat/btrfs_balance_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_compress_types.h: $(top_srcdir)/xlat/btrfs_compress_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_defrag_flags.h: $(top_srcdir)/xlat/btrfs_defrag_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_cmds.h: $(top_srcdir)/xlat/btrfs_dev_replace_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_results.h: $(top_srcdir)/xlat/btrfs_dev_replace_results.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_state.h: $(top_srcdir)/xlat/btrfs_dev_replace_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_flags.h: $(top_srcdir)/xlat/btrfs_dev_stats_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_values.h: $(top_srcdir)/xlat/btrfs_dev_stats_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat.h: $(top_srcdir)/xlat/btrfs_features_compat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat_ro.h: $(top_srcdir)/xlat/btrfs_features_compat_ro.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_incompat.h: $(top_srcdir)/xlat/btrfs_features_incompat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_key_types.h: $(top_srcdir)/xlat/btrfs_key_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_limit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_limit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_status_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_status_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_scrub_flags.h: $(top_srcdir)/xlat/btrfs_scrub_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_send_flags.h: $(top_srcdir)/xlat/btrfs_send_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_snap_flags_v2.h: $(top_srcdir)/xlat/btrfs_snap_flags_v2.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_space_info_flags.h: $(top_srcdir)/xlat/btrfs_space_info_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_tree_objectids.h: $(top_srcdir)/xlat/btrfs_tree_objectids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/cacheflush_scope.h: $(top_srcdir)/xlat/cacheflush_scope.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/cap.h: $(top_srcdir)/xlat/cap.in $(top_srcdir)/xlat/gen.sh @@ -4390,8 +5035,6 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/dirent_types.h: $(top_srcdir)/xlat/dirent_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/domains.h: $(top_srcdir)/xlat/domains.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/efd_flags.h: $(top_srcdir)/xlat/efd_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/epollctls.h: $(top_srcdir)/xlat/epollctls.in $(top_srcdir)/xlat/gen.sh @@ -4448,6 +5091,10 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/fdflags.h: $(top_srcdir)/xlat/fdflags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_extent_flags.h: $(top_srcdir)/xlat/fiemap_extent_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_flags.h: $(top_srcdir)/xlat/fiemap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/flockcmds.h: $(top_srcdir)/xlat/flockcmds.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/fsmagic.h: $(top_srcdir)/xlat/fsmagic.in $(top_srcdir)/xlat/gen.sh @@ -4468,6 +5115,8 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/if_dqblk_valid.h: $(top_srcdir)/xlat/if_dqblk_valid.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqinfo_flags.h: $(top_srcdir)/xlat/if_dqinfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/if_dqinfo_valid.h: $(top_srcdir)/xlat/if_dqinfo_valid.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/iffflags.h: $(top_srcdir)/xlat/iffflags.in $(top_srcdir)/xlat/gen.sh @@ -4576,7 +5225,9 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/perf_event_open_flags.h: $(top_srcdir)/xlat/perf_event_open_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/personality_options.h: $(top_srcdir)/xlat/personality_options.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/personality_flags.h: $(top_srcdir)/xlat/personality_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/personality_types.h: $(top_srcdir)/xlat/personality_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/policies.h: $(top_srcdir)/xlat/policies.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ @@ -4604,6 +5255,8 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ptrace_events.h: $(top_srcdir)/xlat/ptrace_events.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_peeksiginfo_flags.h: $(top_srcdir)/xlat/ptrace_peeksiginfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ptrace_setoptions_flags.h: $(top_srcdir)/xlat/ptrace_setoptions_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/quota_formats.h: $(top_srcdir)/xlat/quota_formats.in $(top_srcdir)/xlat/gen.sh @@ -4618,6 +5271,8 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/resources.h: $(top_srcdir)/xlat/resources.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/rwf_flags.h: $(top_srcdir)/xlat/rwf_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sched_flags.h: $(top_srcdir)/xlat/sched_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/schedulers.h: $(top_srcdir)/xlat/schedulers.in $(top_srcdir)/xlat/gen.sh @@ -4710,6 +5365,8 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sram_alloc_flags.h: $(top_srcdir)/xlat/sram_alloc_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/statfs_flags.h: $(top_srcdir)/xlat/statfs_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/swap_flags.h: $(top_srcdir)/xlat/swap_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sync_file_range_flags.h: $(top_srcdir)/xlat/sync_file_range_flags.in $(top_srcdir)/xlat/gen.sh @@ -4750,8 +5407,18 @@ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ubi_volume_types.h: $(top_srcdir)/xlat/ubi_volume_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_api_flags.h: $(top_srcdir)/xlat/uffd_api_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_copy_flags.h: $(top_srcdir)/xlat/uffd_copy_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/uffd_flags.h: $(top_srcdir)/xlat/uffd_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_ioctl_flags.h: $(top_srcdir)/xlat/uffd_register_ioctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_mode_flags.h: $(top_srcdir)/xlat/uffd_register_mode_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_zeropage_flags.h: $(top_srcdir)/xlat/uffd_zeropage_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/umount_flags.h: $(top_srcdir)/xlat/umount_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/usagewho.h: $(top_srcdir)/xlat/usagewho.in $(top_srcdir)/xlat/gen.sh @@ -4801,6 +5468,8 @@ $(top_srcdir)/xlat/xfs_quota_flags.h: $(top_srcdir)/xlat/xfs_quota_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +@CODE_COVERAGE_RULES@ + .PHONY: srpm srpm: dist-xz rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz @@ -4829,6 +5498,14 @@ exit 1; \ fi +ioctl_redefs%.h: ioctlent%.h ioctlent0.h + sort $< > $<-t + sort ioctlent0.h | comm -23 $<-t - | \ + sed -n 's/^{ "\([^"]\+\)", \(0x[[:xdigit:]]\+\) },$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \ + > $@-t + rm -f $<-t + mv $@-t $@ + ioctlent%.h: ioctlsort% ./$< > $@ @@ -4858,6 +5535,7 @@ echo '#undef MPERS_PRINTER_NAME' >> $@-t echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t + echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t mv $@-t $@ m%_funcs.h: $(srcdir_mpers_source_files) @@ -4869,28 +5547,34 @@ # printers -printers.h: $(srcdir_mpers_source_files) +%.c.mpers.i: $(srcdir)/%.c + $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@ + +printers.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t echo 'typedef struct {' >> $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \ + || exit; \ done >> $@-t echo '} struct_printers;' >> $@-t echo 'extern const struct_printers *printers;' >> $@-t echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t mv $@-t $@ -%_printer_decls.h: $(srcdir_mpers_source_files) +%_printer_decls.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \ + || exit; \ done >> $@-t mv $@-t $@ -%_printer_defs.h: $(srcdir_mpers_source_files) +%_printer_defs.h: $(mpers_preproc_files) echo '/* Generated by Makefile from $^; do not edit. */' > $@-t for f in $^; do \ - sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \ + sed -n 's/$(mpers_printer_decl_pattern)/\.\2 = $(mpers_PREFIX)\2,/p' $$f \ + || exit; \ done >> $@-t mv $@-t $@ diff -Nru strace-4.11/membarrier.c strace-4.12/membarrier.c --- strace-4.11/membarrier.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/membarrier.c 2016-05-15 14:23:06.000000000 +0000 @@ -43,6 +43,7 @@ if (syserror(tcp) || !tcp->u_rval) return 0; - tcp->auxstr = sprintflags("", membarrier_cmds, tcp->u_rval); + tcp->auxstr = sprintflags("", membarrier_cmds, + (unsigned long) tcp->u_rval); return RVAL_HEX | RVAL_STR; } diff -Nru strace-4.11/mem.c strace-4.12/mem.c --- strace-4.11/mem.c 2015-11-17 00:40:22.000000000 +0000 +++ strace-4.12/mem.c 2016-05-16 23:47:34.000000000 +0000 @@ -57,24 +57,24 @@ static void print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset) { - /* addr */ - printaddr(u_arg[0]); - /* len */ - tprintf(", %lu, ", u_arg[1]); - /* prot */ - printflags(mmap_prot, u_arg[2], "PROT_???"); + const unsigned long addr = u_arg[0]; + const unsigned long len = u_arg[1]; + const unsigned long prot = u_arg[2]; + const unsigned long flags = u_arg[3]; + const int fd = u_arg[4]; + + printaddr(addr); + tprintf(", %lu, ", len); + printflags_long(mmap_prot, prot, "PROT_???"); tprints(", "); - /* flags */ #ifdef MAP_TYPE - printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???"); - addflags(mmap_flags, u_arg[3] & ~MAP_TYPE); + printxval_long(mmap_flags, flags & MAP_TYPE, "MAP_???"); + addflags(mmap_flags, flags & ~MAP_TYPE); #else - printflags(mmap_flags, u_arg[3], "MAP_???"); + printflags_long(mmap_flags, flags, "MAP_???"); #endif tprints(", "); - /* fd */ - printfd(tcp, u_arg[4]); - /* offset */ + printfd(tcp, fd); tprintf(", %#llx", offset); } @@ -86,37 +86,31 @@ * Confused? Me too! */ +#if defined AARCH64 || defined ARM \ + || defined I386 || defined X86_64 || defined X32 \ + || defined M68K \ + || defined S390 || defined S390X /* Params are pointed to by u_arg[0], offset is in bytes */ SYS_FUNC(old_mmap) { long u_arg[6]; -#if defined(IA64) - /* - * IA64 processes never call this routine, they only use the - * new 'sys_mmap' interface. Only IA32 processes come here. - */ - int i; - unsigned narrow_arg[6]; - if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), narrow_arg) == -1) - return 0; +# if defined AARCH64 || defined X86_64 + /* We are here only in a 32-bit personality. */ + unsigned int narrow_arg[6]; + if (umove_or_printaddr(tcp, tcp->u_arg[0], &narrow_arg)) + return RVAL_DECODED | RVAL_HEX; + unsigned int i; for (i = 0; i < 6; i++) - u_arg[i] = (unsigned long) narrow_arg[i]; -#elif defined(X86_64) - /* We are here only in personality 1 (i386) */ - int i; - unsigned narrow_arg[6]; - if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), narrow_arg) == -1) - return 0; - for (i = 0; i < 6; ++i) - u_arg[i] = (unsigned long) narrow_arg[i]; -#else - if (umoven(tcp, tcp->u_arg[0], sizeof(u_arg), u_arg) == -1) - return 0; -#endif + u_arg[i] = narrow_arg[i]; +# else + if (umove_or_printaddr(tcp, tcp->u_arg[0], &u_arg)) + return RVAL_DECODED | RVAL_HEX; +# endif print_mmap(tcp, u_arg, (unsigned long) u_arg[5]); return RVAL_DECODED | RVAL_HEX; } +#endif /* old_mmap architectures */ #if defined(S390) /* Params are pointed to by u_arg[0], offset is in pages */ @@ -191,7 +185,7 @@ { printaddr(tcp->u_arg[0]); tprintf(", %lu, ", tcp->u_arg[1]); - printflags(mmap_prot, tcp->u_arg[2], "PROT_???"); + printflags_long(mmap_prot, tcp->u_arg[2], "PROT_???"); return RVAL_DECODED; } @@ -202,7 +196,7 @@ { printaddr(tcp->u_arg[0]); tprintf(", %lu, %lu, ", tcp->u_arg[1], tcp->u_arg[2]); - printflags(mremap_flags, tcp->u_arg[3], "MREMAP_???"); + printflags_long(mremap_flags, tcp->u_arg[3], "MREMAP_???"); #ifdef MREMAP_FIXED if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) == (MREMAP_MAYMOVE | MREMAP_FIXED)) { @@ -264,15 +258,18 @@ printaddr(tcp->u_arg[0]); tprintf(", %lu, ", tcp->u_arg[1]); } else { - unsigned long i, len; - char *vec = NULL; + const unsigned long page_size = get_pagesize(); + const unsigned long page_mask = page_size - 1; + unsigned long len = tcp->u_arg[1]; + unsigned char *vec = NULL; - len = tcp->u_arg[1]; + len = len / page_size + (len & page_mask ? 1 : 0); if (syserror(tcp) || !verbose(tcp) || !tcp->u_arg[2] || !(vec = malloc(len)) || umoven(tcp, tcp->u_arg[2], len, vec) < 0) printaddr(tcp->u_arg[2]); else { + unsigned long i; tprints("["); for (i = 0; i < len; i++) { if (abbrev(tcp) && i >= max_strlen) { @@ -292,250 +289,54 @@ || defined SPARC || defined SPARC64 SYS_FUNC(getpagesize) { - if (exiting(tcp)) - return RVAL_HEX; - return 0; + return RVAL_DECODED | RVAL_HEX; } #endif SYS_FUNC(remap_file_pages) { - printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); - printflags(mmap_prot, tcp->u_arg[2], "PROT_???"); - tprintf(", %lu, ", tcp->u_arg[3]); + const unsigned long addr = tcp->u_arg[0]; + const unsigned long size = tcp->u_arg[1]; + const unsigned long prot = tcp->u_arg[2]; + const unsigned long pgoff = tcp->u_arg[3]; + const unsigned long flags = tcp->u_arg[4]; + + printaddr(addr); + tprintf(", %lu, ", size); + printflags_long(mmap_prot, prot, "PROT_???"); + tprintf(", %lu, ", pgoff); #ifdef MAP_TYPE - printxval(mmap_flags, tcp->u_arg[4] & MAP_TYPE, "MAP_???"); - addflags(mmap_flags, tcp->u_arg[4] & ~MAP_TYPE); + printxval_long(mmap_flags, flags & MAP_TYPE, "MAP_???"); + addflags(mmap_flags, flags & ~MAP_TYPE); #else - printflags(mmap_flags, tcp->u_arg[4], "MAP_???"); + printflags_long(mmap_flags, flags, "MAP_???"); #endif return RVAL_DECODED; } -#define MPOL_DEFAULT 0 -#define MPOL_PREFERRED 1 -#define MPOL_BIND 2 -#define MPOL_INTERLEAVE 3 - -#define MPOL_F_NODE (1<<0) -#define MPOL_F_ADDR (1<<1) - -#define MPOL_MF_STRICT (1<<0) -#define MPOL_MF_MOVE (1<<1) -#define MPOL_MF_MOVE_ALL (1<<2) - -#include "xlat/policies.h" -#include "xlat/mbindflags.h" -#include "xlat/mempolicyflags.h" -#include "xlat/move_pages_flags.h" - -static void -get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err) -{ - unsigned long nlongs, size, end; - - nlongs = (maxnodes + 8 * sizeof(long) - 1) / (8 * sizeof(long)); - size = nlongs * sizeof(long); - end = ptr + size; - if (nlongs == 0 || ((err || verbose(tcp)) && (size * 8 == maxnodes) - && (end > ptr))) { - unsigned long n, cur, abbrev_end; - int failed = 0; - - if (abbrev(tcp)) { - abbrev_end = ptr + max_strlen * sizeof(long); - if (abbrev_end < ptr) - abbrev_end = end; - } else { - abbrev_end = end; - } - tprints(", {"); - for (cur = ptr; cur < end; cur += sizeof(long)) { - if (cur > ptr) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umoven(tcp, cur, sizeof(n), &n) < 0) { - tprints("?"); - failed = 1; - break; - } - tprintf("%#0*lx", (int) sizeof(long) * 2 + 2, n); - } - tprints("}"); - if (failed) { - tprints(" "); - printaddr(ptr); - } - } else { - tprints(" "); - printaddr(ptr); - } - tprintf(", %lu", maxnodes); -} - -SYS_FUNC(mbind) -{ - printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); - printxval(policies, tcp->u_arg[2], "MPOL_???"); - get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0); - tprints(", "); - printflags(mbindflags, tcp->u_arg[5], "MPOL_???"); - - return RVAL_DECODED; -} - -SYS_FUNC(set_mempolicy) +#if defined(POWERPC) +static bool +print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - printxval(policies, tcp->u_arg[0], "MPOL_???"); - get_nodes(tcp, tcp->u_arg[1], tcp->u_arg[2], 0); - - return RVAL_DECODED; -} + tprintf("%#08x", * (unsigned int *) elem_buf); -SYS_FUNC(get_mempolicy) -{ - if (exiting(tcp)) { - int pol; - if (!umove_or_printaddr(tcp, tcp->u_arg[0], &pol)) - printxval(policies, pol, "MPOL_???"); - get_nodes(tcp, tcp->u_arg[1], tcp->u_arg[2], syserror(tcp)); - tprints(", "); - printaddr(tcp->u_arg[3]); - tprints(", "); - printflags(mempolicyflags, tcp->u_arg[4], "MPOL_???"); - } - return 0; + return true; } -SYS_FUNC(migrate_pages) +SYS_FUNC(subpage_prot) { - tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); - get_nodes(tcp, tcp->u_arg[2], tcp->u_arg[1], 0); - tprints(", "); - get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[1], 0); - - return RVAL_DECODED; -} + unsigned long addr = tcp->u_arg[0]; + unsigned long len = tcp->u_arg[1]; + unsigned long nmemb = len >> 16; + unsigned long map = tcp->u_arg[2]; -SYS_FUNC(move_pages) -{ - if (entering(tcp)) { - unsigned long npages = tcp->u_arg[1]; - tprintf("%ld, %lu, ", tcp->u_arg[0], npages); - if (tcp->u_arg[2] == 0) - tprints("NULL, "); - else { - unsigned int i; - long puser = tcp->u_arg[2]; - tprints("{"); - for (i = 0; i < npages; ++i) { - void *p; - if (i > 0) - tprints(", "); - if (umove(tcp, puser, &p) < 0) { - tprints("???"); - break; - } - tprintf("%p", p); - puser += sizeof(void *); - } - tprints("}, "); - } - if (tcp->u_arg[3] == 0) - tprints("NULL, "); - else { - unsigned int i; - long nodeuser = tcp->u_arg[3]; - tprints("{"); - for (i = 0; i < npages; ++i) { - int node; - if (i > 0) - tprints(", "); - if (umove(tcp, nodeuser, &node) < 0) { - tprints("???"); - break; - } - tprintf("%#x", node); - nodeuser += sizeof(int); - } - tprints("}, "); - } - } else { - unsigned long npages = tcp->u_arg[1]; - if (tcp->u_arg[4] == 0) - tprints("NULL, "); - else { - unsigned int i; - long statususer = tcp->u_arg[4]; - tprints("{"); - for (i = 0; i < npages; ++i) { - int status; - if (i > 0) - tprints(", "); - if (umove(tcp, statususer, &status) < 0) { - tprints("???"); - break; - } - tprintf("%#x", status); - statususer += sizeof(int); - } - tprints("}, "); - } - printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???"); - } - return 0; -} + printaddr(addr); + tprintf(", %lu, ", len); -#if defined(POWERPC) -SYS_FUNC(subpage_prot) -{ - unsigned long cur, end, abbrev_end, entries; unsigned int entry; - - printaddr(tcp->u_arg[0]); - tprints(", "); - printaddr(tcp->u_arg[1]); - tprints(", "); - entries = tcp->u_arg[1] >> 16; - if (!entries || !tcp->u_arg[2]) { - tprints("{}"); - return 0; - } - cur = tcp->u_arg[2]; - end = cur + (sizeof(int) * entries); - if (!verbose(tcp) || end < (unsigned long) tcp->u_arg[2]) { - printaddr(tcp->u_arg[2]); - return 0; - } - if (abbrev(tcp)) { - abbrev_end = cur + (sizeof(int) * max_strlen); - if (abbrev_end > end) - abbrev_end = end; - } - else - abbrev_end = end; - tprints("{"); - for (; cur < end; cur += sizeof(int)) { - if (cur > (unsigned long) tcp->u_arg[2]) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umove(tcp, cur, &entry) < 0) { - tprintf("??? [%#lx]", cur); - break; - } - else - tprintf("%#08x", entry); - } - tprints("}"); + print_array(tcp, map, nmemb, &entry, sizeof(entry), + umoven_or_printaddr, print_protmap_entry, 0); return RVAL_DECODED; } diff -Nru strace-4.11/mknod.c strace-4.12/mknod.c --- strace-4.11/mknod.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/mknod.c 2016-03-25 23:48:48.000000000 +0000 @@ -48,22 +48,15 @@ decode_mknod(struct tcb *tcp, int offset) { int mode = tcp->u_arg[offset + 1]; + unsigned int dev; printpath(tcp, tcp->u_arg[offset]); tprintf(", %s", sprintmode(mode)); switch (mode & S_IFMT) { case S_IFCHR: case S_IFBLK: -#if defined(SPARC) || defined(SPARC64) - if (current_personality == 1) - tprintf(", makedev(%lu, %lu)", - (unsigned long) ((tcp->u_arg[offset + 2] >> 18) & 0x3fff), - (unsigned long) (tcp->u_arg[offset + 2] & 0x3ffff)); - else -#endif /* SPARC || SPARC64 */ - tprintf(", makedev(%lu, %lu)", - (unsigned long) major(tcp->u_arg[offset + 2]), - (unsigned long) minor(tcp->u_arg[offset + 2])); + dev = tcp->u_arg[offset + 2]; + tprintf(", makedev(%u, %u)", major(dev), minor(dev)); break; } } diff -Nru strace-4.11/mount.c strace-4.12/mount.c --- strace-4.11/mount.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/mount.c 2016-05-16 23:48:05.000000000 +0000 @@ -74,7 +74,7 @@ tprints("|"); } if (flags || !old_magic) - printflags(mount_flags, flags, "MS_???"); + printflags_long(mount_flags, flags, "MS_???"); tprints(", "); if (ignore_data) diff -Nru strace-4.11/mpers.am strace-4.12/mpers.am --- strace-4.11/mpers.am 2015-12-21 23:23:45.000000000 +0000 +++ strace-4.12/mpers.am 2016-05-31 11:35:30.000000000 +0000 @@ -1,2 +1,2 @@ # Generated by ./generate_mpers_am.sh; do not edit. -mpers_source_files = dirent.c fetch_seccomp_fprog.c fetch_struct_flock.c ipc_msgctl.c ipc_shmctl.c print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c print_timex.c printrusage.c printsiginfo.c sigaltstack.c sysinfo.c times.c utime.c +mpers_source_files = block.c btrfs.c dirent.c evdev.c fetch_seccomp_fprog.c fetch_struct_flock.c fetch_struct_statfs.c hdio.c ipc_msgctl.c ipc_shmctl.c mtd.c print_mq_attr.c print_msgbuf.c print_sigevent.c print_time.c print_timex.c printrusage.c printsiginfo.c rtc.c sigaltstack.c sysinfo.c times.c utime.c v4l2.c diff -Nru strace-4.11/mpers.awk strace-4.12/mpers.awk --- strace-4.11/mpers.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/mpers.awk 2016-01-13 02:38:59.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/gawk # # Copyright (c) 2015 Elvira Khabirova -# Copyright (c) 2015 Dmitry V. Levin +# Copyright (c) 2015-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -173,6 +173,8 @@ return leave(what_idx, "") } BEGIN { + match(ARCH_FLAG, /[[:digit:]]+/, temparray) + default_pointer_size = temparray[0] / 8 print "#include " } /^<[[:xdigit:]]+>/ { @@ -181,9 +183,6 @@ idx = "0x" matches[2] array[idx]["idx"] = idx parent[level] = idx - if (level > 1) { - array[idx]["parent"] = parent[level-1] - } } /^DW_AT_data_member_location/ { if (!match($0, /\(DW_OP_plus_uconst:[[:space:]]+([[:digit:]]+)\)/, temparray)) @@ -211,10 +210,18 @@ match($0, /[[:digit:]]+/, temparray) array[parent[level-1]]["upper_bound"] = temparray[0] + 1 } +/^DW_AT_count/ { + match($0, /[[:digit:]]+/, temparray) + array[parent[level-1]]["upper_bound"] = temparray[0] +} /^Abbrev Number:[^(]+\(DW_TAG_/ { if (match($0, /typedef|union_type|structure_type|pointer_type\ |enumeration_type|array_type|base_type|member/, temparray)) { array[idx]["special"] = temparray[0] + if ("pointer_type" == temparray[0]) + array[idx]["byte_size"] = default_pointer_size + if (level > 1 && "member" == temparray[0]) + array[idx]["parent"] = parent[level-1] } } END { diff -Nru strace-4.11/mpers_type.h strace-4.12/mpers_type.h --- strace-4.11/mpers_type.h 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/mpers_type.h 2016-05-21 22:53:06.000000000 +0000 @@ -39,5 +39,9 @@ #else # define MPERS_PREFIX # define DEF_MPERS_TYPE(args) "empty.h" -# define MPERS_DEFS "native_defs.h" +# if IN_MPERS_BOOTSTRAP +# define MPERS_DEFS "empty.h" +# else +# define MPERS_DEFS "native_defs.h" +# endif #endif diff -Nru strace-4.11/mpers_xlat.h strace-4.12/mpers_xlat.h --- strace-4.11/mpers_xlat.h 2015-12-21 23:23:45.000000000 +0000 +++ strace-4.12/mpers_xlat.h 2016-05-31 11:35:30.000000000 +0000 @@ -1,5 +1,48 @@ +extern const struct xlat blkpg_ops[]; +extern const struct xlat btrfs_balance_args[]; +extern const struct xlat btrfs_balance_ctl_cmds[]; +extern const struct xlat btrfs_balance_flags[]; +extern const struct xlat btrfs_balance_state[]; +extern const struct xlat btrfs_compress_types[]; +extern const struct xlat btrfs_defrag_flags[]; +extern const struct xlat btrfs_dev_replace_cmds[]; +extern const struct xlat btrfs_dev_replace_results[]; +extern const struct xlat btrfs_dev_replace_state[]; +extern const struct xlat btrfs_dev_stats_flags[]; +extern const struct xlat btrfs_dev_stats_values[]; +extern const struct xlat btrfs_features_compat[]; +extern const struct xlat btrfs_features_compat_ro[]; +extern const struct xlat btrfs_features_incompat[]; +extern const struct xlat btrfs_key_types[]; +extern const struct xlat btrfs_qgroup_ctl_cmds[]; +extern const struct xlat btrfs_qgroup_inherit_flags[]; +extern const struct xlat btrfs_qgroup_limit_flags[]; +extern const struct xlat btrfs_qgroup_status_flags[]; +extern const struct xlat btrfs_scrub_flags[]; +extern const struct xlat btrfs_send_flags[]; +extern const struct xlat btrfs_snap_flags_v2[]; +extern const struct xlat btrfs_space_info_flags[]; +extern const struct xlat btrfs_tree_objectids[]; +extern const struct xlat evdev_autorepeat[]; +extern const struct xlat evdev_ff_status[]; +extern const struct xlat evdev_ff_types[]; +extern const struct xlat evdev_keycode[]; +extern const struct xlat evdev_leds[]; +extern const struct xlat evdev_misc[]; +extern const struct xlat evdev_mtslots[]; +extern const struct xlat evdev_prop[]; +extern const struct xlat evdev_relative_axes[]; +extern const struct xlat evdev_snd[]; +extern const struct xlat evdev_switch[]; +extern const struct xlat evdev_sync[]; extern const struct xlat msgctl_flags[]; extern const struct xlat shmctl_flags[]; +extern const struct xlat mtd_mode_options[]; +extern const struct xlat mtd_file_mode_options[]; +extern const struct xlat mtd_type_options[]; +extern const struct xlat mtd_flags_options[]; +extern const struct xlat mtd_otp_options[]; +extern const struct xlat mtd_nandecc_options[]; extern const struct xlat sigev_value[]; extern const struct xlat adjtimex_modes[]; extern const struct xlat adjtimex_status[]; @@ -16,3 +59,19 @@ extern const struct xlat sigtrap_codes[]; extern const struct xlat sigemt_codes[]; extern const struct xlat sigaltstack_flags[]; +extern const struct xlat v4l2_device_capabilities_flags[]; +extern const struct xlat v4l2_buf_types[]; +extern const struct xlat v4l2_format_description_flags[]; +extern const struct xlat v4l2_fields[]; +extern const struct xlat v4l2_colorspaces[]; +extern const struct xlat v4l2_memories[]; +extern const struct xlat v4l2_buf_flags[]; +extern const struct xlat v4l2_streaming_capabilities[]; +extern const struct xlat v4l2_capture_modes[]; +extern const struct xlat v4l2_input_types[]; +extern const struct xlat v4l2_control_ids[]; +extern const struct xlat v4l2_control_types[]; +extern const struct xlat v4l2_control_flags[]; +extern const struct xlat v4l2_control_classes[]; +extern const struct xlat v4l2_framesize_types[]; +extern const struct xlat v4l2_frameinterval_types[]; diff -Nru strace-4.11/mtd.c strace-4.12/mtd.c --- strace-4.11/mtd.c 2015-08-25 21:48:36.000000000 +0000 +++ strace-4.12/mtd.c 2016-05-28 19:16:32.000000000 +0000 @@ -26,6 +26,8 @@ #include "defs.h" +#include DEF_MPERS_TYPE(struct_mtd_oob_buf) + #include /* The mtd api changes quickly, so we have to keep a local copy */ @@ -35,11 +37,10 @@ #else # include #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) -# include "ubi-user.h" -#else -# include -#endif + +typedef struct mtd_oob_buf struct_mtd_oob_buf; + +#include MPERS_DEFS #include "xlat/mtd_mode_options.h" #include "xlat/mtd_file_mode_options.h" @@ -48,136 +49,242 @@ #include "xlat/mtd_otp_options.h" #include "xlat/mtd_nandecc_options.h" -int -mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +static void +decode_erase_info_user(struct tcb *tcp, const long addr) { - if (!verbose(tcp)) - return RVAL_DECODED; + struct erase_info_user einfo; - switch (code) { - case MEMERASE: - case MEMLOCK: - case MEMUNLOCK: - case MEMISLOCKED: { - struct erase_info_user einfo; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &einfo)) + return; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &einfo)) - break; + tprintf("{start=%#x, length=%#x}", einfo.start, einfo.length); +} - tprintf("{start=%#" PRIx32 ", length=%#" PRIx32 "}", - einfo.start, einfo.length); - break; - } +static void +decode_erase_info_user64(struct tcb *tcp, const long addr) +{ + struct erase_info_user64 einfo64; - case MEMERASE64: { - struct erase_info_user64 einfo64; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &einfo64)) + return; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &einfo64)) - break; + tprintf("{start=%#" PRIx64 ", length=%#" PRIx64 "}", + (uint64_t) einfo64.start, (uint64_t) einfo64.length); +} - tprintf("{start=%#" PRIx64 ", length=%#" PRIx64 "}", - (uint64_t) einfo64.start, (uint64_t) einfo64.length); - break; - } +static void +decode_mtd_oob_buf(struct tcb *tcp, const long addr) +{ + struct_mtd_oob_buf mbuf; - case MEMWRITEOOB: - case MEMREADOOB: { - struct mtd_oob_buf mbuf; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &mbuf)) + return; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &mbuf)) - break; + tprintf("{start=%#x, length=%#x, ptr=%#lx}", + mbuf.start, mbuf.length, (unsigned long) mbuf.ptr); +} - tprintf("{start=%#" PRIx32 ", length=%#" PRIx32 ", ptr=...}", - mbuf.start, mbuf.length); - break; - } +static void +decode_mtd_oob_buf64(struct tcb *tcp, const long addr) +{ + struct mtd_oob_buf64 mbuf64; - case MEMWRITEOOB64: - case MEMREADOOB64: { - struct mtd_oob_buf64 mbuf64; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &mbuf64)) + return; + + tprintf("{start=%#" PRIx64 ", length=%#x, usr_ptr=%#" PRIx64 "}", + (uint64_t) mbuf64.start, mbuf64.length, + (uint64_t) mbuf64.usr_ptr); +} - tprints(", "); - if (umove_or_printaddr(tcp, arg, &mbuf64)) - break; +static void +decode_otp_info(struct tcb *tcp, const long addr) +{ + struct otp_info oinfo; - tprintf("{start=%#" PRIx64 ", length=%#" PRIx64 ", ptr=...}", - (uint64_t) mbuf64.start, (uint64_t) mbuf64.length); - break; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &oinfo)) + return; + + tprintf("{start=%#x, length=%#x, locked=%u}", + oinfo.start, oinfo.length, oinfo.locked); +} + +static void +decode_otp_select(struct tcb *tcp, const long addr) +{ + unsigned int i; + + tprints(", "); + if (umove_or_printaddr(tcp, addr, &i)) + return; + + tprints("["); + printxval(mtd_otp_options, i, "MTD_OTP_???"); + tprints("]"); +} + +static void +decode_mtd_write_req(struct tcb *tcp, const long addr) +{ + struct mtd_write_req mreq; + + tprints(", "); + if (umove_or_printaddr(tcp, addr, &mreq)) + return; + + tprintf("{start=%#" PRIx64 ", len=%#" PRIx64 + ", ooblen=%#" PRIx64 ", usr_data=%#" PRIx64 + ", usr_oob=%#" PRIx64 ", mode=", + (uint64_t) mreq.start, (uint64_t) mreq.len, + (uint64_t) mreq.ooblen, (uint64_t) mreq.usr_data, + (uint64_t) mreq.usr_oob); + printxval(mtd_mode_options, mreq.mode, "MTD_OPS_???"); + tprints("}"); +} + +static void +decode_mtd_info_user(struct tcb *tcp, const long addr) +{ + struct mtd_info_user minfo; + + tprints(", "); + if (umove_or_printaddr(tcp, addr, &minfo)) + return; + + tprints("{type="); + printxval(mtd_type_options, minfo.type, "MTD_???"); + tprints(", flags="); + printflags(mtd_flags_options, minfo.flags, "MTD_???"); + tprintf(", size=%#x, erasesize=%#x, writesize=%#x, oobsize=%#x" + ", padding=%#" PRIx64 "}", + minfo.size, minfo.erasesize, minfo.writesize, minfo.oobsize, + (uint64_t) minfo.padding); +} + +static void +decode_nand_oobinfo(struct tcb *tcp, const long addr) +{ + struct nand_oobinfo ninfo; + unsigned int i, j; + + tprints(", "); + if (umove_or_printaddr(tcp, addr, &ninfo)) + return; + + tprints("{useecc="); + printxval(mtd_nandecc_options, ninfo.useecc, "MTD_NANDECC_???"); + tprintf(", eccbytes=%#x", ninfo.eccbytes); + + tprints(", oobfree={"); + for (i = 0; i < ARRAY_SIZE(ninfo.oobfree); ++i) { + if (i) + tprints("}, "); + tprints("{"); + for (j = 0; j < ARRAY_SIZE(ninfo.oobfree[0]); ++j) { + if (j) + tprints(", "); + tprintf("%#x", ninfo.oobfree[i][j]); + } } - case MEMGETREGIONINFO: { - struct region_info_user rinfo; + tprints("}}, eccpos={"); + for (i = 0; i < ARRAY_SIZE(ninfo.eccpos); ++i) { + if (i) + tprints(", "); + tprintf("%#x", ninfo.eccpos[i]); + } - if (entering(tcp)) { + tprints("}"); +} + +static void +decode_nand_ecclayout_user(struct tcb *tcp, const long addr) +{ + struct nand_ecclayout_user nlay; + unsigned int i; + + tprints(", "); + if (umove_or_printaddr(tcp, addr, &nlay)) + return; + + tprintf("{eccbytes=%#x, eccpos={", nlay.eccbytes); + for (i = 0; i < ARRAY_SIZE(nlay.eccpos); ++i) { + if (i) tprints(", "); - if (umove_or_printaddr(tcp, arg, &rinfo)) - break; - tprintf("{regionindex=%#x", rinfo.regionindex); - return 1; - } else { - if (syserror(tcp)) { - tprints("}"); - break; - } - if (umove(tcp, arg, &rinfo) < 0) { - tprints(", ???}"); - break; - } - tprintf(", offset=%#x, erasesize=%#x, numblocks=%#x}", - rinfo.offset, rinfo.erasesize, rinfo.numblocks); - break; - } + tprintf("%#x", nlay.eccpos[i]); } + tprintf("}, oobavail=%#x, oobfree={", nlay.oobavail); + for (i = 0; i < ARRAY_SIZE(nlay.oobfree); ++i) { + if (i) + tprints(", "); + tprintf("{offset=%#x, length=%#x}", + nlay.oobfree[i].offset, nlay.oobfree[i].length); + } + tprints("}"); +} - case OTPLOCK: { - struct otp_info oinfo; +static void +decode_mtd_ecc_stats(struct tcb *tcp, const long addr) +{ + struct mtd_ecc_stats es; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &oinfo)) - break; + tprints(", "); + if (umove_or_printaddr(tcp, addr, &es)) + return; - tprintf("{start=%#" PRIx32 ", length=%#" PRIx32 ", locked=%" PRIu32 "}", - oinfo.start, oinfo.length, oinfo.locked); + tprintf("{corrected=%#x, failed=%#x, badblocks=%#x, bbtblocks=%#x}", + es.corrected, es.failed, es.badblocks, es.bbtblocks); +} + +MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *tcp, + const unsigned int code, const long arg) +{ + switch (code) { + case MEMERASE: + case MEMLOCK: + case MEMUNLOCK: + case MEMISLOCKED: + decode_erase_info_user(tcp, arg); break; - } - case MEMWRITE: { - struct mtd_write_req mreq; + case MEMERASE64: + decode_erase_info_user64(tcp, arg); + break; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &mreq)) - break; + case MEMWRITEOOB: + case MEMREADOOB: + decode_mtd_oob_buf(tcp, arg); + break; - tprintf("{start=%#" PRIx64 ", len=%#" PRIx64, - (uint64_t) mreq.start, (uint64_t) mreq.len); - tprintf(", ooblen=%#" PRIx64 ", usr_data=%#" PRIx64, - (uint64_t) mreq.ooblen, (uint64_t) mreq.usr_data); - tprintf(", usr_oob=%#" PRIx64 ", mode=", - (uint64_t) mreq.usr_oob); - printxval(mtd_mode_options, mreq.mode, "MTD_OPS_???"); - tprints(", padding=...}"); + case MEMWRITEOOB64: + case MEMREADOOB64: + decode_mtd_oob_buf64(tcp, arg); break; - } - case OTPSELECT: { - unsigned int i; + case MEMWRITE: + decode_mtd_write_req(tcp, arg); + break; - tprints(", "); - if (umove_or_printaddr(tcp, arg, &i)) - break; + case OTPGETREGIONINFO: + if (entering(tcp)) + return 0; + /* fall through */ + case OTPLOCK: + decode_otp_info(tcp, arg); + break; - tprints("["); - printxval(mtd_otp_options, i, "MTD_OTP_???"); - tprints("]"); + case OTPSELECT: + decode_otp_select(tcp, arg); break; - } case MTDFILEMODE: tprints(", "); - printxval(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); + printxval_long(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); break; case MEMGETBADBLOCK: @@ -186,133 +293,33 @@ printnum_int64(tcp, arg, "%" PRIu64); break; - case MEMGETINFO: { - struct mtd_info_user minfo; - + case MEMGETINFO: if (entering(tcp)) return 0; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &minfo)) - break; - - tprints("{type="); - printxval(mtd_type_options, minfo.type, "MTD_???"); - tprints(", flags="); - printflags(mtd_flags_options, minfo.flags, "MTD_???"); - tprintf(", size=%#" PRIx32 ", erasesize=%#" PRIx32, - minfo.size, minfo.erasesize); - tprintf(", writesize=%#" PRIx32 ", oobsize=%#" PRIx32, - minfo.writesize, minfo.oobsize); - tprintf(", padding=%#" PRIx64 "}", - (uint64_t) minfo.padding); + decode_mtd_info_user(tcp, arg); break; - } - - case MEMGETOOBSEL: { - struct nand_oobinfo ninfo; - unsigned int i; + case MEMGETOOBSEL: if (entering(tcp)) return 0; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &ninfo)) - break; - - tprints("{useecc="); - printxval(mtd_nandecc_options, ninfo.useecc, "MTD_NANDECC_???"); - tprintf(", eccbytes=%#" PRIx32, ninfo.eccbytes); - - tprints(", oobfree={"); - for (i = 0; i < ARRAY_SIZE(ninfo.oobfree); ++i) { - unsigned int j; - - if (i) - tprints("}, "); - tprints("{"); - for (j = 0; j < ARRAY_SIZE(ninfo.oobfree[0]); ++j) { - if (j) - tprints(", "); - tprintf("%#" PRIx32, ninfo.oobfree[i][j]); - } - } - - tprints("}}, eccpos={"); - for (i = 0; i < ARRAY_SIZE(ninfo.eccpos); ++i) { - if (i) - tprints(", "); - tprintf("%#" PRIx32, ninfo.eccpos[i]); - } - - tprints("}"); + decode_nand_oobinfo(tcp, arg); break; - } - - case OTPGETREGIONINFO: { - struct otp_info oinfo; + case ECCGETLAYOUT: if (entering(tcp)) return 0; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &oinfo)) - break; - - tprintf("{start=%#" PRIx32 ", length=%#" PRIx32 ", locked=%" PRIu32 "}", - oinfo.start, oinfo.length, oinfo.locked); + decode_nand_ecclayout_user(tcp, arg); break; - } - - case ECCGETLAYOUT: { - struct nand_ecclayout_user nlay; - unsigned int i; + case ECCGETSTATS: if (entering(tcp)) return 0; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &nlay)) - break; - - tprintf("{eccbytes=%#" PRIx32 ", eccpos={", nlay.eccbytes); - for (i = 0; i < ARRAY_SIZE(nlay.eccpos); ++i) { - if (i) - tprints(", "); - tprintf("%#" PRIx32, nlay.eccpos[i]); - } - tprintf("}, oobavail=%#" PRIx32 ", oobfree={", nlay.oobavail); - for (i = 0; i < ARRAY_SIZE(nlay.oobfree); ++i) { - if (i) - tprints(", "); - tprintf("{offset=%#" PRIx32 ", length=%#" PRIx32 "}", - nlay.oobfree[i].offset, nlay.oobfree[i].length); - } - tprints("}"); - break; - } - - case ECCGETSTATS: { - struct mtd_ecc_stats estat; - - if (entering(tcp)) - return 0; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &estat)) - break; - - tprintf("{corrected=%#" PRIx32 ", failed=%#" PRIx32, - estat.corrected, estat.failed); - tprintf(", badblocks=%#" PRIx32 ", bbtblocks=%#" PRIx32 "}", - estat.badblocks, estat.bbtblocks); + decode_mtd_ecc_stats(tcp, arg); break; - } case OTPGETREGIONCOUNT: if (entering(tcp)) return 0; - tprints(", "); printnum_int(tcp, arg, "%u"); break; @@ -320,173 +327,32 @@ case MEMGETREGIONCOUNT: if (entering(tcp)) return 0; - tprints(", "); printnum_int(tcp, arg, "%d"); break; - default: - return RVAL_DECODED; - } - - return RVAL_DECODED | 1; -} - -#include "xlat/ubi_volume_types.h" -#include "xlat/ubi_volume_props.h" - -int -ubi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) -{ - if (!verbose(tcp)) - return RVAL_DECODED; - - switch (code) { - case UBI_IOCMKVOL: + case MEMGETREGIONINFO: if (entering(tcp)) { - struct ubi_mkvol_req mkvol; + struct region_info_user rinfo; tprints(", "); - if (umove_or_printaddr(tcp, arg, &mkvol)) + if (umove_or_printaddr(tcp, arg, &rinfo)) break; + tprintf("{regionindex=%#x", rinfo.regionindex); + return 0; + } else { + struct region_info_user rinfo; - tprintf("{vol_id=%" PRIi32 ", alignment=%" PRIi32 - ", bytes=%" PRIi64 ", vol_type=", mkvol.vol_id, - mkvol.alignment, (int64_t)mkvol.bytes); - printxval(ubi_volume_types, mkvol.vol_type, "UBI_???_VOLUME"); - tprintf(", name_len=%" PRIi16 ", name=", mkvol.name_len); - if (print_quoted_string(mkvol.name, - CLAMP(mkvol.name_len, 0, UBI_MAX_VOLUME_NAME), - QUOTE_0_TERMINATED) > 0) { - tprints("..."); - } - tprints("}"); - return 1; - } - if (!syserror(tcp)) { - tprints(" => "); - printnum_int(tcp, arg, "%d"); - } - break; - - case UBI_IOCRSVOL: { - struct ubi_rsvol_req rsvol; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &rsvol)) - break; - - tprintf("{vol_id=%" PRIi32 ", bytes=%" PRIi64 "}", - rsvol.vol_id, (int64_t)rsvol.bytes); - break; - } - - case UBI_IOCRNVOL: { - struct ubi_rnvol_req rnvol; - int c; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &rnvol)) - break; - - tprintf("{count=%" PRIi32 ", ents=[", rnvol.count); - for (c = 0; c < CLAMP(rnvol.count, 0, UBI_MAX_RNVOL); ++c) { - if (c) - tprints(", "); - tprintf("{vol_id=%" PRIi32 ", name_len=%" PRIi16 - ", name=", rnvol.ents[c].vol_id, - rnvol.ents[c].name_len); - if (print_quoted_string(rnvol.ents[c].name, - CLAMP(rnvol.ents[c].name_len, 0, UBI_MAX_VOLUME_NAME), - QUOTE_0_TERMINATED) > 0) { - tprints("..."); - } + if (!syserror(tcp) && !umove(tcp, arg, &rinfo)) + tprintf(", offset=%#x" + ", erasesize=%#x" + ", numblocks=%#x}", + rinfo.offset, + rinfo.erasesize, + rinfo.numblocks); tprints("}"); - } - tprints("]}"); - break; - } - - case UBI_IOCEBCH: { - struct ubi_leb_change_req leb; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &leb)) break; - - tprintf("{lnum=%d, bytes=%d}", leb.lnum, leb.bytes); - break; - } - - case UBI_IOCATT: - if (entering(tcp)) { - struct ubi_attach_req attach; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &attach)) - break; - - tprintf("{ubi_num=%" PRIi32 ", mtd_num=%" PRIi32 - ", vid_hdr_offset=%" PRIi32 - ", max_beb_per1024=%" PRIi16 "}", - attach.ubi_num, attach.mtd_num, - attach.vid_hdr_offset, attach.max_beb_per1024); - return 1; - } - if (!syserror(tcp)) { - tprints(" => "); - printnum_int(tcp, arg, "%d"); } - break; - - case UBI_IOCEBMAP: { - struct ubi_map_req map; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &map)) - break; - - tprintf("{lnum=%" PRIi32 ", dtype=%" PRIi8 "}", - map.lnum, map.dtype); - break; - } - - case UBI_IOCSETVOLPROP: { - struct ubi_set_vol_prop_req prop; - - tprints(", "); - if (umove_or_printaddr(tcp, arg, &prop)) - break; - - tprints("{property="); - printxval(ubi_volume_props, prop.property, "UBI_VOL_PROP_???"); - tprintf(", value=%#" PRIx64 "}", (uint64_t)prop.value); - break; - } - - - case UBI_IOCVOLUP: - tprints(", "); - printnum_int64(tcp, arg, "%" PRIi64); - break; - - case UBI_IOCDET: - case UBI_IOCEBER: - case UBI_IOCEBISMAP: - case UBI_IOCEBUNMAP: - case UBI_IOCRMVOL: - tprints(", "); - printnum_int(tcp, arg, "%d"); - break; - -#ifdef UBI_IOCVOLCRBLK - case UBI_IOCVOLCRBLK: -#endif -#ifdef UBI_IOCVOLRMBLK - case UBI_IOCVOLRMBLK: -#endif - /* no arguments */ - break; default: return RVAL_DECODED; diff -Nru strace-4.11/net.c strace-4.12/net.c --- strace-4.11/net.c 2015-11-22 23:09:59.000000000 +0000 +++ strace-4.12/net.c 2016-05-14 22:05:06.000000000 +0000 @@ -83,11 +83,7 @@ # include # include #endif -#ifndef PF_UNSPEC -# define PF_UNSPEC AF_UNSPEC -#endif -#include "xlat/domains.h" #include "xlat/addrfams.h" #include "xlat/socktypes.h" #include "xlat/sock_type_flags.h" @@ -99,7 +95,7 @@ #include "xlat/inet_protocols.h" -#ifdef PF_NETLINK +#ifdef AF_NETLINK # if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG # define NETLINK_SOCK_DIAG NETLINK_INET_DIAG # endif @@ -706,12 +702,12 @@ } void -dumpiov_in_msghdr(struct tcb *tcp, long addr) +dumpiov_in_msghdr(struct tcb *tcp, long addr, unsigned long data_size) { struct msghdr msg; if (extractmsghdr(tcp, addr, &msg)) - dumpiov(tcp, msg.msg_iovlen, (long)msg.msg_iov); + dumpiov_upto(tcp, msg.msg_iovlen, (long)msg.msg_iov, data_size); } static void @@ -763,8 +759,8 @@ if (extractmmsghdr(tcp, addr, i, &mmsg)) { tprintf(" = %lu buffers in vector %u\n", (unsigned long)mmsg.msg_hdr.msg_iovlen, i); - dumpiov(tcp, mmsg.msg_hdr.msg_iovlen, - (long)mmsg.msg_hdr.msg_iov); + dumpiov_upto(tcp, mmsg.msg_hdr.msg_iovlen, + (long)mmsg.msg_hdr.msg_iov, mmsg.msg_len); } } } @@ -774,7 +770,7 @@ * other bits are socket type flags. */ static void -tprint_sock_type(int flags) +tprint_sock_type(unsigned int flags) { const char *str = xlookup(socktypes, flags & SOCK_TYPE_MASK); @@ -790,32 +786,32 @@ SYS_FUNC(socket) { - printxval(domains, tcp->u_arg[0], "PF_???"); + printxval(addrfams, tcp->u_arg[0], "AF_???"); tprints(", "); tprint_sock_type(tcp->u_arg[1]); tprints(", "); switch (tcp->u_arg[0]) { - case PF_INET: -#ifdef PF_INET6 - case PF_INET6: + case AF_INET: +#ifdef AF_INET6 + case AF_INET6: #endif printxval(inet_protocols, tcp->u_arg[2], "IPPROTO_???"); break; -#ifdef PF_IPX - case PF_IPX: +#ifdef AF_IPX + case AF_IPX: /* BTW: I don't believe this.. */ tprints("["); - printxval(domains, tcp->u_arg[2], "PF_???"); + printxval(addrfams, tcp->u_arg[2], "AF_???"); tprints("]"); break; -#endif /* PF_IPX */ -#ifdef PF_NETLINK - case PF_NETLINK: +#endif /* AF_IPX */ +#ifdef AF_NETLINK + case AF_NETLINK: printxval(netlink_protocols, tcp->u_arg[2], "NETLINK_???"); break; #endif -#if defined(PF_BLUETOOTH) && defined(HAVE_BLUETOOTH_BLUETOOTH_H) - case PF_BLUETOOTH: +#if defined(AF_BLUETOOTH) && defined(HAVE_BLUETOOTH_BLUETOOTH_H) + case AF_BLUETOOTH: printxval(bt_protocols, tcp->u_arg[2], "BTPROTO_???"); break; #endif @@ -1098,16 +1094,7 @@ do_pipe(struct tcb *tcp, int flags_arg) { if (exiting(tcp)) { - if (syserror(tcp)) { - printaddr(tcp->u_arg[0]); - } else { -#ifdef HAVE_GETRVAL2 - if (flags_arg < 0) { - printpair_fd(tcp, tcp->u_rval, getrval2(tcp)); - } else -#endif - decode_pair_fd(tcp, tcp->u_arg[0]); - } + decode_pair_fd(tcp, tcp->u_arg[0]); if (flags_arg >= 0) { tprints(", "); printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); @@ -1118,7 +1105,13 @@ SYS_FUNC(pipe) { +#ifdef HAVE_GETRVAL2 + if (exiting(tcp) && !syserror(tcp)) + printpair_fd(tcp, tcp->u_rval, getrval2(tcp)); + return 0; +#else return do_pipe(tcp, -1); +#endif } SYS_FUNC(pipe2) @@ -1129,7 +1122,7 @@ SYS_FUNC(socketpair) { if (entering(tcp)) { - printxval(domains, tcp->u_arg[0], "PF_???"); + printxval(addrfams, tcp->u_arg[0], "AF_???"); tprints(", "); tprint_sock_type(tcp->u_arg[1]); tprintf(", %lu", tcp->u_arg[2]); @@ -1154,7 +1147,8 @@ #include "xlat/socktcpoptions.h" static void -print_sockopt_fd_level_name(struct tcb *tcp, int fd, int level, int name, bool is_getsockopt) +print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level, + unsigned int name, bool is_getsockopt) { printfd(tcp, fd); tprints(", "); @@ -1255,16 +1249,20 @@ # include "xlat/icmpfilterflags.h" static void -print_icmp_filter(struct tcb *tcp, long addr, int len) +print_icmp_filter(struct tcb *tcp, const long addr, int len) { - struct icmp_filter filter; + struct icmp_filter filter = {}; - if (len != sizeof(filter) || - umove(tcp, addr, &filter) < 0) { + if (len > (int) sizeof(filter)) + len = sizeof(filter); + else if (len <= 0) { printaddr(addr); return; } + if (umoven_or_printaddr(tcp, addr, len, &filter)) + return; + tprints("~("); printflags(icmpfilterflags, ~filter.data, "ICMP_???"); tprints(")"); @@ -1272,7 +1270,8 @@ #endif /* ICMP_FILTER */ static void -print_getsockopt(struct tcb *tcp, int level, int name, long addr, int len) +print_getsockopt(struct tcb *tcp, unsigned int level, unsigned int name, + long addr, int len) { if (addr && verbose(tcp)) switch (level) { @@ -1468,7 +1467,8 @@ #endif /* PACKET_ADD_MEMBERSHIP */ static void -print_setsockopt(struct tcb *tcp, int level, int name, long addr, int len) +print_setsockopt(struct tcb *tcp, unsigned int level, unsigned int name, + long addr, int len) { if (addr && verbose(tcp)) switch (level) { diff -Nru strace-4.11/NEWS strace-4.12/NEWS --- strace-4.11/NEWS 2015-12-21 20:21:22.000000000 +0000 +++ strace-4.12/NEWS 2016-05-31 11:12:13.000000000 +0000 @@ -1,3 +1,48 @@ +Noteworthy changes in release 4.12 (2016-05-31) +=============================================== + +* Improvements + * Implemented simultaneous use of -p option and tracing of a command. + (addresses Debian bug #549942). + * Implemented caching of netlink conversations to reduce amount of time + spent in decoding socket details in -yy mode. + * Implemented -yy mode decoding of protocol:portid pairs associated with + netlink socket descriptors. + * Implemented decoding of copy_file_range, preadv2, and pwritev2 syscalls. + * Implemented dumping of preadv, preadv2, pwritev, pwritev2, and vmsplice + syscalls. + * Implemented decoding of BTRFS_* and UFFDIO_* ioctl commands. + * Enhanced decoding of BLK*, EVIOC*, RTC_*, and VIDIOC_* ioctl commands. + * Enhanced decoding of fstatfs, fstatfs64, get_mempolicy, getdents, + getdents64, getgroups, getpriority, kill, mbind, migrate_pages, mknod, + mknodat, personality, poll, ppoll, quotactl, rt_sigpending, + rt_sigqueueinfo, rt_sigtimedwait, rt_tgsigqueueinfo, sched_getaffinity, + sched_setaffinity, seccomp, set_mempolicy, setgroups, setpriority, statfs, + statfs64, tgkill, waitid, and xattr family syscalls. + * Enhanced decoding of getxpid, getxuid, and getxgid syscalls on alpha. + * Enhanced decoding of pipe syscall on alpha, ia64, mips, sh, and sparc. + * Added decoding of bind, listen, and setsockopt direct syscalls on sparc. + * Added decoding of osf_statfs64 and osf_fstatfs64 syscalls on alpha. + * Added decoding of fadvise64 and fadvise64_64 on s390. + * Updated lists of AF_*, BPF_MAP_TYPE_*, CLONE_*, EPOLL*, IPV6_*, MADV_*, + MSG_*, PTRACE_*, SEGV_*, SO_*, SOL_*, *_MAGIC, and quotactl constants. + * Updated lists of ioctl commands from Linux 4.6. + +* Bug fixes + * Fixed build on arc, metag, nios2, or1k, and tile architectures. + * Fixed decoding of 32-bit times syscall return value on 64-bit architectures. + * Fixed decoding of mlock2 syscall on sparc. + * Fixed decoding of osf_shmat syscall on alpha. + * Fixed decoding of syscalls unknown to the kernel on s390/s390x. + (addresses Debian bug #485979 and Fedora bug #1298294). + * Fixed decoding of preadv syscall in case of short read. + * Fixed decoding and dumping of readv syscall in case of short read. + * Fixed dumping of recvmsg and recvmmsg syscalls in case of short read. + * Fixed decoding of mincore syscall's last argument. + * Fixed remaining errors in mapping between syscall numbers and numbers + of syscall arguments. + * Applied various fixes to strace-graph script. + Noteworthy changes in release 4.11 (2015-12-21) =============================================== diff -Nru strace-4.11/numa.c strace-4.12/numa.c --- strace-4.11/numa.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/numa.c 2016-05-16 23:48:05.000000000 +0000 @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2003-2007 Ulrich Drepper + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +static bool +print_node(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + if (elem_size < sizeof(long)) { + tprintf("%#0*x", (int) elem_size * 2 + 2, + * (unsigned int *) elem_buf); + } else { + tprintf("%#0*lx", (int) elem_size * 2 + 2, + * (unsigned long *) elem_buf); + } + + return true; +} + +static void +print_nodemask(struct tcb *tcp, unsigned long addr, unsigned long maxnodes) +{ + const unsigned long nmemb = + (maxnodes + 8 * current_wordsize - 2) / (8 * current_wordsize); + + if (nmemb < maxnodes / (8 * current_wordsize) || + (maxnodes && !nmemb)) { + printaddr(addr); + return; + } + + unsigned long buf; + print_array(tcp, addr, nmemb, &buf, current_wordsize, + umoven_or_printaddr, print_node, 0); +} + +SYS_FUNC(migrate_pages) +{ + tprintf("%d, %lu, ", (int) tcp->u_arg[0], tcp->u_arg[1]); + print_nodemask(tcp, tcp->u_arg[2], tcp->u_arg[1]); + tprints(", "); + print_nodemask(tcp, tcp->u_arg[3], tcp->u_arg[1]); + + return RVAL_DECODED; +} + +#include "xlat/policies.h" +#include "xlat/mbindflags.h" + +SYS_FUNC(mbind) +{ + printaddr(tcp->u_arg[0]); + tprintf(", %lu, ", tcp->u_arg[1]); + printxval_long(policies, tcp->u_arg[2], "MPOL_???"); + tprints(", "); + print_nodemask(tcp, tcp->u_arg[3], tcp->u_arg[4]); + tprintf(", %lu, ", tcp->u_arg[4]); + printflags(mbindflags, tcp->u_arg[5], "MPOL_???"); + + return RVAL_DECODED; +} + +SYS_FUNC(set_mempolicy) +{ + printxval(policies, tcp->u_arg[0], "MPOL_???"); + tprints(", "); + print_nodemask(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[2]); + + return RVAL_DECODED; +} + +#include "xlat/mempolicyflags.h" + +SYS_FUNC(get_mempolicy) +{ + if (exiting(tcp)) { + int pol; + if (!umove_or_printaddr(tcp, tcp->u_arg[0], &pol)) { + tprints("["); + printxval(policies, pol, "MPOL_???"); + tprints("]"); + } + tprints(", "); + print_nodemask(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, ", tcp->u_arg[2]); + printaddr(tcp->u_arg[3]); + tprints(", "); + printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???"); + } + return 0; +} + +#include "xlat/move_pages_flags.h" + +static bool +print_addr(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + unsigned long addr; + + if (elem_size < sizeof(long)) { + addr = * (unsigned int *) elem_buf; + } else { + addr = * (unsigned long *) elem_buf; + } + + printaddr(addr); + + return true; +} + +static bool +print_status(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + const int status = * (int *) elem_buf; + + if (status < 0 && (unsigned) -status < nerrnos) + tprintf("%s", errnoent[-status]); + else + tprintf("%d", status); + + return true; +} + +static bool +print_int(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + tprintf("%d", * (int *) elem_buf); + + return true; +} + +SYS_FUNC(move_pages) +{ + const unsigned long npages = tcp->u_arg[1]; + long buf; + + if (entering(tcp)) { + tprintf("%d, %lu, ", (int) tcp->u_arg[0], npages); + print_array(tcp, tcp->u_arg[2], npages, &buf, current_wordsize, + umoven_or_printaddr, print_addr, 0); + tprints(", "); + print_array(tcp, tcp->u_arg[3], npages, &buf, sizeof(int), + umoven_or_printaddr, print_int, 0); + tprints(", "); + } else { + print_array(tcp, tcp->u_arg[4], npages, &buf, sizeof(int), + umoven_or_printaddr, print_status, 0); + tprints(", "); + printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???"); + } + return 0; +} diff -Nru strace-4.11/open.c strace-4.12/open.c --- strace-4.11/open.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/open.c 2016-04-29 00:13:20.000000000 +0000 @@ -73,7 +73,7 @@ * other bits are real flags. */ const char * -sprint_open_modes(int flags) +sprint_open_modes(unsigned int flags) { static char outstr[(1 + ARRAY_SIZE(open_mode_flags)) * sizeof("O_LARGEFILE")]; char *p; @@ -110,7 +110,7 @@ } void -tprint_open_modes(int flags) +tprint_open_modes(unsigned int flags) { tprints(sprint_open_modes(flags) + sizeof("flags")); } diff -Nru strace-4.11/or1k_atomic.c strace-4.12/or1k_atomic.c --- strace-4.11/or1k_atomic.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/or1k_atomic.c 2016-05-16 23:48:05.000000000 +0000 @@ -44,7 +44,7 @@ SYS_FUNC(or1k_atomic) { - printxval(atomic_ops, tcp->u_arg[0], "???"); + printxval_long(atomic_ops, tcp->u_arg[0], "???"); switch(tcp->u_arg[0]) { case OR1K_ATOMIC_SWAP: tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]); diff -Nru strace-4.11/pathtrace.c strace-4.12/pathtrace.c --- strace-4.11/pathtrace.c 2015-11-22 23:21:35.000000000 +0000 +++ strace-4.12/pathtrace.c 2016-02-14 00:36:38.000000000 +0000 @@ -181,7 +181,6 @@ case SEN_name_to_handle_at: case SEN_newfstatat: case SEN_openat: - case SEN_pipe2: case SEN_readlinkat: case SEN_unlinkat: case SEN_utimensat: @@ -216,6 +215,7 @@ case SEN_mmap: case SEN_mmap_4koff: case SEN_mmap_pgoff: + case SEN_ARCH_mmap: /* x, x, x, x, fd */ return fdmatch(tcp, tcp->u_arg[4]); @@ -225,8 +225,9 @@ upathmatch(tcp, tcp->u_arg[0]) || upathmatch(tcp, tcp->u_arg[2]); + case SEN_copy_file_range: case SEN_splice: - /* fd, x, fd, x, x */ + /* fd, x, fd, x, x, x */ return fdmatch(tcp, tcp->u_arg[0]) || fdmatch(tcp, tcp->u_arg[2]); @@ -326,6 +327,7 @@ case SEN_memfd_create: case SEN_perf_event_open: case SEN_pipe: + case SEN_pipe2: case SEN_printargs: case SEN_socket: case SEN_socketpair: diff -Nru strace-4.11/perf.c strace-4.12/perf.c --- strace-4.11/perf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/perf.c 2016-05-16 23:48:05.000000000 +0000 @@ -41,7 +41,7 @@ (int) tcp->u_arg[1], (int) tcp->u_arg[2], (int) tcp->u_arg[3]); - printflags(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); + printflags_long(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); return RVAL_DECODED | RVAL_FD; } diff -Nru strace-4.11/personality.c strace-4.12/personality.c --- strace-4.11/personality.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/personality.c 2015-12-27 00:18:35.000000000 +0000 @@ -1,12 +1,69 @@ -#include "defs.h" +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "defs.h" #include +#include "xlat/personality_types.h" +#include "xlat/personality_flags.h" -#include "xlat/personality_options.h" SYS_FUNC(personality) { - printxval(personality_options, tcp->u_arg[0], "PER_???"); + unsigned int pers; + + if (entering(tcp)) { + pers = tcp->u_arg[0]; + if (0xffffffff == pers) { + tprints("0xffffffff"); + } else { + printxval(personality_types, pers & PER_MASK, "PER_???"); + pers &= ~PER_MASK; + if (pers) { + tprints("|"); + printflags(personality_flags, pers, NULL); + } + } + return 0; + } + + if (syserror(tcp)) + return 0; - return RVAL_DECODED; + pers = tcp->u_rval; + const char *type = xlookup(personality_types, pers & PER_MASK); + char *p; + static char outstr[1024]; + if (type) + p = stpcpy(outstr, type); + else + p = outstr + sprintf(outstr, "%#x /* %s */", pers & PER_MASK, "PER_???"); + pers &= ~PER_MASK; + if (pers) + strcpy(p, sprintflags("|", personality_flags, pers)); + tcp->auxstr = outstr; + return RVAL_HEX | RVAL_STR; } diff -Nru strace-4.11/poll.c strace-4.12/poll.c --- strace-4.11/poll.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/poll.c 2016-05-16 22:41:19.000000000 +0000 @@ -31,67 +31,32 @@ #include "xlat/pollflags.h" -static void -print_pollfd(struct tcb *tcp, const struct pollfd *fds) +static bool +print_pollfd(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { + const struct pollfd *fds = elem_buf; + tprints("{fd="); printfd(tcp, fds->fd); if (fds->fd >= 0) { tprints(", events="); - printflags(pollflags, fds->events, "POLL???"); + printflags(pollflags, (unsigned short) fds->events, "POLL???"); } tprints("}"); + + return true; } -static int +static void decode_poll_entering(struct tcb *tcp) { - struct pollfd fds; + const unsigned long addr = tcp->u_arg[0]; const unsigned int nfds = tcp->u_arg[1]; - const unsigned long size = sizeof(fds) * nfds; - const unsigned long start = tcp->u_arg[0]; - const unsigned long end = start + size; - unsigned long cur, abbrev_end; - - if (!verbose(tcp) || !start || !nfds || - size / sizeof(fds) != nfds || end < start) { - printaddr(start); - tprintf(", %u, ", nfds); - return 0; - } - - if (abbrev(tcp)) { - abbrev_end = start + max_strlen * sizeof(fds); - if (abbrev_end < start) - abbrev_end = end; - } else { - abbrev_end = end; - } - - if (start >= abbrev_end || umove(tcp, start, &fds) < 0) { - printaddr(start); - tprintf(", %u, ", nfds); - return 0; - } - - tprints("["); - print_pollfd(tcp, &fds); - for (cur = start + sizeof(fds); cur < end; cur += sizeof(fds)) { - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umove(tcp, cur, &fds) < 0) { - tprints("???"); - break; - } - print_pollfd(tcp, &fds); - - } - tprintf("], %u, ", nfds); + struct pollfd fds; - return 0; + print_array(tcp, addr, nfds, &fds, sizeof(fds), + umoven_or_printaddr, print_pollfd, 0); + tprintf(", %u, ", nfds); } static int @@ -102,7 +67,9 @@ const unsigned long size = sizeof(fds) * nfds; const unsigned long start = tcp->u_arg[0]; const unsigned long end = start + size; - unsigned long cur, abbrev_end; + const unsigned long max_printed = + abbrev(tcp) ? max_strlen : (unsigned int) -1; + unsigned long printed, cur; static char outstr[1024]; char *outptr; @@ -118,23 +85,16 @@ if (!verbose(tcp) || !start || !nfds || size / sizeof(fds) != nfds || end < start) return 0; - if (abbrev(tcp)) { - abbrev_end = start + max_strlen * sizeof(fds); - if (abbrev_end < start) - abbrev_end = end; - } else { - abbrev_end = end; - } outptr = outstr; - for (cur = start; cur < end; cur += sizeof(fds)) { + for (printed = 0, cur = start; cur < end; cur += sizeof(fds)) { if (umove(tcp, cur, &fds) < 0) { if (outptr == outstr) *outptr++ = '['; else outptr = stpcpy(outptr, ", "); - outptr = stpcpy(outptr, "???"); + outptr += sprintf(outptr, "%#lx", cur); break; } if (!fds.revents) @@ -143,7 +103,7 @@ *outptr++ = '['; else outptr = stpcpy(outptr, ", "); - if (cur >= abbrev_end) { + if (printed >= max_printed) { outptr = stpcpy(outptr, "..."); break; } @@ -152,16 +112,18 @@ char fdstr[sizeof(fmt) + sizeof(int) * 3]; sprintf(fdstr, fmt, fds.fd); - const char *flagstr = sprintflags("", pollflags, fds.revents); + const char *flagstr = sprintflags("", pollflags, + (unsigned short) fds.revents); - if (outptr + strlen(fdstr) + strlen(flagstr) + 1 - >= end_outstr - sizeof(", ...], ...")) { + if (outptr + strlen(fdstr) + strlen(flagstr) + 1 >= + end_outstr - (2 + 2 * sizeof(long) + sizeof(", ], ..."))) { outptr = stpcpy(outptr, "..."); break; } outptr = stpcpy(outptr, fdstr); outptr = stpcpy(outptr, flagstr); *outptr++ = '}'; + ++printed; } if (outptr != outstr) @@ -190,16 +152,17 @@ SYS_FUNC(poll) { if (entering(tcp)) { - int rc = decode_poll_entering(tcp); + decode_poll_entering(tcp); + int timeout = tcp->u_arg[2]; #ifdef INFTIM - if (INFTIM == (int) tcp->u_arg[2]) + if (INFTIM == timeout) tprints("INFTIM"); else #endif - tprintf("%d", (int) tcp->u_arg[2]); + tprintf("%d", timeout); - return rc; + return 0; } else { return decode_poll_exiting(tcp, 0); } @@ -208,7 +171,7 @@ SYS_FUNC(ppoll) { if (entering(tcp)) { - int rc = decode_poll_entering(tcp); + decode_poll_entering(tcp); print_timespec(tcp, tcp->u_arg[2]); tprints(", "); @@ -216,7 +179,7 @@ print_sigset_addr_len(tcp, tcp->u_arg[3], tcp->u_arg[4]); tprintf(", %lu", tcp->u_arg[4]); - return rc; + return 0; } else { return decode_poll_exiting(tcp, tcp->u_arg[2]); } diff -Nru strace-4.11/prctl.c strace-4.12/prctl.c --- strace-4.11/prctl.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/prctl.c 2016-05-16 23:50:59.000000000 +0000 @@ -73,12 +73,13 @@ SYS_FUNC(prctl) { + const unsigned int option = tcp->u_arg[0]; unsigned int i; if (entering(tcp)) - printxval(prctl_options, tcp->u_arg[0], "PR_???"); + printxval(prctl_options, option, "PR_???"); - switch (tcp->u_arg[0]) { + switch (option) { case PR_GET_DUMPABLE: case PR_GET_KEEPCAPS: case PR_GET_SECCOMP: @@ -122,7 +123,8 @@ break; if (syserror(tcp) || tcp->u_rval == 0) return 0; - tcp->auxstr = sprintflags("", secbits, tcp->u_rval); + tcp->auxstr = sprintflags("", secbits, + (unsigned long) tcp->u_rval); return RVAL_STR; case PR_GET_TID_ADDRESS: @@ -170,18 +172,19 @@ case PR_CAPBSET_DROP: case PR_CAPBSET_READ: tprints(", "); - printxval(cap, tcp->u_arg[1], "CAP_???"); + printxval_long(cap, tcp->u_arg[1], "CAP_???"); return RVAL_DECODED; case PR_CAP_AMBIENT: tprints(", "); - printxval(pr_cap_ambient, tcp->u_arg[1], "PR_CAP_AMBIENT_???"); + printxval_long(pr_cap_ambient, tcp->u_arg[1], + "PR_CAP_AMBIENT_???"); switch (tcp->u_arg[1]) { case PR_CAP_AMBIENT_RAISE: case PR_CAP_AMBIENT_LOWER: case PR_CAP_AMBIENT_IS_SET: tprints(", "); - printxval(cap, tcp->u_arg[2], "CAP_???"); + printxval_long(cap, tcp->u_arg[2], "CAP_???"); print_prctl_args(tcp, 3); break; default: @@ -192,10 +195,10 @@ case PR_MCE_KILL: tprints(", "); - printxval(pr_mce_kill, tcp->u_arg[1], "PR_MCE_KILL_???"); + printxval_long(pr_mce_kill, tcp->u_arg[1], "PR_MCE_KILL_???"); tprints(", "); if (PR_MCE_KILL_SET == tcp->u_arg[1]) - printxval(pr_mce_kill_policy, tcp->u_arg[2], + printxval_long(pr_mce_kill_policy, tcp->u_arg[2], "PR_MCE_KILL_???"); else tprintf("%#lx", tcp->u_arg[2]); @@ -208,16 +211,12 @@ return RVAL_DECODED; #ifdef __ANDROID__ -# ifndef PR_SET_VMA -# define PR_SET_VMA 0x53564d41 -# endif # ifndef PR_SET_VMA_ANON_NAME # define PR_SET_VMA_ANON_NAME 0 # endif case PR_SET_VMA: if (tcp->u_arg[1] == PR_SET_VMA_ANON_NAME) { - tprintf(", %lu", tcp->u_arg[1]); - tprintf(", %#lx", tcp->u_arg[2]); + tprintf(", PR_SET_VMA_ANON_NAME, %#lx", tcp->u_arg[2]); tprintf(", %lu, ", tcp->u_arg[3]); printstr(tcp, tcp->u_arg[4], -1); } else { @@ -252,7 +251,7 @@ case PR_SET_SECCOMP: tprints(", "); - printxval(seccomp_mode, tcp->u_arg[1], + printxval_long(seccomp_mode, tcp->u_arg[1], "SECCOMP_MODE_???"); if (SECCOMP_MODE_STRICT == tcp->u_arg[1]) return RVAL_DECODED; @@ -266,7 +265,7 @@ case PR_SET_SECUREBITS: tprints(", "); - printflags(secbits, tcp->u_arg[1], "SECBIT_???"); + printflags_long(secbits, tcp->u_arg[1], "SECBIT_???"); return RVAL_DECODED; case PR_SET_TIMERSLACK: @@ -296,7 +295,8 @@ } if (syserror(tcp)) return 0; - tcp->auxstr = xlookup(pr_mce_kill_policy, tcp->u_rval); + tcp->auxstr = xlookup(pr_mce_kill_policy, + (unsigned long) tcp->u_rval); return tcp->auxstr ? RVAL_STR : RVAL_UDECIMAL; case PR_GET_NO_NEW_PRIVS: @@ -316,10 +316,12 @@ SYS_FUNC(arch_prctl) { + const unsigned int option = tcp->u_arg[0]; + if (entering(tcp)) - printxval(archvals, tcp->u_arg[0], "ARCH_???"); + printxval(archvals, option, "ARCH_???"); - switch (tcp->u_arg[0]) { + switch (option) { case ARCH_GET_GS: case ARCH_GET_FS: if (entering(tcp)) diff -Nru strace-4.11/printmode.c strace-4.12/printmode.c --- strace-4.11/printmode.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/printmode.c 2016-05-14 22:05:06.000000000 +0000 @@ -37,7 +37,7 @@ #include "xlat/modetypes.h" const char * -sprintmode(int mode) +sprintmode(unsigned int mode) { static char buf[sizeof("S_IFSOCK|S_ISUID|S_ISGID|S_ISVTX|%o") + sizeof(int)*3 diff -Nru strace-4.11/print_mq_attr.c strace-4.12/print_mq_attr.c --- strace-4.11/print_mq_attr.c 2015-11-26 01:36:58.000000000 +0000 +++ strace-4.12/print_mq_attr.c 2016-05-21 22:53:06.000000000 +0000 @@ -41,7 +41,7 @@ #include MPERS_DEFS -MPERS_PRINTER_DECL(void, printmqattr)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, printmqattr, struct tcb *tcp, const long addr) { #if defined HAVE_MQUEUE_H || defined HAVE_LINUX_MQUEUE_H mq_attr_t attr; diff -Nru strace-4.11/print_msgbuf.c strace-4.12/print_msgbuf.c --- strace-4.11/print_msgbuf.c 2015-08-28 08:46:23.000000000 +0000 +++ strace-4.12/print_msgbuf.c 2016-05-21 22:53:06.000000000 +0000 @@ -38,7 +38,8 @@ typedef struct msgbuf msgbuf_t; #include MPERS_DEFS -MPERS_PRINTER_DECL(void, tprint_msgbuf)(struct tcb *tcp, const long addr, const unsigned long count) +MPERS_PRINTER_DECL(void, tprint_msgbuf, + struct tcb *tcp, const long addr, const unsigned long count) { msgbuf_t msg; diff -Nru strace-4.11/printrusage.c strace-4.12/printrusage.c --- strace-4.11/printrusage.c 2015-08-28 08:46:23.000000000 +0000 +++ strace-4.12/printrusage.c 2016-05-21 22:53:06.000000000 +0000 @@ -37,7 +37,7 @@ #include MPERS_DEFS -MPERS_PRINTER_DECL(void, printrusage)(struct tcb *tcp, long addr) +MPERS_PRINTER_DECL(void, printrusage, struct tcb *tcp, long addr) { rusage_t ru; diff -Nru strace-4.11/print_sigevent.c strace-4.12/print_sigevent.c --- strace-4.11/print_sigevent.c 2015-11-20 05:44:49.000000000 +0000 +++ strace-4.12/print_sigevent.c 2016-05-21 22:53:06.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2003, 2004 Ulrich Drepper - * Copyright (c) 2005-2015 Dmitry V. Levin + * Copyright (c) 2005-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,13 @@ #include "defs.h" #include DEF_MPERS_TYPE(struct_sigevent) - -#include -typedef struct sigevent struct_sigevent; - +#include "sigevent.h" #include MPERS_DEFS +#include #include "xlat/sigev_value.h" -MPERS_PRINTER_DECL(void, print_sigevent)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_sigevent, struct tcb *tcp, const long addr) { struct_sigevent sev; @@ -66,30 +64,13 @@ switch (sev.sigev_notify) { case SIGEV_THREAD_ID: -#ifndef sigev_notify_thread_id - /* - * _pad[0] is the _tid field which might not be - * present in the userlevel definition of the struct. - */ -# if defined HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD -# define sigev_notify_thread_id _sigev_un._pad[0] -# elif defined HAVE_STRUCT_SIGEVENT___PAD -# define sigev_notify_thread_id __pad[0] -# endif -#endif - -#ifdef sigev_notify_thread_id - tprintf(", sigev_notify_thread_id=%d", - sev.sigev_notify_thread_id); -#else -# warning unfamiliar struct sigevent => incomplete SIGEV_THREAD_ID decoding -#endif + tprintf(", sigev_notify_thread_id=%d", sev.sigev_un.tid); break; case SIGEV_THREAD: tprints(", sigev_notify_function="); - printaddr((unsigned long) sev.sigev_notify_function); + printaddr(sev.sigev_un.sigev_thread.function); tprints(", sigev_notify_attributes="); - printaddr((unsigned long) sev.sigev_notify_attributes); + printaddr(sev.sigev_un.sigev_thread.attribute); break; } tprints("}"); diff -Nru strace-4.11/printsiginfo.c strace-4.12/printsiginfo.c --- strace-4.11/printsiginfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/printsiginfo.c 2016-05-26 14:44:13.000000000 +0000 @@ -74,18 +74,14 @@ } static void -printsigval(const siginfo_t *sip, bool verbose) +printsigval(const siginfo_t *sip) { - if (!verbose) - tprints(", ..."); - else - tprintf(", si_value={int=%d, ptr=%#lx}", - sip->si_int, - (unsigned long) sip->si_ptr); + tprintf(", si_value={int=%d, ptr=%#lx}", + sip->si_int, (unsigned long) sip->si_ptr); } static void -print_si_code(int si_signo, int si_code) +print_si_code(int si_signo, unsigned int si_code) { const char *code = xlookup(siginfo_codes, si_code); @@ -133,7 +129,7 @@ } static void -print_si_info(const siginfo_t *sip, bool verbose) +print_si_info(const siginfo_t *sip) { if (sip->si_errno) { tprints(", si_errno="); @@ -156,13 +152,13 @@ case SI_TIMER: tprintf(", si_timerid=%#x, si_overrun=%d", sip->si_timerid, sip->si_overrun); - printsigval(sip, verbose); + printsigval(sip); break; #endif default: printsigsource(sip); if (sip->si_ptr) - printsigval(sip, verbose); + printsigval(sip); break; } } else { @@ -174,12 +170,9 @@ tprintf("%d", sip->si_status); else printsignal(sip->si_status); - if (!verbose) - tprints(", ..."); - else - tprintf(", si_utime=%llu, si_stime=%llu", - (unsigned long long) sip->si_utime, - (unsigned long long) sip->si_stime); + tprintf(", si_utime=%llu, si_stime=%llu", + widen_to_ull(sip->si_utime), + widen_to_ull(sip->si_stime)); break; case SIGILL: case SIGFPE: case SIGSEGV: case SIGBUS: @@ -198,7 +191,7 @@ case SIGSYS: tprintf(", si_call_addr=%#lx, si_syscall=__NR_%s, si_arch=", (unsigned long) sip->si_call_addr, - syscall_name(sip->si_syscall)); + syscall_name((unsigned) sip->si_syscall)); printxval(audit_arch, sip->si_arch, "AUDIT_ARCH_???"); break; #endif @@ -206,7 +199,7 @@ if (sip->si_pid || sip->si_uid) printsigsource(sip); if (sip->si_ptr) - printsigval(sip, verbose); + printsigval(sip); } } } @@ -215,7 +208,7 @@ static #endif void -printsiginfo(const siginfo_t *sip, bool verbose) +printsiginfo(const siginfo_t *sip) { if (sip->si_signo == 0) { tprints("{}"); @@ -230,15 +223,32 @@ #ifdef SI_NOINFO if (sip->si_code != SI_NOINFO) #endif - print_si_info(sip, verbose); + print_si_info(sip); tprints("}"); } -MPERS_PRINTER_DECL(void, printsiginfo_at)(struct tcb *tcp, long addr) +MPERS_PRINTER_DECL(void, printsiginfo_at, + struct tcb *tcp, long addr) { siginfo_t si; if (!umove_or_printaddr(tcp, addr, &si)) - printsiginfo(&si, verbose(tcp)); + printsiginfo(&si); +} + +static bool +print_siginfo_t(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + printsiginfo((const siginfo_t *) elem_buf); + return true; +} + +MPERS_PRINTER_DECL(void, print_siginfo_array, + struct tcb *tcp, unsigned long addr, unsigned long len) +{ + siginfo_t si; + + print_array(tcp, addr, len, &si, sizeof(si), + umoven_or_printaddr, print_siginfo_t, 0); } diff -Nru strace-4.11/printsiginfo.h strace-4.12/printsiginfo.h --- strace-4.11/printsiginfo.h 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/printsiginfo.h 2016-05-13 22:09:07.000000000 +0000 @@ -1 +1 @@ -extern void printsiginfo(const siginfo_t *, bool); +extern void printsiginfo(const siginfo_t *); diff -Nru strace-4.11/print_statfs.c strace-4.12/print_statfs.c --- strace-4.11/print_statfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/print_statfs.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "statfs.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +static void +print_statfs_type(const char *const prefix, const unsigned long long magic) +{ + tprints(prefix); + const char *s = xlat_search(fsmagic, ARRAY_SIZE(fsmagic), magic); + if (s) + tprints(s); + else + tprintf("%#llx", magic); +} + +#if defined HAVE_STRUCT_STATFS_F_FLAGS || defined HAVE_STRUCT_STATFS64_F_FLAGS +static void +print_statfs_flags(const char *const prefix, const unsigned long long flags) +{ + if (flags & ST_VALID) { + tprints(prefix); + printflags64(statfs_flags, flags, "ST_???"); + } +} +#endif /* HAVE_STRUCT_STATFS_F_FLAGS || HAVE_STRUCT_STATFS64_F_FLAGS */ + +static void +print_statfs_number(const char *const prefix, const unsigned long long number) +{ + tprints(prefix); + tprintf("%llu", number); +} + +void +print_struct_statfs(struct tcb *tcp, const long addr) +{ +#ifdef HAVE_STRUCT_STATFS + struct strace_statfs b; + + if (!fetch_struct_statfs(tcp, addr, &b)) + return; + + print_statfs_type("{f_type=", b.f_type); + print_statfs_number(", f_bsize=", b.f_bsize); + print_statfs_number(", f_blocks=", b.f_blocks); + print_statfs_number(", f_bfree=", b.f_bfree); + print_statfs_number(", f_bavail=", b.f_bavail); + print_statfs_number(", f_files=", b.f_files); + print_statfs_number(", f_ffree=", b.f_ffree); +# if defined HAVE_STRUCT_STATFS_F_FSID_VAL \ + || defined HAVE_STRUCT_STATFS_F_FSID___VAL + print_statfs_number(", f_fsid={", b.f_fsid[0]); + print_statfs_number(", ", b.f_fsid[1]); + tprints("}"); +# endif + print_statfs_number(", f_namelen=", b.f_namelen); +# ifdef HAVE_STRUCT_STATFS_F_FRSIZE + print_statfs_number(", f_frsize=", b.f_frsize); +# endif +# ifdef HAVE_STRUCT_STATFS_F_FLAGS + print_statfs_flags(", f_flags=", b.f_flags); +# endif + tprints("}"); +#else + printaddr(addr); +#endif +} + +void +print_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size) +{ +#ifdef HAVE_STRUCT_STATFS64 + struct strace_statfs b; + + if (!fetch_struct_statfs64(tcp, addr, size, &b)) + return; + + print_statfs_type("{f_type=", b.f_type); + print_statfs_number(", f_bsize=", b.f_bsize); + print_statfs_number(", f_blocks=", b.f_blocks); + print_statfs_number(", f_bfree=", b.f_bfree); + print_statfs_number(", f_bavail=", b.f_bavail); + print_statfs_number(", f_files=", b.f_files); + print_statfs_number(", f_ffree=", b.f_ffree); +# if defined HAVE_STRUCT_STATFS64_F_FSID_VAL \ + || defined HAVE_STRUCT_STATFS64_F_FSID___VAL + print_statfs_number(", f_fsid={", b.f_fsid[0]); + print_statfs_number(", ", b.f_fsid[1]); + tprints("}"); +# endif + print_statfs_number(", f_namelen=", b.f_namelen); +# ifdef HAVE_STRUCT_STATFS64_F_FRSIZE + print_statfs_number(", f_frsize=", b.f_frsize); +# endif +# ifdef HAVE_STRUCT_STATFS64_F_FLAGS + print_statfs_flags(", f_flags=", b.f_flags); +# endif + tprints("}"); +#else + printaddr(addr); +#endif +} diff -Nru strace-4.11/printstat.h strace-4.12/printstat.h --- strace-4.11/printstat.h 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/printstat.h 2016-05-26 14:44:13.000000000 +0000 @@ -55,7 +55,7 @@ tprintf("{st_dev=makedev(%u, %u), st_ino=%llu, st_mode=%s, ", (unsigned int) STAT_MAJOR(statbuf->st_dev), (unsigned int) STAT_MINOR(statbuf->st_dev), - (unsigned long long) statbuf->st_ino, + widen_to_ull(statbuf->st_ino), sprintmode(statbuf->st_mode)); tprintf("st_nlink=%u, st_uid=%u, st_gid=%u, ", (unsigned int) statbuf->st_nlink, @@ -65,8 +65,7 @@ tprintf("st_blksize=%u, ", (unsigned int) statbuf->st_blksize); #endif #ifdef HAVE_STRUCT_STAT_ST_BLOCKS - tprintf("st_blocks=%llu, ", - (unsigned long long) statbuf->st_blocks); + tprintf("st_blocks=%llu, ", widen_to_ull(statbuf->st_blocks)); #endif } else { tprintf("{st_mode=%s, ", sprintmode(statbuf->st_mode)); @@ -85,8 +84,7 @@ #endif /* !HAVE_STRUCT_STAT_ST_RDEV */ break; default: - tprintf("st_size=%llu, ", - (unsigned long long) statbuf->st_size); + tprintf("st_size=%llu, ", widen_to_ull(statbuf->st_size)); break; } diff -Nru strace-4.11/print_time.c strace-4.12/print_time.c --- strace-4.11/print_time.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/print_time.c 2016-05-21 22:53:06.000000000 +0000 @@ -73,7 +73,8 @@ tprintf(time_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_usec); } -MPERS_PRINTER_DECL(void, print_timespec)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_timespec, + struct tcb *tcp, const long addr) { timespec_t t; @@ -83,7 +84,8 @@ print_timespec_t(&t); } -MPERS_PRINTER_DECL(const char *, sprint_timespec)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(const char *, sprint_timespec, + struct tcb *tcp, const long addr) { timespec_t t; static char buf[sizeof(time_fmt) + 3 * sizeof(t)]; @@ -101,7 +103,8 @@ return buf; } -MPERS_PRINTER_DECL(void, print_timespec_utime_pair)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_timespec_utime_pair, + struct tcb *tcp, const long addr) { timespec_t t[2]; @@ -115,7 +118,8 @@ tprints("]"); } -MPERS_PRINTER_DECL(void, print_itimerspec)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_itimerspec, + struct tcb *tcp, const long addr) { timespec_t t[2]; @@ -129,7 +133,8 @@ tprints("}"); } -MPERS_PRINTER_DECL(void, print_timeval)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_timeval, + struct tcb *tcp, const long addr) { timeval_t t; @@ -139,7 +144,8 @@ print_timeval_t(&t); } -MPERS_PRINTER_DECL(void, print_timeval_pair)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_timeval_pair, + struct tcb *tcp, const long addr) { timeval_t t[2]; @@ -153,7 +159,8 @@ tprints("]"); } -MPERS_PRINTER_DECL(const char *, sprint_timeval)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(const char *, sprint_timeval, + struct tcb *tcp, const long addr) { timeval_t t; static char buf[sizeof(time_fmt) + 3 * sizeof(t)]; @@ -171,7 +178,8 @@ return buf; } -MPERS_PRINTER_DECL(void, print_itimerval)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_itimerval, + struct tcb *tcp, const long addr) { timeval_t t[2]; diff -Nru strace-4.11/print_timex.c strace-4.12/print_timex.c --- strace-4.11/print_timex.c 2015-11-20 05:44:49.000000000 +0000 +++ strace-4.12/print_timex.c 2016-05-21 22:53:06.000000000 +0000 @@ -40,7 +40,7 @@ #include "xlat/adjtimex_modes.h" #include "xlat/adjtimex_status.h" -MPERS_PRINTER_DECL(int, print_timex)(struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(int, print_timex, struct tcb *tcp, const long addr) { struct_timex tx; diff -Nru strace-4.11/process.c strace-4.12/process.c --- strace-4.11/process.c 2015-09-16 00:14:55.000000000 +0000 +++ strace-4.12/process.c 2016-05-13 02:36:14.000000000 +0000 @@ -46,6 +46,7 @@ #include "ptrace.h" #include "xlat/ptrace_cmds.h" #include "xlat/ptrace_setoptions_flags.h" +#include "xlat/ptrace_peeksiginfo_flags.h" #define uoff(member) offsetof(struct user, member) #define XLAT_UOFF(member) { uoff(member), "offsetof(struct user, " #member ")" } @@ -55,87 +56,207 @@ XLAT_END }; -SYS_FUNC(ptrace) +static void +print_user_offset_addr(const unsigned long addr) { const struct xlat *x; - unsigned long addr; + + for (x = struct_user_offsets; x->str; ++x) { + if (x->val >= addr) + break; + } + + if (!x->str) { + printaddr(addr); + } else if (x->val > addr) { + if (x == struct_user_offsets) { + printaddr(addr); + } else { + --x; + tprintf("%s + %lu", + x->str, addr - (unsigned long) x->val); + } + } else { + tprints(x->str); + } +} + +SYS_FUNC(ptrace) +{ + const unsigned long request = tcp->u_arg[0]; + const int pid = tcp->u_arg[1]; + const unsigned long addr = tcp->u_arg[2]; + const unsigned long data = tcp->u_arg[3]; if (entering(tcp)) { - printxval(ptrace_cmds, tcp->u_arg[0], "PTRACE_???"); - tprintf(", %lu, ", tcp->u_arg[1]); + /* request */ + printxval64(ptrace_cmds, request, "PTRACE_???"); - addr = tcp->u_arg[2]; - if (tcp->u_arg[0] == PTRACE_PEEKUSER - || tcp->u_arg[0] == PTRACE_POKEUSER - ) { - for (x = struct_user_offsets; x->str; x++) { - if (x->val >= addr) - break; - } - if (!x->str) - printaddr(addr); - else if (x->val > addr && x != struct_user_offsets) { - x--; - tprintf("%s + %ld", x->str, addr - x->val); + if (request == PTRACE_TRACEME) { + /* pid, addr, and data are ignored. */ + return RVAL_DECODED; + } + + /* pid */ + tprintf(", %d", pid); + + /* addr */ + switch (request) { + case PTRACE_ATTACH: + case PTRACE_INTERRUPT: + case PTRACE_KILL: + case PTRACE_LISTEN: + /* addr and data are ignored */ + return RVAL_DECODED; + case PTRACE_PEEKUSER: + case PTRACE_POKEUSER: + tprints(", "); + print_user_offset_addr(addr); + break; + case PTRACE_GETREGSET: + case PTRACE_SETREGSET: + tprints(", "); + printxval(nt_descriptor_types, addr, "NT_???"); + break; + case PTRACE_GETSIGMASK: + case PTRACE_SETSIGMASK: + case PTRACE_SECCOMP_GET_FILTER: + tprintf(", %lu", addr); + break; + case PTRACE_PEEKSIGINFO: { + tprints(", "); + struct { + uint64_t off; + uint32_t flags; + uint32_t nr; + } psi; + if (umove_or_printaddr(tcp, addr, &psi)) { + tprints(", "); + printaddr(data); + return RVAL_DECODED; } - else - tprints(x->str); - } else - if (tcp->u_arg[0] == PTRACE_GETREGSET - || tcp->u_arg[0] == PTRACE_SETREGSET) - printxval(nt_descriptor_types, tcp->u_arg[2], "NT_???"); - else + tprintf("{off=%" PRIu64 ", flags=", psi.off); + printflags(ptrace_peeksiginfo_flags, psi.flags, + "PTRACE_PEEKSIGINFO_???"); + tprintf(", nr=%u}", psi.nr); + break; + } + default: + tprints(", "); printaddr(addr); - tprints(", "); + } - switch (tcp->u_arg[0]) { -#ifndef IA64 +# if defined IA64 || defined SPARC || defined SPARC64 + switch (request) { +# ifdef IA64 case PTRACE_PEEKDATA: case PTRACE_PEEKTEXT: case PTRACE_PEEKUSER: - break; -#endif + /* data is ignored */ + return RVAL_DECODED | RVAL_HEX; +# endif /* IA64 */ +# if defined SPARC || defined SPARC64 + case PTRACE_GETREGS: + case PTRACE_SETREGS: + case PTRACE_GETFPREGS: + case PTRACE_SETFPREGS: + /* data is ignored */ + return RVAL_DECODED; +# endif /* SPARC || SPARC64 */ + } +# endif /* IA64 || SPARC || SPARC64 */ + + tprints(", "); + + /* data */ + switch (request) { case PTRACE_CONT: - case PTRACE_SINGLESTEP: - case PTRACE_SYSCALL: case PTRACE_DETACH: - printsignal(tcp->u_arg[3]); + case PTRACE_SYSCALL: +#ifdef PTRACE_SINGLESTEP + case PTRACE_SINGLESTEP: +#endif +#ifdef PTRACE_SINGLEBLOCK + case PTRACE_SINGLEBLOCK: +#endif +#ifdef PTRACE_SYSEMU + case PTRACE_SYSEMU: +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + case PTRACE_SYSEMU_SINGLESTEP: +#endif + printsignal(data); break; + case PTRACE_SEIZE: case PTRACE_SETOPTIONS: - printflags(ptrace_setoptions_flags, tcp->u_arg[3], "PTRACE_O_???"); +#ifdef PTRACE_OLDSETOPTIONS + case PTRACE_OLDSETOPTIONS: +#endif + printflags64(ptrace_setoptions_flags, data, "PTRACE_O_???"); break; - case PTRACE_SETSIGINFO: { - printsiginfo_at(tcp, tcp->u_arg[3]); + case PTRACE_SETSIGINFO: + printsiginfo_at(tcp, data); + break; + case PTRACE_SETSIGMASK: + print_sigset_addr_len(tcp, data, addr); break; - } case PTRACE_SETREGSET: - tprint_iov(tcp, /*len:*/ 1, tcp->u_arg[3], /*as string:*/ 0); + tprint_iov(tcp, /*len:*/ 1, data, /*as string:*/ 0); break; - case PTRACE_GETSIGINFO: +#ifndef IA64 + case PTRACE_PEEKDATA: + case PTRACE_PEEKTEXT: + case PTRACE_PEEKUSER: +#endif + case PTRACE_GETEVENTMSG: case PTRACE_GETREGSET: - /* Don't print anything, do it at syscall return. */ - break; + case PTRACE_GETSIGINFO: + case PTRACE_GETSIGMASK: + case PTRACE_PEEKSIGINFO: + case PTRACE_SECCOMP_GET_FILTER: + if (verbose(tcp)) { + /* print data on exiting syscall */ + return 0; + } + /* fall through */ default: - printaddr(tcp->u_arg[3]); + printaddr(data); break; } + + return RVAL_DECODED; } else { - switch (tcp->u_arg[0]) { + switch (request) { +#ifndef IA64 case PTRACE_PEEKDATA: case PTRACE_PEEKTEXT: case PTRACE_PEEKUSER: -#ifdef IA64 - return RVAL_HEX; -#else - printnum_ptr(tcp, tcp->u_arg[3]); + printnum_ptr(tcp, data); break; #endif - case PTRACE_GETSIGINFO: { - printsiginfo_at(tcp, tcp->u_arg[3]); + case PTRACE_GETEVENTMSG: + printnum_ulong(tcp, data); break; - } case PTRACE_GETREGSET: - tprint_iov(tcp, /*len:*/ 1, tcp->u_arg[3], /*as string:*/ 0); + tprint_iov(tcp, /*len:*/ 1, data, /*as string:*/ 0); + break; + case PTRACE_GETSIGINFO: + printsiginfo_at(tcp, data); + break; + case PTRACE_GETSIGMASK: + print_sigset_addr_len(tcp, data, addr); + break; + case PTRACE_PEEKSIGINFO: + if (syserror(tcp)) + printaddr(data); + else + print_siginfo_array(tcp, data, tcp->u_rval); + break; + case PTRACE_SECCOMP_GET_FILTER: + if (syserror(tcp)) + printaddr(data); + else + print_seccomp_fprog(tcp, data, tcp->u_rval); break; } } diff -Nru strace-4.11/ptrace.h strace-4.12/ptrace.h --- strace-4.11/ptrace.h 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/ptrace.h 2016-01-12 03:07:39.000000000 +0000 @@ -5,7 +5,7 @@ * Copyright (c) 2004 Roland McGrath * Copyright (c) 2010 Wang Chao * Copyright (c) 2011-2013 Denys Vlasenko - * Copyright (c) 2011-2015 Dmitry V. Levin + * Copyright (c) 2011-2016 Dmitry V. Levin * Copyright (c) 2013 Ali Polatel * Copyright (c) 2015 Mike Frysinger * All rights reserved. @@ -162,6 +162,9 @@ #ifndef PTRACE_SETSIGMASK # define PTRACE_SETSIGMASK 0x420b #endif +#ifndef PTRACE_SECCOMP_GET_FILTER +# define PTRACE_SECCOMP_GET_FILTER 0x420c +#endif #if !HAVE_DECL_PTRACE_PEEKUSER # define PTRACE_PEEKUSER PTRACE_PEEKUSR diff -Nru strace-4.11/quota.c strace-4.12/quota.c --- strace-4.11/quota.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/quota.c 2016-05-16 22:41:20.000000000 +0000 @@ -3,7 +3,7 @@ * Copyright (c) 1993 Branko Lankester * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey * Copyright (c) 1996-1999 Wichert Akkerman - * Copyright (c) 2005, 2006 Dmitry V. Levin + * Copyright (c) 2005-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,109 +33,58 @@ #define SUBCMDMASK 0x00ff #define SUBCMDSHIFT 8 -#define QCMD_CMD(cmd) ((u_int32_t)(cmd) >> SUBCMDSHIFT) -#define QCMD_TYPE(cmd) ((u_int32_t)(cmd) & SUBCMDMASK) +#define QCMD_CMD(cmd) ((uint32_t)(cmd) >> SUBCMDSHIFT) +#define QCMD_TYPE(cmd) ((uint32_t)(cmd) & SUBCMDMASK) -#define OLD_CMD(cmd) ((u_int32_t)(cmd) << 8) -#define NEW_CMD(cmd) ((u_int32_t)(cmd) | 0x800000) -#define XQM_CMD(cmd) ((u_int32_t)(cmd) | ('X'<<8)) - -#define Q_V1_QUOTAON OLD_CMD(0x1) -#define Q_V1_QUOTAOFF OLD_CMD(0x2) -#define Q_V1_GETQUOTA OLD_CMD(0x3) -#define Q_V1_SETQUOTA OLD_CMD(0x4) -#define Q_V1_SETUSE OLD_CMD(0x5) -#define Q_V1_SYNC OLD_CMD(0x6) -#define Q_SETQLIM OLD_CMD(0x7) -#define Q_V1_GETSTATS OLD_CMD(0x8) -#define Q_V1_RSQUASH OLD_CMD(0x10) - -#define Q_V2_GETQUOTA OLD_CMD(0xD) -#define Q_V2_SETQUOTA OLD_CMD(0xE) -#define Q_V2_SETUSE OLD_CMD(0xF) -#define Q_V2_GETINFO OLD_CMD(0x9) -#define Q_V2_SETINFO OLD_CMD(0xA) -#define Q_V2_SETGRACE OLD_CMD(0xB) -#define Q_V2_SETFLAGS OLD_CMD(0xC) -#define Q_V2_GETSTATS OLD_CMD(0x11) - -#define Q_SYNC NEW_CMD(0x1) -#define Q_QUOTAON NEW_CMD(0x2) -#define Q_QUOTAOFF NEW_CMD(0x3) -#define Q_GETFMT NEW_CMD(0x4) -#define Q_GETINFO NEW_CMD(0x5) -#define Q_SETINFO NEW_CMD(0x6) -#define Q_GETQUOTA NEW_CMD(0x7) -#define Q_SETQUOTA NEW_CMD(0x8) - -#define Q_XQUOTAON XQM_CMD(0x1) -#define Q_XQUOTAOFF XQM_CMD(0x2) -#define Q_XGETQUOTA XQM_CMD(0x3) -#define Q_XSETQLIM XQM_CMD(0x4) -#define Q_XGETQSTAT XQM_CMD(0x5) -#define Q_XQUOTARM XQM_CMD(0x6) -#define Q_XQUOTASYNC XQM_CMD(0x7) +#define OLD_CMD(cmd) ((uint32_t)(cmd) << SUBCMDSHIFT) +#define NEW_CMD(cmd) ((uint32_t)(cmd) | 0x800000) +#define XQM_CMD(cmd) ((uint32_t)(cmd) | ('X' << SUBCMDSHIFT)) #include "xlat/quotacmds.h" - -#define USRQUOTA 0 -#define GRPQUOTA 1 - #include "xlat/quotatypes.h" - -/* Quota format identifiers */ -#define QFMT_VFS_OLD 1 -#define QFMT_VFS_V0 2 - #include "xlat/quota_formats.h" - -#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ -#define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ -#define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ -#define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ - -#define XFS_USER_QUOTA (1<<0) /* user quota type */ -#define XFS_PROJ_QUOTA (1<<1) /* (IRIX) project quota type */ -#define XFS_GROUP_QUOTA (1<<2) /* group quota type */ - #include "xlat/xfs_quota_flags.h" #include "xlat/xfs_dqblk_flags.h" - -/* - * Following flags are used to specify which fields are valid - */ -#define QIF_BLIMITS 1 -#define QIF_SPACE 2 -#define QIF_ILIMITS 4 -#define QIF_INODES 8 -#define QIF_BTIME 16 -#define QIF_ITIME 32 - #include "xlat/if_dqblk_valid.h" +#include "xlat/if_dqinfo_flags.h" +#include "xlat/if_dqinfo_valid.h" struct if_dqblk { - u_int64_t dqb_bhardlimit; - u_int64_t dqb_bsoftlimit; - u_int64_t dqb_curspace; - u_int64_t dqb_ihardlimit; - u_int64_t dqb_isoftlimit; - u_int64_t dqb_curinodes; - u_int64_t dqb_btime; - u_int64_t dqb_itime; - u_int32_t dqb_valid; + uint64_t dqb_bhardlimit; + uint64_t dqb_bsoftlimit; + uint64_t dqb_curspace; + uint64_t dqb_ihardlimit; + uint64_t dqb_isoftlimit; + uint64_t dqb_curinodes; + uint64_t dqb_btime; + uint64_t dqb_itime; + uint32_t dqb_valid; +}; + +struct if_nextdqblk { + uint64_t dqb_bhardlimit; + uint64_t dqb_bsoftlimit; + uint64_t dqb_curspace; + uint64_t dqb_ihardlimit; + uint64_t dqb_isoftlimit; + uint64_t dqb_curinodes; + uint64_t dqb_btime; + uint64_t dqb_itime; + uint32_t dqb_valid; + uint32_t dqb_id; }; struct v1_dqblk { - u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ - u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ - u_int32_t dqb_curblocks; /* current block count */ - u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ - u_int32_t dqb_isoftlimit; /* preferred inode limit */ - u_int32_t dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive files */ + uint32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ + uint32_t dqb_bsoftlimit; /* preferred limit on disk blks */ + uint32_t dqb_curblocks; /* current block count */ + uint32_t dqb_ihardlimit; /* maximum # allocated inodes */ + uint32_t dqb_isoftlimit; /* preferred inode limit */ + uint32_t dqb_curinodes; /* current # allocated inodes */ + time_t dqb_btime; /* time limit for excessive disk use */ + time_t dqb_itime; /* time limit for excessive files */ }; struct v2_dqblk @@ -145,52 +94,43 @@ unsigned int dqb_curinodes; unsigned int dqb_bhardlimit; unsigned int dqb_bsoftlimit; - u_int64_t dqb_curspace; + uint64_t dqb_curspace; time_t dqb_btime; time_t dqb_itime; }; struct xfs_dqblk { - int8_t d_version; /* version of this structure */ - int8_t d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ - u_int16_t d_fieldmask; /* field specifier */ - u_int32_t d_id; /* user, project, or group ID */ - u_int64_t d_blk_hardlimit; /* absolute limit on disk blks */ - u_int64_t d_blk_softlimit; /* preferred limit on disk blks */ - u_int64_t d_ino_hardlimit; /* maximum # allocated inodes */ - u_int64_t d_ino_softlimit; /* preferred inode limit */ - u_int64_t d_bcount; /* # disk blocks owned by the user */ - u_int64_t d_icount; /* # inodes owned by the user */ - int32_t d_itimer; /* zero if within inode limits */ - int32_t d_btimer; /* similar to above; for disk blocks */ - u_int16_t d_iwarns; /* # warnings issued wrt num inodes */ - u_int16_t d_bwarns; /* # warnings issued wrt disk blocks */ - int32_t d_padding2; /* padding2 - for future use */ - u_int64_t d_rtb_hardlimit; /* absolute limit on realtime blks */ - u_int64_t d_rtb_softlimit; /* preferred limit on RT disk blks */ - u_int64_t d_rtbcount; /* # realtime blocks owned */ - int32_t d_rtbtimer; /* similar to above; for RT disk blks */ - u_int16_t d_rtbwarns; /* # warnings issued wrt RT disk blks */ - int16_t d_padding3; /* padding3 - for future use */ - char d_padding4[8]; /* yet more padding */ + int8_t d_version; /* version of this structure */ + int8_t d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ + uint16_t d_fieldmask; /* field specifier */ + uint32_t d_id; /* user, project, or group ID */ + uint64_t d_blk_hardlimit; /* absolute limit on disk blks */ + uint64_t d_blk_softlimit; /* preferred limit on disk blks */ + uint64_t d_ino_hardlimit; /* maximum # allocated inodes */ + uint64_t d_ino_softlimit; /* preferred inode limit */ + uint64_t d_bcount; /* # disk blocks owned by the user */ + uint64_t d_icount; /* # inodes owned by the user */ + int32_t d_itimer; /* zero if within inode limits */ + int32_t d_btimer; /* similar to above; for disk blocks */ + uint16_t d_iwarns; /* # warnings issued wrt num inodes */ + uint16_t d_bwarns; /* # warnings issued wrt disk blocks */ + int32_t d_padding2; /* padding2 - for future use */ + uint64_t d_rtb_hardlimit; /* absolute limit on realtime blks */ + uint64_t d_rtb_softlimit; /* preferred limit on RT disk blks */ + uint64_t d_rtbcount; /* # realtime blocks owned */ + int32_t d_rtbtimer; /* similar to above; for RT disk blks */ + uint16_t d_rtbwarns; /* # warnings issued wrt RT disk blks */ + int16_t d_padding3; /* padding3 - for future use */ + char d_padding4[8]; /* yet more padding */ }; -/* - * Following flags are used to specify which fields are valid - */ -#define IIF_BGRACE 1 -#define IIF_IGRACE 2 -#define IIF_FLAGS 4 - -#include "xlat/if_dqinfo_valid.h" - struct if_dqinfo { - u_int64_t dqi_bgrace; - u_int64_t dqi_igrace; - u_int32_t dqi_flags; - u_int32_t dqi_valid; + uint64_t dqi_bgrace; + uint64_t dqi_igrace; + uint32_t dqi_flags; + uint32_t dqi_valid; }; struct v2_dqinfo @@ -205,56 +145,79 @@ struct v1_dqstats { - u_int32_t lookups; - u_int32_t drops; - u_int32_t reads; - u_int32_t writes; - u_int32_t cache_hits; - u_int32_t allocated_dquots; - u_int32_t free_dquots; - u_int32_t syncs; + uint32_t lookups; + uint32_t drops; + uint32_t reads; + uint32_t writes; + uint32_t cache_hits; + uint32_t allocated_dquots; + uint32_t free_dquots; + uint32_t syncs; }; struct v2_dqstats { - u_int32_t lookups; - u_int32_t drops; - u_int32_t reads; - u_int32_t writes; - u_int32_t cache_hits; - u_int32_t allocated_dquots; - u_int32_t free_dquots; - u_int32_t syncs; - u_int32_t version; + uint32_t lookups; + uint32_t drops; + uint32_t reads; + uint32_t writes; + uint32_t cache_hits; + uint32_t allocated_dquots; + uint32_t free_dquots; + uint32_t syncs; + uint32_t version; }; typedef struct fs_qfilestat { - u_int64_t qfs_ino; /* inode number */ - u_int64_t qfs_nblks; /* number of BBs 512-byte-blks */ - u_int32_t qfs_nextents; /* number of extents */ + uint64_t qfs_ino; /* inode number */ + uint64_t qfs_nblks; /* number of BBs 512-byte-blks */ + uint32_t qfs_nextents; /* number of extents */ } fs_qfilestat_t; struct xfs_dqstats { - int8_t qs_version; /* version number for future changes */ - u_int16_t qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ - int8_t qs_pad; /* unused */ + int8_t qs_version; /* version number for future changes */ + uint16_t qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ + int8_t qs_pad; /* unused */ fs_qfilestat_t qs_uquota; /* user quota storage information */ fs_qfilestat_t qs_gquota; /* group quota storage information */ - u_int32_t qs_incoredqs; /* number of dquots incore */ - int32_t qs_btimelimit; /* limit for blks timer */ - int32_t qs_itimelimit; /* limit for inodes timer */ + uint32_t qs_incoredqs; /* number of dquots incore */ + int32_t qs_btimelimit; /* limit for blks timer */ + int32_t qs_itimelimit; /* limit for inodes timer */ int32_t qs_rtbtimelimit; /* limit for rt blks timer */ - u_int16_t qs_bwarnlimit; /* limit for num warnings */ - u_int16_t qs_iwarnlimit; /* limit for num warnings */ + uint16_t qs_bwarnlimit; /* limit for num warnings */ + uint16_t qs_iwarnlimit; /* limit for num warnings */ +}; + +struct fs_qfilestatv { + uint64_t qfs_ino, qfs_nblks; + uint32_t qfs_nextents, qfs_pad; +}; + +struct fs_quota_statv { + int8_t qs_version; + uint8_t qs_pad1; + uint16_t qs_flags; + uint32_t qs_incoredqs; + struct fs_qfilestatv qs_uquota; + struct fs_qfilestatv qs_gquota; + struct fs_qfilestatv qs_pquota; + int32_t qs_btimelimit; + int32_t qs_itimelimit; + int32_t qs_rtbtimelimit; + uint16_t qs_bwarnlimit; + uint16_t qs_iwarnlimit; + uint64_t qs_pad2[8]; }; -static void -decode_cmd_data(struct tcb *tcp, u_int32_t cmd, unsigned long data) +static int +decode_cmd_data(struct tcb *tcp, uint32_t cmd, unsigned long data) { switch (cmd) { case Q_GETQUOTA: + if (entering(tcp)) + return 0; case Q_SETQUOTA: { struct if_dqblk dq; @@ -278,7 +241,34 @@ tprints("...}"); break; } + case Q_GETNEXTQUOTA: + { + struct if_nextdqblk dq; + + if (entering(tcp)) + return 0; + if (umove_or_printaddr(tcp, data, &dq)) + break; + tprintf("{bhardlimit=%" PRIu64 ", ", dq.dqb_bhardlimit); + tprintf("bsoftlimit=%" PRIu64 ", ", dq.dqb_bsoftlimit); + tprintf("curspace=%" PRIu64 ", ", dq.dqb_curspace); + tprintf("ihardlimit=%" PRIu64 ", ", dq.dqb_ihardlimit); + tprintf("isoftlimit=%" PRIu64 ", ", dq.dqb_isoftlimit); + tprintf("curinodes=%" PRIu64 ", ", dq.dqb_curinodes); + if (!abbrev(tcp)) { + tprintf("btime=%" PRIu64 ", ", dq.dqb_btime); + tprintf("itime=%" PRIu64 ", ", dq.dqb_itime); + tprints("valid="); + printflags(if_dqblk_valid, + dq.dqb_valid, "QIF_???"); + tprintf(", id=%u}", dq.dqb_id); + } else + tprintf("id=%u, ...}", dq.dqb_id); + break; + } case Q_V1_GETQUOTA: + if (entering(tcp)) + return 0; case Q_V1_SETQUOTA: { struct v1_dqblk dq; @@ -296,6 +286,8 @@ break; } case Q_V2_GETQUOTA: + if (entering(tcp)) + return 0; case Q_V2_SETQUOTA: { struct v2_dqblk dq; @@ -313,6 +305,9 @@ break; } case Q_XGETQUOTA: + case Q_XGETNEXTQUOTA: + if (entering(tcp)) + return 0; case Q_XSETQLIM: { struct xfs_dqblk dq; @@ -322,7 +317,7 @@ tprintf("{version=%d, ", dq.d_version); tprints("flags="); printflags(xfs_dqblk_flags, - dq.d_flags, "XFS_???_QUOTA"); + (uint8_t) dq.d_flags, "XFS_???_QUOTA"); tprintf(", fieldmask=%#x, ", dq.d_fieldmask); tprintf("id=%u, ", dq.d_id); tprintf("blk_hardlimit=%" PRIu64 ", ", dq.d_blk_hardlimit); @@ -345,16 +340,20 @@ } case Q_GETFMT: { - u_int32_t fmt; + uint32_t fmt; + if (entering(tcp)) + return 0; if (umove_or_printaddr(tcp, data, &fmt)) break; - tprints("{"); + tprints("["); printxval(quota_formats, fmt, "QFMT_VFS_???"); - tprints("}"); + tprints("]"); break; } case Q_GETINFO: + if (entering(tcp)) + return 0; case Q_SETINFO: { struct if_dqinfo dq; @@ -363,13 +362,16 @@ break; tprintf("{bgrace=%" PRIu64 ", ", dq.dqi_bgrace); tprintf("igrace=%" PRIu64 ", ", dq.dqi_igrace); - tprintf("flags=%#x, ", dq.dqi_flags); - tprints("valid="); + tprints("flags="); + printflags(if_dqinfo_flags, dq.dqi_flags, "DQF_???"); + tprints(", valid="); printflags(if_dqinfo_valid, dq.dqi_valid, "IIF_???"); tprints("}"); break; } case Q_V2_GETINFO: + if (entering(tcp)) + return 0; case Q_V2_SETINFO: { struct v2_dqinfo dq; @@ -378,8 +380,9 @@ break; tprintf("{bgrace=%u, ", dq.dqi_bgrace); tprintf("igrace=%u, ", dq.dqi_igrace); - tprintf("flags=%#x, ", dq.dqi_flags); - tprintf("blocks=%u, ", dq.dqi_blocks); + tprints("flags="); + printflags(if_dqinfo_flags, dq.dqi_flags, "DQF_???"); + tprintf(", blocks=%u, ", dq.dqi_blocks); tprintf("free_blk=%u, ", dq.dqi_free_blk); tprintf("free_entry=%u}", dq.dqi_free_entry); break; @@ -388,6 +391,8 @@ { struct v1_dqstats dq; + if (entering(tcp)) + return 0; if (umove_or_printaddr(tcp, data, &dq)) break; tprintf("{lookups=%u, ", dq.lookups); @@ -404,6 +409,8 @@ { struct v2_dqstats dq; + if (entering(tcp)) + return 0; if (umove_or_printaddr(tcp, data, &dq)) break; tprintf("{lookups=%u, ", dq.lookups); @@ -421,6 +428,8 @@ { struct xfs_dqstats dq; + if (entering(tcp)) + return 0; if (umove_or_printaddr(tcp, data, &dq)) break; tprintf("{version=%d, ", dq.qs_version); @@ -445,21 +454,56 @@ tprintf("iwarnlimit=%u}", dq.qs_iwarnlimit); break; } + case Q_XGETQSTATV: + { + struct fs_quota_statv dq; + + if (entering(tcp)) + return 0; + if (umove_or_printaddr(tcp, data, &dq)) + break; + tprintf("{version=%d, ", dq.qs_version); + if (abbrev(tcp)) { + tprints("...}"); + break; + } + tprints("flags="); + printflags(xfs_quota_flags, + dq.qs_flags, "XFS_QUOTA_???"); + tprintf(", incoredqs=%u, ", dq.qs_incoredqs); + tprintf("u_ino=%" PRIu64 ", ", dq.qs_uquota.qfs_ino); + tprintf("u_nblks=%" PRIu64 ", ", dq.qs_uquota.qfs_nblks); + tprintf("u_nextents=%u, ", dq.qs_uquota.qfs_nextents); + tprintf("g_ino=%" PRIu64 ", ", dq.qs_gquota.qfs_ino); + tprintf("g_nblks=%" PRIu64 ", ", dq.qs_gquota.qfs_nblks); + tprintf("g_nextents=%u, ", dq.qs_gquota.qfs_nextents); + tprintf("p_ino=%" PRIu64 ", ", dq.qs_pquota.qfs_ino); + tprintf("p_nblks=%" PRIu64 ", ", dq.qs_pquota.qfs_nblks); + tprintf("p_nextents=%u, ", dq.qs_pquota.qfs_nextents); + tprintf("btimelimit=%d, ", dq.qs_btimelimit); + tprintf("itimelimit=%d, ", dq.qs_itimelimit); + tprintf("rtbtimelimit=%d, ", dq.qs_rtbtimelimit); + tprintf("bwarnlimit=%u, ", dq.qs_bwarnlimit); + tprintf("iwarnlimit=%u}", dq.qs_iwarnlimit); + break; + } case Q_XQUOTAON: + case Q_XQUOTAOFF: { - u_int32_t flag; + uint32_t flag; if (umove_or_printaddr(tcp, data, &flag)) break; - tprints("{"); + tprints("["); printflags(xfs_quota_flags, flag, "XFS_QUOTA_???"); - tprints("}"); + tprints("]"); break; } default: printaddr(data); break; } + return RVAL_DECODED; } SYS_FUNC(quotactl) @@ -470,10 +514,10 @@ * will have been sign-extended when we see it. The high 1 bits * don't mean anything, so don't confuse the output with them. */ - u_int32_t qcmd = tcp->u_arg[0]; - u_int32_t cmd = QCMD_CMD(qcmd); - u_int32_t type = QCMD_TYPE(qcmd); - u_int32_t id = tcp->u_arg[2]; + uint32_t qcmd = tcp->u_arg[0]; + uint32_t cmd = QCMD_CMD(qcmd); + uint32_t type = QCMD_TYPE(qcmd); + uint32_t id = tcp->u_arg[2]; if (entering(tcp)) { printxval(quotacmds, cmd, "Q_???"); @@ -483,38 +527,14 @@ printpath(tcp, tcp->u_arg[1]); tprints(", "); switch (cmd) { - case Q_V1_QUOTAON: case Q_QUOTAON: + case Q_V1_QUOTAON: printxval(quota_formats, id, "QFMT_VFS_???"); - break; - case Q_V1_GETQUOTA: - case Q_V2_GETQUOTA: - case Q_GETQUOTA: - case Q_XGETQUOTA: - tprintf("%u", id); - break; - case Q_SETQLIM: - case Q_SETQUOTA: - case Q_V1_SETQUOTA: - case Q_V1_SETUSE: - case Q_V2_SETQUOTA: - case Q_V2_SETUSE: - case Q_XSETQLIM: - tprintf("%u, ", id); - case Q_SETINFO: - case Q_V2_SETFLAGS: - case Q_V2_SETGRACE: - case Q_V2_SETINFO: - decode_cmd_data(tcp, cmd, tcp->u_arg[3]); + tprints(", "); + printpath(tcp, tcp->u_arg[3]); return RVAL_DECODED; - break; - default: - printaddr(tcp->u_arg[2]); - break; } - tprints(", "); - } else { - decode_cmd_data(tcp, cmd, tcp->u_arg[3]); + tprintf("%u, ", id); } - return 0; + return decode_cmd_data(tcp, cmd, tcp->u_arg[3]); } diff -Nru strace-4.11/reboot.c strace-4.12/reboot.c --- strace-4.11/reboot.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/reboot.c 2016-04-26 17:46:44.000000000 +0000 @@ -6,12 +6,16 @@ SYS_FUNC(reboot) { - printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???"); + const unsigned int magic1 = tcp->u_arg[0]; + const unsigned int magic2 = tcp->u_arg[1]; + const unsigned int cmd = tcp->u_arg[2]; + + printflags(bootflags1, magic1, "LINUX_REBOOT_MAGIC_???"); tprints(", "); - printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???"); + printflags(bootflags2, magic2, "LINUX_REBOOT_MAGIC_???"); tprints(", "); - printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???"); - if (tcp->u_arg[2] == (long) LINUX_REBOOT_CMD_RESTART2) { + printflags(bootflags3, cmd, "LINUX_REBOOT_CMD_???"); + if (cmd == LINUX_REBOOT_CMD_RESTART2) { tprints(", "); printstr(tcp, tcp->u_arg[3], -1); } diff -Nru strace-4.11/resource.c strace-4.12/resource.c --- strace-4.11/resource.c 2015-09-16 00:14:55.000000000 +0000 +++ strace-4.12/resource.c 2016-03-17 09:30:45.000000000 +0000 @@ -184,7 +184,7 @@ SYS_FUNC(getpriority) { printxval(priorities, tcp->u_arg[0], "PRIO_???"); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %d", (int) tcp->u_arg[1]); return RVAL_DECODED; } @@ -192,7 +192,7 @@ SYS_FUNC(setpriority) { printxval(priorities, tcp->u_arg[0], "PRIO_???"); - tprintf(", %lu, %d", tcp->u_arg[1], (int) tcp->u_arg[2]); + tprintf(", %d, %d", (int) tcp->u_arg[1], (int) tcp->u_arg[2]); return RVAL_DECODED; } diff -Nru strace-4.11/rtc.c strace-4.12/rtc.c --- strace-4.11/rtc.c 2015-08-18 16:15:33.000000000 +0000 +++ strace-4.12/rtc.c 2016-05-25 16:36:37.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2004 Ulrich Drepper - * Copyright (c) 2004 Dmitry V. Levin + * Copyright (c) 2004-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,9 +27,16 @@ */ #include "defs.h" + +#include DEF_MPERS_TYPE(struct_rtc_pll_info) + #include #include +typedef struct rtc_pll_info struct_rtc_pll_info; + +#include MPERS_DEFS + static void print_rtc_time(struct tcb *tcp, const struct rtc_time *rt) { @@ -49,7 +56,6 @@ { struct rtc_time rt; - tprints(", "); if (!umove_or_printaddr(tcp, addr, &rt)) print_rtc_time(tcp, &rt); } @@ -59,26 +65,37 @@ { struct rtc_wkalrm wk; - tprints(", "); if (!umove_or_printaddr(tcp, addr, &wk)) { - tprintf("{enabled=%d, pending=%d, ", wk.enabled, wk.pending); + tprintf("{enabled=%d, pending=%d, time=", wk.enabled, wk.pending); print_rtc_time(tcp, &wk.time); tprints("}"); } } -int -rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +static void +decode_rtc_pll_info(struct tcb *tcp, const long addr) +{ + struct_rtc_pll_info pll; + + if (!umove_or_printaddr(tcp, addr, &pll)) + tprintf("{pll_ctrl=%d, pll_value=%d, pll_max=%d, pll_min=%d" + ", pll_posmult=%d, pll_negmult=%d, pll_clock=%ld}", + pll.pll_ctrl, pll.pll_value, pll.pll_max, pll.pll_min, + pll.pll_posmult, pll.pll_negmult, (long) pll.pll_clock); +} + +MPERS_PRINTER_DECL(int, rtc_ioctl, struct tcb *tcp, + const unsigned int code, const long arg) { switch (code) { - case RTC_ALM_SET: - case RTC_SET_TIME: - decode_rtc_time(tcp, arg); - break; case RTC_ALM_READ: case RTC_RD_TIME: if (entering(tcp)) return 0; + /* fall through */ + case RTC_ALM_SET: + case RTC_SET_TIME: + tprints(", "); decode_rtc_time(tcp, arg); break; case RTC_IRQP_SET: @@ -92,13 +109,21 @@ tprints(", "); printnum_ulong(tcp, arg); break; + case RTC_WKALM_RD: + if (entering(tcp)) + return 0; + /* fall through */ case RTC_WKALM_SET: + tprints(", "); decode_rtc_wkalrm(tcp, arg); break; - case RTC_WKALM_RD: + case RTC_PLL_GET: if (entering(tcp)) return 0; - decode_rtc_wkalrm(tcp, arg); + /* fall through */ + case RTC_PLL_SET: + tprints(", "); + decode_rtc_pll_info(tcp, arg); break; #ifdef RTC_VL_READ case RTC_VL_READ: @@ -108,6 +133,19 @@ printnum_int(tcp, arg, "%d"); break; #endif + case RTC_AIE_ON: + case RTC_AIE_OFF: + case RTC_UIE_ON: + case RTC_UIE_OFF: + case RTC_PIE_ON: + case RTC_PIE_OFF: + case RTC_WIE_ON: + case RTC_WIE_OFF: +#ifdef RTC_VL_CLR + case RTC_VL_CLR: +#endif + /* no args */ + break; default: return RVAL_DECODED; } diff -Nru strace-4.11/sched.c strace-4.12/sched.c --- strace-4.11/sched.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/sched.c 2016-05-16 22:41:19.000000000 +0000 @@ -39,7 +39,7 @@ if (entering(tcp)) { tprintf("%d", (int) tcp->u_arg[0]); } else if (!syserror(tcp)) { - tcp->auxstr = xlookup(schedulers, tcp->u_rval); + tcp->auxstr = xlookup(schedulers, (unsigned long) tcp->u_rval); if (tcp->auxstr != NULL) return RVAL_STR; } @@ -115,7 +115,7 @@ tprintf("{size=%u, sched_policy=", attr.size); printxval(schedulers, attr.sched_policy, "SCHED_???"); tprints(", sched_flags="); - printflags(sched_flags, attr.sched_flags, "SCHED_FLAG_???"); + printflags64(sched_flags, attr.sched_flags, "SCHED_FLAG_???"); tprintf(", sched_nice=%d", attr.sched_nice); tprintf(", sched_priority=%u", attr.sched_priority); tprintf(", sched_runtime=%" PRIu64, attr.sched_runtime); diff -Nru strace-4.11/scsi.c strace-4.12/scsi.c --- strace-4.11/scsi.c 2015-07-18 00:01:39.000000000 +0000 +++ strace-4.12/scsi.c 2016-05-26 14:44:13.000000000 +0000 @@ -42,29 +42,21 @@ # include "xlat/bsg_subprotocol.h" # endif +static bool +print_uchar(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + tprintf("%02x", (unsigned int) (* (unsigned char *) elem_buf)); + + return true; +} + static void -print_sg_io_buffer(struct tcb *tcp, unsigned long addr, const unsigned int len) +print_sg_io_buffer(struct tcb *tcp, const unsigned long addr, const unsigned int len) { - unsigned char *buf = NULL; - unsigned int allocated, i; + unsigned char buf; - tprints("["); - if (len == 0) - goto out; - allocated = (len > max_strlen) ? max_strlen : len; - buf = malloc(allocated); - if (!buf || umoven(tcp, addr, allocated, buf) < 0) { - printaddr(addr); - goto out; - } - tprintf("%02x", buf[0]); - for (i = 1; i < allocated; ++i) - tprintf(", %02x", buf[i]); - if (allocated != len) - tprints(", ..."); -out: - free(buf); - tprints("]"); + print_array(tcp, addr, len, &buf, sizeof(buf), + umoven_or_printaddr, print_uchar, 0); } static int @@ -154,7 +146,7 @@ printxval(bsg_subprotocol, sg_io.subprotocol, "BSG_SUB_PROTOCOL_???"); tprintf(", request[%u]=", sg_io.request_len); print_sg_io_buffer(tcp, sg_io.request, sg_io.request_len); - tprintf(", request_tag=%llu", (unsigned long long) sg_io.request_tag); + tprintf(", request_tag=%" PRI__u64, sg_io.request_tag); tprintf(", request_attr=%u", sg_io.request_attr); tprintf(", request_priority=%u", sg_io.request_priority); tprintf(", request_extra=%u", sg_io.request_extra); @@ -166,7 +158,7 @@ tprintf(", din_xfer_len=%u", sg_io.din_xfer_len); tprintf(", timeout=%u", sg_io.timeout); tprintf(", flags=%u", sg_io.flags); - tprintf(", usr_ptr=%llu", (unsigned long long) sg_io.usr_ptr); + tprintf(", usr_ptr=%" PRI__u64, sg_io.usr_ptr); tprintf(", spare_in=%u", sg_io.spare_in); tprintf(", dout[%u]=", sg_io.dout_xfer_len); if (sg_io.dout_iovec_count) @@ -208,7 +200,7 @@ tprintf(", response_len=%u", sg_io.response_len); tprintf(", din_resid=%u", sg_io.din_resid); tprintf(", dout_resid=%u", sg_io.dout_resid); - tprintf(", generated_tag=%llu", (unsigned long long) sg_io.generated_tag); + tprintf(", generated_tag=%" PRI__u64, sg_io.generated_tag); tprintf(", spare_out=%u", sg_io.spare_out); } diff -Nru strace-4.11/seccomp.c strace-4.12/seccomp.c --- strace-4.11/seccomp.c 2015-09-20 00:02:26.000000000 +0000 +++ strace-4.12/seccomp.c 2016-05-12 14:35:02.000000000 +0000 @@ -68,46 +68,48 @@ switch (BPF_CLASS(code)) { case BPF_LD: case BPF_LDX: - tprints(" | "); + tprints("|"); printxval(bpf_size, BPF_SIZE(code), "BPF_???"); - tprints(" | "); + tprints("|"); printxval(bpf_mode, BPF_MODE(code), "BPF_???"); break; case BPF_ST: case BPF_STX: if (i) - tprintf(" | %#x /* %s */", i, "BPF_???"); + tprintf("|%#x /* %s */", i, "BPF_???"); break; case BPF_ALU: - tprints(" | "); + tprints("|"); printxval(bpf_src, BPF_SRC(code), "BPF_???"); - tprints(" | "); + tprints("|"); printxval(bpf_op_alu, BPF_OP(code), "BPF_???"); break; case BPF_JMP: - tprints(" | "); + tprints("|"); printxval(bpf_src, BPF_SRC(code), "BPF_???"); - tprints(" | "); + tprints("|"); printxval(bpf_op_jmp, BPF_OP(code), "BPF_???"); break; case BPF_RET: - tprints(" | "); + tprints("|"); printxval(bpf_rval, BPF_RVAL(code), "BPF_???"); i &= ~BPF_RVAL(code); if (i) - tprintf(" | %#x /* %s */", i, "BPF_???"); + tprintf("|%#x /* %s */", i, "BPF_???"); break; case BPF_MISC: - tprints(" | "); + tprints("|"); printxval(bpf_miscop, BPF_MISCOP(code), "BPF_???"); i &= ~BPF_MISCOP(code); if (i) - tprintf(" | %#x /* %s */", i, "BPF_???"); + tprintf("|%#x /* %s */", i, "BPF_???"); break; } } +#endif /* HAVE_LINUX_FILTER_H */ + static void decode_bpf_stmt(const struct bpf_filter *filter) { @@ -121,7 +123,7 @@ printxval(seccomp_ret_action, action, "SECCOMP_RET_???"); if (data) - tprintf(" | %#x)", data); + tprintf("|%#x)", data); else tprints(")"); } else { @@ -146,47 +148,40 @@ #endif /* HAVE_LINUX_FILTER_H */ } -static void -decode_filter(const struct bpf_filter *filter) +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +static bool +print_bpf_filter(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { + const struct bpf_filter *filter = elem_buf; + unsigned int *pn = data; + + if ((*pn)++ >= BPF_MAXINSNS) { + tprints("..."); + return false; + } + if (filter->jt || filter->jf) decode_bpf_jump(filter); else decode_bpf_stmt(filter); -} - -#endif /* HAVE_LINUX_FILTER_H */ -#ifndef BPF_MAXINSNS -# define BPF_MAXINSNS 4096 -#endif + return true; +} -static void -decode_fprog(struct tcb *tcp, unsigned short len, unsigned long addr) +void +print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len) { - if (!len || abbrev(tcp)) { - tprintf("{len = %u, filter = ", len); + if (abbrev(tcp)) { printaddr(addr); - tprints("}"); } else { - unsigned int i = 0; - - tprints("["); - while (i < len && i < BPF_MAXINSNS) { - struct bpf_filter filter; - - if (umove(tcp, addr, &filter) < 0) - break; - if (i) - tprints(", "); - decode_filter(&filter); + unsigned int insns = 0; + struct bpf_filter filter; - addr += sizeof(filter); - ++i; - } - if (i < len) - tprints("..."); - tprints("]"); + print_array(tcp, addr, len, &filter, sizeof(filter), + umoven_or_printaddr, print_bpf_filter, &insns); } } @@ -197,8 +192,11 @@ { struct seccomp_fprog fprog; - if (fetch_seccomp_fprog(tcp, addr, &fprog)) - decode_fprog(tcp, fprog.len, fprog.filter); + if (fetch_seccomp_fprog(tcp, addr, &fprog)) { + tprintf("{len=%hu, filter=", fprog.len); + print_seccomp_fprog(tcp, fprog.filter, fprog.len); + tprints("}"); + } } static void diff -Nru strace-4.11/sigevent.h strace-4.12/sigevent.h --- strace-4.11/sigevent.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/sigevent.h 2016-01-12 03:07:39.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SIGEVENT_H_ +#define SIGEVENT_H_ + +typedef struct { + union { + int sival_int; + unsigned long sival_ptr; + } sigev_value; + int sigev_signo; + int sigev_notify; + union { + int tid; + struct { + unsigned long function; + unsigned long attribute; + } sigev_thread; + } sigev_un; +} struct_sigevent; + +#endif diff -Nru strace-4.11/signal.c strace-4.12/signal.c --- strace-4.11/signal.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/signal.c 2016-04-27 14:04:55.000000000 +0000 @@ -124,7 +124,7 @@ if (s < nsignals) return signalent[s]; #ifdef ASM_SIGRTMAX - if (s >= ASM_SIGRTMIN && s <= ASM_SIGRTMAX) { + if (s >= ASM_SIGRTMIN && s <= (unsigned int) ASM_SIGRTMAX) { sprintf(buf, "SIGRT_%u", s - ASM_SIGRTMIN); return buf; } @@ -223,28 +223,29 @@ tprints(signame(nr)); } -void -print_sigset_addr_len(struct tcb *tcp, long addr, long len) +static void +print_sigset_addr_len_limit(struct tcb *tcp, long addr, long len, long min_len) { - char mask[NSIG / 8]; - - /* Here len is usually equals NSIG / 8 or current_wordsize. + /* + * Here len is usually equal to NSIG / 8 or current_wordsize. * But we code this defensively: */ - if (len < 0) { + if (len < min_len || len > NSIG / 8) { printaddr(addr); return; } - if (len >= NSIG / 8) - len = NSIG / 8; - else - len = (len + 3) & ~3; - + int mask[NSIG / 8 / sizeof(int)] = {}; if (umoven_or_printaddr(tcp, addr, len, mask)) return; tprints(sprintsigmask_n("", mask, len)); } +void +print_sigset_addr_len(struct tcb *tcp, long addr, long len) +{ + print_sigset_addr_len_limit(tcp, addr, len, current_wordsize); +} + SYS_FUNC(sigsetmask) { if (entering(tcp)) { @@ -450,8 +451,8 @@ SYS_FUNC(kill) { - tprintf("%ld, %s", - widen_to_long(tcp->u_arg[0]), + tprintf("%d, %s", + (int) tcp->u_arg[0], signame(tcp->u_arg[1])); return RVAL_DECODED; @@ -459,9 +460,9 @@ SYS_FUNC(tgkill) { - tprintf("%ld, %ld, %s", - widen_to_long(tcp->u_arg[0]), - widen_to_long(tcp->u_arg[1]), + tprintf("%d, %d, %s", + (int) tcp->u_arg[0], + (int) tcp->u_arg[1], signame(tcp->u_arg[2])); return RVAL_DECODED; @@ -613,7 +614,8 @@ * This allows non-rt sigpending() syscall * to reuse rt_sigpending() code in kernel. */ - print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[1]); + print_sigset_addr_len_limit(tcp, tcp->u_arg[0], + tcp->u_arg[1], 1); tprintf(", %lu", tcp->u_arg[1]); } return 0; @@ -638,7 +640,7 @@ SYS_FUNC(rt_sigqueueinfo) { - tprintf("%lu, ", tcp->u_arg[0]); + tprintf("%d, ", (int) tcp->u_arg[0]); print_sigqueueinfo(tcp, tcp->u_arg[1], tcp->u_arg[2]); return RVAL_DECODED; @@ -646,7 +648,7 @@ SYS_FUNC(rt_tgsigqueueinfo) { - tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + tprintf("%d, %d, ", (int) tcp->u_arg[0], (int) tcp->u_arg[1]); print_sigqueueinfo(tcp, tcp->u_arg[2], tcp->u_arg[3]); return RVAL_DECODED; @@ -658,32 +660,30 @@ if (entering(tcp)) { print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[3]); tprints(", "); - /* This is the only "return" parameter, */ - if (tcp->u_arg[1] != 0) - return 0; - /* ... if it's NULL, can decode all on entry */ - tprints("NULL, "); - } - else if (tcp->u_arg[1] != 0) { - /* syscall exit, and u_arg[1] wasn't NULL */ - printsiginfo_at(tcp, tcp->u_arg[1]); - tprints(", "); - } - else { - /* syscall exit, and u_arg[1] was NULL */ - return 0; - } - - /* - * Since the timeout parameter is read by the kernel - * on entering syscall, it has to be decoded the same way - * whether the syscall has failed or not. - */ - temporarily_clear_syserror(tcp); - print_timespec(tcp, tcp->u_arg[2]); - restore_cleared_syserror(tcp); + if (!tcp->u_arg[1]) { + /* + * This is the only "return" parameter, + * if it's NULL, decode all parameters on entry. + */ + tprints("NULL, "); + print_timespec(tcp, tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[3]); + tcp->auxstr = NULL; + } else { + tcp->auxstr = sprint_timespec(tcp, tcp->u_arg[2]); + } + } else { + if (tcp->auxstr) { + printsiginfo_at(tcp, tcp->u_arg[1]); + tprintf(", %s, %lu", tcp->auxstr, tcp->u_arg[3]); + tcp->auxstr = NULL; + } - tprintf(", %lu", tcp->u_arg[3]); + if (!syserror(tcp) && tcp->u_rval) { + tcp->auxstr = signame(tcp->u_rval); + return RVAL_STR; + } + } return 0; }; diff -Nru strace-4.11/sock.c strace-4.12/sock.c --- strace-4.11/sock.c 2015-07-12 22:31:49.000000000 +0000 +++ strace-4.12/sock.c 2016-05-16 22:41:19.000000000 +0000 @@ -27,15 +27,11 @@ #include "defs.h" #include +#if defined ALPHA || defined SH || defined SH64 +# include +#endif #include #include -#if defined(ALPHA) || defined(SH) || defined(SH64) -# if defined(HAVE_SYS_IOCTL_H) -# include -# elif defined(HAVE_IOCTLS_H) -# include -# endif -#endif #include #include "xlat/iffflags.h" @@ -101,7 +97,7 @@ case SIOCSIFFLAGS: case SIOCGIFFLAGS: tprints("ifr_flags="); - printflags(iffflags, ifr->ifr_flags, "IFF_???"); + printflags(iffflags, (unsigned short) ifr->ifr_flags, "IFF_???"); break; case SIOCSIFMETRIC: case SIOCGIFMETRIC: diff -Nru strace-4.11/socketutils.c strace-4.12/socketutils.c --- strace-4.11/socketutils.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/socketutils.c 2016-05-21 09:33:12.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2014 Zubin Mithra - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,9 @@ #include #include #include +#include #include +#include "xlat/netlink_protocols.h" #if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG # define NETLINK_SOCK_DIAG NETLINK_INET_DIAG @@ -45,33 +47,50 @@ # define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path) #endif +typedef struct { + unsigned long inode; + char *details; +} cache_entry; + +#define CACHE_SIZE 1024U +static cache_entry cache[CACHE_SIZE]; +#define CACHE_MASK (CACHE_SIZE - 1) + +static int +cache_and_print_inode_details(const unsigned long inode, char *const details) +{ + cache_entry *e = &cache[inode & CACHE_MASK]; + free(e->details); + e->inode = inode; + e->details = details; + + tprints(details); + return 1; +} + +bool +print_sockaddr_by_inode_cached(const unsigned long inode) +{ + const cache_entry *const e = &cache[inode & CACHE_MASK]; + if (e && inode == e->inode) { + tprints(e->details); + return true; + } + return false; +} + static bool -inet_send_query(const int fd, const int family, const int proto) +send_query(const int fd, void *req, size_t req_size) { struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; - struct { - struct nlmsghdr nlh; - struct inet_diag_req_v2 idr; - } req = { - .nlh = { - .nlmsg_len = sizeof(req), - .nlmsg_type = SOCK_DIAG_BY_FAMILY, - .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST - }, - .idr = { - .sdiag_family = family, - .sdiag_protocol = proto, - .idiag_states = -1 - } - }; struct iovec iov = { - .iov_base = &req, - .iov_len = sizeof(req) + .iov_base = req, + .iov_len = req_size }; - struct msghdr msg = { - .msg_name = (void*)&nladdr, + const struct msghdr msg = { + .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -88,15 +107,38 @@ } static bool -inet_parse_response(const char *proto_name, const void *data, int data_len, - const unsigned long inode) +inet_send_query(const int fd, const int family, const int proto) +{ + struct { + const struct nlmsghdr nlh; + const struct inet_diag_req_v2 idr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .idr = { + .sdiag_family = family, + .sdiag_protocol = proto, + .idiag_states = -1 + } + }; + return send_query(fd, &req, sizeof(req)); +} + +static int +inet_parse_response(const char *const proto_name, const void *const data, + const int data_len, const unsigned long inode) { - const struct inet_diag_msg *diag_msg = data; + const struct inet_diag_msg *const diag_msg = data; static const char zero_addr[sizeof(struct in6_addr)]; socklen_t addr_size, text_size; + if (data_len < (int) NLMSG_LENGTH(sizeof(*diag_msg))) + return -1; if (diag_msg->idiag_inode != inode) - return false; + return 0; switch(diag_msg->idiag_family) { case AF_INET: @@ -108,14 +150,15 @@ text_size = INET6_ADDRSTRLEN; break; default: - return false; + return -1; } char src_buf[text_size]; + char *details; if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_src, src_buf, text_size)) - return false; + return -1; if (diag_msg->id.idiag_dport || memcmp(zero_addr, diag_msg->id.idiag_dst, addr_size)) { @@ -123,63 +166,70 @@ if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst, dst_buf, text_size)) - return false; + return -1; - tprintf("%s:[%s:%u->%s:%u]", - proto_name, - src_buf, ntohs(diag_msg->id.idiag_sport), - dst_buf, ntohs(diag_msg->id.idiag_dport)); + if (asprintf(&details, "%s:[%s:%u->%s:%u]", proto_name, + src_buf, ntohs(diag_msg->id.idiag_sport), + dst_buf, ntohs(diag_msg->id.idiag_dport)) < 0) + return false; } else { - tprintf("%s:[%s:%u]", proto_name, src_buf, - ntohs(diag_msg->id.idiag_sport)); + if (asprintf(&details, "%s:[%s:%u]", proto_name, src_buf, + ntohs(diag_msg->id.idiag_sport)) < 0) + return false; } - return true; + return cache_and_print_inode_details(inode, details); } static bool receive_responses(const int fd, const unsigned long inode, const char *proto_name, - bool (* parser) (const char *, const void *, int, const unsigned long)) + int (* parser) (const char *, const void *, + int, unsigned long)) { - static long buf[8192 / sizeof(long)]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; + int flags = 0; for (;;) { - ssize_t ret; - struct nlmsghdr *h; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - ret = recvmsg(fd, &msg, 0); + ssize_t ret = recvmsg(fd, &msg, flags); if (ret < 0) { if (errno == EINTR) continue; return false; } - if (!ret) + + const struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) return false; - for (h = (struct nlmsghdr*)buf; - NLMSG_OK(h, ret); - h = NLMSG_NEXT(h, ret)) { - switch (h->nlmsg_type) { - case NLMSG_DONE: - case NLMSG_ERROR: - return false; - } - if (parser(proto_name, NLMSG_DATA(h), h->nlmsg_len, inode)) + for (; NLMSG_OK(h, ret); h = NLMSG_NEXT(h, ret)) { + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + return false; + const int rc = parser(proto_name, NLMSG_DATA(h), + h->nlmsg_len, inode); + if (rc > 0) return true; + if (rc < 0) + return false; } + flags = MSG_DONTWAIT; } } @@ -194,12 +244,9 @@ static bool unix_send_query(const int fd, const unsigned long inode) { - struct sockaddr_nl nladdr = { - .nl_family = AF_NETLINK - }; struct { - struct nlmsghdr nlh; - struct unix_diag_req udr; + const struct nlmsghdr nlh; + const struct unix_diag_req udr; } req = { .nlh = { .nlmsg_len = sizeof(req), @@ -213,30 +260,12 @@ .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER } }; - struct iovec iov = { - .iov_base = &req, - .iov_len = sizeof(req) - }; - struct msghdr msg = { - .msg_name = (void*)&nladdr, - .msg_namelen = sizeof(nladdr), - .msg_iov = &iov, - .msg_iovlen = 1 - }; - - for (;;) { - if (sendmsg(fd, &msg, 0) < 0) { - if (errno == EINTR) - continue; - return false; - } - return true; - } + return send_query(fd, &req, sizeof(req)); } -static bool -unix_parse_response(const char *proto_name, const void *data, int data_len, - const unsigned long inode) +static int +unix_parse_response(const char *proto_name, const void *data, + const int data_len, const unsigned long inode) { const struct unix_diag_msg *diag_msg = data; struct rtattr *attr; @@ -245,10 +274,12 @@ size_t path_len = 0; char path[UNIX_PATH_MAX + 1]; + if (rta_len < 0) + return -1; if (diag_msg->udiag_ino != inode) - return false; + return 0; if (diag_msg->udiag_family != AF_UNIX) - return false; + return -1; for (attr = (struct rtattr *) (diag_msg + 1); RTA_OK(attr, rta_len); @@ -265,7 +296,7 @@ break; case UNIX_DIAG_PEER: if (RTA_PAYLOAD(attr) >= 4) - peer = *(uint32_t *)RTA_DATA(attr); + peer = *(uint32_t *) RTA_DATA(attr); break; } } @@ -274,75 +305,177 @@ * print obtained information in the following format: * "UNIX:[" SELF_INODE [ "->" PEER_INODE ][ "," SOCKET_FILE ] "]" */ - if (peer || path_len) { - tprintf("%s:[%lu", proto_name, inode); - if (peer) - tprintf("->%u", peer); - if (path_len) { - if (path[0] == '\0') { - tprints(",@"); - print_quoted_string(path + 1, path_len, - QUOTE_0_TERMINATED); - } else { - tprints(","); - print_quoted_string(path, path_len + 1, - QUOTE_0_TERMINATED); - } + if (!peer && !path_len) + return -1; + + char peer_str[3 + sizeof(peer) * 3]; + if (peer) + snprintf(peer_str, sizeof(peer_str), "->%u", peer); + else + peer_str[0] = '\0'; + + const char *path_str; + if (path_len) { + char *outstr = alloca(4 * path_len + 4); + + outstr[0] = ','; + if (path[0] == '\0') { + outstr[1] = '@'; + string_quote(path + 1, outstr + 2, + path_len - 1, QUOTE_0_TERMINATED); + } else { + string_quote(path, outstr + 1, + path_len, QUOTE_0_TERMINATED); } - tprints("]"); - return true; + path_str = outstr; + } else { + path_str = ""; } - else - return false; + + char *details; + if (asprintf(&details, "%s:[%lu%s%s]", proto_name, inode, + peer_str, path_str) < 0) + return -1; + + return cache_and_print_inode_details(inode, details); +} + +static bool +netlink_send_query(const int fd, const unsigned long inode) +{ + struct { + const struct nlmsghdr nlh; + const struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + return send_query(fd, &req, sizeof(req)); +} + +static int +netlink_parse_response(const char *proto_name, const void *data, + const int data_len, const unsigned long inode) +{ + const struct netlink_diag_msg *const diag_msg = data; + const char *netlink_proto; + char *details; + + if (data_len < (int) NLMSG_LENGTH(sizeof(*diag_msg))) + return -1; + if (diag_msg->ndiag_ino != inode) + return 0; + + if (diag_msg->ndiag_family != AF_NETLINK) + return -1; + + netlink_proto = xlookup(netlink_protocols, + diag_msg->ndiag_protocol); + + if (netlink_proto) { + static const char netlink_prefix[] = "NETLINK_"; + const size_t netlink_prefix_len = + sizeof(netlink_prefix) -1; + if (strncmp(netlink_proto, netlink_prefix, + netlink_prefix_len) == 0) + netlink_proto += netlink_prefix_len; + if (asprintf(&details, "%s:[%s:%u]", proto_name, + netlink_proto, diag_msg->ndiag_portid) < 0) + return -1; + } else { + if (asprintf(&details, "%s:[%u]", proto_name, + (unsigned) diag_msg->ndiag_protocol) < 0) + return -1; + } + + return cache_and_print_inode_details(inode, details); } static bool -unix_print(int fd, const unsigned long inode) +unix_print(const int fd, const unsigned long inode) { return unix_send_query(fd, inode) && receive_responses(fd, inode, "UNIX", unix_parse_response); } +static bool +tcp_v4_print(const int fd, const unsigned long inode) +{ + return inet_print(fd, AF_INET, IPPROTO_TCP, inode, "TCP"); +} + +static bool +udp_v4_print(const int fd, const unsigned long inode) +{ + return inet_print(fd, AF_INET, IPPROTO_UDP, inode, "UDP"); +} + +static bool +tcp_v6_print(const int fd, const unsigned long inode) +{ + return inet_print(fd, AF_INET6, IPPROTO_TCP, inode, "TCPv6"); +} + +static bool +udp_v6_print(const int fd, const unsigned long inode) +{ + return inet_print(fd, AF_INET6, IPPROTO_UDP, inode, "UDPv6"); +} + +static bool +netlink_print(const int fd, const unsigned long inode) +{ + return netlink_send_query(fd, inode) + && receive_responses(fd, inode, "NETLINK", + netlink_parse_response); +} + /* Given an inode number of a socket, print out the details * of the ip address and port. */ bool -print_sockaddr_by_inode(const unsigned long inode, const char *proto_name) +print_sockaddr_by_inode(const unsigned long inode, const char *const proto_name) { - int fd; - bool r = false; + static const struct { + const char *const name; + bool (*const print)(int, unsigned long); + } protocols[] = { + { "TCP", tcp_v4_print }, + { "UDP", udp_v4_print }, + { "TCPv6", tcp_v6_print }, + { "UDPv6", udp_v6_print }, + { "UNIX", unix_print }, + { "NETLINK", netlink_print } + }; - fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); if (fd < 0) return false; + bool r = false; + unsigned int i; if (proto_name) { - if (strcmp(proto_name, "TCP") == 0) - r = inet_print(fd, AF_INET, IPPROTO_TCP, inode, "TCP"); - else if (strcmp(proto_name, "UDP") == 0) - r = inet_print(fd, AF_INET, IPPROTO_UDP, inode, "UDP"); - else if (strcmp(proto_name, "TCPv6") == 0) - r = inet_print(fd, AF_INET6, IPPROTO_TCP, inode, "TCPv6"); - else if (strcmp(proto_name, "UDPv6") == 0) - r = inet_print(fd, AF_INET6, IPPROTO_UDP, inode, "UDPv6"); - else if (strcmp(proto_name, "UNIX") == 0) - r = unix_print(fd, inode); - } else { - const struct { - const int family; - const int protocol; - const char *name; - } protocols[] = { - { AF_INET, IPPROTO_TCP, "TCP" }, - { AF_INET, IPPROTO_UDP, "UDP" }, - { AF_INET6, IPPROTO_TCP, "TCPv6" }, - { AF_INET6, IPPROTO_UDP, "UDPv6" } - }; - size_t i; + for (i = 0; i < ARRAY_SIZE(protocols); ++i) { + if (strcmp(proto_name, protocols[i].name) == 0) { + r = protocols[i].print(fd, inode); + break; + } + } + if (!r) { + tprintf("%s:[%lu]", proto_name, inode); + r = true; + } + } else { for (i = 0; i < ARRAY_SIZE(protocols); ++i) { - if ((r = inet_print(fd, protocols[i].family, - protocols[i].protocol, inode, - protocols[i].name))) + if ((r = protocols[i].print(fd, inode))) break; } } diff -Nru strace-4.11/sram_alloc.c strace-4.12/sram_alloc.c --- strace-4.11/sram_alloc.c 2015-07-16 23:44:57.000000000 +0000 +++ strace-4.12/sram_alloc.c 2016-05-17 08:03:58.000000000 +0000 @@ -11,7 +11,7 @@ /* size */ tprintf("%lu, ", tcp->u_arg[0]); /* flags */ - printflags(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); + printflags_long(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); return RVAL_DECODED | RVAL_HEX; } diff -Nru strace-4.11/statfs64.c strace-4.12/statfs64.c --- strace-4.11/statfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/statfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,14 @@ +#include "defs.h" + +SYS_FUNC(statfs64) +{ + const unsigned long size = tcp->u_arg[1]; + + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", %lu, ", size); + } else { + print_struct_statfs64(tcp, tcp->u_arg[2], size); + } + return 0; +} diff -Nru strace-4.11/statfs.c strace-4.12/statfs.c --- strace-4.11/statfs.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/statfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -1,83 +1,4 @@ -/* - * Copyright (c) 1991, 1992 Paul Kranenburg - * Copyright (c) 1993 Branko Lankester - * Copyright (c) 1993-1996 Rick Sladkey - * Copyright (c) 1996-1999 Wichert Akkerman - * Copyright (c) 2003 Ulrich Drepper - * Copyright (c) 2012 Andreas Schwab - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - #include "defs.h" -#ifdef HAVE_SYS_VFS_H -# include -#endif -#include "xlat/fsmagic.h" - -static const char * -sprintfstype(const unsigned int magic) -{ - static char buf[32]; - const char *s; - - s = xlat_search(fsmagic, ARRAY_SIZE(fsmagic), magic); - if (s) { - sprintf(buf, "\"%s\"", s); - return buf; - } - sprintf(buf, "%#x", magic); - return buf; -} - -static void -printstatfs(struct tcb *tcp, const long addr) -{ - struct statfs statbuf; - - if (umove_or_printaddr(tcp, addr, &statbuf)) - return; - tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ", - sprintfstype(statbuf.f_type), - (unsigned long)statbuf.f_bsize, - (unsigned long)statbuf.f_blocks, - (unsigned long)statbuf.f_bfree); - tprintf("f_bavail=%lu, f_files=%lu, f_ffree=%lu, f_fsid={%d, %d}", - (unsigned long)statbuf.f_bavail, - (unsigned long)statbuf.f_files, - (unsigned long)statbuf.f_ffree, - statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); - tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); -#ifdef _STATFS_F_FRSIZE - tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize); -#endif -#ifdef _STATFS_F_FLAGS - tprintf(", f_flags=%lu", (unsigned long)statbuf.f_flags); -#endif - tprints("}"); -} SYS_FUNC(statfs) { @@ -85,151 +6,7 @@ printpath(tcp, tcp->u_arg[0]); tprints(", "); } else { - printstatfs(tcp, tcp->u_arg[1]); - } - return 0; -} - -SYS_FUNC(fstatfs) -{ - if (entering(tcp)) { - printfd(tcp, tcp->u_arg[0]); - tprints(", "); - } else { - printstatfs(tcp, tcp->u_arg[1]); - } - return 0; -} - -#ifdef HAVE_STRUCT_STATFS64 -static void -printstatfs64(struct tcb *tcp, long addr) -{ - struct statfs64 statbuf; - - if (umove_or_printaddr(tcp, addr, &statbuf)) - return; - tprintf("{f_type=%s, f_bsize=%llu, f_blocks=%llu, f_bfree=%llu, ", - sprintfstype(statbuf.f_type), - (unsigned long long)statbuf.f_bsize, - (unsigned long long)statbuf.f_blocks, - (unsigned long long)statbuf.f_bfree); - tprintf("f_bavail=%llu, f_files=%llu, f_ffree=%llu, f_fsid={%d, %d}", - (unsigned long long)statbuf.f_bavail, - (unsigned long long)statbuf.f_files, - (unsigned long long)statbuf.f_ffree, - statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); - tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); -#ifdef _STATFS_F_FRSIZE - tprintf(", f_frsize=%llu", (unsigned long long)statbuf.f_frsize); -#endif -#ifdef _STATFS_F_FLAGS - tprintf(", f_flags=%llu", (unsigned long long)statbuf.f_flags); -#endif - tprints("}"); -} - -struct compat_statfs64 { - uint32_t f_type; - uint32_t f_bsize; - uint64_t f_blocks; - uint64_t f_bfree; - uint64_t f_bavail; - uint64_t f_files; - uint64_t f_ffree; - fsid_t f_fsid; - uint32_t f_namelen; - uint32_t f_frsize; - uint32_t f_flags; - uint32_t f_spare[4]; -} -#if defined AARCH64 || defined X86_64 || defined X32 || defined IA64 - ATTRIBUTE_PACKED ATTRIBUTE_ALIGNED(4) -#endif -; -#if defined AARCH64 || defined ARM -/* See arch/arm/kernel/sys_oabi-compat.c for details. */ -# define COMPAT_STATFS64_PADDED_SIZE (sizeof(struct compat_statfs64) + 4) -#endif - -static void -printcompat_statfs64(struct tcb *tcp, const long addr) -{ - struct compat_statfs64 statbuf; - - if (umove_or_printaddr(tcp, addr, &statbuf)) - return; - tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%llu, f_bfree=%llu, ", - sprintfstype(statbuf.f_type), - (unsigned long)statbuf.f_bsize, - (unsigned long long)statbuf.f_blocks, - (unsigned long long)statbuf.f_bfree); - tprintf("f_bavail=%llu, f_files=%llu, f_ffree=%llu, f_fsid={%d, %d}", - (unsigned long long)statbuf.f_bavail, - (unsigned long long)statbuf.f_files, - (unsigned long long)statbuf.f_ffree, - statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); - tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); - tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize); - tprintf(", f_flags=%lu}", (unsigned long)statbuf.f_frsize); -} - -static int -do_statfs64_fstatfs64(struct tcb *tcp) -{ - if (entering(tcp)) { - tprintf(", %lu, ", tcp->u_arg[1]); - } else { - if (tcp->u_arg[1] == sizeof(struct statfs64)) - printstatfs64(tcp, tcp->u_arg[2]); - else if (tcp->u_arg[1] == sizeof(struct compat_statfs64) -#ifdef COMPAT_STATFS64_PADDED_SIZE - || tcp->u_arg[1] == COMPAT_STATFS64_PADDED_SIZE -#endif - ) - printcompat_statfs64(tcp, tcp->u_arg[2]); - else - tprints("{???}"); - } - return 0; -} - -SYS_FUNC(statfs64) -{ - if (entering(tcp)) - printpath(tcp, tcp->u_arg[0]); - return do_statfs64_fstatfs64(tcp); -} - -SYS_FUNC(fstatfs64) -{ - if (entering(tcp)) - printfd(tcp, tcp->u_arg[0]); - return do_statfs64_fstatfs64(tcp); -} -#endif /* HAVE_STRUCT_STATFS64 */ - -#ifdef ALPHA -SYS_FUNC(osf_statfs) -{ - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprints(", "); - } else { - printstatfs(tcp, tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); - } - return 0; -} - -SYS_FUNC(osf_fstatfs) -{ - if (entering(tcp)) { - tprintf("%lu, ", tcp->u_arg[0]); - } else { - printstatfs(tcp, tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + print_struct_statfs(tcp, tcp->u_arg[1]); } return 0; } -#endif /* ALPHA */ diff -Nru strace-4.11/statfs.h strace-4.12/statfs.h --- strace-4.11/statfs.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/statfs.h 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_STATFS_H +#define STRACE_STATFS_H + +struct strace_statfs { + unsigned long long f_type; + unsigned long long f_bsize; + unsigned long long f_blocks; + unsigned long long f_bfree; + unsigned long long f_bavail; + unsigned long long f_files; + unsigned long long f_ffree; + unsigned long f_fsid[2]; + unsigned long long f_namelen; + unsigned long long f_frsize; + unsigned long long f_flags; +}; + +#endif /* STRACE_STATFS_H */ diff -Nru strace-4.11/strace.1 strace-4.12/strace.1 --- strace-4.11/strace.1 2015-12-09 15:59:15.000000000 +0000 +++ strace-4.12/strace.1 2016-05-26 15:34:28.000000000 +0000 @@ -325,7 +325,7 @@ Print paths associated with file descriptor arguments. .TP .B \-yy -Print ip:port pairs associated with socket file descriptors. +Print protocol specific information associated with socket file descriptors. .TP .BI "\-a " column Align return values in a specific column (default column 40). @@ -530,12 +530,17 @@ leaving it (them) to continue running. Multiple .B \-p -options can be used to attach to many processes. --p "`pidof PROG`" syntax is supported. +options can be used to attach to many processes in addition to +.I command +(which is optional if at least one +.B \-p +option is given). +.B \-p +"`pidof PROG`" syntax is supported. .TP .BI "\-P " path Trace only system calls accessing -.I path. +.IR path . Multiple .B \-P options can be used to specify several paths. diff -Nru strace-4.11/strace.c strace-4.12/strace.c --- strace-4.11/strace.c 2015-11-26 23:38:59.000000000 +0000 +++ strace-4.12/strace.c 2016-05-26 15:34:28.000000000 +0000 @@ -218,7 +218,7 @@ -x print non-ascii strings in hex\n\ -xx print all strings in hex\n\ -y print paths associated with file descriptor arguments\n\ - -yy print ip:port pairs associated with socket file descriptors\n\ + -yy print protocol specific information associated with socket file descriptors\n\ \n\ Statistics:\n\ -c count time, calls, and errors for each syscall and report summary\n\ @@ -691,19 +691,25 @@ static void expand_tcbtab(void) { - /* Allocate some more TCBs and expand the table. + /* Allocate some (more) TCBs (and expand the table). We don't want to relocate the TCBs because our callers have pointers and it would be a pain. So tcbtab is a table of pointers. Since we never free the TCBs, we allocate a single chunk of many. */ - unsigned int i = tcbtabsize; - struct tcb *newtcbs = xcalloc(tcbtabsize, sizeof(newtcbs[0])); - struct tcb **newtab = xreallocarray(tcbtab, tcbtabsize * 2, - sizeof(tcbtab[0])); - tcbtabsize *= 2; - tcbtab = newtab; - while (i < tcbtabsize) - tcbtab[i++] = newtcbs++; + unsigned int new_tcbtabsize, alloc_tcbtabsize; + struct tcb *newtcbs; + + if (tcbtabsize) { + alloc_tcbtabsize = tcbtabsize; + new_tcbtabsize = tcbtabsize * 2; + } else { + new_tcbtabsize = alloc_tcbtabsize = 1; + } + + newtcbs = xcalloc(alloc_tcbtabsize, sizeof(newtcbs[0])); + tcbtab = xreallocarray(tcbtab, new_tcbtabsize, sizeof(tcbtab[0])); + while (tcbtabsize < new_tcbtabsize) + tcbtab[tcbtabsize++] = newtcbs++; } static struct tcb * @@ -973,6 +979,7 @@ static void startup_attach(void) { + pid_t parent_pid = strace_tracer_pid; unsigned int tcbi; struct tcb *tcp; @@ -1015,7 +1022,13 @@ if (tcp->flags & TCB_ATTACHED) continue; /* no, we already attached it */ - if (followfork && !daemonized_tracer) { + if (tcp->pid == parent_pid || tcp->pid == strace_tracer_pid) { + errno = EPERM; + perror_msg("attach: %d", tcp->pid); + droptcb(tcp); + continue; + } + if (followfork && tcp->pid != strace_child) { char procdir[sizeof("/proc/%d/task") + sizeof(int) * 3]; DIR *dir; @@ -1092,18 +1105,19 @@ if (debug_flag) error_msg("attach to pid %d (main) succeeded", tcp->pid); - if (daemonized_tracer) { - /* - * Make parent go away. - * Also makes grandparent's wait() unblock. - */ - kill(getppid(), SIGKILL); - } - if (!qflag) error_msg("Process %u attached", tcp->pid); } /* for each tcbtab[] */ + if (daemonized_tracer) { + /* + * Make parent go away. + * Also makes grandparent's wait() unblock. + */ + kill(parent_pid, SIGKILL); + strace_child = 0; + } + ret: if (interactive) sigprocmask(SIG_SETMASK, &empty_set, NULL); @@ -1176,6 +1190,17 @@ perror_msg_and_die("exec"); } +static int +open_dummy_desc(void) +{ + int fds[2]; + + if (pipe(fds)) + perror_msg_and_die("pipe"); + close(fds[1]); + return fds[0]; +} + static void startup_child(char **argv) { @@ -1317,11 +1342,10 @@ newoutf(tcp); } else { - /* With -D, we are *child* here, IOW: different pid. Fetch it: */ + /* With -D, we are *child* here, the tracee is our parent. */ + strace_child = strace_tracer_pid; strace_tracer_pid = getpid(); - /* The tracee is our parent: */ - pid = getppid(); - alloctcb(pid); + alloctcb(strace_child); /* attaching will be done later, by startup_attach */ /* note: we don't do newoutf(tcp) here either! */ @@ -1346,6 +1370,25 @@ * to create a genuine separate stack and execute on it. */ } + /* + * A case where straced process is part of a pipe: + * { sleep 1; yes | head -n99999; } | strace -o/dev/null sh -c 'exec <&-; sleep 9' + * If strace won't close its fd#0, closing it in tracee is not enough: + * the pipe is still open, it has a reader. Thus, "head" will not get its + * SIGPIPE at once, on the first write. + * + * Preventing it by closing strace's stdin/out. + * (Don't leave fds 0 and 1 closed, this is bad practice: future opens + * will reuse them, unexpectedly making a newly opened object "stdin"). + */ + close(0); + open_dummy_desc(); /* opens to fd#0 */ + dup2(0, 1); +#if 0 + /* A good idea too, but we sometimes need to print error messages */ + if (shared_log != stderr) + dup2(0, 2); +#endif } #if USE_SEIZE @@ -1447,10 +1490,8 @@ static void ATTRIBUTE_NOINLINE init(int argc, char *argv[]) { - struct tcb *tcp; int c, i; int optF = 0; - unsigned int tcbi; struct sigaction sa; progname = argv[0] ? argv[0] : "strace"; @@ -1466,13 +1507,6 @@ os_release = get_os_release(); - /* Allocate the initial tcbtab. */ - tcbtabsize = argc; /* Surely enough for all -p args. */ - tcbtab = xcalloc(tcbtabsize, sizeof(tcbtab[0])); - tcp = xcalloc(tcbtabsize, sizeof(*tcp)); - for (tcbi = 0; tcbi < tcbtabsize; tcbi++) - tcbtab[tcbi] = tcp++; - shared_log = stderr; set_sortby(DEFAULT_SORTBY); set_personality(DEFAULT_PERSONALITY); @@ -1619,13 +1653,12 @@ memset(acolumn_spaces, ' ', acolumn); acolumn_spaces[acolumn] = '\0'; - /* Must have PROG [ARGS], or -p PID. Not both. */ - if (!argv[0] == !nprocs) { + if (!argv[0] && !nprocs) { error_msg_and_help("must have PROG [ARGS] or -p PID"); } - if (nprocs != 0 && daemonized_tracer) { - error_msg_and_help("-D and -p are mutually exclusive"); + if (!argv[0] && daemonized_tracer) { + error_msg_and_help("PROG [ARGS] must be specified with -D"); } if (!followfork) @@ -1688,6 +1721,25 @@ error_msg("ptrace_setoptions = %#x", ptrace_setoptions); test_ptrace_seize(); + if (fcntl(0, F_GETFD) == -1 || fcntl(1, F_GETFD) == -1) { + /* + * Something weird with our stdin and/or stdout - + * for example, may be not open? In this case, + * ensure that none of the future opens uses them. + * + * This was seen in the wild when /proc/sys/kernel/core_pattern + * was set to "|/bin/strace -o/tmp/LOG PROG": + * kernel runs coredump helper with fd#0 open but fd#1 closed (!), + * therefore LOG gets opened to fd#1, and fd#1 is closed by + * "don't hold up stdin/out open" code soon after. + */ + int fd = open_dummy_desc(); + while (fd >= 0 && fd < 2) + fd = dup(fd); + if (fd > 2) + close(fd); + } + /* Check if they want to redirect the output. */ if (outfname) { /* See if they want to pipe the output. */ @@ -1722,9 +1774,9 @@ opt_intr = INTR_WHILE_WAIT; /* argv[0] -pPID -oFILE Default interactive setting - * yes 0 0 INTR_WHILE_WAIT + * yes * 0 INTR_WHILE_WAIT * no 1 0 INTR_WHILE_WAIT - * yes 0 1 INTR_NEVER + * yes * 1 INTR_NEVER * no 1 1 INTR_WHILE_WAIT */ @@ -2014,7 +2066,7 @@ printleader(tcp); if (si) { tprintf("--- %s ", signame(sig)); - printsiginfo(si, verbose(tcp)); + printsiginfo(si); tprints(" ---\n"); } else tprintf("--- stopped by %s ---\n", signame(sig)); diff -Nru strace-4.11/strace-graph strace-4.12/strace-graph --- strace-4.11/strace-graph 2012-03-16 11:02:22.000000000 +0000 +++ strace-4.12/strace-graph 2016-02-05 00:41:23.000000000 +0000 @@ -33,14 +33,19 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +use strict; +use warnings; + my %unfinished; +my $floatform; # Scales for strace slowdown. Make configurable! my $scale_factor = 3.5; while (<>) { - my ($pid, $call, $args, $result, $time); + my ($pid, $call, $args, $result, $time, $time_spent); chop; + $floatform = 0; s/^(\d+)\s+//; $pid = $1; @@ -70,7 +75,7 @@ delete $unfinished{$pid}; } - if (/^--- SIG(\S+) \(.*\) ---$/) { + if (/^--- SIG(\S+) (.*) ---$/) { # $pid received signal $1 # currently we don't do anything with this next; @@ -82,7 +87,16 @@ next; } + if (/^\+\+\+ exited with (\d+) \+\+\+$/) { + # $pid exited $1 + # currently we don't do anything with this + next; + } + ($call, $args, $result) = /(\S+)\((.*)\)\s+= (.*)$/; + if ($result =~ /^(.*) <([0-9.]*)>$/) { + ($result, $time_spent) = ($1, $2); + } unless (defined $result) { print STDERR "$0: $ARGV: $.: cannot parse line.\n"; next; @@ -119,13 +133,14 @@ my ($in) = @_; if ($in =~ s/^\"//) { + my $tmp; ($tmp, $in) = parse_str($in); if (not defined $tmp) { print STDERR "$0: $ARGV: $.: cannot parse string.\n"; return (undef, $in); } return ($tmp, $in); - } elsif ($in =~ s/^0x(\x+)//) { + } elsif ($in =~ s/^0x([[:xdigit:]]+)//) { return (hex $1, $in); } elsif ($in =~ s/^(\d+)//) { return (int $1, $in); @@ -197,7 +212,7 @@ # process info, indexed by pid. # fields: # parent pid number -# seq forks and execs for this pid, in sequence (array) +# seq clones, forks and execs for this pid, in sequence (array) # filename and argv (from latest exec) # basename (derived from filename) @@ -214,10 +229,10 @@ } if ($call eq 'execve') { - return if $result != 0; + return if $result ne '0'; my ($filename, $argv) = parseargs($args); - ($basename) = $filename =~ m/([^\/]*)$/; + my ($basename) = $filename =~ m/([^\/]*)$/; if ($basename ne $$argv[0]) { $$argv[0] = "$basename($$argv[0])"; } @@ -235,7 +250,8 @@ push @$seq, ['FORK', $result]; $pr{$pid}{seq} = $seq; $pr{$result}{parent} = $pid; - } elsif ($call eq '_exit') { + $pr{$result}{seq} = []; + } elsif ($call eq '_exit' || $call eq 'exit_group') { $pr{$pid}{end} = $time if defined $time; } } @@ -249,7 +265,7 @@ my ($pid) = @_; my $seq = $pr{$pid}{seq}; - for $elem (@$seq) { + for my $elem (@$seq) { if ($$elem[0] eq 'EXEC') { my $argv = $$elem[2]; print "$$elem[0] $$elem[1] @$argv\n"; @@ -265,7 +281,7 @@ my ($pid) = @_; my $seq = $pr{$pid}{seq}; - for $elem (@$seq) { + for my $elem (@$seq) { if ($$elem[0] eq 'EXEC') { return $elem; } @@ -293,15 +309,15 @@ } } - for $elem (@seq) { + for my $elem (@seq) { $i++; if ($$elem[0] eq 'EXEC') { my $argv = $$elem[2]; if (defined $elapsed) { - print "$lead [$elapsed] @$argv\n"; + print "$lead [$elapsed] $pid @$argv\n"; undef $elapsed; } else { - print "$lead @$argv\n"; + print "$lead $pid @$argv\n"; } } elsif ($$elem[0] eq 'FORK') { if ($i == 1) { diff -Nru strace-4.11/strace.spec strace-4.12/strace.spec --- strace-4.11/strace.spec 2015-12-21 20:21:22.000000000 +0000 +++ strace-4.12/strace.spec 2016-05-31 11:12:13.000000000 +0000 @@ -1,12 +1,17 @@ Summary: Tracks and displays system calls associated with a running process Name: strace -Version: 4.11 +Version: 4.12 Release: 1%{?dist} +%define srcname %name-%version License: BSD Group: Development/Debuggers URL: http://sourceforge.net/projects/strace/ -Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz -BuildRequires: libacl-devel, time +Source: http://downloads.sourceforge.net/strace/%{srcname}.tar.xz +BuildRequires: time +%ifarch x86_64 +# for experimental -k option +BuildRequires: libunwind-devel +%endif %define strace64_arches ppc64 sparc64 %description @@ -39,9 +44,19 @@ %endif %prep -%setup -q +%setup -q -n %{srcname} %build +echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION' +uname -a |head -1 +libc="$(ldd /bin/sh |sed -n 's|^[^/]*\(/[^ ]*/libc\.so[^ ]*\).*|\1|p' |head -1)" +$libc |head -1 +file -L /bin/sh +gcc --version |head -1 +kver="$(echo -e '#include \nLINUX_VERSION_CODE' | gcc -E -P -)" +printf 'kernel-headers %%s.%%s.%%s\n' $(($kver/65536)) $(($kver/256%%256)) $(($kver%%256)) +echo 'END OF BUILD ENVIRONMENT INFORMATION' + %configure make %{?_smp_mflags} @@ -63,7 +78,10 @@ %endif %check -make -k check VERBOSE=1 +make %{?_smp_mflags} -k check VERBOSE=1 +echo 'BEGIN OF TEST SUITE INFORMATION' +tail -n 99999 -- tests*/test-suite.log tests*/ksysent.log +echo 'END OF TEST SUITE INFORMATION' %files %doc CREDITS ChangeLog ChangeLog-CVS COPYING NEWS README @@ -77,6 +95,19 @@ %endif %changelog +* Tue May 31 2016 Dmitry V. Levin - 4.12-1 +- 4.11.0.163.9720 -> 4.12. + +* Fri Feb 05 2016 Fedora Release Engineering - 4.11.0.163.9720-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Dmitry V. Levin - 4.11.0.163.9720-1 +- New upstream snapshot v4.11-163-g972018f: + + fixed decoding of syscalls unknown to the kernel on s390/s390x (#1298294). + +* Wed Dec 23 2015 Dmitry V. Levin - 4.11-2 +- Enabled experimental -k option on x86_64 (#1170296). + * Mon Dec 21 2015 Dmitry V. Levin - 4.11-1 - New upstream release: + print nanoseconds along with seconds in stat family syscalls (#1251176). diff -Nru strace-4.11/swapon.c strace-4.12/swapon.c --- strace-4.11/swapon.c 2015-07-16 23:44:57.000000000 +0000 +++ strace-4.12/swapon.c 2016-04-07 01:15:58.000000000 +0000 @@ -6,14 +6,19 @@ SYS_FUNC(swapon) { - int flags = tcp->u_arg[1]; + unsigned int flags = tcp->u_arg[1]; + unsigned int prio = flags & SWAP_FLAG_PRIO_MASK; + flags &= ~SWAP_FLAG_PRIO_MASK; printpath(tcp, tcp->u_arg[0]); tprints(", "); - printflags(swap_flags, flags & ~SWAP_FLAG_PRIO_MASK, - "SWAP_FLAG_???"); - if (flags & SWAP_FLAG_PREFER) - tprintf("|%d", flags & SWAP_FLAG_PRIO_MASK); + if (flags) { + printflags(swap_flags, flags, "SWAP_FLAG_???"); + if (prio) + tprintf("|%u", prio); + } else { + tprintf("%u", prio); + } return RVAL_DECODED; } diff -Nru strace-4.11/sync_file_range2.c strace-4.12/sync_file_range2.c --- strace-4.11/sync_file_range2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/sync_file_range2.c 2016-04-22 04:34:22.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013 William Manley + * Copyright (c) 2014-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +#include "xlat/sync_file_range_flags.h" + +SYS_FUNC(sync_file_range2) +{ + int argn; + + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printflags(sync_file_range_flags, tcp->u_arg[1], + "SYNC_FILE_RANGE_???"); + argn = printllval(tcp, ", %lld, ", 2); + argn = printllval(tcp, "%lld", argn); + + return RVAL_DECODED; +} diff -Nru strace-4.11/sync_file_range.c strace-4.12/sync_file_range.c --- strace-4.11/sync_file_range.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/sync_file_range.c 2016-04-22 04:34:22.000000000 +0000 @@ -27,9 +27,7 @@ */ #include "defs.h" - #include - #include "xlat/sync_file_range_flags.h" SYS_FUNC(sync_file_range) @@ -44,16 +42,3 @@ return RVAL_DECODED; } - -SYS_FUNC(sync_file_range2) -{ - int argn; - - printfd(tcp, tcp->u_arg[0]); - printflags(sync_file_range_flags, tcp->u_arg[1], - "SYNC_FILE_RANGE_???"); - argn = printllval(tcp, ", %lld, ", 2); - argn = printllval(tcp, "%lld, ", argn); - - return RVAL_DECODED; -} diff -Nru strace-4.11/syscall.c strace-4.12/syscall.c --- strace-4.11/syscall.c 2015-12-16 00:06:59.000000000 +0000 +++ strace-4.12/syscall.c 2016-05-11 00:58:06.000000000 +0000 @@ -34,6 +34,7 @@ #include "defs.h" #include "native_defs.h" #include +#include /* for struct iovec */ #include @@ -627,11 +628,6 @@ * see linux/mips/get_syscall_args.c */ } - -SYS_FUNC(syscall) -{ - return printargs(tcp); -} #endif int @@ -647,27 +643,25 @@ } int -printargs_lu(struct tcb *tcp) +printargs_u(struct tcb *tcp) { - if (entering(tcp)) { - int i; - int n = tcp->s_ent->nargs; - for (i = 0; i < n; i++) - tprintf("%s%lu", i ? ", " : "", tcp->u_arg[i]); - } - return 0; + const int n = tcp->s_ent->nargs; + int i; + for (i = 0; i < n; ++i) + tprintf("%s%u", i ? ", " : "", + (unsigned int) tcp->u_arg[i]); + return RVAL_DECODED; } int -printargs_ld(struct tcb *tcp) +printargs_d(struct tcb *tcp) { - if (entering(tcp)) { - int i; - int n = tcp->s_ent->nargs; - for (i = 0; i < n; i++) - tprintf("%s%ld", i ? ", " : "", tcp->u_arg[i]); - } - return 0; + const int n = tcp->s_ent->nargs; + int i; + for (i = 0; i < n; ++i) + tprintf("%s%d", i ? ", " : "", + (int) tcp->u_arg[i]); + return RVAL_DECODED; } static void @@ -691,10 +685,13 @@ dumpstr(tcp, tcp->u_arg[1], tcp->u_rval); return; case SEN_readv: - dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + case SEN_preadv: + case SEN_preadv2: + dumpiov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], + tcp->u_rval); return; case SEN_recvmsg: - dumpiov_in_msghdr(tcp, tcp->u_arg[1]); + dumpiov_in_msghdr(tcp, tcp->u_arg[1], tcp->u_rval); return; case SEN_recvmmsg: dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]); @@ -710,10 +707,14 @@ dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); break; case SEN_writev: + case SEN_pwritev: + case SEN_pwritev2: + case SEN_vmsplice: dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); break; case SEN_sendmsg: - dumpiov_in_msghdr(tcp, tcp->u_arg[1]); + dumpiov_in_msghdr(tcp, tcp->u_arg[1], + (unsigned long) -1L); break; case SEN_sendmmsg: dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]); @@ -1064,7 +1065,13 @@ tprintf("= %#lo", tcp->u_rval); break; case RVAL_UDECIMAL: - tprintf("= %lu", tcp->u_rval); +#if SUPPORTED_PERSONALITIES > 1 + if (current_wordsize < sizeof(long)) + tprintf("= %u", + (unsigned int) tcp->u_rval); + else +#endif + tprintf("= %lu", tcp->u_rval); break; case RVAL_DECIMAL: tprintf("= %ld", tcp->u_rval); diff -Nru strace-4.11/sysinfo.c strace-4.12/sysinfo.c --- strace-4.11/sysinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/sysinfo.c 2016-05-26 14:44:13.000000000 +0000 @@ -59,19 +59,19 @@ ", freehigh=%llu" ", mem_unit=%u" "}", - (unsigned long long) si.uptime - , (unsigned long long) si.loads[0] - , (unsigned long long) si.loads[1] - , (unsigned long long) si.loads[2] - , (unsigned long long) si.totalram - , (unsigned long long) si.freeram - , (unsigned long long) si.sharedram - , (unsigned long long) si.bufferram - , (unsigned long long) si.totalswap - , (unsigned long long) si.freeswap + widen_to_ull(si.uptime) + , widen_to_ull(si.loads[0]) + , widen_to_ull(si.loads[1]) + , widen_to_ull(si.loads[2]) + , widen_to_ull(si.totalram) + , widen_to_ull(si.freeram) + , widen_to_ull(si.sharedram) + , widen_to_ull(si.bufferram) + , widen_to_ull(si.totalswap) + , widen_to_ull(si.freeswap) , (unsigned) si.procs - , (unsigned long long) si.totalhigh - , (unsigned long long) si.freehigh + , widen_to_ull(si.totalhigh) + , widen_to_ull(si.freehigh) , si.mem_unit ); } diff -Nru strace-4.11/sysmips.c strace-4.12/sysmips.c --- strace-4.11/sysmips.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/sysmips.c 2016-05-17 08:03:58.000000000 +0000 @@ -45,7 +45,7 @@ SYS_FUNC(sysmips) { - printxval(sysmips_operations, tcp->u_arg[0], "???"); + printxval_long(sysmips_operations, tcp->u_arg[0], "???"); tprints(", "); switch (tcp->u_arg[0]) { diff -Nru strace-4.11/.tarball-version strace-4.12/.tarball-version --- strace-4.11/.tarball-version 2015-12-21 23:24:39.000000000 +0000 +++ strace-4.12/.tarball-version 2016-05-31 11:36:34.000000000 +0000 @@ -1 +1 @@ -4.11 +4.12 diff -Nru strace-4.11/term.c strace-4.12/term.c --- strace-4.11/term.c 2015-07-13 20:16:24.000000000 +0000 +++ strace-4.12/term.c 2016-05-17 08:03:58.000000000 +0000 @@ -222,11 +222,11 @@ /* ioctls with a direct decodable arg */ case TCXONC: tprints(", "); - printxval(tcxonc_options, arg, "TC???"); + printxval_long(tcxonc_options, arg, "TC???"); break; case TCFLSH: tprints(", "); - printxval(tcflsh_options, arg, "TC???"); + printxval_long(tcflsh_options, arg, "TC???"); break; case TCSBRK: case TCSBRKP: diff -Nru strace-4.11/tests/access.c strace-4.12/tests/access.c --- strace-4.11/tests/access.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/access.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#ifdef __NR_access + +# include +# include + +int +main(void) +{ + static const char sample[] = "access_sample"; + + long rc = syscall(__NR_access, sample, F_OK); + printf("access(\"%s\", F_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK); + printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_access") + +#endif diff -Nru strace-4.11/tests/access.test strace-4.12/tests/access.test --- strace-4.11/tests/access.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/access.test 2016-04-21 17:37:43.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check access syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eaccess -a30 $args > "$EXP" + +# Filter out access() calls made by libc. +grep -F access_sample < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/acct.c strace-4.12/tests/acct.c --- strace-4.11/tests/acct.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/acct.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_acct + +# include +# include + +int +main(void) +{ + const char sample[] = "acct_sample"; + + long rc = syscall(__NR_acct, sample); + printf("acct(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__acct") + +#endif diff -Nru strace-4.11/tests/acct.test strace-4.12/tests/acct.test --- strace-4.11/tests/acct.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/acct.test 2016-04-21 20:20:42.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check acct syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests/adjtimex.c strace-4.12/tests/adjtimex.c --- strace-4.11/tests/adjtimex.c 2015-09-17 13:26:22.000000000 +0000 +++ strace-4.12/tests/adjtimex.c 2016-02-08 18:16:27.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of adjtimex strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +27,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include +#include #include int main(void) { - struct timex tx = {}; - int state = adjtimex(&tx); + adjtimex(NULL); + printf("adjtimex\\(NULL\\) = -1 EFAULT \\(%m\\)\n"); + + struct timex * const tx = tail_alloc(sizeof(*tx)); + memset(tx, 0, sizeof(*tx)); + int state = adjtimex(tx); if (state < 0) - return 77; + perror_msg_and_skip("adjtimex"); printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" ", esterror=%jd, status=%s, constant=%jd, precision=%jd" @@ -51,27 +55,27 @@ ", tai=%d" #endif "\\}\\) = %d \\(TIME_[A-Z]+\\)\n", - (intmax_t) tx.offset, - (intmax_t) tx.freq, - (intmax_t) tx.maxerror, - (intmax_t) tx.esterror, - tx.status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", - (intmax_t) tx.constant, - (intmax_t) tx.precision, - (intmax_t) tx.tolerance, - (intmax_t) tx.time.tv_sec, - (intmax_t) tx.time.tv_usec, - (intmax_t) tx.tick, - (intmax_t) tx.ppsfreq, - (intmax_t) tx.jitter, - tx.shift, - (intmax_t) tx.stabil, - (intmax_t) tx.jitcnt, - (intmax_t) tx.calcnt, - (intmax_t) tx.errcnt, - (intmax_t) tx.stbcnt, + (intmax_t) tx->offset, + (intmax_t) tx->freq, + (intmax_t) tx->maxerror, + (intmax_t) tx->esterror, + tx->status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", + (intmax_t) tx->constant, + (intmax_t) tx->precision, + (intmax_t) tx->tolerance, + (intmax_t) tx->time.tv_sec, + (intmax_t) tx->time.tv_usec, + (intmax_t) tx->tick, + (intmax_t) tx->ppsfreq, + (intmax_t) tx->jitter, + tx->shift, + (intmax_t) tx->stabil, + (intmax_t) tx->jitcnt, + (intmax_t) tx->calcnt, + (intmax_t) tx->errcnt, + (intmax_t) tx->stbcnt, #ifdef HAVE_STRUCT_TIMEX_TAI - tx.tai, + tx->tai, #endif state); diff -Nru strace-4.11/tests/adjtimex.test strace-4.12/tests/adjtimex.test --- strace-4.11/tests/adjtimex.test 2015-09-17 13:25:53.000000000 +0000 +++ strace-4.12/tests/adjtimex.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,8 +5,7 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -e adjtimex $args > "$OUT" +run_strace -a 15 -e adjtimex $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests/aio.c strace-4.12/tests/aio.c --- strace-4.11/tests/aio.c 2015-12-16 02:00:01.000000000 +0000 +++ strace-4.12/tests/aio.c 2016-05-07 22:40:06.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include +#include #include #include #include #include -#include #include #if defined __NR_io_setup \ @@ -45,139 +41,154 @@ && defined __NR_io_destroy # include -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - int main(void) { - static char data0[4096]; - static char data1[8192]; + const unsigned int sizeof_data0 = 4096; + const unsigned int sizeof_data1 = 8192; + void *data0 = tail_alloc(sizeof_data0); + void *data1 = tail_alloc(sizeof_data1); - const struct iocb cb[] = { + const struct iocb proto_cb[] = { { .aio_data = 0xfeedface11111111, .aio_reqprio = 11, .aio_buf = (unsigned long) data0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = sizeof(data0) + .aio_nbytes = sizeof_data0 }, { .aio_data = 0xfeedface22222222, .aio_reqprio = 22, .aio_buf = (unsigned long) data1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = sizeof(data1) + .aio_nbytes = sizeof_data1 } }; - const struct iovec iov0[] = { + const struct iocb *cb = tail_memdup(proto_cb, sizeof(proto_cb)); + + const struct iovec proto_iov0[] = { { .iov_base = data0, - .iov_len = sizeof(data0) / 4 + .iov_len = sizeof_data0 / 4 }, { - .iov_base = data0 + sizeof(data0) / 4, - .iov_len = sizeof(data0) / 4 * 3 + .iov_base = data0 + sizeof_data0 / 4, + .iov_len = sizeof_data0 / 4 * 3 }, }; - const struct iovec iov1[] = { + const struct iovec *iov0 = tail_memdup(proto_iov0, sizeof(proto_iov0)); + + const struct iovec proto_iov1[] = { { .iov_base = data1, - .iov_len = sizeof(data1) / 4 + .iov_len = sizeof_data1 / 4 }, { - .iov_base = data1 + sizeof(data1) / 4, - .iov_len = sizeof(data1) / 4 * 3 + .iov_base = data1 + sizeof_data1 / 4, + .iov_len = sizeof_data1 / 4 * 3 }, }; - const struct iocb cbv[] = { + const struct iovec *iov1 = tail_memdup(proto_iov1, sizeof(proto_iov1)); + + const struct iocb proto_cbv[] = { { .aio_data = 0xfeed11111111face, .aio_lio_opcode = 7, .aio_reqprio = 111, - .aio_buf = (unsigned long) &iov0, + .aio_buf = (unsigned long) iov0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = ARRAY_SIZE(iov0) + .aio_nbytes = ARRAY_SIZE(proto_iov0) }, { .aio_data = 0xfeed22222222face, .aio_lio_opcode = 7, .aio_reqprio = 222, - .aio_buf = (unsigned long) &iov1, + .aio_buf = (unsigned long) iov1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = ARRAY_SIZE(iov1) + .aio_nbytes = ARRAY_SIZE(proto_iov1) } }; - struct iocb cbc = { + const struct iocb *cbv = tail_memdup(proto_cbv, sizeof(proto_cbv)); + + const struct iocb proto_cbc = { .aio_data = 0xdeadbeefbadc0ded, .aio_reqprio = 99, .aio_fildes = -42 }; + const struct iocb *cbc = tail_memdup(&proto_cbc, sizeof(proto_cbc)); - const long cbs[ARRAY_SIZE(cb) + 2] = { - (long) &cb[0], (long) &cb[1], - 0xdeadbeef, 0xbadc0ded + const long proto_cbs[] = { + (long) &cb[0], (long) &cb[1] }; - const long cbvs[ARRAY_SIZE(cb) + 2] = { + const long *cbs = tail_memdup(proto_cbs, sizeof(proto_cbs)); + + const long proto_cbvs[] = { (long) &cbv[0], (long) &cbv[1], - 0xdeadbeef, 0xbadc0ded }; + const long *cbvs = tail_memdup(proto_cbvs, sizeof(proto_cbvs)); + + unsigned long *ctx = tail_alloc(sizeof(unsigned long)); + *ctx = 0; - unsigned long ctx = 0; - const unsigned int nr = ARRAY_SIZE(cb); + const unsigned int nr = ARRAY_SIZE(proto_cb); const unsigned long lnr = (unsigned long) (0xdeadbeef00000000ULL | nr); - struct io_event ev[nr]; - const struct timespec ts = { .tv_nsec = 123456789 }; + const struct io_event *ev = tail_alloc(nr * sizeof(struct io_event)); + const struct timespec proto_ts = { .tv_nsec = 123456789 }; + const struct timespec *ts = tail_memdup(&proto_ts, sizeof(proto_ts)); (void) close(0); if (open("/dev/zero", O_RDONLY)) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); - if (syscall(__NR_io_setup, lnr, &ctx)) - return 77; - printf("io_setup(%u, [%lu]) = 0\n", nr, ctx); + if (syscall(__NR_io_setup, lnr, ctx)) + perror_msg_and_skip("io_setup"); + printf("io_setup(%u, [%lu]) = 0\n", nr, *ctx); + + assert(syscall(__NR_io_submit, *ctx, -1L, cbs) == -1); + printf("io_submit(%lu, -1, %p) = -1 %s (%m)\n", + *ctx, cbs, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, pread, reqprio=11, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}, " "{data=%#llx, pread, reqprio=22, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cb[0].aio_data, data0, - (unsigned int) sizeof(data0), (long long) cb[0].aio_offset, + sizeof_data0, (long long) cb[0].aio_offset, (unsigned long long) cb[1].aio_data, data1, - (unsigned int) sizeof(data1), (long long) cb[1].aio_offset, + sizeof_data1, (long long) cb[1].aio_offset, nr); - assert(syscall(__NR_io_getevents, ctx, nr, nr + 1, ev, &ts) == (long) nr); + assert(syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts) == (long) nr); printf("io_getevents(%lu, %u, %u, [" "{data=%#llx, obj=%p, res=%u, res2=0}, " "{data=%#llx, obj=%p, res=%u, res2=0}" "], {0, 123456789}) = %u\n", - ctx, nr, nr + 1, - (unsigned long long) cb[0].aio_data, &cb[0], - (unsigned int) sizeof(data0), - (unsigned long long) cb[1].aio_data, &cb[1], - (unsigned int) sizeof(data1), + *ctx, nr, nr + 1, + (unsigned long long) cb[0].aio_data, &cb[0], sizeof_data0, + (unsigned long long) cb[1].aio_data, &cb[1], sizeof_data1, nr); - assert(syscall(__NR_io_cancel, ctx, &cbc, ev) == -1 && EINVAL == errno); + assert(syscall(__NR_io_cancel, *ctx, cbc, ev) == -1); printf("io_cancel(%lu, {data=%#llx, pread, reqprio=99, fildes=-42}, %p) " - "= -1 EINVAL (Invalid argument)\n", - ctx, (unsigned long long) cbc.aio_data, ev); + "= -1 %s (%m)\n", + *ctx, (unsigned long long) cbc->aio_data, ev, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbvs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbvs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}, " "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cbv[0].aio_data, cbv[0].aio_reqprio, iov0[0].iov_base, (unsigned int) iov0[0].iov_len, iov0[1].iov_base, (unsigned int) iov0[1].iov_len, @@ -188,8 +199,8 @@ (long long) cbv[1].aio_offset, nr); - assert(syscall(__NR_io_destroy, ctx) == 0); - printf("io_destroy(%lu) = 0\n", ctx); + assert(syscall(__NR_io_destroy, *ctx) == 0); + printf("io_destroy(%lu) = 0\n", *ctx); puts("+++ exited with 0 +++"); return 0; @@ -197,10 +208,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_io_*") #endif diff -Nru strace-4.11/tests/aio.test strace-4.12/tests/aio.test --- strace-4.11/tests/aio.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/aio.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,11 +4,5 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null -OUT="$LOG.out" syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy -run_strace -a14 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 -e trace=$syscalls diff -Nru strace-4.11/tests/alarm.c strace-4.12/tests/alarm.c --- strace-4.11/tests/alarm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/alarm.c 2016-02-14 22:30:27.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * This file is part of alarm strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_alarm + +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a); + printf("alarm(%u) = %d\n", 42, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_alarm") + +#endif diff -Nru strace-4.11/tests/alarm.test strace-4.12/tests/alarm.test --- strace-4.11/tests/alarm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/alarm.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check alarm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/attach-f-p.c strace-4.12/tests/attach-f-p.c --- strace-4.11/tests/attach-f-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/attach-f-p.c 2016-05-24 12:14:33.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 3 + +typedef union { + void *ptr; + pid_t pid; +} retval_t; + +typedef struct { + sigset_t set; + unsigned int no; +} thread_arg_t; + +static const char text_parent[] = "attach-f-p.test parent"; +static const char *child[N] = { + "attach-f-p.test child 0", + "attach-f-p.test child 1", + "attach-f-p.test child 2" +}; +static const int sigs[N] = { SIGALRM, SIGUSR1, SIGUSR2 }; +static const struct itimerspec its[N] = { + { .it_value.tv_sec = 1 }, + { .it_value.tv_sec = 2 }, + { .it_value.tv_sec = 3 } +}; +static thread_arg_t args[N] = { + { .no = 0 }, + { .no = 1 }, + { .no = 2 } +}; + +static void * +thread(void *a) +{ + thread_arg_t *arg = a; + int signo; + errno = sigwait(&arg->set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + assert(chdir(child[arg->no]) == -1); + retval_t retval = { .pid = syscall(__NR_gettid) }; + return retval.ptr; +} + +int +main(void) +{ + static timer_t timerid[N]; + pthread_t t[N]; + unsigned int i; + + for (i = 0; i < N; ++i) { + sigemptyset(&args[i].set); + sigaddset(&args[i].set, sigs[i]); + + errno = pthread_sigmask(SIG_BLOCK, &args[i].set, NULL); + if (errno) + perror_msg_and_fail("pthread_sigmask"); + } + + for (i = 0; i < N; ++i) { + struct sigevent sev = { + .sigev_notify = SIGEV_SIGNAL, + .sigev_signo = sigs[i] + }; + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid[i])) + perror_msg_and_skip("timer_create"); + + if (timer_settime(timerid[i], 0, &its[i], NULL)) + perror_msg_and_fail("timer_settime"); + + errno = pthread_create(&t[i], NULL, thread, (void *) &args[i]); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + if (write(3, "\n", 1) != 1) + perror_msg_and_fail("write"); + + for (i = 0; i < N; ++i) { + retval_t retval; + errno = pthread_join(t[i], &retval.ptr); + if (errno) + perror_msg_and_fail("pthread_join"); + errno = ENOENT; + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", + retval.pid, child[i], retval.pid); + } + + /* sleep a bit more to late the tracer catch up */ + if (timer_settime(timerid[0], 0, &its[0], NULL)) + perror_msg_and_fail("timer_settime"); + int signo; + errno = sigwait(&args[0].set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + + pid_t pid = getpid(); + assert(chdir(text_parent) == -1); + + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text_parent, pid); + + return 0; +} diff -Nru strace-4.11/tests/attach-f-p.test strace-4.12/tests/attach-f-p.test --- strace-4.11/tests/attach-f-p.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/attach-f-p.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check that -f -p attaches to threads properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -f -p is implemented using /proc/$pid/task/ +[ -d /proc/self/task/ ] || + framework_skip_ '/proc/self/task/ is not available' +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-f-p > /dev/null 3>&1 + +./set_ptracer_any sh -c "exec ./attach-f-p > $EXP 3> $OUT" > /dev/null & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a32 -f -echdir -esignal=none -p $tracee_pid +match_diff "$LOG" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/attach-p-cmd-cmd.c strace-4.12/tests/attach-p-cmd-cmd.c --- strace-4.11/tests/attach-p-cmd-cmd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/attach-p-cmd-cmd.c 2016-05-23 16:39:23.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + static const char text[] = "attach-p-cmd.test cmd"; + pid_t pid = getpid(); + assert(chdir(text) == -1); + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text, pid); + return 0; +} diff -Nru strace-4.11/tests/attach-p-cmd-p.c strace-4.12/tests/attach-p-cmd-p.c --- strace-4.11/tests/attach-p-cmd-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/attach-p-cmd-p.c 2016-01-22 19:37:11.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ + _exit(!chdir("attach-p-cmd.test -p")); +} + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_sec = atoi(av[1]) }; + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + + for (;;); + + return 0; +} diff -Nru strace-4.11/tests/attach-p-cmd.test strace-4.12/tests/attach-p-cmd.test --- strace-4.11/tests/attach-p-cmd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/attach-p-cmd.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check that simultaneous use of -p option and tracing of a command works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-p-cmd-cmd > /dev/null +run_prog ./attach-p-cmd-p 1 > /dev/null + +./set_ptracer_any ./attach-p-cmd-p 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" +{ +printf '%-5d --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---\n' $tracee_pid +printf '%-5d chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory)\n' $tracee_pid +printf '%-5d +++ exited with 0 +++\n' $tracee_pid +} >> "$OUT" + +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff -Nru strace-4.11/tests/bpf.c strace-4.12/tests/bpf.c --- strace-4.11/tests/bpf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/bpf.c 2016-01-06 11:29:16.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -83,39 +80,39 @@ main(void) { if (!map_create()) - return 77; + perror_msg_and_skip("BPF_MAP_CREATE"); printf("bpf\\(BPF_MAP_CREATE, " "\\{map_type=BPF_MAP_TYPE_UNSPEC, key_size=4, value_size=8, max_entries=256\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_LOOKUP_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_LOOKUP_ELEM"); printf("bpf\\(BPF_MAP_LOOKUP_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_UPDATE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_UPDATE_ELEM"); printf("bpf\\(BPF_MAP_UPDATE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef, value=0xbadc0ded, flags=BPF_ANY\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_DELETE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_DELETE_ELEM"); printf("bpf\\(BPF_MAP_DELETE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_GET_NEXT_KEY)) - return 77; + perror_msg_and_skip("BPF_MAP_GET_NEXT_KEY"); printf("bpf\\(BPF_MAP_GET_NEXT_KEY, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!prog_load()) - return 77; + perror_msg_and_skip("BPF_PROG_LOAD"); printf("bpf\\(BPF_PROG_LOAD, " "\\{prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p, " "license=\"GPL\", log_level=42, log_size=4096, log_buf=%p, " @@ -127,10 +124,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_bpf") #endif diff -Nru strace-4.11/tests/bpf.test strace-4.12/tests/bpf.test --- strace-4.11/tests/bpf.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/bpf.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -ebpf $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests/brk.c strace-4.12/tests/brk.c --- strace-4.11/tests/brk.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/brk.c 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_brk + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_brk, NULL); + printf("brk\\(NULL\\) = %#lx\n", rc); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_brk") + +#endif diff -Nru strace-4.11/tests/brk.test strace-4.12/tests/brk.test --- strace-4.11/tests/brk.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/brk.test 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +# Check brk syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a10 -ebrk $args > "$EXP" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests/btrfs.c strace-4.12/tests/btrfs.c --- strace-4.11/tests/btrfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/btrfs.c 2016-05-28 00:37:02.000000000 +0000 @@ -0,0 +1,1920 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_tree_objectids.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_NAME_LEN +# define BTRFS_NAME_LEN 255 +#endif + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +static const char *btrfs_test_root; +static int btrfs_test_dir_fd; +static bool verbose = false; +static bool write_ok = false; + +const unsigned char uuid_reference[BTRFS_UUID_SIZE] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, +}; + +const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210"; + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + + +static const char * +maybe_print_uint64max(uint64_t val) +{ + if (val == UINT64_MAX) + return " /* UINT64_MAX */"; + return ""; +} + +/* takes highest valid flag bit */ +static uint64_t +max_flags_plus_one(int bit) +{ + int i; + uint64_t val = 0; + if (bit == -1) + return 1; + for (i = 0; i <= bit + 1 && i < 64; i++) + val |= (1ULL << i); + return val; +} + +/* + * Consumes no arguments, returns nothing: + * + * - BTRFS_IOC_TRANS_START + * - BTRFS_IOC_TRANS_END + */ +static void +btrfs_test_trans_ioctls(void) +{ + ioctl(-1, BTRFS_IOC_TRANS_START, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_START) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TRANS_END, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_END) = -1 EBADF (%m)\n"); +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SYNC + * + * Consumes argument, returns nothing + * - BTRFS_IOC_WAIT_SYNC + */ +static void +btrfs_test_sync_ioctls(void) +{ + uint64_t u64val = 0xdeadbeefbadc0ded; + + ioctl(-1, BTRFS_IOC_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, &u64val); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, [%" PRIu64 + "]) = -1 EBADF (%m)\n", u64val); + + /* + * The live test of BTRFS_IOC_SYNC happens as a part of the test + * for BTRFS_IOC_LOGICAL_INO + */ +} + +static void +btrfs_print_qgroup_inherit(struct btrfs_qgroup_inherit *inherit) +{ + printf("{flags="); + printflags(btrfs_qgroup_inherit_flags, inherit->flags, + "BTRFS_QGROUP_INHERIT_???"); + printf(", num_qgroups=%" PRI__u64 + ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64", lim={flags=", + inherit->num_qgroups, inherit->num_ref_copies, + inherit->num_excl_copies); + printflags(btrfs_qgroup_limit_flags, + inherit->lim.flags, + "BTRFS_QGROUP_LIMIT_???"); + printf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 + "}, qgroups=", + inherit->lim.max_rfer, inherit->lim.max_excl, + inherit->lim.rsv_rfer, inherit->lim.rsv_excl); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < inherit->num_qgroups; i++) { + if (i > 0) + printf(", "); + printf("%" PRI__u64, inherit->qgroups[i]); + } + printf("]"); + } else + printf("..."); + printf("}"); +} + + +static void +btrfs_print_vol_args_v2(struct btrfs_ioctl_vol_args_v2 *args, int print_qgroups) +{ + printf("{fd=%d, flags=", (int) args->fd); + printflags(btrfs_snap_flags_v2, args->flags, "BTRFS_SUBVOL_???"); + + if (args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + printf(", size=%" PRI__u64 ", qgroup_inherit=", args->size); + if (args->qgroup_inherit && print_qgroups) + btrfs_print_qgroup_inherit(args->qgroup_inherit); + else if (args->qgroup_inherit) + printf("%p", args->qgroup_inherit); + else + printf("NULL"); + } + printf(", name=\"%s\"}", args->name); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SNAP_CREATE + * - BTRFS_IOC_SUBVOL_CREATE + * - BTRFS_IOC_SNAP_DESTROY + * - BTRFS_IOC_DEFAULT_SUBVOL + * + * Consumes argument, returns u64: + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + +static void +btrfs_test_subvol_ioctls(void) +{ + const char *subvol_name = "subvol-name"; + char *long_subvol_name; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed; + uint64_t u64val = 0xdeadbeefbadc0ded; + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { + .fd = 2, + .flags = max_flags_plus_one(2), + }; + + long_subvol_name = malloc(BTRFS_PATH_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("malloc failed"); + memset(long_subvol_name, 'f', BTRFS_PATH_NAME_MAX); + long_subvol_name[BTRFS_PATH_NAME_MAX - 1] = '\0'; + + strcpy(vol_args.name, subvol_name); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + strncpy(vol_args.name, long_subvol_name, BTRFS_PATH_NAME_MAX); + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + long_subvol_name = realloc(long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("realloc failed"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + vol_args_v2.qgroup_inherit = bad_pointer; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + const unsigned int n_qgroups = 8; + unsigned int i; + struct btrfs_qgroup_inherit *inherit; + vol_args_v2.size = + sizeof(*inherit) + n_qgroups * sizeof(inherit->qgroups[0]); + inherit = tail_alloc(vol_args_v2.size); + + inherit->flags = 0x3; + inherit->num_ref_copies = 0; + inherit->num_excl_copies = 0; + inherit->num_qgroups = n_qgroups; + for (i = 0; i < n_qgroups; i++) + inherit->qgroups[i] = 1ULL << i; + inherit->lim.flags = 0x7f; + inherit->lim.max_rfer = u64val; + inherit->lim.max_excl = u64val; + inherit->lim.rsv_rfer = u64val; + inherit->lim.rsv_excl = u64val; + vol_args_v2.qgroup_inherit = inherit; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, &u64val); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, [%" + PRIu64 "]) = -1 EBADF (%m)\n", u64val); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, "); + printflags(btrfs_snap_flags_v2, vol_args_v2.flags, + "BTRFS_SUBVOL_???"); + ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, &vol_args_v2.flags); + printf(") = -1 EBADF (%m)\n"); + + if (write_ok) { + struct btrfs_ioctl_vol_args_v2 args_passed; + /* + * Returns transid if flags & BTRFS_SUBVOL_CREATE_ASYNC + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + int subvolfd; + + strncpy(vol_args_v2.name, subvol_name, + sizeof(vol_args_v2.name)); + vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; + vol_args_v2.size = 0; + vol_args_v2.qgroup_inherit = NULL; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SUBVOL_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SUBVOL_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + subvolfd = openat(btrfs_test_dir_fd, subvol_name, + O_RDONLY|O_DIRECTORY); + if (subvolfd < 0) + perror_msg_and_fail("openat(%s) failed", subvol_name); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_NAME_LEN); + vol_args_v2.fd = subvolfd; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SNAP_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&args_passed, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + /* This only works when mounted w/ -ouser_subvol_rm_allowed */ + strncpy(vol_args.name, long_subvol_name, 255); + vol_args.name[255] = 0; + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%.*s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, 255, long_subvol_name); + + strcpy(vol_args.name, subvol_name); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, subvol_name); + + close(subvolfd); + } + free(long_subvol_name); +} + +static void +btrfs_print_balance_args(struct btrfs_balance_args *args) +{ + printf("{profiles="); + printflags(btrfs_space_info_flags, args->profiles, + "BTRFS_BLOCK_GROUP_???"); + printf(", usage=%"PRI__u64 "%s, devid=%"PRI__u64 "%s, pstart=%"PRI__u64 + "%s, pend=%"PRI__u64 "%s, vstart=%"PRI__u64 "%s, vend=%"PRI__u64 + "%s, target=%"PRI__u64 "%s, flags=", + args->usage, maybe_print_uint64max(args->usage), + args->devid, maybe_print_uint64max(args->devid), + args->pstart, maybe_print_uint64max(args->pstart), + args->pend, maybe_print_uint64max(args->pend), + args->vstart, maybe_print_uint64max(args->vstart), + args->vend, maybe_print_uint64max(args->vend), + args->target, maybe_print_uint64max(args->target)); + printflags(btrfs_balance_args, args->flags, "BTRFS_BALANCE_ARGS_???"); + printf("}"); +} + +/* + * Accepts argument, returns nothing + * - BTRFS_IOC_BALANCE + * - BTRFS_IOC_BALANCE_CTL + * + * Accepts argument, returns argument + * - BTRFS_IOC_BALANCE_V2 + */ +static void +btrfs_test_balance_ioctls(void) +{ + struct btrfs_ioctl_balance_args args = { + .flags = 0x3f, + .data = { + .profiles = 0x7, + .flags = 0x7, + .devid = 1, + .pend = -1ULL, + .vend = -1ULL, + }, + + .meta = { + .profiles = 0x38, + .flags = 0x38, + .devid = 1, + }, + + .sys = { + .profiles = 0x1c0 | (1ULL << 48), + .flags = 0x4c0, + .devid = 1, + }, + }; + struct btrfs_ioctl_vol_args vol_args = {}; + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_PAUSE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 2); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_CANCEL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_balance_args */ + ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, {flags="); + printflags(btrfs_balance_flags, args.flags, "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(-1, BTRFS_IOC_BALANCE_V2, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + args.flags = BTRFS_BALANCE_DATA | BTRFS_BALANCE_METADATA | + BTRFS_BALANCE_SYSTEM; + args.data.flags = 0; + args.data.profiles = 0; + args.meta.flags = 0; + args.meta.profiles = 0; + args.sys.flags = 0; + args.sys.profiles = 0; + printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=", + btrfs_test_dir_fd); + + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_BALANCE_V2, &args); + printf("} => {flags="); + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", state="); + printflags(btrfs_balance_state, args.state, + "BTRFS_BALANCE_STATE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + printf("}) = 0\n"); + } +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_RESIZE + * + * Requires /dev/btrfs-control, consumes argument, returns nothing: + * - BTRFS_IOC_SCAN_DEV + * - BTRFS_IOC_DEVICES_READY + * + */ +static void +btrfs_test_device_ioctls(void) +{ + const char *devid = "1"; + const char *devname = "/dev/sda1"; + struct btrfs_ioctl_vol_args args = { + .fd = 2, + }; + + ioctl(-1, BTRFS_IOC_RESIZE, NULL); + printf("ioctl(-1, BTRFS_IOC_RESIZE, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devid); + ioctl(-1, BTRFS_IOC_RESIZE, &args); + printf("ioctl(-1, BTRFS_IOC_RESIZE, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devname); + ioctl(-1, BTRFS_IOC_SCAN_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_ADD_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_ADD_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_RM_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_RM_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_CLONE + * - BTRFS_IOC_CLONE_RANGE + */ +static void +btrfs_test_clone_ioctls(void) +{ + int clone_fd = 4; + struct btrfs_ioctl_clone_range_args args = { + .src_fd = clone_fd, + .src_offset = 4096, + .src_length = 16384, + .dest_offset = 128 * 1024, + }; + + ioctl(-1, BTRFS_IOC_CLONE, clone_fd); + printf("ioctl(-1, BTRFS_IOC_CLONE or FICLONE, %x) = -1 EBADF (%m)\n", + clone_fd); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, &args); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "{src_fd=%d, src_offset=%" PRI__u64 ", src_length=%" PRI__u64 + ", dest_offset=%" PRI__u64 "}) = -1 EBADF (%m)\n", + (int) args.src_fd, args.src_offset, args.src_length, + args.dest_offset); +} + +#define BTRFS_COMPRESS_TYPES 2 +#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1) + +static void +btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args) +{ + printf("{start=%" PRIu64", len=%" PRIu64 "%s, flags=", + args->start, args->len, maybe_print_uint64max(args->len)); + + printflags(btrfs_defrag_flags, args->flags, "BTRFS_DEFRAG_RANGE_???"); + printf(", extent_thresh=%u, compress_type=", args->extent_thresh); + printxval(btrfs_compress_types, args->compress_type, + "BTRFS_COMPRESS_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_DEFRAG + * - BTRFS_DEFRAG_RANGE + */ +static void +btrfs_test_defrag_ioctls(void) +{ + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_defrag_range_args args = { + .start = 0, + .len = -1ULL, + .flags = max_flags_plus_one(1), + .extent_thresh = 128 * 1024, + .compress_type = 2, /* BTRFS_COMPRESS_LZO */ + }; + + /* + * These are documented as using vol_args but don't + * actually consume it. + */ + ioctl(-1, BTRFS_IOC_DEFRAG, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFRAG, &vol_args); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_defrag_range_args */ + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.compress_type = BTRFS_INVALID_COMPRESS; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.len--; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); +} + +static const char * +xlookup(const struct xlat *xlat, const uint64_t val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + printf("%" PRIu64, objectid); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + printf("%u", type); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_search_key(struct btrfs_ioctl_search_key *key) +{ + printf("key={tree_id="); + btrfs_print_objectid(key->tree_id); + if (verbose || key->min_objectid != 256) { + printf(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + if (verbose || key->max_objectid != -256ULL) { + printf(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + if (key->min_offset) + printf(", min_offset=%" PRI__u64 "%s", + key->min_offset, maybe_print_uint64max(key->min_offset)); + if (key->max_offset) + printf(", max_offset=%" PRI__u64 "%s", + key->max_offset, maybe_print_uint64max(key->max_offset)); + if (key->min_transid) + printf(", min_transid=%" PRI__u64"%s", key->min_transid, + maybe_print_uint64max(key->min_transid)); + if (key->max_transid) + printf(", max_transid=%" PRI__u64"%s", key->max_transid, + maybe_print_uint64max(key->max_transid)); + printf(", min_type="); + btrfs_print_key_type(key->min_type); + printf(", max_type="); + btrfs_print_key_type(key->max_type); + printf(", nr_items=%u}", key->nr_items); +} + +static void +btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, + void *buf, uint64_t buf_size) +{ + if (verbose) { + uint64_t i; + uint64_t off = 0; + printf("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header *sh; + sh = (typeof(sh))(buf + off); + if (i) + printf(", "); + printf("{transid=%" PRI__u64 ", objectid=", + sh->transid); + btrfs_print_objectid(sh->objectid); + printf(", offset=%" PRI__u64 ", type=", sh->offset); + btrfs_print_key_type(sh->type); + printf(", len=%u}", sh->len); + off += sizeof(*sh) + sh->len; + } + printf("]"); + } else + printf("..."); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_TREE_SEARCH + * - BTRFS_IOC_TREE_SEARCH_V2 + */ +static void +btrfs_test_search_ioctls(void) +{ + struct btrfs_ioctl_search_key key_reference = { + .tree_id = 5, + .min_objectid = 256, + .max_objectid = -1ULL, + .min_offset = 0, + .max_offset = -1ULL, + .min_transid = 0, + .max_transid = -1ULL, + .min_type = 0, + .max_type = -1U, + .nr_items = 10, + }; + struct btrfs_ioctl_search_args search_args; + struct btrfs_ioctl_search_args_v2 search_args_v2 = { + .buf_size = 4096, + }; + + ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL) = -1 EBADF (%m)\n"); + + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_objectid = 6; + key_reference.max_objectid = 7; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_offset++; + key_reference.max_offset--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_transid++; + key_reference.max_transid--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_type = 1; + key_reference.max_type = 12; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + if (btrfs_test_root) { + struct btrfs_ioctl_search_args_v2 *args; + int bufsize = 4096; + + key_reference.tree_id = 5; + key_reference.min_type = 1; + key_reference.max_type = 1; + key_reference.min_objectid = 256; + key_reference.max_objectid = 357; + key_reference.min_offset = 0; + key_reference.max_offset = -1ULL; + + search_args.key = key_reference; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&search_args.key); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("} => {key={nr_items=%u}, buf=", + search_args.key.nr_items); + btrfs_print_tree_search_buf(&search_args.key, search_args.buf, + sizeof(search_args.buf)); + printf("}) = 0\n"); + + args = malloc(sizeof(*args) + bufsize); + if (!args) + perror_msg_and_fail("malloc failed"); + + args->key = key_reference; + args->buf_size = bufsize; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&key_reference); + printf(", buf_size=%" PRIu64 "}", (uint64_t) args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {key={nr_items=%u}, buf_size=%" PRIu64 ", buf=", + args->key.nr_items, (uint64_t)args->buf_size); + btrfs_print_tree_search_buf(&args->key, args->buf, + args->buf_size); + printf("}) = 0\n"); + + args->key = key_reference; + args->buf_size = sizeof(struct btrfs_ioctl_search_header); + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&args->key); + printf(", buf_size=%" PRIu64 "}", (uint64_t)args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {buf_size=%" PRIu64 "}) = -1 EOVERFLOW (%m)\n", + (uint64_t)args->buf_size); + free(args); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_LOOKUP + */ +static void +btrfs_test_ino_lookup_ioctl(void) +{ + struct btrfs_ioctl_ino_lookup_args args = { + .treeid = 5, + .objectid = 256, + }; + + ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, {treeid="); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(-1, BTRFS_IOC_INO_LOOKUP, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_INO_LOOKUP, {treeid=", + btrfs_test_dir_fd); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_LOOKUP, &args); + printf("} => {name=\"%s\"}) = 0\n", args.name); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SPACE_INFO + */ +static void +btrfs_test_space_info_ioctl(void) +{ + struct btrfs_ioctl_space_args args = {}; + + ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SPACE_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}) = -1 EBADF (%m)\n", + args.space_slots); + + if (btrfs_test_root) { + struct btrfs_ioctl_space_args args_passed; + struct btrfs_ioctl_space_args *argsp; + args_passed = args; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, args_passed.space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, &args_passed); + printf(" => {total_spaces=%" PRI__u64 "}) = 0\n", + args_passed.total_spaces); + + argsp = malloc(sizeof(args) + + args_passed.total_spaces * sizeof(args.spaces[0])); + if (!argsp) + perror_msg_and_fail("malloc failed"); + + *argsp = args; + argsp->space_slots = args_passed.total_spaces; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, argsp->space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, argsp); + printf(" => {total_spaces=%" PRI__u64 ", spaces=", + argsp->total_spaces); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < argsp->total_spaces; i++) { + struct btrfs_ioctl_space_info *info; + info = &argsp->spaces[i]; + if (i) + printf(", "); + printf("{flags="); + printflags(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + printf(", total_bytes=%" PRI__u64 + ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + } + + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + free(argsp); + } +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SCRUB_CANCEL + * Consumes argument, returns argument: + - * BTRFS_IOC_SCRUB + - * BTRFS_IOC_SCRUB_PROGRESS + */ +static void +btrfs_test_scrub_ioctls(void) +{ + struct btrfs_ioctl_scrub_args args = { + .devid = 1, + .start = 0, + .end = -1ULL, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_SCRUB, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_CANCEL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SCRUB, {devid=%" PRI__u64 ", start=%" + PRI__u64 "%s, end=%" PRI__u64"%s, flags=", + args.devid, args.start, maybe_print_uint64max(args.start), + args.end, maybe_print_uint64max(args.end)); + printflags(btrfs_scrub_flags, args.flags, "BTRFS_SCRUB_???"); + ioctl(-1, BTRFS_IOC_SCRUB, &args); + printf("}) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, " + "{devid=%" PRI__u64 "}) = -1 EBADF (%m)\n", args.devid); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_INFO + */ +static void +btrfs_test_dev_info_ioctl(void) +{ + struct btrfs_ioctl_dev_info_args args = { + .devid = 1, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_DEV_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, " + "{devid=%" PRI__u64", uuid=%s}) = -1 EBADF (%m)\n", + args.devid, uuid_reference_string); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_PATHS + * - BTRFS_IOC_LOGICAL_INO + */ +static void +btrfs_test_ino_path_ioctls(void) +{ + char buf[16384]; + struct btrfs_ioctl_ino_path_args args = { + .inum = 256, + .size = sizeof(buf), + .fspath = (unsigned long)buf, + }; + + ioctl(-1, BTRFS_IOC_INO_PATHS, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_INO_PATHS, &args); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64 "}) = -1 EBADF (%m)\n", + args.inum, args.size, args.fspath); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64 + "}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath); + +#ifdef HAVE_LINUX_FIEMAP_H + if (btrfs_test_root) { + int size; + struct stat si; + int ret; + struct btrfs_data_container *data = (void *)buf; + struct fiemap *fiemap; + int fd; + + ret = fstat(btrfs_test_dir_fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + args.inum = si.st_ino; + printf("ioctl(%d, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64"}", + btrfs_test_dir_fd, args.inum, args.size, + args.fspath); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_PATHS, &args); + printf(" => {fspath={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[\"strace-test\"]"); + } else + printf("..."); + printf("}}) = 0\n"); + + fd = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd < 0) + perror_msg_and_fail("openat(file1) failed"); + + ret = fstat(fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + if (write(fd, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd"); + + /* + * Force delalloc so we can actually + * search for the extent. + */ + fsync(fd); + ioctl(fd, BTRFS_IOC_SYNC, NULL); + printf("ioctl(%d, BTRFS_IOC_SYNC) = 0\n", fd); + + size = sizeof(*fiemap) + 2 * sizeof(fiemap->fm_extents[0]); + fiemap = malloc(size); + if (!fiemap) + perror_msg_and_fail("malloc failed"); + memset(fiemap, 0, size); + + fiemap->fm_length = sizeof(buf); + fiemap->fm_extent_count = 2; + + /* This is also a live test for FIEMAP */ + printf("ioctl(%d, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + fd, fiemap->fm_start, fiemap->fm_length); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u}", fiemap->fm_extent_count); + ioctl(fd, FS_IOC_FIEMAP, fiemap); + printf(" => {fm_flags="); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_mapped_extents=%u, fm_extents=", + fiemap->fm_mapped_extents); + if (verbose) { + printf("["); + unsigned int i; + for (i = 0; i < fiemap->fm_mapped_extents; i++) { + struct fiemap_extent *fe; + fe = &fiemap->fm_extents[i]; + if (i) + printf(", "); + printf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 + ", ", + fe->fe_logical, fe->fe_physical, + fe->fe_length); + printflags(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + printf("}"); + } + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + + args.inum = fiemap->fm_extents[0].fe_physical; + printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64"}", + fd, args.inum, args.size, args.fspath); + ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args); + printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[{inum=%llu, offset=0, root=5}]", + (unsigned long long) si.st_ino); + } else + printf("..."); + printf("}}) = 0\n"); + close(fd); + free(fiemap); + } +#endif /* HAVE_LINUX_FIEMAP_H */ +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SET_RECEIVED_SUBVOL + */ +static void +btrfs_test_set_received_subvol_ioctl(void) +{ + struct btrfs_ioctl_received_subvol_args args = { + .stransid = 0x12345, + .stime = { + .sec = 1463193386, + .nsec = 12345, + }, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, &args); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "{uuid=%s, stransid=%" PRI__u64", stime=%" PRI__u64 + ".%u, flags=0}) = -1 EBADF (%m)\n", + uuid_reference_string, args.stransid, args.stime.sec, + args.stime.nsec); +} + +/* + * Consumes argument, returns nothing (output is via send_fd) + * - BTRFS_IOC_SEND + */ +static void +btrfs_test_send_ioctl(void) +{ + uint64_t u64_array[2] = { 256, 257 }; + struct btrfs_ioctl_send_args args = { + .send_fd = 4, + .parent_root = 257, + .flags = max_flags_plus_one(2), + }; + + ioctl(-1, BTRFS_IOC_SEND, NULL); + printf("ioctl(-1, BTRFS_IOC_SEND, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) + printf("NULL"); + else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); + + args.clone_sources_count = 2; + args.clone_sources = (__u64 *)u64_array; + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) { + printf("["); + btrfs_print_objectid(u64_array[0]); + printf(", "); + btrfs_print_objectid(u64_array[1]); + printf("]"); + } else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_CTL + */ +static void +btrfs_test_quota_ctl_ioctl(void) +{ + struct btrfs_ioctl_quota_ctl_args args = { + .cmd = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_ENABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 2; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_DISABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 3; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_RESCAN__NOTUSED}) = -1 EBADF (%m)\n"); + + args.cmd = 4; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "0x4 /* BTRFS_QUOTA_CTL_??? */}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_ASSIGN + */ +static void +btrfs_test_qgroup_assign_ioctl(void) +{ + struct btrfs_ioctl_qgroup_assign_args args = { + .assign = 1, + .src = 257, + .dst = 258, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, " + "{assign=%" PRI__u64", src=%" PRI__u64", dst=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.assign, args.src, args.dst); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_CREATE + */ +static void +btrfs_test_qgroup_create_ioctl(void) +{ + struct btrfs_ioctl_qgroup_create_args args = { + .create = 1, + .qgroupid = 257, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, " + "{create=%" PRI__u64", qgroupid=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.create, args.qgroupid); +} + +/* + * Consumes nothing, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN_WAIT + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN + */ +static void +btrfs_test_quota_rescan_ioctl(void) +{ + struct btrfs_ioctl_quota_rescan_args args = { + .progress = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, " + "{flags=0}) = -1 EBADF (%m)\n"); + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT) = -1 EBADF (%m)\n"); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FSLABEL + * + * Consumes no argument, returns argument: + * - BTRFS_IOC_GET_FS_LABEL + */ +static void +btrfs_test_label_ioctls(void) +{ + char label[BTRFS_LABEL_SIZE] = "btrfs-label"; + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, \"%s\") = -1 EBADF (%m)\n", + label); + + if (write_ok) { + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_SET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_GET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_GET_DEV_STATS + */ +static void +btrfs_test_get_dev_stats_ioctl(void) +{ + struct btrfs_ioctl_get_dev_stats args = { + .devid = 1, + .nr_items = 5, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL); + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + unsigned int i; + args.flags = BTRFS_DEV_STATS_RESET; + printf("ioctl(%d, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + btrfs_test_dir_fd, args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_DEV_STATS, &args); + printf("} => {nr_items=%" PRI__u64 ", flags=", + args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + printf(", ["); + for (i = 0; i < args.nr_items; i++) { + const char *name = xlookup(btrfs_dev_stats_values, i); + if (i) + printf(", "); + if (name) + printf("/* %s */ ", name); + printf("%" PRI__u64, args.values[i]); + } + printf("]}) = 0\n"); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_REPLACE + * + * Test environment for this is more difficult; It's better to do it by hand. + */ +static void +btrfs_test_dev_replace_ioctl(void) +{ + struct btrfs_ioctl_dev_replace_args args = { + .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, + .start = { + .srcdevid = 1, + }, + }; + strcpy((char *)args.start.srcdev_name, "/dev/sda1"); + strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); + + /* struct btrfs_ioctl_dev_replace_args */ + ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_START, start={srcdevid=%" + PRI__u64", cont_reading_from_srcdev_mode=%" PRI__u64 + ", srcdev_name=\"%s\", tgtdev_name=\"%s\"}}) = -1 EBADF (%m)\n", + args.start.srcdevid, + args.start.cont_reading_from_srcdev_mode, + (char *)args.start.srcdev_name, + (char *)args.start.tgtdev_name); + + args.cmd = 1; + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS}) = -1 EBADF (%m)\n"); +} + +static void +btrfs_test_extent_same_ioctl(void) +{ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + struct file_dedupe_range args = { + .src_offset = 1024, + .src_length = 10240, + }; + struct file_dedupe_range *argsp; + + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, NULL); + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=[]", + (uint64_t)args.src_offset, + (uint64_t)args.src_length, args.dest_count); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, &args); + printf("}) = -1 EBADF (%m)\n"); + + argsp = malloc(sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + if (!argsp) + perror_msg_and_fail("malloc failed"); + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + *argsp = args; + argsp->dest_count = 3; + argsp->info[0].dest_fd = 2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = 2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = 2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=", + (int64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + printf("]"); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + int fd1, fd2; + char buf[16384]; + + memset(buf, 0, sizeof(buf)); + + fd1 = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd1 < 0) + perror_msg_and_fail("open file1 failed"); + + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDWR|O_CREAT, 0600); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + + close(fd2); + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDONLY); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + argsp->src_offset = 0; + argsp->src_length = 4096; + argsp->dest_count = 3; + argsp->info[0].dest_fd = fd2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = fd2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = fd2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(%d, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 ", src_length=%" PRIu64 + ", dest_count=%hu, info=", fd1, + (uint64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 + ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + + ioctl(fd1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("]} => {info="); + printf("[{bytes_deduped=%" PRIu64 ", status=%d}, " + "{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[0].bytes_deduped, + argsp->info[0].status, + (uint64_t)argsp->info[1].bytes_deduped, + argsp->info[1].status); + if (verbose) + printf(", {bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[2].bytes_deduped, + argsp->info[2].status); + else + printf(", ..."); + printf("]}) = 0\n"); + close(fd1); + close(fd2); + unlinkat(btrfs_test_dir_fd, "file1", 0); + unlinkat(btrfs_test_dir_fd, "file2", 0); + close(fd1); + close(fd2); + } + free(argsp); +#endif /* BTRFS_IOC_FILE_EXTENT_SAME */ +} + +static void +btrfs_print_features(struct btrfs_ioctl_feature_flags *flags) +{ + printf("{compat_flags="); + printflags(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + printf(", compat_ro_flags="); + printflags(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + printf(", incompat_flags="); + printflags(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FEATURES + * + * Consumes nothing, returns argument: + * - BTRFS_IOC_GET_FEATURES + * - BTRFS_IOC_GET_SUPPORTED_FEATURES + */ +static void +btrfs_test_features_ioctls(void) +{ + struct btrfs_ioctl_feature_flags args[2] = { + { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, + }; + struct btrfs_ioctl_feature_flags supported_features[3]; + + ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, ["); + btrfs_print_features(&args[0]); + printf(", "); + btrfs_print_features(&args[1]); + ioctl(-1, BTRFS_IOC_SET_FEATURES, &args); + printf("]) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_GET_FEATURES, ", + btrfs_test_dir_fd); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FEATURES, + &supported_features); + btrfs_print_features(&supported_features[0]); + printf(") = 0\n"); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_SUPPORTED_FEATURES, + &supported_features); + printf("ioctl(%d, BTRFS_IOC_GET_SUPPORTED_FEATURES, ", + btrfs_test_dir_fd); + printf("[ /* supported */ "); + btrfs_print_features(&supported_features[0]); + printf(", /* safe to set */ "); + btrfs_print_features(&supported_features[1]); + printf(", /* safe to clear */ "); + btrfs_print_features(&supported_features[2]); + printf("]) = 0\n"); + } +} + +static void +btrfs_test_read_ioctls(void) +{ + static const struct xlat btrfs_read_cmd[] = { + XLAT(BTRFS_IOC_BALANCE_PROGRESS), + XLAT(BTRFS_IOC_FS_INFO), + XLAT(BTRFS_IOC_GET_FEATURES), + XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), + XLAT(BTRFS_IOC_QGROUP_LIMIT), + XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS), + XLAT(BTRFS_IOC_START_SYNC), + XLAT(BTRFS_IOC_SUBVOL_GETFLAGS), + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(btrfs_read_cmd); ++i) { + ioctl(-1, (unsigned long) btrfs_read_cmd[i].val, 0); + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", btrfs_read_cmd[i].str); + } +} + +int +main(int argc, char *argv[]) +{ + + int opt; + int ret; + const char *path; + + while ((opt = getopt(argc, argv, "wv")) != -1) { + switch (opt) { + case 'v': + /* + * These tests are incomplete, especially when + * printing arrays of objects are involved. + */ + verbose = true; + break; + case 'w': + write_ok = true; + break; + default: + error_msg_and_fail("usage: btrfs [-v] [-w] [path]"); + } + } + + /* + * This will enable optional tests that require a valid file descriptor + */ + if (optind < argc) { + int rootfd; + struct statfs sfi; + path = argv[optind]; + + ret = statfs(path, &sfi); + if (ret) + perror_msg_and_fail("statfs(%s) failed", path); + + if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC) + error_msg_and_fail("%s is not a btrfs file system", + path); + + btrfs_test_root = path; + rootfd = open(path, O_RDONLY|O_DIRECTORY); + if (rootfd < 0) + perror_msg_and_fail("open(%s) failed", path); + + ret = mkdirat(rootfd, "strace-test", 0755); + if (ret < 0 && errno != EEXIST) + perror_msg_and_fail("mkdirat(strace-test) failed"); + + btrfs_test_dir_fd = openat(rootfd, "strace-test", + O_RDONLY|O_DIRECTORY); + if (btrfs_test_dir_fd < 0) + perror_msg_and_fail("openat(strace-test) failed"); + close(rootfd); + } else + write_ok = false; + + if (btrfs_test_root) { + fprintf(stderr, "Testing live ioctls on %s (%s)\n", + btrfs_test_root, write_ok ? "read/write" : "read only"); + } + + btrfs_test_read_ioctls(); + btrfs_test_trans_ioctls(); + btrfs_test_sync_ioctls(); + btrfs_test_subvol_ioctls(); + btrfs_test_balance_ioctls(); + btrfs_test_device_ioctls(); + btrfs_test_clone_ioctls(); + btrfs_test_defrag_ioctls(); + btrfs_test_search_ioctls(); + btrfs_test_ino_lookup_ioctl(); + btrfs_test_space_info_ioctl(); + btrfs_test_scrub_ioctls(); + btrfs_test_dev_info_ioctl(); + btrfs_test_ino_path_ioctls(); + btrfs_test_set_received_subvol_ioctl(); + btrfs_test_send_ioctl(); + btrfs_test_quota_ctl_ioctl(); + btrfs_test_qgroup_assign_ioctl(); + btrfs_test_qgroup_create_ioctl(); + btrfs_test_quota_rescan_ioctl(); + btrfs_test_label_ioctls(); + btrfs_test_get_dev_stats_ioctl(); + btrfs_test_dev_replace_ioctl(); + btrfs_test_extent_same_ioctl(); + btrfs_test_features_ioctls(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BTRFS_H") + +#endif diff -Nru strace-4.11/tests/btrfs.test strace-4.12/tests/btrfs.test --- strace-4.11/tests/btrfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/btrfs.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic btrfs ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/btrfs-v.test strace-4.12/tests/btrfs-v.test --- strace-4.11/tests/btrfs-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/btrfs-v.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl + +. "${srcdir=.}/init.sh" + +run_prog ./btrfs -v > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests/btrfs-vw.test strace-4.12/tests/btrfs-vw.test --- strace-4.11/tests/btrfs-vw.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/btrfs-vw.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests/btrfs-w.test strace-4.12/tests/btrfs-w.test --- strace-4.11/tests/btrfs-w.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/btrfs-w.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-w" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests/caps.awk strace-4.12/tests/caps.awk --- strace-4.11/tests/caps.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/caps.awk 2016-05-05 22:20:40.000000000 +0000 @@ -1,6 +1,8 @@ #!/bin/gawk # -# Copyright (c) 2014-2015 Dmitry V. Levin +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,13 +28,19 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BEGIN { - cap = "(0|CAP_[A-Z_]+(\\|CAP_[A-Z_]+)*|CAP_[A-Z_]+(\\|CAP_[A-Z_]+){37}\\|0xffffffc0)" - r[1] = "^capget\\(\\{_LINUX_CAPABILITY_VERSION_3, 0\\}, \\{" cap ", " cap ", " cap "\\}\\) = 0$" - capset_data = "{CAP_DAC_OVERRIDE|CAP_WAKE_ALARM, CAP_DAC_READ_SEARCH|CAP_BLOCK_SUSPEND, 0}" - s[2] = "capset({_LINUX_CAPABILITY_VERSION_3, 0}, " capset_data ") = -1 EPERM (Operation not permitted)" - s[3] = "+++ exited with 0 +++" + cap = "(0|1< + * This file is part of caps strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include extern int capget(int *, int *); extern int capset(int *, const int *); @@ -33,14 +37,26 @@ int main(void) { - int unused[6]; const int data[] = { 2, 4, 0, 8, 16, 0 }; const int v3 = 0x20080522; - int head[] = { v3, 0 }; - if (capget(head, unused) || head[0] != v3 || - capset(head, data) == 0 || errno != EPERM) - return 77; + int * const head = tail_alloc(sizeof(int) * 2); + head[0] = v3; + head[1] = 0; + int * const tail_data = tail_alloc(sizeof(data)); + + capget(NULL, NULL); + capget(head + 2, tail_data); + capget(head, tail_data + ARRAY_SIZE(data)); + + if (capget(head, tail_data)) + perror_msg_and_skip("capget"); + if (head[0] != v3) + error_msg_and_skip("capget: v3 expected"); + + memcpy(tail_data, data, sizeof(data)); + if (capset(head, data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); return 0; } diff -Nru strace-4.11/tests/caps.test strace-4.12/tests/caps.test --- strace-4.11/tests/caps.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests/caps.test 2016-02-08 18:21:10.000000000 +0000 @@ -5,7 +5,7 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -e trace=capget,capset $args +run_strace -a 19 -e trace=capget,capset $args match_awk exit 0 diff -Nru strace-4.11/tests/chmod.c strace-4.12/tests/chmod.c --- strace-4.11/tests/chmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chmod.c 2016-03-07 23:13:28.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2016 Anchit Jain + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_chmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "chmod_test_file"; + + if (open(fname, O_CREAT|O_RDONLY, 0400) == -1) + perror_msg_and_fail("open"); + + int chmod_res = syscall(__NR_chmod, fname, 0600); + + if (chmod_res == 0) { + printf("chmod(\"%s\", 0600) = 0\n", fname); + } else { + if (errno == ENOSYS) { + printf("chmod(\"%s\", 0600) = -1 ENOSYS (%m)\n", fname); + } else { + perror_msg_and_fail("chmod"); + } + } + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (chmod_res == 0) { + if (syscall(__NR_chmod, fname, 0600) != -1) + perror_msg_and_fail("chmod"); + + printf("chmod(\"%s\", 0600) = -1 ENOENT (%m)\n", fname); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chmod") + +#endif diff -Nru strace-4.11/tests/chmod.test strace-4.12/tests/chmod.test --- strace-4.11/tests/chmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests/chown32.c strace-4.12/tests/chown32.c --- strace-4.11/tests/chown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chown32.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_chown32 + +# define SYSCALL_NR __NR_chown32 +# define SYSCALL_NAME "chown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown32") + +#endif diff -Nru strace-4.11/tests/chown32.test strace-4.12/tests/chown32.test --- strace-4.11/tests/chown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chown32.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests/chown.c strace-4.12/tests/chown.c --- strace-4.11/tests/chown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_chown + +# define SYSCALL_NR __NR_chown +# define SYSCALL_NAME "chown" + +# if defined __NR_chown32 && __NR_chown != __NR_chown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown") + +#endif diff -Nru strace-4.11/tests/chown.test strace-4.12/tests/chown.test --- strace-4.11/tests/chown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 diff -Nru strace-4.11/tests/chroot.c strace-4.12/tests/chroot.c --- strace-4.11/tests/chroot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chroot.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_chroot + +# include +# include + +int +main(void) +{ + static const char sample[] = "chroot.sample"; + + long rc = syscall(__NR_chroot, sample); + printf("chroot(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chroot") + +#endif diff -Nru strace-4.11/tests/chroot.test strace-4.12/tests/chroot.test --- strace-4.11/tests/chroot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/chroot.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chroot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests/clock_adjtime.c strace-4.12/tests/clock_adjtime.c --- strace-4.11/tests/clock_adjtime.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/clock_adjtime.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of clock_adjtime strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_clock_adjtime + +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_clock_adjtime, CLOCK_MONOTONIC, NULL); + printf("clock_adjtime(CLOCK_MONOTONIC, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + void *efault = tail_alloc(1); + + rc = syscall(__NR_clock_adjtime, CLOCK_REALTIME, efault); + printf("clock_adjtime(CLOCK_REALTIME, %p) = %ld %s (%m)\n", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_adjtime") + +#endif diff -Nru strace-4.11/tests/clock_adjtime.test strace-4.12/tests/clock_adjtime.test --- strace-4.11/tests/clock_adjtime.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/clock_adjtime.test 2016-04-22 01:13:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_adjtime syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff -Nru strace-4.11/tests/clock_nanosleep.c strace-4.12/tests/clock_nanosleep.c --- strace-4.11/tests/clock_nanosleep.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests/clock_nanosleep.c 2016-01-06 09:46:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -63,34 +61,32 @@ }; if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, NULL)) - return 77; + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, NULL, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + NULL, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, NULL, %p)" - " = -1 EFAULT (Bad address)\n", &rem.ts); + " = -1 EFAULT (%m)\n", &rem.ts); - if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == 0); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 999999999 + 1; - if (!syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_MONOTONIC, 0" - ", {%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + ", {%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -99,25 +95,23 @@ (intmax_t) itv.it_value.tv_usec); --req.ts.tv_nsec; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); - if (syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts)) - return 77; + assert(syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts) == 0); printf("clock_gettime(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); ++req.ts.tv_sec; rem.ts.tv_sec = 0xc0de4; rem.ts.tv_nsec = 0xc0de5; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, - &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {%jd, %jd}, %p)" " = ? ERESTARTNOHAND (To be restarted if no handler)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); diff -Nru strace-4.11/tests/clock_nanosleep.test strace-4.12/tests/clock_nanosleep.test --- strace-4.11/tests/clock_nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/clock_nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check clock_nanosleep syscall decoding. +# Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_nanosleep,clock_gettime,setitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer diff -Nru strace-4.11/tests/clock_xettime.c strace-4.12/tests/clock_xettime.c --- strace-4.11/tests/clock_xettime.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests/clock_xettime.c 2016-01-06 09:48:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,13 +47,13 @@ }; if (syscall(__NR_clock_getres, CLOCK_REALTIME, &t.ts)) - return 77; + perror_msg_and_skip("clock_getres CLOCK_REALTIME"); printf("clock_getres(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); if (syscall(__NR_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &t.ts)) - return 77; + perror_msg_and_skip("clock_gettime CLOCK_PROCESS_CPUTIME_ID"); printf("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -60,9 +61,10 @@ t.ts.tv_sec = 0xdeface1; t.ts.tv_nsec = 0xdeface2; if (!syscall(__NR_clock_settime, CLOCK_THREAD_CPUTIME_ID, &t.ts)) - return 77; + error_msg_and_skip("clock_settime CLOCK_THREAD_CPUTIME_ID:" + " EINVAL expected"); printf("clock_settime(CLOCK_THREAD_CPUTIME_ID, {%jd, %jd})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -72,10 +74,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_clock_getres && __NR_clock_gettime && __NR_clock_settime") #endif diff -Nru strace-4.11/tests/clock_xettime.test strace-4.12/tests/clock_xettime.test --- strace-4.11/tests/clock_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/clock_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check clock_getres, clock_gettime, and clock_settime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_getres,clock_gettime,clock_settime -run_strace -a36 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime diff -Nru strace-4.11/tests/copy_file_range.c strace-4.12/tests/copy_file_range.c --- strace-4.11/tests/copy_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/copy_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of copy_file_range strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_copy_file_range + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 0; + + long rc = syscall(__NR_copy_file_range, + fd_in, off_in, fd_out, off_out, len, flags); + printf("copy_file_range(%d, [%lld], %d, [%lld], %zu, %u)" + " = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, flags, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_copy_file_range") + +#endif diff -Nru strace-4.11/tests/copy_file_range.test strace-4.12/tests/copy_file_range.test --- strace-4.11/tests/copy_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/copy_file_range.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check copy_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/count-f.c strace-4.12/tests/count-f.c --- strace-4.11/tests/count-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/count-f.c 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * This file is part of count-f strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#define N 32 +#define P 8 +#define T 4 + +static void * +thread(void *arg) +{ + unsigned int i; + + assert(chdir(".") == 0); + for (i = 0; i < N; ++i) { + assert(chdir("") == -1); + assert(chdir(".") == 0); + } + + return NULL; +} + +static int +process(void) +{ + unsigned int i; + pthread_t t[T]; + + for (i = 0; i < T; ++i) { + errno = pthread_create(&t[i], NULL, thread, NULL); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + for (i = 0; i < T; ++i) { + void *retval; + errno = pthread_join(t[i], &retval); + if (errno) + perror_msg_and_fail("pthread_join"); + } + + return 0; +} + +int +main(void) +{ + unsigned int i; + pid_t p[P]; + + for (i = 0; i < P; ++i) { + p[i] = fork(); + if (p[i] < 0) + perror_msg_and_fail("fork"); + if (!p[i]) + return process(); + } + for (i = 0; i < P; ++i) { + int s; + + assert(waitpid(p[i], &s, 0) == p[i]); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + + return 0; +} diff -Nru strace-4.11/tests/count-f.expected strace-4.12/tests/count-f.expected --- strace-4.11/tests/count-f.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/count-f.expected 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1 @@ +[ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir diff -Nru strace-4.11/tests/count-f.test strace-4.12/tests/count-f.test --- strace-4.11/tests/count-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/count-f.test 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check whether -c counts through forks and clones properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -q -f -c $args +match_grep + +exit 0 diff -Nru strace-4.11/tests/count.test strace-4.12/tests/count.test --- strace-4.11/tests/count.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/count.test 2016-05-08 00:00:18.000000000 +0000 @@ -2,7 +2,7 @@ # # Check whether -c and -w options work. # -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,14 +29,14 @@ . "${srcdir=.}/init.sh" +run_prog ./sleep 0 check_prog grep -check_prog sleep grep_log() { local pattern="$1"; shift - run_strace "$@" + run_strace "$@" ./sleep 1 grep nanosleep "$LOG" > /dev/null || framework_skip_ 'sleep does not use nanosleep' @@ -48,9 +48,9 @@ } } -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c sleep 1 -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep sleep 1 -grep_log ' *[^ ]+ +(1\.0|0\.99)[^n]*nanosleep' -cw sleep 1 -grep_log '100\.00 +(1\.0|0\.99)[^n]*nanosleep' -cw -enanosleep sleep 1 +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep +grep_log ' *[^ ]+ +(1\.[01]|0\.99)[^n]*nanosleep' -cw +grep_log '100\.00 +(1\.[01]|0\.99)[^n]*nanosleep' -cw -enanosleep exit 0 diff -Nru strace-4.11/tests/creat.c strace-4.12/tests/creat.c --- strace-4.11/tests/creat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/creat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_creat + +# include +# include + +# define TMP_FILE "creat" + +int +main(void) +{ + long rc = syscall(__NR_creat, TMP_FILE, 0400); + printf("creat(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, 0400, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_creat") + +#endif diff -Nru strace-4.11/tests/creat.test strace-4.12/tests/creat.test --- strace-4.11/tests/creat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/creat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check creat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/dup2.c strace-4.12/tests/dup2.c --- strace-4.11/tests/dup2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_dup2 + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup2, fd_old, fd_new); + printf("dup2(%d, %d) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup2") + +#endif diff -Nru strace-4.11/tests/dup2.test strace-4.12/tests/dup2.test --- strace-4.11/tests/dup2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup2.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests/dup3.c strace-4.12/tests/dup3.c --- strace-4.11/tests/dup3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup3.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include +#include + +#if defined __NR_dup3 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup3 && && O_CLOEXEC") + +#endif diff -Nru strace-4.11/tests/dup3.test strace-4.12/tests/dup3.test --- strace-4.11/tests/dup3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup3.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup3 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests/dup.c strace-4.12/tests/dup.c --- strace-4.11/tests/dup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = dup(-1); + printf("dup(-1) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/dup.test strace-4.12/tests/dup.test --- strace-4.11/tests/dup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/dup.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests/epoll_create1.c strace-4.12/tests/epoll_create1.c --- strace-4.11/tests/epoll_create1.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/epoll_create1.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include #include +#if defined __NR_epoll_create1 && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_epoll_create1 && defined O_CLOEXEC - (void) close(0); - if (syscall(__NR_epoll_create1, O_CLOEXEC)) - return 77; - return syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK) >= 0; + long rc = syscall(__NR_epoll_create1, O_CLOEXEC); + if (rc == -1) { + printf("epoll_create1(EPOLL_CLOEXEC) = -1 %s (%m)\n", + errno2name()); + } else { + printf("epoll_create1(EPOLL_CLOEXEC) = %ld\n", rc); + } + + rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK); + printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %ld %s (%m)\n", + O_NONBLOCK, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests/epoll_create1.expected strace-4.12/tests/epoll_create1.expected --- strace-4.11/tests/epoll_create1.expected 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests/epoll_create1.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -epoll_create1\(EPOLL_CLOEXEC\) += 0 -epoll_create1\(EPOLL_CLOEXEC\|0x[[:xdigit:]]+\) += -1 EINVAL .* diff -Nru strace-4.11/tests/epoll_create1.test strace-4.12/tests/epoll_create1.test --- strace-4.11/tests/epoll_create1.test 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests/epoll_create1.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check epoll_create1 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e epoll_create1 $args -match_grep - -exit 0 +run_strace_match_diff -a28 diff -Nru strace-4.11/tests/epoll_create.c strace-4.12/tests/epoll_create.c --- strace-4.11/tests/epoll_create.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_create.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_create + +# include +# include + +int +main(void) +{ + const long int size = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_epoll_create, size); + printf("epoll_create(%d) = %ld %s (%m)\n", + (int) size, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_creat") + +#endif diff -Nru strace-4.11/tests/epoll_create.test strace-4.12/tests/epoll_create.test --- strace-4.11/tests/epoll_create.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_create.test 2016-04-08 07:59:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests/epoll_ctl.c strace-4.12/tests/epoll_ctl.c --- strace-4.11/tests/epoll_ctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_ctl.c 2016-05-16 21:47:09.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_ctl + +# include +# include +# include +# include + +static long +invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) +{ + op |= (unsigned long) 0xffffffff00000000; + return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); +} + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + ev->events = EPOLLIN; + + long rc = invoke_syscall(-1U, EPOLL_CTL_ADD, -2U, ev); + printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); + + rc = invoke_syscall(-3U, EPOLL_CTL_DEL, -4U, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", + ev, rc, errno2name()); + + rc = invoke_syscall(-1UL, EPOLL_CTL_MOD, -16UL, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_ctl") + +#endif diff -Nru strace-4.11/tests/epoll_ctl.test strace-4.12/tests/epoll_ctl.test --- strace-4.11/tests/epoll_ctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_ctl.test 2016-04-08 07:59:15.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_ctl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/epoll_pwait.c strace-4.12/tests/epoll_pwait.c --- strace-4.11/tests/epoll_pwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_pwait.c 2016-05-10 01:37:46.000000000 +0000 @@ -0,0 +1,32 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_pwait + +# include +# include +# include +# include + +# include "kernel_types.h" + +int +main(void) +{ + sigset_t set[2]; + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, + set, (kernel_ulong_t) sizeof(set)); + printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n", + ev, set, (unsigned) sizeof(set), rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_pwait") + +#endif diff -Nru strace-4.11/tests/epoll_pwait.test strace-4.12/tests/epoll_pwait.test --- strace-4.11/tests/epoll_pwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_pwait.test 2016-05-09 22:12:57.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of epoll_pwait syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/epoll_wait.c strace-4.12/tests/epoll_wait.c --- strace-4.11/tests/epoll_wait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_wait.c 2016-05-09 21:46:17.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_wait + +# include +# include +# include + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2); + printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n", + ev, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_wait") + +#endif diff -Nru strace-4.11/tests/epoll_wait.test strace-4.12/tests/epoll_wait.test --- strace-4.11/tests/epoll_wait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/epoll_wait.test 2016-04-08 07:59:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_wait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 diff -Nru strace-4.11/tests/errno2name.c strace-4.12/tests/errno2name.c --- strace-4.11/tests/errno2name.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/errno2name.c 2016-04-21 01:08:55.000000000 +0000 @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +errno2name(void) +{ + switch (errno) { + /* names taken from linux/errnoent.h */ +#ifdef E2BIG + CASE(E2BIG); +#endif +#ifdef EACCES + CASE(EACCES); +#endif +#ifdef EADDRINUSE + CASE(EADDRINUSE); +#endif +#ifdef EADDRNOTAVAIL + CASE(EADDRNOTAVAIL); +#endif +#ifdef EADV + CASE(EADV); +#endif +#ifdef EAFNOSUPPORT + CASE(EAFNOSUPPORT); +#endif +#ifdef EAGAIN + CASE(EAGAIN); +#endif +#ifdef EALREADY + CASE(EALREADY); +#endif +#ifdef EBADCOOKIE + CASE(EBADCOOKIE); +#endif +#ifdef EBADE + CASE(EBADE); +#endif +#ifdef EBADF + CASE(EBADF); +#endif +#ifdef EBADFD + CASE(EBADFD); +#endif +#ifdef EBADHANDLE + CASE(EBADHANDLE); +#endif +#ifdef EBADMSG + CASE(EBADMSG); +#endif +#ifdef EBADR + CASE(EBADR); +#endif +#ifdef EBADRQC + CASE(EBADRQC); +#endif +#ifdef EBADSLT + CASE(EBADSLT); +#endif +#ifdef EBADTYPE + CASE(EBADTYPE); +#endif +#ifdef EBFONT + CASE(EBFONT); +#endif +#ifdef EBUSY + CASE(EBUSY); +#endif +#ifdef ECANCELED + CASE(ECANCELED); +#endif +#ifdef ECHILD + CASE(ECHILD); +#endif +#ifdef ECHRNG + CASE(ECHRNG); +#endif +#ifdef ECOMM + CASE(ECOMM); +#endif +#ifdef ECONNABORTED + CASE(ECONNABORTED); +#endif +#ifdef ECONNREFUSED + CASE(ECONNREFUSED); +#endif +#ifdef ECONNRESET + CASE(ECONNRESET); +#endif +#ifdef EDEADLK + CASE(EDEADLK); +#endif +#ifdef EDESTADDRREQ + CASE(EDESTADDRREQ); +#endif +#ifdef EDOM + CASE(EDOM); +#endif +#ifdef EDOTDOT + CASE(EDOTDOT); +#endif +#ifdef EDQUOT + CASE(EDQUOT); +#endif +#ifdef EEXIST + CASE(EEXIST); +#endif +#ifdef EFAULT + CASE(EFAULT); +#endif +#ifdef EFBIG + CASE(EFBIG); +#endif +#ifdef EHOSTDOWN + CASE(EHOSTDOWN); +#endif +#ifdef EHOSTUNREACH + CASE(EHOSTUNREACH); +#endif +#ifdef EHWPOISON + CASE(EHWPOISON); +#endif +#ifdef EIDRM + CASE(EIDRM); +#endif +#ifdef EILSEQ + CASE(EILSEQ); +#endif +#ifdef EINPROGRESS + CASE(EINPROGRESS); +#endif +#ifdef EINTR + CASE(EINTR); +#endif +#ifdef EINVAL + CASE(EINVAL); +#endif +#ifdef EIO + CASE(EIO); +#endif +#ifdef EIOCBQUEUED + CASE(EIOCBQUEUED); +#endif +#ifdef EISCONN + CASE(EISCONN); +#endif +#ifdef EISDIR + CASE(EISDIR); +#endif +#ifdef EISNAM + CASE(EISNAM); +#endif +#ifdef EJUKEBOX + CASE(EJUKEBOX); +#endif +#ifdef EKEYEXPIRED + CASE(EKEYEXPIRED); +#endif +#ifdef EKEYREJECTED + CASE(EKEYREJECTED); +#endif +#ifdef EKEYREVOKED + CASE(EKEYREVOKED); +#endif +#ifdef EL2HLT + CASE(EL2HLT); +#endif +#ifdef EL2NSYNC + CASE(EL2NSYNC); +#endif +#ifdef EL3HLT + CASE(EL3HLT); +#endif +#ifdef EL3RST + CASE(EL3RST); +#endif +#ifdef ELIBACC + CASE(ELIBACC); +#endif +#ifdef ELIBBAD + CASE(ELIBBAD); +#endif +#ifdef ELIBEXEC + CASE(ELIBEXEC); +#endif +#ifdef ELIBMAX + CASE(ELIBMAX); +#endif +#ifdef ELIBSCN + CASE(ELIBSCN); +#endif +#ifdef ELNRNG + CASE(ELNRNG); +#endif +#ifdef ELOOP + CASE(ELOOP); +#endif +#ifdef EMEDIUMTYPE + CASE(EMEDIUMTYPE); +#endif +#ifdef EMFILE + CASE(EMFILE); +#endif +#ifdef EMLINK + CASE(EMLINK); +#endif +#ifdef EMSGSIZE + CASE(EMSGSIZE); +#endif +#ifdef EMULTIHOP + CASE(EMULTIHOP); +#endif +#ifdef ENAMETOOLONG + CASE(ENAMETOOLONG); +#endif +#ifdef ENAVAIL + CASE(ENAVAIL); +#endif +#ifdef ENETDOWN + CASE(ENETDOWN); +#endif +#ifdef ENETRESET + CASE(ENETRESET); +#endif +#ifdef ENETUNREACH + CASE(ENETUNREACH); +#endif +#ifdef ENFILE + CASE(ENFILE); +#endif +#ifdef ENOANO + CASE(ENOANO); +#endif +#ifdef ENOBUFS + CASE(ENOBUFS); +#endif +#ifdef ENOCSI + CASE(ENOCSI); +#endif +#ifdef ENODATA + CASE(ENODATA); +#endif +#ifdef ENODEV + CASE(ENODEV); +#endif +#ifdef ENOENT + CASE(ENOENT); +#endif +#ifdef ENOEXEC + CASE(ENOEXEC); +#endif +#ifdef ENOIOCTLCMD + CASE(ENOIOCTLCMD); +#endif +#ifdef ENOKEY + CASE(ENOKEY); +#endif +#ifdef ENOLCK + CASE(ENOLCK); +#endif +#ifdef ENOLINK + CASE(ENOLINK); +#endif +#ifdef ENOMEDIUM + CASE(ENOMEDIUM); +#endif +#ifdef ENOMEM + CASE(ENOMEM); +#endif +#ifdef ENOMSG + CASE(ENOMSG); +#endif +#ifdef ENONET + CASE(ENONET); +#endif +#ifdef ENOPKG + CASE(ENOPKG); +#endif +#ifdef ENOPROTOOPT + CASE(ENOPROTOOPT); +#endif +#ifdef ENOSPC + CASE(ENOSPC); +#endif +#ifdef ENOSR + CASE(ENOSR); +#endif +#ifdef ENOSTR + CASE(ENOSTR); +#endif +#ifdef ENOSYS + CASE(ENOSYS); +#endif +#ifdef ENOTBLK + CASE(ENOTBLK); +#endif +#ifdef ENOTCONN + CASE(ENOTCONN); +#endif +#ifdef ENOTDIR + CASE(ENOTDIR); +#endif +#ifdef ENOTEMPTY + CASE(ENOTEMPTY); +#endif +#ifdef ENOTNAM + CASE(ENOTNAM); +#endif +#ifdef ENOTRECOVERABLE + CASE(ENOTRECOVERABLE); +#endif +#ifdef ENOTSOCK + CASE(ENOTSOCK); +#endif +#ifdef ENOTSUPP + CASE(ENOTSUPP); +#endif +#ifdef ENOTSYNC + CASE(ENOTSYNC); +#endif +#ifdef ENOTTY + CASE(ENOTTY); +#endif +#ifdef ENOTUNIQ + CASE(ENOTUNIQ); +#endif +#ifdef ENXIO + CASE(ENXIO); +#endif +#ifdef EOPENSTALE + CASE(EOPENSTALE); +#endif +#ifdef EOPNOTSUPP + CASE(EOPNOTSUPP); +#endif +#ifdef EOVERFLOW + CASE(EOVERFLOW); +#endif +#ifdef EOWNERDEAD + CASE(EOWNERDEAD); +#endif +#ifdef EPERM + CASE(EPERM); +#endif +#ifdef EPFNOSUPPORT + CASE(EPFNOSUPPORT); +#endif +#ifdef EPIPE + CASE(EPIPE); +#endif +#ifdef EPROBE_DEFER + CASE(EPROBE_DEFER); +#endif +#ifdef EPROTO + CASE(EPROTO); +#endif +#ifdef EPROTONOSUPPORT + CASE(EPROTONOSUPPORT); +#endif +#ifdef EPROTOTYPE + CASE(EPROTOTYPE); +#endif +#ifdef ERANGE + CASE(ERANGE); +#endif +#ifdef EREMCHG + CASE(EREMCHG); +#endif +#ifdef EREMOTE + CASE(EREMOTE); +#endif +#ifdef EREMOTEIO + CASE(EREMOTEIO); +#endif +#ifdef ERESTART + CASE(ERESTART); +#endif +#ifdef ERESTARTNOHAND + CASE(ERESTARTNOHAND); +#endif +#ifdef ERESTARTNOINTR + CASE(ERESTARTNOINTR); +#endif +#ifdef ERESTARTSYS + CASE(ERESTARTSYS); +#endif +#ifdef ERESTART_RESTARTBLOCK + CASE(ERESTART_RESTARTBLOCK); +#endif +#ifdef ERFKILL + CASE(ERFKILL); +#endif +#ifdef EROFS + CASE(EROFS); +#endif +#ifdef ESERVERFAULT + CASE(ESERVERFAULT); +#endif +#ifdef ESHUTDOWN + CASE(ESHUTDOWN); +#endif +#ifdef ESOCKTNOSUPPORT + CASE(ESOCKTNOSUPPORT); +#endif +#ifdef ESPIPE + CASE(ESPIPE); +#endif +#ifdef ESRCH + CASE(ESRCH); +#endif +#ifdef ESRMNT + CASE(ESRMNT); +#endif +#ifdef ESTALE + CASE(ESTALE); +#endif +#ifdef ESTRPIPE + CASE(ESTRPIPE); +#endif +#ifdef ETIME + CASE(ETIME); +#endif +#ifdef ETIMEDOUT + CASE(ETIMEDOUT); +#endif +#ifdef ETOOMANYREFS + CASE(ETOOMANYREFS); +#endif +#ifdef ETOOSMALL + CASE(ETOOSMALL); +#endif +#ifdef ETXTBSY + CASE(ETXTBSY); +#endif +#ifdef EUCLEAN + CASE(EUCLEAN); +#endif +#ifdef EUNATCH + CASE(EUNATCH); +#endif +#ifdef EUSERS + CASE(EUSERS); +#endif +#ifdef EXDEV + CASE(EXDEV); +#endif +#ifdef EXFULL + CASE(EXFULL); +#endif + default: perror_msg_and_fail("unknown errno %d", errno); + } +} diff -Nru strace-4.11/tests/error_msg.c strace-4.12/tests/error_msg.c --- strace-4.11/tests/error_msg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/error_msg.c 2016-01-21 23:46:43.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +void +perror_msg_and_fail(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_fail(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_skip(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(77); +} + +void +perror_msg_and_skip(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(77); +} diff -Nru strace-4.11/tests/eventfd.c strace-4.12/tests/eventfd.c --- strace-4.11/tests/eventfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/eventfd.c 2016-01-05 23:12:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include +#if defined __NR_eventfd2 && defined O_CLOEXEC + int main(void) { -#if defined __NR_eventfd2 && defined O_CLOEXEC (void) close(0); - return syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("eventfd2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests/execveat.c strace-4.12/tests/execveat.c --- strace-4.11/tests/execveat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/execveat.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execveat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,160 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #ifdef __NR_execveat -#define FILENAME "execveat\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +# define FILENAME "test.execveat\nfilename" +# define Q_FILENAME "test.execveat\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - syscall(__NR_execveat, -100, FILENAME, argv, envp, 0x1100); + const char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + const char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], envp[2], envp[3], envp[4], +#endif + errno2name()); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], +#endif + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[1], +#endif + errno2name()); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", []" +#ifdef VERBOSE_EXECVEAT + ", []" +#else + ", [/* 0 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, errno2name()); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + syscall(__NR_execveat, -100, FILENAME, a, b, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVEAT + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, a + 1, b + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, NULL, efault, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", NULL, %p" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + syscall(__NR_execveat, -100, FILENAME, efault, NULL, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", %p, NULL" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_execveat") #endif diff -Nru strace-4.11/tests/execveat.expected strace-4.12/tests/execveat.expected --- strace-4.11/tests/execveat.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execveat.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \[/\* 2 vars \*/\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests/execveat.test strace-4.12/tests/execveat.test --- strace-4.11/tests/execveat.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execveat.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check execveat syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/execveat-v.c strace-4.12/tests/execveat-v.c --- strace-4.11/tests/execveat-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/execveat-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execveat-v strace test. */ +#define VERBOSE_EXECVEAT +#include "execveat.c" diff -Nru strace-4.11/tests/execveat-v.expected strace-4.12/tests/execveat-v.expected --- strace-4.11/tests/execveat-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execveat-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests/execveat-v.test strace-4.12/tests/execveat-v.test --- strace-4.11/tests/execveat-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/execveat-v.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of execveat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=execveat diff -Nru strace-4.11/tests/execve.c strace-4.12/tests/execve.c --- strace-4.11/tests/execve.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/execve.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execve strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +27,145 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include -#define FILENAME "execve\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +#define FILENAME "test.execve\nfilename" +#define Q_FILENAME "test.execve\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - execve(FILENAME, (char * const *) argv, (char * const *) envp); + char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1], envp[2], envp[3], envp[4] +#endif + ); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1] +#endif + ); + + execve(FILENAME, tail_argv + 2, tail_envp + 1); + printf("execve(\"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[1] +#endif + ); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + execve(FILENAME, empty, empty); + printf("execve(\"%s\", []" +#ifdef VERBOSE_EXECVE + ", []" +#else + ", [/* 0 vars */]" +#endif + ") = -1 ENOENT (%m)\n", Q_FILENAME); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + execve(FILENAME, a, b); + printf("execve(\"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, a + 1, b + 1); + printf("execve(\"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, (char **) tail_argv[ARRAY_SIZE(q_argv)], efault); + printf("execve(\"%s\", NULL, %p) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + execve(FILENAME, efault, NULL); + printf("execve(\"%s\", %p, NULL) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + return 0; } diff -Nru strace-4.11/tests/execve.expected strace-4.12/tests/execve.expected --- strace-4.11/tests/execve.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execve.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \[/\* 2 vars \*/\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests/execve.test strace-4.12/tests/execve.test --- strace-4.11/tests/execve.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execve.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +check_prog grep +run_prog > /dev/null +run_strace -eexecve $args > "$EXP" -exit 0 +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/execve-v.c strace-4.12/tests/execve-v.c --- strace-4.11/tests/execve-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/execve-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execve-v strace test. */ +#define VERBOSE_EXECVE +#include "execve.c" diff -Nru strace-4.11/tests/execve-v.expected strace-4.12/tests/execve-v.expected --- strace-4.11/tests/execve-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests/execve-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests/execve-v.test strace-4.12/tests/execve-v.test --- strace-4.11/tests/execve-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/execve-v.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of execve syscall. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -veexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/faccessat.c strace-4.12/tests/faccessat.c --- strace-4.11/tests/faccessat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/faccessat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_faccessat + +# include +# include + +int +main(void) +{ + static const char sample[] = "faccessat.sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_faccessat, fd, sample, F_OK); + printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_faccessat") + +#endif diff -Nru strace-4.11/tests/faccessat.test strace-4.12/tests/faccessat.test --- strace-4.11/tests/faccessat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/faccessat.test 2016-03-28 00:16:17.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check faccessat syscall decoding. + +. "${srcdir=.}/openat.test" diff -Nru strace-4.11/tests/fanotify_mark.c strace-4.12/tests/fanotify_mark.c --- strace-4.11/tests/fanotify_mark.c 2015-01-10 00:40:10.000000000 +0000 +++ strace-4.12/tests/fanotify_mark.c 2016-01-05 23:06:14.000000000 +0000 @@ -1,19 +1,18 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK + # include + int main(void) { fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, "."); return 0; } + #else -int -main(void) -{ - return 77; -} + +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK") + #endif diff -Nru strace-4.11/tests/fchdir.c strace-4.12/tests/fchdir.c --- strace-4.11/tests/fchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_fchdir + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fchdir, fd); + printf("fchdir(%d) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchdir") + +#endif diff -Nru strace-4.11/tests/fchdir.test strace-4.12/tests/fchdir.test --- strace-4.11/tests/fchdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchdir.test 2016-04-21 17:35:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests/fchmodat.c strace-4.12/tests/fchmodat.c --- strace-4.11/tests/fchmodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchmodat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Check decoding of fchmodat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmodat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "fchmodat_sample"; + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) == 0) { + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = 0\n", sample); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) != -1) + perror_msg_and_fail("fchmodat"); + } + + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = -1 %s (%m)\n", + sample, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmodat") + +#endif diff -Nru strace-4.11/tests/fchmodat.test strace-4.12/tests/fchmodat.test --- strace-4.11/tests/fchmodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchmodat.test 2016-04-02 13:13:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchmodat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/fchmod.c strace-4.12/tests/fchmod.c --- strace-4.11/tests/fchmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchmod.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_fchmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "fchmod_test_file"; + + int fd = open(fname, O_CREAT|O_RDONLY, 0400); + + if (fd == -1) + perror_msg_and_fail("open"); + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmod, fd, 0600) == 0) { + close(fd); + + printf("fchmod(%d, 0600) = 0\n", fd); + + if (syscall(__NR_fchmod, fd, 0600) != -1) + perror_msg_and_fail("fchmod"); + } + printf("fchmod(%d, 0600) = -1 %s (%m)\n", fd, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmod") + +#endif diff -Nru strace-4.11/tests/fchmod.test strace-4.12/tests/fchmod.test --- strace-4.11/tests/fchmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests/fchown32.c strace-4.12/tests/fchown32.c --- strace-4.11/tests/fchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown32 + +# define SYSCALL_NR __NR_fchown32 +# define SYSCALL_NAME "fchown32" +# define ACCESS_BY_DESCRIPTOR +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown32") + +#endif diff -Nru strace-4.11/tests/fchown32.test strace-4.12/tests/fchown32.test --- strace-4.11/tests/fchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests/fchownat.c strace-4.12/tests/fchownat.c --- strace-4.11/tests/fchownat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchownat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of fchownat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_fchownat && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW + +# include +# include + +int +main(void) +{ + static const char sample[] = "fchownat_sample"; + uid_t uid = geteuid(); + uid_t gid = getegid(); + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchownat, AT_FDCWD, sample, uid, gid, 0); + if (rc == 0) { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0) = 0\n", + sample, uid, gid); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchownat, AT_FDCWD, + sample, -1, -1L, AT_SYMLINK_NOFOLLOW); + + printf("fchownat(AT_FDCWD, \"%s\", -1, -1, AT_SYMLINK_NOFOLLOW)" + " = %ld %s (%m)\n", sample, rc, errno2name()); + } else { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0)" + " = %ld %s (%m)\n", sample, uid, gid, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchownat && AT_FDCWD && AT_SYMLINK_NOFOLLOW") + +#endif diff -Nru strace-4.11/tests/fchownat.test strace-4.12/tests/fchownat.test --- strace-4.11/tests/fchownat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchownat.test 2016-04-02 14:07:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchownat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/fchown.c strace-4.12/tests/fchown.c --- strace-4.11/tests/fchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchown.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown + +# define SYSCALL_NR __NR_fchown +# define SYSCALL_NAME "fchown" +# define ACCESS_BY_DESCRIPTOR + +# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown") + +#endif diff -Nru strace-4.11/tests/fchown.test strace-4.12/tests/fchown.test --- strace-4.11/tests/fchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fchown.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests/fcntl64.c strace-4.12/tests/fcntl64.c --- strace-4.11/tests/fcntl64.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests/fcntl64.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl64 -# define TEST_SYSCALL_NAME fcntl64 +# define TEST_SYSCALL_NR __NR_fcntl64 +# define TEST_SYSCALL_STR "fcntl64" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -57,16 +55,16 @@ { TEST_FLOCK64_EINVAL(F_SETLK64); TEST_FLOCK64_EINVAL(F_SETLKW64); -#ifdef F_OFD_SETLK +# ifdef F_OFD_SETLK TEST_FLOCK64_EINVAL(F_OFD_SETLK); TEST_FLOCK64_EINVAL(F_OFD_SETLKW); -#endif +# endif struct_kernel_flock64 fl = { .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + long rc = invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); @@ -74,12 +72,12 @@ if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK64, &fl); + invoke_test_syscall(F_GETLK64, &fl); printf("%s(0, F_GETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); @@ -88,9 +86,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -100,10 +96,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl64") #endif diff -Nru strace-4.11/tests/fcntl.c strace-4.12/tests/fcntl.c --- strace-4.11/tests/fcntl.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests/fcntl.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl -# define TEST_SYSCALL_NAME fcntl +# define TEST_SYSCALL_NR __NR_fcntl +# define TEST_SYSCALL_STR "fcntl" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, %p) = %s\n", TEST_SYSCALL_STR, name, &fl, EINVAL_STR); } @@ -70,9 +68,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -82,10 +78,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl") #endif diff -Nru strace-4.11/tests/fcntl.test strace-4.12/tests/fcntl.test --- strace-4.11/tests/fcntl.test 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests/fcntl.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check fcntl decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscall=${ME_%.test} -run_strace -a8 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a8 diff -Nru strace-4.11/tests/fdatasync.c strace-4.12/tests/fdatasync.c --- strace-4.11/tests/fdatasync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fdatasync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fdatasync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fdatasync, fd); + printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fdatasync") + +#endif diff -Nru strace-4.11/tests/fdatasync.test strace-4.12/tests/fdatasync.test --- strace-4.11/tests/fdatasync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fdatasync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fdatasync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests/file_handle.c strace-4.12/tests/file_handle.c --- strace-4.11/tests/file_handle.c 2015-11-26 16:49:39.000000000 +0000 +++ strace-4.12/tests/file_handle.c 2016-04-21 22:05:53.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #ifdef MAX_HANDLE_SZ +# include +# include +# include +# include + int main(void) { @@ -49,26 +47,20 @@ handle->handle_bytes = 0; - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) != -1 - || EINVAL != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) == -1); + if (EINVAL != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" - ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (Invalid argument)\n", - &mount_id); + ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags) != -1 - || EOVERFLOW != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == -1); + if (EOVERFLOW != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" - ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW" - " (Value too large for defined data type)\n", + ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", handle->handle_bytes, &mount_id); - assert(!name_to_handle_at(dirfd, ".", handle, &mount_id, flags)); + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == 0); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" ", handle_type=%d, f_handle=0x", handle->handle_bytes, handle->handle_type); @@ -76,15 +68,12 @@ printf("%02x", handle->f_handle[i]); printf("}, [%d], AT_SYMLINK_FOLLOW) = 0\n", mount_id); - assert(open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY)); printf("open_by_handle_at(-1, {handle_bytes=%u, handle_type=%d" ", f_handle=0x", handle->handle_bytes, handle->handle_type); for (i = 0; i < handle->handle_bytes; ++i) printf("%02x", handle->f_handle[i]); - printf("}, O_RDONLY|O_DIRECTORY) = -1 %s\n", - EPERM == errno ? "EPERM (Operation not permitted)" : - EINVAL == errno ? "EINVAL (Invalid argument)" : - "EBADF (Bad file descriptor)"); + int rc = open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY); + printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -92,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MAX_HANDLE_SZ") #endif diff -Nru strace-4.11/tests/file_handle.test strace-4.12/tests/file_handle.test --- strace-4.11/tests/file_handle.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/file_handle.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check name_to_handle_at and open_by_handle_at syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -ename_to_handle_at,open_by_handle_at $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at diff -Nru strace-4.11/tests/file_ioctl.c strace-4.12/tests/file_ioctl.c --- strace-4.11/tests/file_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/file_ioctl.c 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_FIEMAP_H + +# include +# include +# include +# include +# include "xlat.h" +# include "xlat/fiemap_flags.h" + +static void +test_fiemap(void) +{ + (void) tail_alloc(1); + struct fiemap *const args = tail_alloc(sizeof(*args)); + + printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + args->fm_start, args->fm_length); + printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u})", args->fm_extent_count); + ioctl(-1, FS_IOC_FIEMAP, args); + printf(" = -1 EBADF (%m)\n"); + + /* The live version of this test is in btrfs.c */ +} + +/* clone and dedupe ioctls are in btrfs.c since they originated there */ + +int +main(int argc, char *argv[]) +{ + test_fiemap(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H") + +#endif diff -Nru strace-4.11/tests/file_ioctl.test strace-4.12/tests/file_ioctl.test --- strace-4.11/tests/file_ioctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/file_ioctl.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check FS_IOC_FIEMAP ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/filter-unavailable.c strace-4.12/tests/filter-unavailable.c --- strace-4.11/tests/filter-unavailable.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/filter-unavailable.c 2016-01-06 00:14:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -52,7 +53,8 @@ (void) close(0); (void) close(1); - assert(pipe(fds) == 0 && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); for (i = 0; i < T; ++i) assert(pthread_create(&t, NULL, thread, NULL) == 0); @@ -70,10 +72,13 @@ pid_t p; for (i = 0; i < P; ++i) { - assert((p = fork()) >= 0); + p = fork(); + if (p < 0) + perror_msg_and_fail("fork"); if (p == 0) return process(); - assert(waitpid(p, &s, 0) == p && WIFEXITED(s)); + assert(waitpid(p, &s, 0) == p); + assert(WIFEXITED(s)); if (WEXITSTATUS(s)) return WEXITSTATUS(s); } diff -Nru strace-4.11/tests/flock.c strace-4.12/tests/flock.c --- strace-4.11/tests/flock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/flock.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_flock + +# include +# include +# include + +int +main(void) +{ + const unsigned long fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_flock, fd, LOCK_SH); + printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_flock") + +#endif diff -Nru strace-4.11/tests/flock.test strace-4.12/tests/flock.test --- strace-4.11/tests/flock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/flock.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check flock syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests/fork-f.c strace-4.12/tests/fork-f.c --- strace-4.11/tests/fork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "fork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) + return logit("exec"); + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + close(child_wait_fds[1]); + + if (read(0, child_wait_fds, sizeof(int))) + _exit(2); + + char *const args[] = { av[0], (char *) "", NULL }; + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + ppid, prefix, + pid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests/fork-f.test strace-4.12/tests/fork-f.test --- strace-4.11/tests/fork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fork-f.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how strace -f follows fork syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none diff -Nru strace-4.11/tests/fstat64.c strace-4.12/tests/fstat64.c --- strace-4.11/tests/fstat64.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests/fstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat64 -# define TEST_SYSCALL_NAME fstat64 + +# define TEST_SYSCALL_NR __NR_fstat64 +# define TEST_SYSCALL_STR "fstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat64") + +#endif diff -Nru strace-4.11/tests/fstatat64.c strace-4.12/tests/fstatat64.c --- strace-4.11/tests/fstatat64.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests/fstatat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstatat64 -# define TEST_SYSCALL_NAME fstatat64 -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_fstatat64 +# define TEST_SYSCALL_STR "fstatat64" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatat64") + +#endif diff -Nru strace-4.11/tests/fstatat.c strace-4.12/tests/fstatat.c --- strace-4.11/tests/fstatat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/fstatat.c 2016-01-05 22:41:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HAVE_FSTATAT -# undef TEST_SYSCALL_NAME -#endif +#ifdef HAVE_FSTATAT -#define TEST_SYSCALL_INVOKE(sample, pst) \ +# define TEST_SYSCALL_INVOKE(sample, pst) \ fstatat(AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) -#define PRINT_SYSCALL_HEADER(sample) \ +# define PRINT_SYSCALL_HEADER(sample) \ printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) -#define PRINT_SYSCALL_FOOTER \ +# define PRINT_SYSCALL_FOOTER \ puts(", AT_SYMLINK_NOFOLLOW) = 0") -#include "xstatx.c" +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif diff -Nru strace-4.11/tests/fstat.c strace-4.12/tests/fstat.c --- strace-4.11/tests/fstat.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests/fstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat -# define TEST_SYSCALL_NAME fstat + +# define TEST_SYSCALL_NR __NR_fstat +# define TEST_SYSCALL_STR "fstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat") + +#endif diff -Nru strace-4.11/tests/fstatfs64.c strace-4.12/tests/fstatfs64.c --- strace-4.11/tests/fstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs64 + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs64 +# define SYSCALL_NAME "fstatfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs64") + +#endif diff -Nru strace-4.11/tests/fstatfs64.test strace-4.12/tests/fstatfs64.test --- strace-4.11/tests/fstatfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fstatfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests/fstatfs.c strace-4.12/tests/fstatfs.c --- strace-4.11/tests/fstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs +# define SYSCALL_NAME "fstatfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs") + +#endif diff -Nru strace-4.11/tests/fstatfs.test strace-4.12/tests/fstatfs.test --- strace-4.11/tests/fstatfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fstatfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests/fstat.test strace-4.12/tests/fstat.test --- strace-4.11/tests/fstat.test 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests/fstat.test 2016-03-30 00:13:56.000000000 +0000 @@ -8,9 +8,8 @@ [ -d /proc/self/fd/ ] || framework_skip_ '/proc/self/fd/ is not available' -syscall=${ME_%.test} +syscall=$NAME run_prog > /dev/null -OUT="$LOG.out" sample=$syscall.sample > "$sample" run_strace -ve$syscall -P$sample $args > "$OUT" diff -Nru strace-4.11/tests/fstatx.c strace-4.12/tests/fstatx.c --- strace-4.11/tests/fstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/fstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests/fsync.c strace-4.12/tests/fsync.c --- strace-4.11/tests/fsync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fsync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fsync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fsync, fd); + printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fsync") + +#endif diff -Nru strace-4.11/tests/fsync.test strace-4.12/tests/fsync.test --- strace-4.11/tests/fsync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/fsync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fsync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/ftruncate64.c strace-4.12/tests/ftruncate64.c --- strace-4.11/tests/ftruncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/ftruncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate64 -#include -#include -#include +# include +# include int main(void) { const off_t len = 0xdefaceddeadbeef; - int rc = ftruncate(-1, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate64(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + int rc = ftruncate(-1, len); + printf("ftruncate64(-1, %llu) = %d %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -55,10 +48,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate64") #endif diff -Nru strace-4.11/tests/ftruncate64.test strace-4.12/tests/ftruncate64.test --- strace-4.11/tests/ftruncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests/ftruncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -eftruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests/ftruncate.c strace-4.12/tests/ftruncate.c --- strace-4.11/tests/ftruncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/ftruncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,29 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate -#include -#include -#include +# include +# include -#include "kernel_types.h" +# include "kernel_types.h" int main(void) { const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = ftruncate(-1, len); else rc = syscall(__NR_ftruncate, -1L, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + printf("ftruncate(-1, %llu) = %ld %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +55,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate") #endif diff -Nru strace-4.11/tests/ftruncate.test strace-4.12/tests/ftruncate.test --- strace-4.11/tests/ftruncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests/ftruncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eftruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 diff -Nru strace-4.11/tests/futimesat.c strace-4.12/tests/futimesat.c --- strace-4.11/tests/futimesat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/futimesat.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of futimesat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_futimesat + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "futimesat_sample"; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U; + + long rc = syscall(__NR_futimesat, dirfd, sample, 0); + printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + dirfd = (unsigned long) 0xdeadbeefffffffff; + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + (void) close(0); + rc = syscall(__NR_futimesat, 0, "", ts); + printf("futimesat(0, \"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futimesat") + +#endif diff -Nru strace-4.11/tests/futimesat.test strace-4.12/tests/futimesat.test --- strace-4.11/tests/futimesat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/futimesat.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check futimesat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests/getcwd.c strace-4.12/tests/getcwd.c --- strace-4.11/tests/getcwd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getcwd.c 2016-03-23 13:38:35.000000000 +0000 @@ -0,0 +1,39 @@ +#include "tests.h" + +#include + +#ifdef __NR_getcwd + +# include +# include +# include + +int +main(void) +{ + long res; + char cur_dir[PATH_MAX + 1]; + + res = syscall(__NR_getcwd, cur_dir, sizeof(cur_dir)); + + if (res <= 0) + perror_msg_and_fail("getcwd"); + + printf("getcwd(\""); + print_quoted_string(cur_dir); + printf("\", %zu) = %ld\n", sizeof(cur_dir), res); + + syscall(__NR_getcwd, cur_dir, 0); + + printf("getcwd(%p, 0) = -1 ERANGE (%m)\n", cur_dir); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcwd"); + +#endif diff -Nru strace-4.11/tests/getcwd.test strace-4.12/tests/getcwd.test --- strace-4.11/tests/getcwd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getcwd.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests/getdents64.c strace-4.12/tests/getdents64.c --- strace-4.11/tests/getdents64.c 2015-11-20 00:08:48.000000000 +0000 +++ strace-4.12/tests/getdents64.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents64 -#include -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -104,7 +101,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -114,12 +110,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents64, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count); + printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents64, 0, buf, count))) { kernel_dirent64 *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents64"); printf("getdents64(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent64 *) &buf[i]; @@ -127,9 +130,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents64(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents64(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -140,10 +143,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents64") #endif diff -Nru strace-4.11/tests/getdents64.test strace-4.12/tests/getdents64.test --- strace-4.11/tests/getdents64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/getdents64.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a24 -vegetdents64 $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -v diff -Nru strace-4.11/tests/getdents.c strace-4.12/tests/getdents.c --- strace-4.11/tests/getdents.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/getdents.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents -#include -#include -#include -#include -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include +# include +# include +# include +# include +# include "kernel_types.h" static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -100,7 +96,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -110,12 +105,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count); + printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents, 0, buf, count))) { kernel_dirent *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents"); printf("getdents(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent *) &buf[i]; @@ -123,9 +125,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -136,10 +138,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents") #endif diff -Nru strace-4.11/tests/getdents.test strace-4.12/tests/getdents.test --- strace-4.11/tests/getdents.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/getdents.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a22 -vegetdents $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a22 -v diff -Nru strace-4.11/tests/getegid32.c strace-4.12/tests/getegid32.c --- strace-4.11/tests/getegid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getegid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid32 + +# include +# include + +int +main(void) +{ + printf("getegid32() = %ld\n", syscall(__NR_getegid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid32") + +#endif diff -Nru strace-4.11/tests/getegid32.test strace-4.12/tests/getegid32.test --- strace-4.11/tests/getegid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getegid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/getegid.c strace-4.12/tests/getegid.c --- strace-4.11/tests/getegid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getegid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid + +# include +# include + +int +main(void) +{ + printf("getegid() = %ld\n", syscall(__NR_getegid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid") + +#endif diff -Nru strace-4.11/tests/getegid.test strace-4.12/tests/getegid.test --- strace-4.11/tests/getegid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getegid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/geteuid32.c strace-4.12/tests/geteuid32.c --- strace-4.11/tests/geteuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/geteuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid32 + +# include +# include + +int +main(void) +{ + printf("geteuid32() = %ld\n", syscall(__NR_geteuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid32") + +#endif diff -Nru strace-4.11/tests/geteuid32.test strace-4.12/tests/geteuid32.test --- strace-4.11/tests/geteuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/geteuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/geteuid.c strace-4.12/tests/geteuid.c --- strace-4.11/tests/geteuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/geteuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid + +# include +# include + +int +main(void) +{ + printf("geteuid() = %ld\n", syscall(__NR_geteuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid") + +#endif diff -Nru strace-4.11/tests/geteuid.test strace-4.12/tests/geteuid.test --- strace-4.11/tests/geteuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/geteuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/getgid32.c strace-4.12/tests/getgid32.c --- strace-4.11/tests/getgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid32 + +# include +# include + +int +main(void) +{ + printf("getgid32() = %ld\n", syscall(__NR_getgid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid32") + +#endif diff -Nru strace-4.11/tests/getgid32.test strace-4.12/tests/getgid32.test --- strace-4.11/tests/getgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/getgid.c strace-4.12/tests/getgid.c --- strace-4.11/tests/getgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid + +# include +# include + +int +main(void) +{ + printf("getgid() = %ld\n", syscall(__NR_getgid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid") + +#endif diff -Nru strace-4.11/tests/getgid.test strace-4.12/tests/getgid.test --- strace-4.11/tests/getgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/getgroups32.c strace-4.12/tests/getgroups32.c --- strace-4.11/tests/getgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_getgroups32 + +# include "getgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups32") + +#endif diff -Nru strace-4.11/tests/getgroups32.test strace-4.12/tests/getgroups32.test --- strace-4.11/tests/getgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests/getgroups.c strace-4.12/tests/getgroups.c --- strace-4.11/tests/getgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,148 @@ +/* + * Check decoding of getgroups/getgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_getgroups32 + +# define SYSCALL_NR __NR_getgroups32 +# define SYSCALL_NAME "getgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_getgroups + +# define SYSCALL_NR __NR_getgroups +# define SYSCALL_NAME "getgroups" +# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +#define MAX_STRLEN 32 +static long ngroups; + +static void +get_groups(const long size, GID_TYPE *const g) +{ + long i = syscall(SYSCALL_NR, size, g); + if (i != ngroups) + perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); + + printf("%s(%u, [", SYSCALL_NAME, (unsigned) size); + for (i = 0; i < ngroups; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + printf("%u", (unsigned int) g[i]); + } + printf("]) = %ld\n", ngroups); +} + +int +main(void) +{ + long rc; + + /* check how the first argument is decoded */ + ngroups = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, ngroups); + if (ngroups < 0) + perror_msg_and_fail(SYSCALL_NAME); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); + + rc = syscall(SYSCALL_NR, ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + /* check how the second argument is decoded */ + GID_TYPE *const g1 = + tail_alloc(ngroups ? sizeof(*g1) * ngroups : 1); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * (ngroups + 1)); + void *efault = g2 + ngroups + 1; + + get_groups(ngroups, g1); + get_groups(ngroups + 1, g1); + get_groups(ngroups + 1, g2); + + if (ngroups) { + rc = syscall(SYSCALL_NR, ngroups, efault); + printf("%s(%u, %p) = %ld %s (%m)\n", + SYSCALL_NAME, (unsigned) ngroups, efault, + rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups") + +#endif diff -Nru strace-4.11/tests/getgroups.test strace-4.12/tests/getgroups.test --- strace-4.11/tests/getgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests/get_mempolicy.c strace-4.12/tests/get_mempolicy.c --- strace-4.11/tests/get_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/get_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,135 @@ +/* + * Check decoding of get_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_get_mempolicy + +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(unsigned long maxnode) +{ + unsigned long *const nodemask = + tail_alloc(sizeof(*nodemask) * NLONGS(maxnode)); + + if (syscall(__NR_get_mempolicy, 0, nodemask, maxnode, 0, 0)) { + printf("get_mempolicy(NULL, %p, %lu, NULL, 0) = -1 %s (%m)\n", + nodemask, maxnode, errno2name()); + return; + } + + printf("get_mempolicy(NULL, ["); + + unsigned int nlongs = NLONGS(maxnode); + unsigned int i; + for (i = 0; i < nlongs; ++i) { + if (i) + fputs(", ", stdout); + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(*nodemask) * 2 + 2, nodemask[i]); + } + + printf("], %lu, NULL, 0) = 0\n", maxnode); +} + +int +main(void) +{ + long rc; + + if (syscall(__NR_get_mempolicy, 0, 0, 0, 0, 0)) + perror_msg_and_skip("get_mempolicy"); + puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); + + int *mode = (void *) 0xdefaced1baddeed2; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long flags = -1U; + rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); + printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", + mode, nodemask, maxnode, addr, + "MPOL_F_NODE|MPOL_F_ADDR", + flags & ~3, rc, errno2name()); + + mode = tail_alloc(sizeof(*mode)); + + rc = syscall(__NR_get_mempolicy, mode, 0, 0, 0, 0); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, NULL, 0) = %ld\n", rc); + + *mode = -1; + rc = syscall(__NR_get_mempolicy, mode, 0, 0, mode - 1, 2); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, %p, MPOL_F_ADDR) = %ld\n", mode - 1, rc); + + maxnode = get_page_size() * 8; + + print_nodes(maxnode); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + + maxnode = sizeof(*nodemask) * 8; + print_nodes(maxnode - 1); + print_nodes(maxnode ); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + print_nodes(maxnode * 2 - 1); + print_nodes(maxnode * 2 ); + print_nodes(maxnode * 2 + 1); + print_nodes(maxnode * 2 + 2); + print_nodes(maxnode * 3 - 1); + print_nodes(maxnode * 3 ); + print_nodes(maxnode * 3 + 1); + print_nodes(maxnode * 3 + 2); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_mempolicy") + +#endif diff -Nru strace-4.11/tests/get_mempolicy.test strace-4.12/tests/get_mempolicy.test --- strace-4.11/tests/get_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/get_mempolicy.test 2016-04-28 01:17:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a38 diff -Nru strace-4.11/tests/get_page_size.c strace-4.12/tests/get_page_size.c --- strace-4.11/tests/get_page_size.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/get_page_size.c 2016-01-05 23:17:07.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include + +size_t +get_page_size(void) +{ + static size_t page_size; + + if (!page_size) + page_size = sysconf(_SC_PAGESIZE); + + return page_size; +} diff -Nru strace-4.11/tests/getpgrp.c strace-4.12/tests/getpgrp.c --- strace-4.11/tests/getpgrp.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getpgrp.c 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_getpgrp + +# include +# include + +int +main(void) +{ + printf("getpgrp() = %ld\n", syscall(__NR_getpgrp)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgrp") + +#endif diff -Nru strace-4.11/tests/getpgrp.test strace-4.12/tests/getpgrp.test --- strace-4.11/tests/getpgrp.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getpgrp.test 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgrp syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/getrandom.c strace-4.12/tests/getrandom.c --- strace-4.11/tests/getrandom.c 2015-08-28 08:16:43.000000000 +0000 +++ strace-4.12/tests/getrandom.c 2016-01-06 11:36:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,38 +25,40 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_getrandom + +# include +# include + int main(void) { -#ifdef __NR_getrandom unsigned char buf[4]; if (syscall(__NR_getrandom, buf, sizeof(buf) - 1, 0) != sizeof(buf) - 1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\", 3, 0) = 3\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 1) != sizeof(buf)) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\"..., 4, GRND_NONBLOCK) = 4\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 0x3003) != -1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(%p, 4, GRND_NONBLOCK|GRND_RANDOM|0x3000) = " - "-1 EINVAL (Invalid argument)\n", buf); + "-1 EINVAL (%m)\n", buf); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_getrandom") + #endif -} diff -Nru strace-4.11/tests/getrandom.test strace-4.12/tests/getrandom.test --- strace-4.11/tests/getrandom.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/getrandom.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check getrandom syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e getrandom -xx -s3 -a32 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a32 -xx -s3 diff -Nru strace-4.11/tests/getresgid32.c strace-4.12/tests/getresgid32.c --- strace-4.11/tests/getresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid32 + +# define SYSCALL_NR __NR_getresgid32 +# define SYSCALL_NAME "getresgid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid32") + +#endif diff -Nru strace-4.11/tests/getresgid32.test strace-4.12/tests/getresgid32.test --- strace-4.11/tests/getresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests/getresgid.c strace-4.12/tests/getresgid.c --- strace-4.11/tests/getresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid + +# define SYSCALL_NR __NR_getresgid +# define SYSCALL_NAME "getresgid" + +# if defined __NR_getresgid32 && __NR_getresgid != __NR_getresgid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid") + +#endif diff -Nru strace-4.11/tests/getresgid.test strace-4.12/tests/getresgid.test --- strace-4.11/tests/getresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests/getresugid.c strace-4.12/tests/getresugid.c --- strace-4.11/tests/getresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresugid.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Check decoding of getresuid/getresgid/getresuid32/getresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +main(void) +{ + unsigned UGID_TYPE *const r = tail_alloc(sizeof(*r)); + unsigned UGID_TYPE *const e = tail_alloc(sizeof(*e)); + unsigned UGID_TYPE *const s = tail_alloc(sizeof(*s)); + + if (syscall(SYSCALL_NR, r, e, s)) + perror_msg_and_fail(SYSCALL_NAME); + + printf("%s([%u], [%u], [%u]) = 0\n", SYSCALL_NAME, + (unsigned) *r, (unsigned) *e, (unsigned) *s); + + assert(syscall(SYSCALL_NR, NULL, e, s) == -1); + printf("%s(NULL, %p, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, e, s); + + assert(syscall(SYSCALL_NR, r, NULL, s) == -1); + printf("%s(%p, NULL, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, s); + + assert(syscall(SYSCALL_NR, r, e, NULL) == -1); + printf("%s(%p, %p, NULL) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, e); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/getresuid32.c strace-4.12/tests/getresuid32.c --- strace-4.11/tests/getresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid32 + +# define SYSCALL_NR __NR_getresuid32 +# define SYSCALL_NAME "getresuid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid32") + +#endif diff -Nru strace-4.11/tests/getresuid32.test strace-4.12/tests/getresuid32.test --- strace-4.11/tests/getresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests/getresuid.c strace-4.12/tests/getresuid.c --- strace-4.11/tests/getresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid + +# define SYSCALL_NR __NR_getresuid +# define SYSCALL_NAME "getresuid" + +# if defined __NR_getresuid32 && __NR_getresuid != __NR_getresuid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid") + +#endif diff -Nru strace-4.11/tests/getresuid.test strace-4.12/tests/getresuid.test --- strace-4.11/tests/getresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getresuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests/getrusage.c strace-4.12/tests/getrusage.c --- strace-4.11/tests/getrusage.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getrusage.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrusage + +# include +# include +# include +# include + +int +main(void) +{ + struct rusage *const usage = tail_alloc(sizeof(struct rusage)); + int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); + printf("getrusage(RUSAGE_SELF, {ru_utime={%ju, %ju}" + ", ru_stime={%ju, %ju}, ru_maxrss=%lu, ru_ixrss=%lu" + ", ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" + ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" + ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", + (uintmax_t) usage->ru_utime.tv_sec, + (uintmax_t) usage->ru_utime.tv_usec, + (uintmax_t) usage->ru_stime.tv_sec, + (uintmax_t) usage->ru_stime.tv_usec, + usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, + usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, + usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, + usage->ru_msgsnd, usage->ru_msgrcv, usage->ru_nsignals, + usage->ru_nvcsw, usage->ru_nivcsw, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrusage") + +#endif diff -Nru strace-4.11/tests/getrusage.test strace-4.12/tests/getrusage.test --- strace-4.11/tests/getrusage.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getrusage.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrusage syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v diff -Nru strace-4.11/tests/getsid.c strace-4.12/tests/getsid.c --- strace-4.11/tests/getsid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getsid.c 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/getsid.test strace-4.12/tests/getsid.test --- strace-4.11/tests/getsid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getsid.test 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/getuid32.c strace-4.12/tests/getuid32.c --- strace-4.11/tests/getuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid32 + +# include +# include + +int +main(void) +{ + printf("getuid32() = %ld\n", syscall(__NR_getuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid32") + +#endif diff -Nru strace-4.11/tests/getuid32.test strace-4.12/tests/getuid32.test --- strace-4.11/tests/getuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests/getuid.c strace-4.12/tests/getuid.c --- strace-4.11/tests/getuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid + +# include +# include + +int +main(void) +{ + printf("getuid() = %ld\n", syscall(__NR_getuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid") + +#endif diff -Nru strace-4.11/tests/getuid.test strace-4.12/tests/getuid.test --- strace-4.11/tests/getuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check getuid syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq +run_prog > /dev/null +run_strace -qq -a9 -e$NAME $args > "$EXP" +uniq < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests/getxxid.c strace-4.12/tests/getxxid.c --- strace-4.11/tests/getxxid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getxxid.c 2016-01-09 00:09:04.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getxpid && defined __NR_getxuid && defined __NR_getxgid + +# include +# include + +int +main(void) +{ + long id; + pid_t ppid; + + id = syscall(__NR_getxpid); + ppid = getppid(); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + + id = syscall(__NR_getxuid); + printf("getxuid() = %ld (euid %ld)\n", id, id); + + id = syscall(__NR_getxgid); + printf("getxgid() = %ld (egid %ld)\n", id, id); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getxpid && __NR_getxuid && __NR_getxgid") + +#endif diff -Nru strace-4.11/tests/getxxid.test strace-4.12/tests/getxxid.test --- strace-4.11/tests/getxxid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/getxxid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getxpid, getxuid, and getxgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid diff -Nru strace-4.11/tests/hexdump_strdup.c strace-4.12/tests/hexdump_strdup.c --- strace-4.11/tests/hexdump_strdup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/hexdump_strdup.c 2016-04-02 18:24:36.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Make a hexdump copy of C string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexdump_memdup(const char *src, size_t len) +{ + size_t dst_size = 3 * len + 2; + assert(dst_size > len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + const unsigned char *usrc = (const unsigned char *) src; + size_t i; + for (i = 0; i < len; ++i) { + unsigned int c = usrc[i]; + *(p++) = ' '; + if (i == 8) + *(p++) = ' '; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} + +const char * +hexdump_strdup(const char *src) +{ + return hexdump_memdup(src, strlen(src)); +} diff -Nru strace-4.11/tests/hexquote_strndup.c strace-4.12/tests/hexquote_strndup.c --- strace-4.11/tests/hexquote_strndup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/hexquote_strndup.c 2016-02-04 03:36:25.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Make a hexquoted copy of a string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexquote_strndup(const char *src, const size_t src_len) +{ + const size_t dst_size = 4 * src_len + 1; + assert(dst_size > src_len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + size_t i; + for (i = 0; i < src_len; ++i) { + unsigned int c = ((const unsigned char *) src)[i]; + *(p++) = '\\'; + *(p++) = 'x'; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} diff -Nru strace-4.11/tests/inet-accept-connect-send-recv.c strace-4.12/tests/inet-accept-connect-send-recv.c --- strace-4.11/tests/inet-accept-connect-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/inet-accept-connect-send-recv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main(void) -{ - static const char data[] = "data"; - const size_t size = sizeof(data) - 1; - struct sockaddr_in addr; - socklen_t len = sizeof(addr); - pid_t pid; - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - close(0); - close(1); - - if (socket(PF_INET, SOCK_STREAM, 0)) { - perror("socket"); - return 77; - } - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } - assert(listen(0, 5) == 0); - - memset(&addr, 0, sizeof(addr)); - assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); - - assert((pid = fork()) >= 0); - - if (pid) { - char buf[sizeof(data)]; - int status; - - assert(accept(0, (struct sockaddr *) &addr, &len) == 1); - assert(close(0) == 0); - assert(recv(1, buf, sizeof(buf), MSG_WAITALL) == (int) size); - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - assert(close(1) == 0); - } else { - assert(close(0) == 0); - assert(socket(PF_INET, SOCK_STREAM, 0) == 0); - assert(connect(0, (struct sockaddr *) &addr, len) == 0); - assert(send(0, data, size, MSG_DONTROUTE) == (int) size); - assert(close(0) == 0); - } - - return 0; -} diff -Nru strace-4.11/tests/inet-cmsg.c strace-4.12/tests/inet-cmsg.c --- strace-4.11/tests/inet-cmsg.c 2015-12-06 01:02:17.000000000 +0000 +++ strace-4.12/tests/inet-cmsg.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,8 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include #include #include #include @@ -75,6 +75,7 @@ } } +#ifdef IP_ORIGDSTADDR static void print_origdstaddr(const struct cmsghdr *c) { @@ -84,6 +85,7 @@ printf("IP_ORIGDSTADDR, {sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}", ntohs(sin->sin_port)); } +#endif int main(void) @@ -94,22 +96,18 @@ assert(!close(0)); assert(!close(3)); - if (socket(PF_INET, SOCK_DGRAM, 0)) { - perror("socket"); - return 77; - } + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); struct sockaddr_in addr = { .sin_family = AF_INET, .sin_addr.s_addr = htonl(INADDR_LOOPBACK) }; socklen_t len = sizeof(addr); - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); assert(!getsockname(0, (struct sockaddr *) &addr, &len)); - assert(socket(PF_INET, SOCK_DGRAM, 0) == 3); + assert(socket(AF_INET, SOCK_DGRAM, 0) == 3); assert(!connect(3, (struct sockaddr *) &addr, len)); const int opt_1 = htonl(0x01000000); @@ -149,9 +147,9 @@ printf("recvmsg(0, {msg_name(%u)={sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}, msg_iov(1)=[{\"%s\", %zu}]" - ", msg_controllen=%zu, [", + ", msg_controllen=%lu, [", (unsigned) mh.msg_namelen, ntohs(addr.sin_port), - data, size, mh.msg_controllen); + data, size, (unsigned long) mh.msg_controllen); struct cmsghdr *c; for (c = CMSG_FIRSTHDR(&mh); c; c = CMSG_NXTHDR(&mh, c)) { @@ -159,8 +157,8 @@ continue; if (c != control) printf(", "); - printf("{cmsg_len=%zu, cmsg_level=SOL_IP, cmsg_type=", - c->cmsg_len); + printf("{cmsg_len=%lu, cmsg_level=SOL_IP, cmsg_type=", + (unsigned long) c->cmsg_len); switch (c->cmsg_type) { case IP_PKTINFO: print_pktinfo(c); diff -Nru strace-4.11/tests/inet-cmsg.test strace-4.12/tests/inet-cmsg.test --- strace-4.11/tests/inet-cmsg.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/inet-cmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check IPPROTO_IP control messages decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -erecvmsg $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=recvmsg diff -Nru strace-4.11/tests/init.sh strace-4.12/tests/init.sh --- strace-4.11/tests/init.sh 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/init.sh 2016-03-30 00:16:24.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,6 +26,10 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ME_="${0##*/}" +LOG="$ME_.tmp" +OUT="$LOG.out" +EXP="$LOG.exp" +NAME="${ME_%.test}" warn_() { printf >&2 '%s\n' "$*"; } fail_() { warn_ "$ME_: failed test: $*"; exit 1; } @@ -48,7 +52,7 @@ run_prog() { if [ $# -eq 0 ]; then - set -- "./${ME_%.test}" + set -- "./$NAME" fi args="$*" "$@" || { @@ -108,7 +112,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - program="$srcdir/${ME_%.test}.awk" + program="$srcdir/$NAME.awk" else program="$1"; shift fi @@ -138,7 +142,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - expected="$srcdir/${ME_%.test}.expected" + expected="$srcdir/$NAME.expected" else expected="$1"; shift fi @@ -168,7 +172,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - patterns="$srcdir/${ME_%.test}.expected" + patterns="$srcdir/$NAME.expected" else patterns="$1"; shift fi @@ -197,10 +201,21 @@ } } +# Usage: run_strace_match_diff [args to run_strace] +run_strace_match_diff() +{ + args="$*" + [ -n "$args" -a -z "${args##*-e trace=*}" ] || + set -- -e trace="$NAME" "$@" + run_prog > /dev/null + run_strace "$@" $args > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + check_prog cat check_prog rm -LOG="$ME_.tmp" rm -f "$LOG" : "${STRACE:=../strace}" diff -Nru strace-4.11/tests/inode_of_sockfd.c strace-4.12/tests/inode_of_sockfd.c --- strace-4.11/tests/inode_of_sockfd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/inode_of_sockfd.c 2016-02-02 00:24:48.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of strace test suite. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +unsigned long +inode_of_sockfd(const int fd) +{ + assert(fd >= 0); + + char linkpath[sizeof("/proc/self/fd/%u") + sizeof(int) * 3]; + assert(snprintf(linkpath, sizeof(linkpath), "/proc/self/fd/%u", fd) + < (int) sizeof(linkpath)); + + char path[PATH_MAX + 1]; + const ssize_t path_len = readlink(linkpath, path, sizeof(path) - 1); + if (path_len < 0) + perror_msg_and_fail("readlink: %s", linkpath); + path[path_len] = '\0'; + + static const char prefix[] = "socket:["; + const size_t prefix_len = sizeof(prefix) - 1; + assert(strncmp(path, prefix, prefix_len) == 0 + && path[path_len - 1] == ']'); + + return strtoul(path + prefix_len, NULL, 10); +} diff -Nru strace-4.11/tests/ioctl_block.c strace-4.12/tests/ioctl_block.c --- strace-4.11/tests/ioctl_block.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_block.c 2016-05-26 15:16:31.000000000 +0000 @@ -0,0 +1,216 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRUCT_BLK_USER_TRACE_SETUP +# include +#endif +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static struct xlat block_argless[] = { + XLAT(BLKRRPART), + XLAT(BLKFLSBUF), +#ifdef BLKTRACESTART + XLAT(BLKTRACESTART), +#endif +#ifdef BLKTRACESTOP + XLAT(BLKTRACESTOP), +#endif +#ifdef BLKTRACETEARDOWN + XLAT(BLKTRACETEARDOWN), +#endif +}; + +#define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(BLKBSZGET); + TEST_NULL_ARG(BLKBSZSET); + TEST_NULL_ARG(BLKFRAGET); + TEST_NULL_ARG(BLKGETSIZE); + TEST_NULL_ARG(BLKGETSIZE64); + TEST_NULL_ARG(BLKPG); + TEST_NULL_ARG(BLKRAGET); + TEST_NULL_ARG(BLKROGET); + TEST_NULL_ARG(BLKROSET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSSZGET); +#ifdef BLKALIGNOFF + TEST_NULL_ARG(BLKALIGNOFF); +#endif +#ifdef BLKDAXGET + TEST_NULL_ARG(BLKDAXGET); +#endif +#ifdef BLKDISCARD + TEST_NULL_ARG(BLKDISCARD); +#endif +#ifdef BLKDISCARDZEROES + TEST_NULL_ARG(BLKDISCARDZEROES); +#endif +#ifdef BLKIOMIN + TEST_NULL_ARG(BLKIOMIN); +#endif +#ifdef BLKIOOPT + TEST_NULL_ARG(BLKIOOPT); +#endif +#ifdef BLKPBSZGET + TEST_NULL_ARG(BLKPBSZGET); +#endif +#ifdef BLKROTATIONAL + TEST_NULL_ARG(BLKROTATIONAL); +#endif +#ifdef BLKSECDISCARD + TEST_NULL_ARG(BLKSECDISCARD); +#endif +#ifdef BLKZEROOUT + TEST_NULL_ARG(BLKZEROOUT); +#endif +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + TEST_NULL_ARG(BLKTRACESETUP); +#endif + + ioctl(-1, BLKRASET, lmagic); + printf("ioctl(-1, BLKRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + ioctl(-1, BLKFRASET, lmagic); + printf("ioctl(-1, BLKFRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + + ioctl(-1, BLKROSET, val_int); + printf("ioctl(-1, BLKROSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + ioctl(-1, BLKBSZSET, val_int); + printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); + pair_int64[0] = 0xdeadbeefbadc0ded; + pair_int64[1] = 0xfacefeedcafef00d; + +#ifdef BLKDISCARD + ioctl(-1, BLKDISCARD, pair_int64); + printf("ioctl(-1, BLKDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKSECDISCARD + ioctl(-1, BLKSECDISCARD, pair_int64); + printf("ioctl(-1, BLKSECDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKZEROOUT + ioctl(-1, BLKZEROOUT, pair_int64); + printf("ioctl(-1, BLKZEROOUT, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + + struct blkpg_ioctl_arg *const blkpg = tail_alloc(sizeof(*blkpg)); + blkpg->op = 3; + blkpg->flags = 0xdeadbeef; + blkpg->datalen = 0xbadc0ded; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data=%#lx}) = -1 EBADF (%m)\n", + "BLKPG_RESIZE_PARTITION", blkpg->flags, blkpg->datalen, + (unsigned long) blkpg->data); + + struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); + bp->start = 0xfac1fed2dad3bef4; + bp->length = 0xfac5fed6dad7bef8; + bp->pno = magic; + memset(bp->devname, 'A', sizeof(bp->devname)); + memset(bp->volname, 'B', sizeof(bp->volname)); + blkpg->op = 1; + blkpg->data = bp; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data={start=%lld, length=%lld, pno=%d" + ", devname=\"%.*s\", volname=\"%.*s\"}})" + " = -1 EBADF (%m)\n", + "BLKPG_ADD_PARTITION", + blkpg->flags, blkpg->datalen, + bp->start, bp->length, bp->pno, + (int) sizeof(bp->devname) - 1, bp->devname, + (int) sizeof(bp->volname) - 1, bp->volname); + +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); + init_magic(buts, sizeof(*buts)); + + ioctl(-1, BLKTRACESETUP, buts); + printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" + ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})" + " = -1 EBADF (%m)\n", + buts->act_mask, buts->buf_size, buts->buf_nr, + buts->start_lba, buts->end_lba, buts->pid); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(block_argless); ++i) { + ioctl(-1, (unsigned long) block_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", block_argless[i].str); + } + + ioctl(-1, _IOC(_IOC_READ, 0x12, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x12, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/ioctl_block.test strace-4.12/tests/ioctl_block.test --- strace-4.11/tests/ioctl_block.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_block.test 2016-05-26 14:44:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of BLK* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioctl.c strace-4.12/tests/ioctl.c --- strace-4.11/tests/ioctl.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ioctl.c 2016-05-05 21:20:45.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -64,36 +61,36 @@ struct termios tty; (void) ioctl(-1, TCGETS, &tty); printf("ioctl(-1, TCGETS, %p)" - " = -1 EBADF (Bad file descriptor)\n", &tty); + " = -1 EBADF (%m)\n", &tty); #endif (void) ioctl(-1, MMTIMER_GETRES, &data); printf("ioctl(-1, MMTIMER_GETRES, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, VIDIOC_ENUMINPUT, 0); - printf("ioctl(-1, VIDIOC_ENUMINPUT, 0)" - " = -1 EBADF (Bad file descriptor)\n"); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL)" + " = -1 EBADF (%m)\n"); (void) ioctl(-1, HIDIOCGVERSION, &data); printf("ioctl(-1, HIDIOCGRDESCSIZE or HIDIOCGVERSION, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, HIDIOCGPHYS(8), &data); printf("ioctl(-1, HIDIOCGPHYS(8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data); printf("ioctl(-1, EVIOCGBIT(EV_KEY, 8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, _IOR('M', 13, int), &data); printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" - " = -1 EBADF (Bad file descriptor)\n"); + " = -1 EBADF (%m)\n"); (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x08), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); puts("+++ exited with 0 +++"); return 0; @@ -101,10 +98,8 @@ #else -int -main(void ) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MMTIMER_GETRES && VIDIOC_ENUMINPUT" + " && HIDIOCGVERSION && HIDIOCGPHYS" + " && EVIOCGBIT && EV_KEY") #endif diff -Nru strace-4.11/tests/ioctl_evdev.c strace-4.12/tests/ioctl_evdev.c --- strace-4.11/tests/ioctl_evdev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_evdev.c 2016-05-28 22:13:27.000000000 +0000 @@ -0,0 +1,284 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_INPUT_H + +# include +# include +# include +# include +# include +# include + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +# ifdef VERBOSE_IOCTL +static void +print_envelope(const struct ff_envelope *const e) +{ + printf(", envelope={attack_length=%hu, attack_level=%hu" + ", fade_length=%hu, fade_level=%#hx}", + e->attack_length, e->attack_level, + e->fade_length, e->fade_level); +} +# endif /* VERBOSE_IOCTL */ + +static void +print_ffe_common(const struct ff_effect *const ffe, const char *const type_str) +{ + printf("ioctl(-1, EVIOCSFF, {type=%s, id=%" PRIu16 + ", direction=%" PRIu16 ", ", + type_str, ffe->id, ffe->direction); +# ifdef VERBOSE_IOCTL + printf("trigger={button=%hu, interval=%hu}" + ", replay={length=%hu, delay=%hu}", + ffe->trigger.button, ffe->trigger.interval, + ffe->replay.length, ffe->replay.delay); +# endif /* VERBOSE_IOCTL */ +} + +# define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(EVIOCGVERSION); + TEST_NULL_ARG(EVIOCGEFFECTS); + TEST_NULL_ARG(EVIOCGID); + TEST_NULL_ARG(EVIOCGKEYCODE); + TEST_NULL_ARG(EVIOCSKEYCODE); + TEST_NULL_ARG(EVIOCSFF); +# ifdef EVIOCGKEYCODE_V2 + TEST_NULL_ARG(EVIOCGKEYCODE_V2); +# endif +# ifdef EVIOCSKEYCODE_V2 + TEST_NULL_ARG(EVIOCSKEYCODE_V2); +# endif +# ifdef EVIOCGREP + TEST_NULL_ARG(EVIOCGREP); +# endif +# ifdef EVIOCSREP + TEST_NULL_ARG(EVIOCSREP); +# endif +# ifdef EVIOCSCLOCKID + TEST_NULL_ARG(EVIOCSCLOCKID); +# endif + + TEST_NULL_ARG(EVIOCGNAME(0)); + TEST_NULL_ARG(EVIOCGPHYS(0)); + TEST_NULL_ARG(EVIOCGUNIQ(0)); + TEST_NULL_ARG(EVIOCGKEY(0)); + TEST_NULL_ARG(EVIOCGLED(0)); +# ifdef EVIOCGMTSLOTS + TEST_NULL_ARG(EVIOCGMTSLOTS(0)); +# endif +# ifdef EVIOCGPROP + TEST_NULL_ARG(EVIOCGPROP(0)); +# endif + TEST_NULL_ARG(EVIOCGSND(0)); +# ifdef EVIOCGSW + TEST_NULL_ARG(EVIOCGSW(0)); +# endif + + TEST_NULL_ARG(EVIOCGABS(ABS_X)); + TEST_NULL_ARG(EVIOCSABS(ABS_X)); + + TEST_NULL_ARG(EVIOCGBIT(EV_SYN, 0)); + TEST_NULL_ARG(EVIOCGBIT(EV_KEY, 1)); + TEST_NULL_ARG(EVIOCGBIT(EV_REL, 2)); + TEST_NULL_ARG(EVIOCGBIT(EV_ABS, 3)); + TEST_NULL_ARG(EVIOCGBIT(EV_MSC, 4)); +# ifdef EV_SW + TEST_NULL_ARG(EVIOCGBIT(EV_SW, 5)); +# endif + TEST_NULL_ARG(EVIOCGBIT(EV_LED, 6)); + TEST_NULL_ARG(EVIOCGBIT(EV_SND, 7)); + TEST_NULL_ARG(EVIOCGBIT(EV_REP, 8)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF, 9)); + TEST_NULL_ARG(EVIOCGBIT(EV_PWR, 10)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF_STATUS, 11)); + + ioctl(-1, EVIOCGBIT(EV_MAX, 42), 0); + printf("ioctl(-1, EVIOCGBIT(%#x /* EV_??? */, 42), NULL)" + " = -1 EBADF (%m)\n", EV_MAX); + + ioctl(-1, EVIOCRMFF, lmagic); + printf("ioctl(-1, EVIOCRMFF, %d) = -1 EBADF (%m)\n", (int) lmagic); + + ioctl(-1, EVIOCGRAB, lmagic); + printf("ioctl(-1, EVIOCGRAB, %lu) = -1 EBADF (%m)\n", lmagic); + +# ifdef EVIOCREVOKE + ioctl(-1, EVIOCREVOKE, lmagic); + printf("ioctl(-1, EVIOCREVOKE, %lu) = -1 EBADF (%m)\n", lmagic); +# endif + + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + +# ifdef EVIOCSCLOCKID + ioctl(-1, EVIOCSCLOCKID, val_int); + printf("ioctl(-1, EVIOCSCLOCKID, [%u]) = -1 EBADF (%m)\n", *val_int); +# endif + + int *pair_int = tail_alloc(sizeof(*pair_int) * 2); + pair_int[0] = 0xdeadbeef; + pair_int[1] = 0xbadc0ded; + +# ifdef EVIOSGREP + ioctl(-1, EVIOCSREP, pair_int); + printf("ioctl(-1, EVIOCSREP, [%u, %u]) = -1 EBADF (%m)\n", + pair_int[0], pair_int[1]); +# endif + + pair_int[1] = 1; + ioctl(-1, EVIOCSKEYCODE, pair_int); + printf("ioctl(-1, EVIOCSKEYCODE, [%u, %s]) = -1 EBADF (%m)\n", + pair_int[0], "KEY_ESC"); + +# ifdef EVIOCSKEYCODE_V2 + struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); + init_magic(ike, sizeof(*ike)); + ike->keycode = 2; + + ioctl(-1, EVIOCSKEYCODE_V2, ike); + printf("ioctl(-1, EVIOCSKEYCODE_V2, {flags=%" PRIu8 + ", len=%" PRIu8 ", ", ike->flags, ike->len); +# ifdef VERBOSE_IOCTL + printf("index=%" PRIu16 ", keycode=%s, scancode=[", + ike->index, "KEY_1"); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(ike->scancode); ++i) { + if (i > 0) + printf(", "); + printf("%" PRIx8, ike->scancode[i]); + } + printf("]"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); + init_magic(ffe, sizeof(*ffe)); + + ffe->type = FF_CONSTANT; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_CONSTANT"); + +# ifdef VERBOSE_IOCTL + printf(", constant={level=%hd", ffe->u.constant.level); + print_envelope(&ffe->u.constant.envelope); + printf("}"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + +# ifdef VERBOSE_IOCTL + ffe->type = FF_RAMP; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RAMP"); + printf(", ramp={start_level=%hd, end_level=%hd", + ffe->u.ramp.start_level, ffe->u.ramp.end_level); + print_envelope(&ffe->u.ramp.envelope); + errno = EBADF; + printf("}}) = -1 EBADF (%m)\n"); + + ffe->type = FF_PERIODIC; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_PERIODIC"); + printf(", periodic={waveform=%hu, period=%hu, magnitude=%hd" + ", offset=%hd, phase=%hu", + ffe->u.periodic.waveform, ffe->u.periodic.period, + ffe->u.periodic.magnitude, ffe->u.periodic.offset, + ffe->u.periodic.phase); + print_envelope(&ffe->u.periodic.envelope); + printf(", custom_len=%u, custom_data=%p}", + ffe->u.periodic.custom_len, ffe->u.periodic.custom_data); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = FF_RUMBLE; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RUMBLE"); + printf(", rumble={strong_magnitude=%hu, weak_magnitude=%hu}", + ffe->u.rumble.strong_magnitude, ffe->u.rumble.weak_magnitude); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = 0xff; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "0xff /* FF_??? */"); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_WRITE, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_INPUT_H") + +#endif diff -Nru strace-4.11/tests/ioctl_evdev.test strace-4.12/tests/ioctl_evdev.test --- strace-4.11/tests/ioctl_evdev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_evdev.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of EVIOC* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioctl_evdev-v.c strace-4.12/tests/ioctl_evdev-v.c --- strace-4.11/tests/ioctl_evdev-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_evdev-v.c 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_evdev-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_evdev.c" diff -Nru strace-4.11/tests/ioctl_evdev-v.test strace-4.12/tests/ioctl_evdev-v.test --- strace-4.11/tests/ioctl_evdev-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_evdev-v.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding EVIOC* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/ioctl_mtd.c strace-4.12/tests/ioctl_mtd.c --- strace-4.11/tests/ioctl_mtd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_mtd.c 2016-05-28 19:55:01.000000000 +0000 @@ -0,0 +1,208 @@ +/* + * This file is part of ioctl_mtd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +#define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + if (_IOC_DIR(cmd) == _IOC_WRITE) \ + printf("ioctl(-1, MIXER_WRITE(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else if (_IOC_DIR(cmd) == _IOC_READ) \ + printf("ioctl(-1, MIXER_READ(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +#define TEST_erase_info_user(cmd, eiu) \ + ioctl(-1, cmd, eiu); \ + printf("ioctl(-1, MIXER_%s(%u) or %s, {start=%#x, length=%#x})" \ + " = -1 EBADF (%m)\n", \ + (_IOC_DIR(cmd) == _IOC_READ) ? "READ" : "WRITE", \ + (unsigned int) _IOC_NR(cmd), #cmd, \ + eiu->start, eiu->length) + +int +main(void) +{ + TEST_NULL_ARG(ECCGETLAYOUT); + TEST_NULL_ARG(ECCGETSTATS); + TEST_NULL_ARG(MEMERASE); + TEST_NULL_ARG(MEMERASE64); + TEST_NULL_ARG(MEMGETBADBLOCK); + TEST_NULL_ARG(MEMGETINFO); + TEST_NULL_ARG(MEMGETOOBSEL); + TEST_NULL_ARG(MEMGETREGIONCOUNT); + TEST_NULL_ARG(MEMISLOCKED); + TEST_NULL_ARG(MEMLOCK); + TEST_NULL_ARG(MEMREADOOB); + TEST_NULL_ARG(MEMREADOOB64); + TEST_NULL_ARG(MEMSETBADBLOCK); + TEST_NULL_ARG(MEMUNLOCK); + TEST_NULL_ARG(MEMWRITE); + TEST_NULL_ARG(MEMWRITEOOB); + TEST_NULL_ARG(MEMWRITEOOB64); + TEST_NULL_ARG(OTPGETREGIONCOUNT); + TEST_NULL_ARG(OTPGETREGIONINFO); + TEST_NULL_ARG(OTPLOCK); + TEST_NULL_ARG(OTPSELECT); + + ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL); + printf("ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL) = -1 EBADF (%m)\n"); + + int *const opt = tail_alloc(sizeof(*opt)); + *opt = MTD_OTP_OFF; + ioctl(-1, OTPSELECT, opt); + printf("ioctl(-1, MIXER_READ(%u) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); + + uint64_t *const v64 = tail_alloc(sizeof(*v64)); + init_magic(v64, sizeof(*v64)); + + ioctl(-1, MEMGETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMGETBADBLOCK), *v64); + + ioctl(-1, MEMSETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMSETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); + + struct region_info_user *const riu = tail_alloc(sizeof(*riu)); + init_magic(riu, sizeof(*riu)); + ioctl(-1, MEMGETREGIONINFO, riu); + printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", + "MEMGETREGIONINFO" +#ifdef __i386__ + " or MTRRIOC_GET_PAGE_ENTRY" +#endif + , riu->regionindex); + + struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); + init_magic(eiu, sizeof(*eiu)); + + TEST_erase_info_user(MEMERASE, eiu); + TEST_erase_info_user(MEMLOCK, eiu); + TEST_erase_info_user(MEMUNLOCK, eiu); + TEST_erase_info_user(MEMISLOCKED, eiu); + + struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); + init_magic(eiu64, sizeof(*eiu64)); + ioctl(-1, MEMERASE64, eiu64); + printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMERASE64), "MEMERASE64", + (unsigned long long) eiu64->start, + (unsigned long long) eiu64->length); + + struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); + init_magic(oob, sizeof(*oob)); + + ioctl(-1, MEMWRITEOOB, oob); + printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + ioctl(-1, MEMREADOOB, oob); + printf("ioctl(-1, MEMREADOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); + init_magic(oob64, sizeof(*oob64)); + + ioctl(-1, MEMWRITEOOB64, oob64); + printf("ioctl(-1, MEMWRITEOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + ioctl(-1, MEMREADOOB64, oob64); + printf("ioctl(-1, MEMREADOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + + struct otp_info *const oi = tail_alloc(sizeof(*oi)); + init_magic(oi, sizeof(*oi)); + ioctl(-1, OTPLOCK, oi); + printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" + ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); + + struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); + init_magic(wr, sizeof(*wr)); + wr->mode = MTD_OPS_PLACE_OOB; + ioctl(-1, MEMWRITE, wr); + printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" + ", usr_data=%#llx, usr_oob=%#llx, mode=MTD_OPS_PLACE_OOB})" + " = -1 EBADF (%m)\n", + (unsigned long long) wr->start, + (unsigned long long) wr->len, + (unsigned long long) wr->ooblen, + (unsigned long long) wr->usr_data, + (unsigned long long) wr->usr_oob); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/ioctl_mtd.test strace-4.12/tests/ioctl_mtd.test --- strace-4.11/tests/ioctl_mtd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_mtd.test 2016-05-28 19:31:50.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of 'M' type ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioctl_rtc.c strace-4.12/tests/ioctl_rtc.c --- strace-4.11/tests/ioctl_rtc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_rtc.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,218 @@ +/* + * This file is part of ioctl_rtc strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static void +print_rtc_time(const struct rtc_time *rt) +{ + printf("{tm_sec=%d, tm_min=%d, tm_hour=%d" + ", tm_mday=%d, tm_mon=%d, tm_year=%d", + rt->tm_sec, rt->tm_min, rt->tm_hour, + rt->tm_mday, rt->tm_mon, rt->tm_year); +#ifdef VERBOSE_IOCTL + printf(", tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); +#else + printf(", ...}"); +#endif +} + +static struct xlat rtc_argless[] = { + XLAT(RTC_AIE_OFF), + XLAT(RTC_PIE_ON), + XLAT(RTC_PIE_OFF), + XLAT(RTC_UIE_ON), + XLAT(RTC_WIE_ON), + XLAT(RTC_WIE_OFF), +#ifdef RTC_VL_CLR + XLAT(RTC_VL_CLR), +#endif +}; + +int +main(void) +{ + const unsigned int size = get_page_size(); + + void *const page = tail_alloc(size); + init_magic(page, size); + + struct rtc_time *rt = tail_alloc(sizeof(*rt)); + init_magic(rt, sizeof(*rt)); + + struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); + init_magic(wk, sizeof(*wk)); + + struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); + init_magic(pll, sizeof(*pll)); + + /* RTC_ALM_READ */ + ioctl(-1, RTC_ALM_READ, 0); + printf("ioctl(-1, RTC_ALM_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_READ, page); + printf("ioctl(-1, RTC_ALM_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_RD_TIME */ + ioctl(-1, RTC_RD_TIME, 0); + printf("ioctl(-1, RTC_RD_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_RD_TIME, page); + printf("ioctl(-1, RTC_RD_TIME, %p) = -1 EBADF (%m)\n", page); + + /* RTC_ALM_SET */ + ioctl(-1, RTC_ALM_SET, 0); + printf("ioctl(-1, RTC_ALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_SET, rt); + printf("ioctl(-1, RTC_ALM_SET, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_SET_TIME */ + ioctl(-1, RTC_SET_TIME, 0); + printf("ioctl(-1, RTC_SET_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_SET_TIME, rt); + printf("ioctl(-1, RTC_SET_TIME, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_IRQP_SET */ + ioctl(-1, RTC_IRQP_SET, lmagic); + printf("ioctl(-1, RTC_IRQP_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_EPOCH_SET */ + ioctl(-1, RTC_EPOCH_SET, lmagic); + printf("ioctl(-1, RTC_EPOCH_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_IRQP_READ */ + ioctl(-1, RTC_IRQP_READ, 0); + printf("ioctl(-1, RTC_IRQP_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_IRQP_READ, page); + printf("ioctl(-1, RTC_IRQP_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_EPOCH_READ */ + ioctl(-1, RTC_EPOCH_READ, 0); + printf("ioctl(-1, RTC_EPOCH_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_EPOCH_READ, page); + printf("ioctl(-1, RTC_EPOCH_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_RD */ + ioctl(-1, RTC_WKALM_RD, 0); + printf("ioctl(-1, RTC_WKALM_RD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_RD, page); + printf("ioctl(-1, RTC_WKALM_RD, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_SET */ + ioctl(-1, RTC_WKALM_SET, 0); + printf("ioctl(-1, RTC_WKALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_SET, wk); + printf("ioctl(-1, RTC_WKALM_SET, {enabled=%u, pending=%u, time=", + (unsigned) wk->enabled, (unsigned) wk->pending); + print_rtc_time(&wk->time); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + /* RTC_PLL_GET */ + ioctl(-1, RTC_PLL_GET, 0); + printf("ioctl(-1, RTC_PLL_GET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_GET, page); + printf("ioctl(-1, RTC_PLL_GET, %p) = -1 EBADF (%m)\n", page); + + /* RTC_PLL_SET */ + ioctl(-1, RTC_PLL_SET, 0); + printf("ioctl(-1, RTC_PLL_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_SET, pll); + printf("ioctl(-1, RTC_PLL_SET, {pll_ctrl=%d, pll_value=%d" + ", pll_max=%d, pll_min=%d, pll_posmult=%d, pll_negmult=%d" + ", pll_clock=%ld}) = -1 EBADF (%m)\n", + pll->pll_ctrl, pll->pll_value, pll->pll_max, pll->pll_min, + pll->pll_posmult, pll->pll_negmult, pll->pll_clock); + +#ifdef RTC_VL_READ + /* RTC_VL_READ */ + ioctl(-1, RTC_VL_READ, 0); + printf("ioctl(-1, RTC_VL_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_VL_READ, page); + printf("ioctl(-1, RTC_VL_READ, %p) = -1 EBADF (%m)\n", page); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(rtc_argless); ++i) { + ioctl(-1, (unsigned long) rtc_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", rtc_argless[i].str); + } + + ioctl(-1, RTC_UIE_OFF, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PHN_NOT_OH or RTC_UIE_OFF"); + + ioctl(-1, RTC_AIE_ON, lmagic); +#ifdef HPPA + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PA_PERF_ON or RTC_AIE_ON"); +#else + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "RTC_AIE_ON"); +#endif + + ioctl(-1, _IO(0x70, 0x40), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "NVRAM_INIT", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/ioctl_rtc.test strace-4.12/tests/ioctl_rtc.test --- strace-4.11/tests/ioctl_rtc.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_rtc.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic decoding of RTC_* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioctl_rtc-v.c strace-4.12/tests/ioctl_rtc-v.c --- strace-4.11/tests/ioctl_rtc-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_rtc-v.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_rtc-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_rtc.c" diff -Nru strace-4.11/tests/ioctl_rtc-v.test strace-4.12/tests/ioctl_rtc-v.test --- strace-4.11/tests/ioctl_rtc-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_rtc-v.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding of RTC_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/ioctl.test strace-4.12/tests/ioctl.test --- strace-4.11/tests/ioctl.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/ioctl.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,9 +5,11 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -a16 -e ioctl $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests/ioctl_uffdio.c strace-4.12/tests/ioctl_uffdio.c --- strace-4.11/tests/ioctl_uffdio.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_uffdio.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_userfaultfd && defined HAVE_LINUX_USERFAULTFD_H + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +int +main(void) +{ + int rc; + int fd = syscall(__NR_userfaultfd, O_NONBLOCK); + size_t pagesize = getpagesize(); + + if (fd < 0) + perror_msg_and_skip("userfaultfd"); + + /* ---- API ---- */ + struct uffdio_api *api_struct = tail_alloc(sizeof(*api_struct)); + + /* With a bad fd */ + memset(api_struct, 0, sizeof(*api_struct)); + rc = ioctl(-1, UFFDIO_API, api_struct); + printf("ioctl(-1, UFFDIO_API, {api=0, features=0}) = %d %s (%m)\n", + rc, errno2name()); + /* With a bad pointer */ + rc = ioctl(fd, UFFDIO_API, NULL); + printf("ioctl(%d, UFFDIO_API, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + /* Normal call */ + api_struct->api = UFFD_API; + api_struct->features = 0; + rc = ioctl(fd, UFFDIO_API, api_struct); + printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, " + "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|" + "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API", + fd, (uint64_t)api_struct->features); + api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER| + 1ull<<_UFFDIO_UNREGISTER| + 1ull<<_UFFDIO_API); + if (api_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)api_struct->ioctls); + printf("}) = %d\n", rc); + + /* For the rest of the tests we need some anonymous memory */ + void *area1 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area1 == MAP_FAILED) + perror_msg_and_fail("mmap area1"); + void *area2 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area2 == MAP_FAILED) + perror_msg_and_fail("mmap area2"); + madvise(area2, pagesize, MADV_DONTNEED); + *(char *)area1 = 42; + + /* ---- REGISTER ---- */ + struct uffdio_register *register_struct = + tail_alloc(sizeof(*register_struct)); + memset(register_struct, 0, sizeof(*register_struct)); + + rc = ioctl(-1, UFFDIO_REGISTER, register_struct); + printf("ioctl(-1, UFFDIO_REGISTER, {range={start=0, len=0}, " + "mode=0}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_REGISTER, NULL); + printf("ioctl(%d, UFFDIO_REGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + register_struct->range.start = (uint64_t)(uintptr_t)area2; + register_struct->range.len = pagesize; + register_struct->mode = UFFDIO_REGISTER_MODE_MISSING; + rc = ioctl(fd, UFFDIO_REGISTER, register_struct); + printf("ioctl(%d, UFFDIO_REGISTER, {range={start=%p, len=%#zx}, " + "mode=UFFDIO_REGISTER_MODE_MISSING, ioctls=" + "1<<_UFFDIO_WAKE|1<<_UFFDIO_COPY|1<<_UFFDIO_ZEROPAGE", + fd, area2, pagesize); + register_struct->ioctls &= ~(1ull<<_UFFDIO_WAKE| + 1ull<<_UFFDIO_COPY| + 1ull<<_UFFDIO_ZEROPAGE); + if (register_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)register_struct->ioctls); + printf("}) = %d\n", rc); + + /* With area2 registered we can now do the atomic copies onto it + * but be careful not to access it in any other way otherwise + * userfaultfd will cause us to stall. + */ + /* ---- COPY ---- */ + struct uffdio_copy *copy_struct = tail_alloc(sizeof(*copy_struct)); + + memset(copy_struct, 0, sizeof(*copy_struct)); + rc = ioctl(-1, UFFDIO_COPY, copy_struct); + printf("ioctl(-1, UFFDIO_COPY, {dst=0, src=0, len=0, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_COPY, NULL); + printf("ioctl(%d, UFFDIO_COPY, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + copy_struct->dst = (uint64_t)(uintptr_t)area2; + copy_struct->src = (uint64_t)(uintptr_t)area1; + copy_struct->len = pagesize; + copy_struct->mode = UFFDIO_COPY_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_COPY, copy_struct); + printf("ioctl(%d, UFFDIO_COPY, {dst=%p, src=%p, len=%#zx," + " mode=UFFDIO_COPY_MODE_DONTWAKE, copy=%#zx}) = %d\n", + fd, area2, area1, pagesize, pagesize, rc); + + /* ---- ZEROPAGE ---- */ + struct uffdio_zeropage *zero_struct = tail_alloc(sizeof(*zero_struct)); + madvise(area2, pagesize, MADV_DONTNEED); + + memset(zero_struct, 0, sizeof(*zero_struct)); + rc = ioctl(-1, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(-1, UFFDIO_ZEROPAGE, {range={start=0, len=0}, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_ZEROPAGE, NULL); + printf("ioctl(%d, UFFDIO_ZEROPAGE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + zero_struct->range.start = (uint64_t)(uintptr_t)area2; + zero_struct->range.len = pagesize; + zero_struct->mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(%d, UFFDIO_ZEROPAGE, {range={start=%p, len=%#zx}," + " mode=UFFDIO_ZEROPAGE_MODE_DONTWAKE, zeropage=%#zx}) = %d\n", + fd, area2, pagesize, pagesize, rc); + + /* ---- WAKE ---- */ + struct uffdio_range *range_struct = tail_alloc(sizeof(*range_struct)); + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_WAKE, range_struct); + printf("ioctl(-1, UFFDIO_WAKE, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_WAKE, NULL); + printf("ioctl(%d, UFFDIO_WAKE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_WAKE, range_struct); + printf("ioctl(%d, UFFDIO_WAKE, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + + /* ---- UNREGISTER ---- */ + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(-1, UFFDIO_UNREGISTER, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_UNREGISTER, NULL); + printf("ioctl(%d, UFFDIO_UNREGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(%d, UFFDIO_UNREGISTER, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && HAVE_LINUX_USERFAULTFD_H") + +#endif diff -Nru strace-4.11/tests/ioctl_uffdio.test strace-4.12/tests/ioctl_uffdio.test --- strace-4.11/tests/ioctl_uffdio.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_uffdio.test 2016-05-10 11:00:12.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check userfaultfd ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioctl_v4l2.c strace-4.12/tests/ioctl_v4l2.c --- strace-4.11/tests/ioctl_v4l2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_v4l2.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,522 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static const unsigned int magic = 0xdeadbeef; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size; + + for (; p < end; ++p) + *(unsigned int *) p = magic; +} + +int +main(void ) +{ + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + const union u_pixel_format { + unsigned int pixelformat; + unsigned char cc[sizeof(int)]; + } u = { +#if WORDS_BIGENDIAN + .cc = { + (unsigned char) (magic >> 24), + (unsigned char) (magic >> 16), + (unsigned char) (magic >> 8), + (unsigned char) magic + } +#else + .pixelformat = magic +#endif + }; + + /* VIDIOC_QUERYCAP */ + ioctl(-1, VIDIOC_QUERYCAP, 0); + printf("ioctl(-1, VIDIOC_QUERYCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCAP, page); + printf("ioctl(-1, VIDIOC_QUERYCAP, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_ENUM_FMT */ + ioctl(-1, VIDIOC_ENUM_FMT, 0); + printf("ioctl(-1, VIDIOC_ENUM_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_fmtdesc *const p_fmtdesc = tail_alloc(sizeof(*p_fmtdesc)); + p_fmtdesc->index = magic; + p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); + printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FMT */ + ioctl(-1, VIDIOC_G_FMT, 0); + printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_format *const p_format = + tail_alloc(sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + + ioctl(-1, VIDIOC_G_FMT, p_format); + printf("ioctl(-1, VIDIOC_G_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n"); + + /* VIDIOC_S_FMT */ + ioctl(-1, VIDIOC_S_FMT, 0); + printf("ioctl(-1, VIDIOC_S_FMT, NULL) = -1 EBADF (%m)\n"); + + p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_format->fmt.pix.width = 0xdad1beaf; + p_format->fmt.pix.height = 0xdad2beaf; + p_format->fmt.pix.pixelformat = 0xdeadbeef; + p_format->fmt.pix.field = V4L2_FIELD_NONE; + p_format->fmt.pix.bytesperline = 0xdad3beaf; + p_format->fmt.pix.sizeimage = 0xdad4beaf; + p_format->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; + + ioctl(-1, VIDIOC_S_FMT, p_format); + printf("ioctl(-1, VIDIOC_S_FMT, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", fmt.pix={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" + ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", + p_format->fmt.pix.width, p_format->fmt.pix.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3], + p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); + + /* VIDIOC_TRY_FMT */ + ioctl(-1, VIDIOC_TRY_FMT, 0); + printf("ioctl(-1, VIDIOC_TRY_FMT, NULL) = -1 EBADF (%m)\n"); + +#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + memset(p_format, -1, sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + p_format->fmt.pix_mp.width = 0xdad1beaf; + p_format->fmt.pix_mp.height = 0xdad2beaf; + p_format->fmt.pix_mp.pixelformat = 0xdeadbeef; + p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; + p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; + unsigned int i; + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + p_format->fmt.pix_mp.plane_fmt[i].sizeimage = 0xbadc0de0 | i; + p_format->fmt.pix_mp.plane_fmt[i].bytesperline = 0xdadbeaf0 | i; + } + ioctl(-1, VIDIOC_TRY_FMT, p_format); + printf("ioctl(-1, VIDIOC_TRY_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" + ", fmt.pix_mp={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" + ", plane_fmt=[", + p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3]); + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + if (i) + printf(", "); + printf("{sizeimage=%u, bytesperline=%u}", + p_format->fmt.pix_mp.plane_fmt[i].sizeimage, + p_format->fmt.pix_mp.plane_fmt[i].bytesperline); + } + printf("], num_planes=%u}}) = -1 EBADF (%m)\n", + p_format->fmt.pix_mp.num_planes); +#else + ioctl(-1, VIDIOC_TRY_FMT, page); + printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); +#endif + + /* VIDIOC_REQBUFS */ + ioctl(-1, VIDIOC_REQBUFS, 0); + printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_REQBUFS, + page + size - sizeof(struct v4l2_requestbuffers)); + printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" + " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" + " = -1 EBADF (%m)\n", magic, magic, magic); + + /* VIDIOC_QUERYBUF */ + ioctl(-1, VIDIOC_QUERYBUF, 0); + printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QBUF */ + ioctl(-1, VIDIOC_QBUF, 0); + printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_DQBUF */ + ioctl(-1, VIDIOC_DQBUF, 0); + printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_DQBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FBUF */ + ioctl(-1, VIDIOC_G_FBUF, 0); + printf("ioctl(-1, VIDIOC_G_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_FBUF, page); + printf("ioctl(-1, VIDIOC_G_FBUF, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_FBUF */ + ioctl(-1, VIDIOC_S_FBUF, 0); + printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_FBUF, page + size - sizeof(struct v4l2_framebuffer)); + printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" + ", flags=%#x, base=%#lx}) = -1 EBADF (%m)\n", + magic, magic, *(unsigned long *) page); + + /* VIDIOC_STREAMON */ + ioctl(-1, VIDIOC_STREAMON, 0); + printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMON, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_STREAMOFF */ + ioctl(-1, VIDIOC_STREAMOFF, 0); + printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMOFF, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_PARM */ + ioctl(-1, VIDIOC_G_PARM, 0); + printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_PARM, page + size - sizeof(struct v4l2_streamparm)); + printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_PARM */ + ioctl(-1, VIDIOC_S_PARM, 0); + printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_PARM, page); + printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + struct v4l2_streamparm *const p_streamparm = + tail_alloc(sizeof(*p_streamparm)); + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + p_streamparm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + p_streamparm->parm.capture.capturemode = V4L2_MODE_HIGHQUALITY; + p_streamparm->parm.capture.timeperframe.numerator = 0xdeadbeef; + p_streamparm->parm.capture.timeperframe.denominator = 0xbadc0ded; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE" + ", parm.capture={capability=V4L2_CAP_TIMEPERFRAME" + ", capturemode=V4L2_MODE_HIGHQUALITY, timeperframe=%u/%u" + ", extendedmode=%u, readbuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.capture.timeperframe.numerator, + p_streamparm->parm.capture.timeperframe.denominator, -1U, -1U); + + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_streamparm->parm.output.outputmode = 0; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", parm.output={capability=V4L2_CAP_TIMEPERFRAME" + ", outputmode=0, timeperframe=%u/%u" + ", extendedmode=%u, writebuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.output.timeperframe.numerator, + p_streamparm->parm.output.timeperframe.denominator, -1U, -1U); + + /* VIDIOC_G_STD */ + ioctl(-1, VIDIOC_G_STD, 0); + printf("ioctl(-1, VIDIOC_G_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_STD, page); + printf("ioctl(-1, VIDIOC_G_STD, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_STD */ + ioctl(-1, VIDIOC_S_STD, 0); + printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_STD, page + size - sizeof(long long)); + printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", + *(unsigned long long *) page); + + /* VIDIOC_ENUMSTD */ + ioctl(-1, VIDIOC_ENUMSTD, 0); + printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_standard *const p_standard = + tail_alloc(sizeof(*p_standard)); + p_standard->index = magic; + ioctl(-1, VIDIOC_ENUMSTD, p_standard); + printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_ENUMINPUT */ + ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUMINPUT, page); + printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_G_CTRL */ + ioctl(-1, VIDIOC_G_CTRL, 0); + printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CTRL */ + ioctl(-1, VIDIOC_S_CTRL, 0); + printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" + ", value=%d}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QUERYCTRL */ + ioctl(-1, VIDIOC_QUERYCTRL, 0); + printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCTRL, + page + size - sizeof(struct v4l2_queryctrl)); +# ifdef V4L2_CTRL_FLAG_NEXT_CTRL + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" + "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", + magic & ~V4L2_CTRL_FLAG_NEXT_CTRL); +# else + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); +# endif + + struct v4l2_queryctrl *const p_queryctrl = + tail_alloc(sizeof(*p_queryctrl)); + p_queryctrl->id = V4L2_CID_SATURATION; + ioctl(-1, VIDIOC_QUERYCTRL, p_queryctrl); + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CID_SATURATION})" + " = -1 EBADF (%m)\n"); + + /* VIDIOC_G_INPUT */ + ioctl(-1, VIDIOC_G_INPUT, 0); + printf("ioctl(-1, VIDIOC_G_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_INPUT, page); + printf("ioctl(-1, VIDIOC_G_INPUT, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_INPUT */ + ioctl(-1, VIDIOC_S_INPUT, 0); + printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_INPUT, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_CROPCAP */ + ioctl(-1, VIDIOC_CROPCAP, 0); + printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CROPCAP, page + size - sizeof(struct v4l2_cropcap)); + printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_CROP */ + ioctl(-1, VIDIOC_G_CROP, 0); + printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CROP */ + ioctl(-1, VIDIOC_S_CROP, 0); + printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", + magic, magic, magic, magic, magic); + +#ifdef VIDIOC_S_EXT_CTRLS + /* VIDIOC_S_EXT_CTRLS */ + ioctl(-1, VIDIOC_S_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_ext_controls *const p_ext_controls = + tail_alloc(sizeof(*p_ext_controls)); + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = 0; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_USER" + ", count=%u}) = -1 EBADF (%m)\n", p_ext_controls->count); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_MPEG; + p_ext_controls->count = magic; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_MPEG" + ", count=%u, controls=%p}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + p_ext_controls->count = 2; + p_ext_controls->controls = + tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); + p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; + p_ext_controls->controls[0].size = 0; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef; + p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; + p_ext_controls->controls[1].size = 2; + p_ext_controls->controls[1].string = + tail_alloc(p_ext_controls->controls[1].size); + + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "] => controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "], error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->error_idx); + + ++p_ext_controls->count; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + ", %p]}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls + 2); +# endif /* HAVE_DECL_V4L2_CTRL_TYPE_STRING */ + + /* VIDIOC_TRY_EXT_CTRLS */ + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = magic; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p})" + " = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + + /* VIDIOC_G_EXT_CTRLS */ + ioctl(-1, VIDIOC_G_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p" + ", error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls, + p_ext_controls->error_idx); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmsizeenum *const p_frmsizeenum = + tail_alloc(sizeof(*p_frmsizeenum)); + p_frmsizeenum->index = magic; + const union u_pixel_format u_frmsizeenum = { + .cc = { 'A', '\'', '\\', '\xfa' } + }; +#if WORDS_BIGENDIAN + p_frmsizeenum->pixel_format = + (unsigned) u_frmsizeenum.cc[0] << 24 | + (unsigned) u_frmsizeenum.cc[1] << 16 | + (unsigned) u_frmsizeenum.cc[2] << 8 | + (unsigned) u_frmsizeenum.cc[3]; +#else + p_frmsizeenum->pixel_format = u_frmsizeenum.pixelformat; +#endif + + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" + ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" + " = -1 EBADF (%m)\n", p_frmsizeenum->index, + u_frmsizeenum.cc[0], u_frmsizeenum.cc[1], + u_frmsizeenum.cc[2], u_frmsizeenum.cc[3]); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, page); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" + ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", width=%u, height=%u}) = -1 EBADF (%m)\n", + magic, u.cc[0], u.cc[1], u.cc[2], u.cc[3], magic, magic); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + ioctl(-1, VIDIOC_CREATE_BUFS, 0); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CREATE_BUFS, + page + size - sizeof(struct v4l2_create_buffers)); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" + " /* V4L2_MEMORY_??? */, format={type=%#x" + " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", + magic, magic, magic); +#endif /* VIDIOC_CREATE_BUFS */ + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/ioctl_v4l2.test strace-4.12/tests/ioctl_v4l2.test --- strace-4.11/tests/ioctl_v4l2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioctl_v4l2.test 2016-05-05 21:20:56.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic VIDIOC_* ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests/ioperm.c strace-4.12/tests/ioperm.c --- strace-4.11/tests/ioperm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioperm.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_ioperm + +# include +# include + +int +main(void) +{ + const unsigned long port = (unsigned long) 0xdeafbeefffffffff; + + long rc = syscall(__NR_ioperm, port, 1, 0); + printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", + port, 1UL, 0, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioperm") + +#endif diff -Nru strace-4.11/tests/ioperm.test strace-4.12/tests/ioperm.test --- strace-4.11/tests/ioperm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ioperm.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ioperm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests/iopl.c strace-4.12/tests/iopl.c --- strace-4.11/tests/iopl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/iopl.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_iopl + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_iopl, 4); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_iopl") + +#endif diff -Nru strace-4.11/tests/iopl.test strace-4.12/tests/iopl.test --- strace-4.11/tests/iopl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/iopl.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iopl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests/ipc_msgbuf.c strace-4.12/tests/ipc_msgbuf.c --- strace-4.11/tests/ipc_msgbuf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ipc_msgbuf.c 2016-01-06 11:55:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +26,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include - #include "kernel_types.h" #define text_string "STRACE_STRING" #define msgsz sizeof(text_string) +static int msqid = -1; + +static void +cleanup(void) +{ + msgctl(msqid, IPC_RMID, 0); + msqid = -1; +} + int main (void) { @@ -49,18 +56,13 @@ .mtype = mtype, .mtext = text_string }; - int msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); + msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); if (msqid == -1) - return 77; + perror_msg_and_skip("msgget"); + atexit(cleanup); if (msgsnd(msqid, &msg, msgsz, 0) == -1) - goto cleanup; + perror_msg_and_skip("msgsnd"); if (msgrcv(msqid, &msg, msgsz, mtype, 0) != msgsz) - goto cleanup; - if (msgctl(msqid, IPC_RMID, 0) == -1) - return 77; + perror_msg_and_skip("msgrcv"); return 0; - -cleanup: - msgctl(msqid, IPC_RMID, 0); - return 77; } diff -Nru strace-4.11/tests/ipc_msg.c strace-4.12/tests/ipc_msg.c --- strace-4.11/tests/ipc_msg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ipc_msg.c 2016-01-06 11:59:06.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + msgctl(id, IPC_RMID, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct msqid_ds ds; id = msgget(IPC_PRIVATE, 0600); if (id < 0) - return 77; + perror_msg_and_skip("msgget"); printf("msgget\\(IPC_PRIVATE, 0600\\) += %d\n", id); + atexit(cleanup); if (msgctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("msgctl IPC_STAT"); printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{msg_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u, msg_rtime=%u, " "msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u, msg_lspid=%u, " @@ -57,7 +70,7 @@ int max = msgctl(0, MSG_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("msgctl MSG_INFO"); printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %d\n", &ds, max); rc = msgctl(id, MSG_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("msgctl MSG_STAT"); + printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (msgctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests/ipc_sem.c strace-4.12/tests/ipc_sem.c --- strace-4.11/tests/ipc_sem.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ipc_sem.c 2016-01-06 11:59:29.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Andreas Schwab + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,8 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include union semun { @@ -38,29 +40,40 @@ (Linux-specific) */ }; +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; union semun un; struct semid_ds ds; struct seminfo info; id = semget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("semget"); printf("semget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); un.buf = &ds; if (semctl(id, 0, IPC_STAT, un)) - goto fail; + perror_msg_and_skip("semctl IPC_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, \\[?%p\\]?\\) += 0\n", id, &ds); un.__buf = &info; int max = semctl(0, 0, SEM_INFO, un); if (max < 0) - goto fail; + perror_msg_and_skip("semctl SEM_INFO"); printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, \\[?%p\\]?\\) += %d\n", &info, max); @@ -72,22 +85,13 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; + perror_msg_and_skip("semctl SEM_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" - " += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + " += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" " += %d\n", id, &ds, id); } - rc = 0; -done: - if (semctl(id, 0, IPC_RMID, 0) < 0) - return 1; - printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests/ipc.sh strace-4.12/tests/ipc.sh --- strace-4.11/tests/ipc.sh 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests/ipc.sh 2016-03-30 00:13:37.000000000 +0000 @@ -4,8 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" - run_prog > /dev/null run_strace -eipc $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests/ipc_shm.c strace-4.12/tests/ipc_shm.c --- strace-4.11/tests/ipc_shm.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ipc_shm.c 2016-01-06 11:59:58.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct shmid_ds ds; id = shmget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("shmget"); printf("shmget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); if (shmctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("shmctl IPC_STAT"); printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{shm_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, " "shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, " @@ -57,7 +70,7 @@ int max = shmctl(0, SHM_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("shmctl SHM_INFO"); printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %d\n", &ds, max); rc = shmctl(id, SHM_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("shmctl SHM_STAT"); + printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (shmctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests/ip_mreq.c strace-4.12/tests/ip_mreq.c --- strace-4.11/tests/ip_mreq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ip_mreq.c 2016-01-06 11:42:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,20 +25,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include +#include "tests.h" #include -#include + +#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ + && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON + +# include +# include +# include +# include int main(void) { -#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ - && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON struct ip_mreq m4; struct ipv6_mreq m6; @@ -48,13 +48,14 @@ m6.ipv6mr_interface = 1; (void) close(0); - assert(socket(AF_INET, SOCK_DGRAM, 0) == 0); + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); assert(setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, 1) == -1); assert(setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, 1) == -1); if (setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, sizeof(m4)) || setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, sizeof(m4))) - return 77; + perror_msg_and_skip("setsockopt"); assert(setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &m6, 1) == -1); assert(setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &m6, 1) == -1); @@ -67,7 +68,11 @@ assert(setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, &m6, sizeof(m6)) == -1); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("IP_ADD_MEMBERSHIP && IPV6_ADD_MEMBERSHIP" + " && IPV6_JOIN_ANYCAST && HAVE_INET_PTON") + #endif -} diff -Nru strace-4.11/tests/kill.c strace-4.12/tests/kill.c --- strace-4.11/tests/kill.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/kill.c 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Check decoding of kill syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_kill + +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const int pid = getpid(); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM); + printf("kill(%d, SIGALRM) = %ld\n", pid, rc); + + const long big_pid = (long) 0xfacefeedbadc0ded; + const long big_sig = (long) 0xdeadbeefcafef00d; + rc = syscall(__NR_kill, big_pid, big_sig); + printf("kill(%d, %d) = %ld %s (%m)\n", + (int) big_pid, (int) big_sig, rc, errno2name()); + + rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0); + printf("kill(%d, SIG_0) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kill") + +#endif diff -Nru strace-4.11/tests/kill.test strace-4.12/tests/kill.test --- strace-4.11/tests/kill.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/kill.test 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kill syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -esignal=none diff -Nru strace-4.11/tests/ksysent.c strace-4.12/tests/ksysent.c --- strace-4.11/tests/ksysent.c 2015-12-10 02:06:25.000000000 +0000 +++ strace-4.12/tests/ksysent.c 2016-01-12 05:06:10.000000000 +0000 @@ -45,7 +45,7 @@ #include "syscallent.h" }; -typedef const char const *pstr_t; +typedef const char *pstr_t; static const pstr_t ksyslist[] = { #include "ksysent.h" }; diff -Nru strace-4.11/tests/lchown32.c strace-4.12/tests/lchown32.c --- strace-4.11/tests/lchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/lchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown32 + +# define SYSCALL_NR __NR_lchown32 +# define SYSCALL_NAME "lchown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown32") + +#endif diff -Nru strace-4.11/tests/lchown32.test strace-4.12/tests/lchown32.test --- strace-4.11/tests/lchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/lchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests/lchown.c strace-4.12/tests/lchown.c --- strace-4.11/tests/lchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/lchown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown + +# define SYSCALL_NR __NR_lchown +# define SYSCALL_NAME "lchown" + +# if defined __NR_lchown32 && __NR_lchown != __NR_lchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown") + +#endif diff -Nru strace-4.11/tests/lchown.test strace-4.12/tests/lchown.test --- strace-4.11/tests/lchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/lchown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 diff -Nru strace-4.11/tests/linkat.c strace-4.12/tests/linkat.c --- strace-4.11/tests/linkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/linkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_linkat + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "linkat_sample_old"; + static const char sample_2[] = "linkat_sample_new"; + const long fd_old = (long) 0xdeadbeefffffffff; + const long fd_new = (long) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); + printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd_old, sample_1, (int) fd_new, sample_2, + rc, errno2name()); + + rc = syscall(__NR_linkat, -100, sample_1, -100, sample_2, -1L); + printf("linkat(%s, \"%s\", %s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample_1, "AT_FDCWD", sample_2, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_linkat") + +#endif diff -Nru strace-4.11/tests/linkat.test strace-4.12/tests/linkat.test --- strace-4.11/tests/linkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/linkat.test 2016-04-06 06:18:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check linkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/link.c strace-4.12/tests/link.c --- strace-4.11/tests/link.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/link.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_link + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "link_sample_old"; + static const char sample_2[] = "link_sample_new"; + + long rc = syscall(__NR_link, sample_1, sample_2); + printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_link") + +#endif diff -Nru strace-4.11/tests/link.test strace-4.12/tests/link.test --- strace-4.11/tests/link.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/link.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check link syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/llseek.c strace-4.12/tests/llseek.c --- strace-4.11/tests/llseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/llseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,32 +25,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR__llseek -#include -#include -#include +# include +# include int main(void) { - const unsigned long high = 0xdefaced; + const unsigned long high = 0xfacefeed; const unsigned long low = 0xdeadbeef; - const unsigned long long offset = 0xdefaceddeadbeef; + const long long offset = 0xfacefeeddeadbeefLL; unsigned long long result; - int rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); - if (rc != -1 || EBADF != errno) - return 77; - - printf("_llseek(-1, %llu, %p, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - offset, &result); + long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); + printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n", + offset, &result, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -58,10 +51,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR__llseek") #endif diff -Nru strace-4.11/tests/llseek.test strace-4.12/tests/llseek.test --- strace-4.11/tests/llseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests/llseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -e_llseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -e_llseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests/lseek.c strace-4.12/tests/lseek.c --- strace-4.11/tests/lseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/lseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,33 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_lseek -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) { - const kernel_ulong_t offset = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; - - if (sizeof(offset) > sizeof(long)) - rc = lseek(-1, offset, SEEK_SET); - else - rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); - - if (rc != -1 || EBADF != errno) - return 77; + const kernel_ulong_t offset = (kernel_ulong_t) 0xfacefeeddeadbeefULL; - printf("lseek(-1, %llu, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) offset); + if (sizeof(offset) > sizeof(long)) { + /* + * Cannot use syscall because it takes long arguments. + * Let's call lseek with hope it will invoke lseek syscall. + */ + long long rc = lseek(-1, offset, SEEK_SET); + printf("lseek(-1, %lld, SEEK_SET) = %lld %s (%m)\n", + (long long) offset, rc, errno2name()); + } else { + long rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); + printf("lseek(-1, %ld, SEEK_SET) = %ld %s (%m)\n", + (long) offset, rc, errno2name()); + } puts("+++ exited with 0 +++"); return 0; @@ -62,10 +59,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_lseek") #endif diff -Nru strace-4.11/tests/lseek.test strace-4.12/tests/lseek.test --- strace-4.11/tests/lseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests/lseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -a30 -elseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a30 -elseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests/lstat64.c strace-4.12/tests/lstat64.c --- strace-4.11/tests/lstat64.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests/lstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat64 -# define TEST_SYSCALL_NAME lstat64 + +# define TEST_SYSCALL_NR __NR_lstat64 +# define TEST_SYSCALL_STR "lstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat64") + +#endif diff -Nru strace-4.11/tests/lstat.c strace-4.12/tests/lstat.c --- strace-4.11/tests/lstat.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests/lstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat -# define TEST_SYSCALL_NAME lstat + +# define TEST_SYSCALL_NR __NR_lstat +# define TEST_SYSCALL_STR "lstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat") + +#endif diff -Nru strace-4.11/tests/lstatx.c strace-4.12/tests/lstatx.c --- strace-4.11/tests/lstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/lstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests/Makefile.am strace-4.12/tests/Makefile.am --- strace-4.11/tests/Makefile.am 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/Makefile.am 2016-05-28 19:31:50.000000000 +0000 @@ -1,6 +1,6 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ OS = linux ARCH = @arch@ +MPERS_NAME = ARCH_MFLAGS = AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -39,82 +40,264 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a + check_PROGRAMS = \ _newselect \ + access \ + acct \ adjtimex \ aio \ + alarm \ + attach-f-p \ + attach-p-cmd-cmd \ + attach-p-cmd-p \ bpf \ + brk \ + btrfs \ caps \ + chmod \ + chown \ + chown32 \ + chroot \ + clock_adjtime \ clock_nanosleep \ clock_xettime \ + copy_file_range \ + count-f \ + creat \ + dup \ + dup2 \ + dup3 \ + epoll_create \ epoll_create1 \ + epoll_ctl \ + epoll_pwait \ + epoll_wait \ eventfd \ execve \ + execve-v \ execveat \ + execveat-v \ + faccessat \ fanotify_mark \ + fchdir \ + fchmod \ + fchmodat \ + fchown \ + fchown32 \ + fchownat \ fcntl \ fcntl64 \ + fdatasync \ file_handle \ + file_ioctl \ filter-unavailable \ + flock \ + fork-f \ fstat \ fstat64 \ fstatat64 \ + fstatfs \ + fstatfs64 \ + fsync \ ftruncate \ ftruncate64 \ + futimesat \ + get_mempolicy \ + getcwd \ getdents \ getdents64 \ + getegid \ + getegid32 \ + geteuid \ + geteuid32 \ + getgid \ + getgid32 \ + getgroups \ + getgroups32 \ + getpgrp \ getrandom \ - inet-accept-connect-send-recv \ + getresgid \ + getresgid32 \ + getresuid \ + getresuid32 \ + getrusage \ + getsid \ + getuid \ + getuid32 \ + getxxid \ inet-cmsg \ ioctl \ + ioctl_block \ + ioctl_evdev \ + ioctl_evdev-v \ + ioctl_mtd \ + ioctl_rtc \ + ioctl_rtc-v \ + ioctl_uffdio \ + ioctl_v4l2 \ + ioperm \ + iopl \ ip_mreq \ ipc_msg \ ipc_msgbuf \ ipc_sem \ ipc_shm \ + kill \ ksysent \ + lchown \ + lchown32 \ + link \ + linkat \ llseek \ lseek \ lstat \ lstat64 \ + mbind \ membarrier \ memfd_create \ + migrate_pages \ + mincore \ + mkdir \ + mkdirat \ + mknod \ + mknodat \ + mlock \ mlock2 \ + mlockall \ mmap \ mmap64 \ mmsg \ + mount \ + move_pages \ mq \ + munlockall \ nanosleep \ net-accept-connect \ + net-icmp_filter \ + net-y-unix \ + net-yy-inet \ + net-yy-netlink \ + net-yy-unix \ netlink_inet_diag \ + netlink_netlink_diag \ netlink_unix_diag \ newfstatat \ + nsyscalls \ + old_mmap \ oldselect \ + open \ + openat \ + pause \ pc \ + personality \ pipe \ + poll \ ppoll \ + prctl-seccomp-filter-v \ + prctl-seccomp-strict \ + pread64-pwrite64 \ + preadv \ + preadv-pwritev \ + preadv2-pwritev2 \ pselect6 \ + ptrace \ + pwritev \ + read-write \ readdir \ readlink \ readlinkat \ + readv \ + reboot \ + recvmsg \ + remap_file_pages \ + rename \ + renameat \ + renameat2 \ restart_syscall \ + rmdir \ + rt_sigpending \ + rt_sigprocmask \ rt_sigqueueinfo \ + rt_sigsuspend \ + rt_sigtimedwait \ + rt_tgsigqueueinfo \ + sched_get_priority_mxx \ + sched_rr_get_interval \ + sched_xetaffinity \ sched_xetattr \ + sched_xetparam \ + sched_xetscheduler \ + sched_yield \ scm_rights \ - seccomp \ + seccomp-filter \ + seccomp-filter-v \ + seccomp-strict \ select \ + semop \ sendfile \ sendfile64 \ + set_mempolicy \ set_ptracer_any \ + setdomainname \ + setfsgid \ + setfsgid32 \ + setfsuid \ + setfsuid32 \ + setgid \ + setgid32 \ + setgroups \ + setgroups32 \ + sethostname \ + setregid \ + setregid32 \ + setresgid \ + setresgid32 \ + setresuid \ + setresuid32 \ + setreuid \ + setreuid32 \ + setuid \ + setuid32 \ + shmxt \ sigaction \ sigaltstack \ signalfd \ sigreturn \ + sleep \ + splice \ stack-fcall \ stat \ stat64 \ statfs \ + statfs64 \ + swap \ + symlink \ + symlinkat \ + sync \ + sync_file_range \ + sync_file_range2 \ sysinfo \ + syslog \ + tee \ time \ timer_create \ timer_xettime \ @@ -123,121 +306,292 @@ times-fail \ truncate \ truncate64 \ - uid \ - uid16 \ - uid32 \ uio \ + umask \ umount \ umount2 \ umovestr \ umovestr2 \ + umovestr3 \ + uname \ unix-pair-send-recv \ + unlink \ + unlinkat \ userfaultfd \ utime \ utimensat \ + utimes \ + vfork-f \ + vhangup \ + vmsplice \ wait \ xattr \ xet_robust_list \ xetitimer \ + xetpgid \ + xetpriority \ xettimeofday \ # end of check_PROGRAMS -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 + stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -246,86 +600,121 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) -net-fd.log: net.log +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests/Makefile.in strace-4.12/tests/Makefile.in --- strace-4.11/tests/Makefile.in 2015-12-21 23:24:05.000000000 +0000 +++ strace-4.12/tests/Makefile.in 2016-05-31 11:35:59.000000000 +0000 @@ -16,7 +16,7 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -104,46 +104,108 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = _newselect$(EXEEXT) adjtimex$(EXEEXT) aio$(EXEEXT) \ - bpf$(EXEEXT) caps$(EXEEXT) clock_nanosleep$(EXEEXT) \ - clock_xettime$(EXEEXT) epoll_create1$(EXEEXT) eventfd$(EXEEXT) \ - execve$(EXEEXT) execveat$(EXEEXT) fanotify_mark$(EXEEXT) \ - fcntl$(EXEEXT) fcntl64$(EXEEXT) file_handle$(EXEEXT) \ - filter-unavailable$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ - fstatat64$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ - getdents$(EXEEXT) getdents64$(EXEEXT) getrandom$(EXEEXT) \ - inet-accept-connect-send-recv$(EXEEXT) inet-cmsg$(EXEEXT) \ - ioctl$(EXEEXT) ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) \ - ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ - ksysent$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) lstat$(EXEEXT) \ - lstat64$(EXEEXT) membarrier$(EXEEXT) memfd_create$(EXEEXT) \ - mlock2$(EXEEXT) mmap$(EXEEXT) mmap64$(EXEEXT) mmsg$(EXEEXT) \ - mq$(EXEEXT) nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ - netlink_inet_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ - newfstatat$(EXEEXT) oldselect$(EXEEXT) pc$(EXEEXT) \ - pipe$(EXEEXT) ppoll$(EXEEXT) pselect6$(EXEEXT) \ - readdir$(EXEEXT) readlink$(EXEEXT) readlinkat$(EXEEXT) \ - restart_syscall$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ - sched_xetattr$(EXEEXT) scm_rights$(EXEEXT) seccomp$(EXEEXT) \ - select$(EXEEXT) sendfile$(EXEEXT) sendfile64$(EXEEXT) \ - set_ptracer_any$(EXEEXT) sigaction$(EXEEXT) \ +check_PROGRAMS = _newselect$(EXEEXT) access$(EXEEXT) acct$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-p-cmd-cmd$(EXEEXT) \ + attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) brk$(EXEEXT) \ + btrfs$(EXEEXT) caps$(EXEEXT) chmod$(EXEEXT) chown$(EXEEXT) \ + chown32$(EXEEXT) chroot$(EXEEXT) clock_adjtime$(EXEEXT) \ + clock_nanosleep$(EXEEXT) clock_xettime$(EXEEXT) \ + copy_file_range$(EXEEXT) count-f$(EXEEXT) creat$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) eventfd$(EXEEXT) execve$(EXEEXT) \ + execve-v$(EXEEXT) execveat$(EXEEXT) execveat-v$(EXEEXT) \ + faccessat$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) flock$(EXEEXT) \ + fork-f$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ + fstatat64$(EXEEXT) fstatfs$(EXEEXT) fstatfs64$(EXEEXT) \ + fsync$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcwd$(EXEEXT) \ + getdents$(EXEEXT) getdents64$(EXEEXT) getegid$(EXEEXT) \ + getegid32$(EXEEXT) geteuid$(EXEEXT) geteuid32$(EXEEXT) \ + getgid$(EXEEXT) getgid32$(EXEEXT) getgroups$(EXEEXT) \ + getgroups32$(EXEEXT) getpgrp$(EXEEXT) getrandom$(EXEEXT) \ + getresgid$(EXEEXT) getresgid32$(EXEEXT) getresuid$(EXEEXT) \ + getresuid32$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getuid$(EXEEXT) getuid32$(EXEEXT) getxxid$(EXEEXT) \ + inet-cmsg$(EXEEXT) ioctl$(EXEEXT) ioctl_block$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) ioctl_mtd$(EXEEXT) \ + ioctl_rtc$(EXEEXT) ioctl_rtc-v$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) ipc_msgbuf$(EXEEXT) \ + ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) kill$(EXEEXT) \ + ksysent$(EXEEXT) lchown$(EXEEXT) lchown32$(EXEEXT) \ + link$(EXEEXT) linkat$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) munlockall$(EXEEXT) \ + nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ + net-icmp_filter$(EXEEXT) net-y-unix$(EXEEXT) \ + net-yy-inet$(EXEEXT) net-yy-netlink$(EXEEXT) \ + net-yy-unix$(EXEEXT) netlink_inet_diag$(EXEEXT) \ + netlink_netlink_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldselect$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) \ + pause$(EXEEXT) pc$(EXEEXT) personality$(EXEEXT) pipe$(EXEEXT) \ + poll$(EXEEXT) ppoll$(EXEEXT) prctl-seccomp-filter-v$(EXEEXT) \ + prctl-seccomp-strict$(EXEEXT) pread64-pwrite64$(EXEEXT) \ + preadv$(EXEEXT) preadv-pwritev$(EXEEXT) \ + preadv2-pwritev2$(EXEEXT) pselect6$(EXEEXT) ptrace$(EXEEXT) \ + pwritev$(EXEEXT) read-write$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvmsg$(EXEEXT) remap_file_pages$(EXEEXT) \ + rename$(EXEEXT) renameat$(EXEEXT) renameat2$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setregid$(EXEEXT) setregid32$(EXEEXT) setresgid$(EXEEXT) \ + setresgid32$(EXEEXT) setresuid$(EXEEXT) setresuid32$(EXEEXT) \ + setreuid$(EXEEXT) setreuid32$(EXEEXT) setuid$(EXEEXT) \ + setuid32$(EXEEXT) shmxt$(EXEEXT) sigaction$(EXEEXT) \ sigaltstack$(EXEEXT) signalfd$(EXEEXT) sigreturn$(EXEEXT) \ - stack-fcall$(EXEEXT) stat$(EXEEXT) stat64$(EXEEXT) \ - statfs$(EXEEXT) sysinfo$(EXEEXT) time$(EXEEXT) \ - timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ - timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ - truncate$(EXEEXT) truncate64$(EXEEXT) uid$(EXEEXT) \ - uid16$(EXEEXT) uid32$(EXEEXT) uio$(EXEEXT) umount$(EXEEXT) \ - umount2$(EXEEXT) umovestr$(EXEEXT) umovestr2$(EXEEXT) \ - unix-pair-send-recv$(EXEEXT) userfaultfd$(EXEEXT) \ - utime$(EXEEXT) utimensat$(EXEEXT) wait$(EXEEXT) xattr$(EXEEXT) \ - xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ - xettimeofday$(EXEEXT) + sleep$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) time$(EXEEXT) timer_create$(EXEEXT) \ + timer_xettime$(EXEEXT) timerfd_xettime$(EXEEXT) times$(EXEEXT) \ + times-fail$(EXEEXT) truncate$(EXEEXT) truncate64$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umovestr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) userfaultfd$(EXEEXT) utime$(EXEEXT) \ + utimensat$(EXEEXT) utimes$(EXEEXT) vfork-f$(EXEEXT) \ + vhangup$(EXEEXT) vmsplice$(EXEEXT) wait$(EXEEXT) \ + xattr$(EXEEXT) xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ + xetpgid$(EXEEXT) xetpriority$(EXEEXT) xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/mpers.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -152,311 +214,1106 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) _newselect_SOURCES = _newselect.c _newselect_OBJECTS = _newselect.$(OBJEXT) _newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a adjtimex_SOURCES = adjtimex.c adjtimex_OBJECTS = adjtimex.$(OBJEXT) adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a aio_SOURCES = aio.c aio_OBJECTS = aio.$(OBJEXT) aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a bpf_SOURCES = bpf.c bpf_OBJECTS = bpf.$(OBJEXT) bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a caps_SOURCES = caps.c caps_OBJECTS = caps.$(OBJEXT) caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a clock_nanosleep_SOURCES = clock_nanosleep.c clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a clock_xettime_SOURCES = clock_xettime.c clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) -clock_xettime_DEPENDENCIES = +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a epoll_create1_SOURCES = epoll_create1.c epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a eventfd_SOURCES = eventfd.c eventfd_OBJECTS = eventfd.$(OBJEXT) eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a execve_SOURCES = execve.c execve_OBJECTS = execve.$(OBJEXT) execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a execveat_SOURCES = execveat.c execveat_OBJECTS = execveat.$(OBJEXT) execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a fanotify_mark_SOURCES = fanotify_mark.c fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a fcntl_SOURCES = fcntl.c fcntl_OBJECTS = fcntl.$(OBJEXT) fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a fcntl64_SOURCES = fcntl64.c fcntl64_OBJECTS = fcntl64.$(OBJEXT) fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a file_handle_SOURCES = file_handle.c file_handle_OBJECTS = file_handle.$(OBJEXT) file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a filter_unavailable_SOURCES = filter-unavailable.c filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) -filter_unavailable_DEPENDENCIES = +filter_unavailable_DEPENDENCIES = $(LDADD) +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a fstat_SOURCES = fstat.c fstat_OBJECTS = fstat.$(OBJEXT) fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a fstat64_SOURCES = fstat64.c fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a fstatat64_SOURCES = fstatat64.c fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a ftruncate_SOURCES = ftruncate.c ftruncate_OBJECTS = ftruncate.$(OBJEXT) ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a ftruncate64_SOURCES = ftruncate64.c ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a getdents_SOURCES = getdents.c getdents_OBJECTS = getdents.$(OBJEXT) getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a getdents64_SOURCES = getdents64.c getdents64_OBJECTS = getdents64.$(OBJEXT) getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a getrandom_SOURCES = getrandom.c getrandom_OBJECTS = getrandom.$(OBJEXT) getrandom_LDADD = $(LDADD) -inet_accept_connect_send_recv_SOURCES = \ - inet-accept-connect-send-recv.c -inet_accept_connect_send_recv_OBJECTS = \ - inet-accept-connect-send-recv.$(OBJEXT) -inet_accept_connect_send_recv_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a inet_cmsg_SOURCES = inet-cmsg.c inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a ioctl_SOURCES = ioctl.c ioctl_OBJECTS = ioctl.$(OBJEXT) ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a ip_mreq_SOURCES = ip_mreq.c ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a ipc_msg_SOURCES = ipc_msg.c ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a ipc_msgbuf_SOURCES = ipc_msgbuf.c ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a ipc_sem_SOURCES = ipc_sem.c ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a ipc_shm_SOURCES = ipc_shm.c ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a ksysent_SOURCES = ksysent.c ksysent_OBJECTS = ksysent.$(OBJEXT) ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a llseek_SOURCES = llseek.c llseek_OBJECTS = llseek.$(OBJEXT) llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a lseek_SOURCES = lseek.c lseek_OBJECTS = lseek.$(OBJEXT) lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a lstat_SOURCES = lstat.c lstat_OBJECTS = lstat.$(OBJEXT) lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a lstat64_SOURCES = lstat64.c lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a membarrier_SOURCES = membarrier.c membarrier_OBJECTS = membarrier.$(OBJEXT) membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a memfd_create_SOURCES = memfd_create.c memfd_create_OBJECTS = memfd_create.$(OBJEXT) memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a mlock2_SOURCES = mlock2.c mlock2_OBJECTS = mlock2.$(OBJEXT) mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a mmap_SOURCES = mmap.c mmap_OBJECTS = mmap.$(OBJEXT) mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a mmap64_SOURCES = mmap64.c mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a mmsg_SOURCES = mmsg.c mmsg_OBJECTS = mmsg.$(OBJEXT) mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a mq_SOURCES = mq.c mq_OBJECTS = mq.$(OBJEXT) -mq_DEPENDENCIES = +mq_DEPENDENCIES = $(LDADD) +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a nanosleep_SOURCES = nanosleep.c nanosleep_OBJECTS = nanosleep.$(OBJEXT) nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a net_accept_connect_SOURCES = net-accept-connect.c net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a netlink_inet_diag_SOURCES = netlink_inet_diag.c netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a netlink_unix_diag_SOURCES = netlink_unix_diag.c netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a newfstatat_SOURCES = newfstatat.c newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a oldselect_SOURCES = oldselect.c oldselect_OBJECTS = oldselect.$(OBJEXT) oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a pc_SOURCES = pc.c pc_OBJECTS = pc.$(OBJEXT) am__DEPENDENCIES_1 = -pc_DEPENDENCIES = $(am__DEPENDENCIES_1) +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a pipe_SOURCES = pipe.c pipe_OBJECTS = pipe.$(OBJEXT) pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a ppoll_SOURCES = ppoll.c ppoll_OBJECTS = ppoll.$(OBJEXT) ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a pselect6_SOURCES = pselect6.c pselect6_OBJECTS = pselect6.$(OBJEXT) pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a readdir_SOURCES = readdir.c readdir_OBJECTS = readdir.$(OBJEXT) readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a readlink_SOURCES = readlink.c readlink_OBJECTS = readlink.$(OBJEXT) readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a readlinkat_SOURCES = readlinkat.c readlinkat_OBJECTS = readlinkat.$(OBJEXT) readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a restart_syscall_SOURCES = restart_syscall.c restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a sched_xetattr_SOURCES = sched_xetattr.c sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a scm_rights_SOURCES = scm_rights.c scm_rights_OBJECTS = scm_rights.$(OBJEXT) scm_rights_LDADD = $(LDADD) -seccomp_SOURCES = seccomp.c -seccomp_OBJECTS = seccomp.$(OBJEXT) -seccomp_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a select_SOURCES = select.c select_OBJECTS = select.$(OBJEXT) select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a sendfile_SOURCES = sendfile.c sendfile_OBJECTS = sendfile.$(OBJEXT) sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a sendfile64_SOURCES = sendfile64.c sendfile64_OBJECTS = sendfile64.$(OBJEXT) sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a set_ptracer_any_SOURCES = set_ptracer_any.c set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a sigaction_SOURCES = sigaction.c sigaction_OBJECTS = sigaction.$(OBJEXT) sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a sigaltstack_SOURCES = sigaltstack.c sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a signalfd_SOURCES = signalfd.c signalfd_OBJECTS = signalfd.$(OBJEXT) signalfd_LDADD = $(LDADD) +signalfd_DEPENDENCIES = libtests.a sigreturn_SOURCES = sigreturn.c sigreturn_OBJECTS = sigreturn.$(OBJEXT) sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ stack-fcall-3.$(OBJEXT) stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a stat_SOURCES = stat.c stat_OBJECTS = stat.$(OBJEXT) stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a stat64_SOURCES = stat64.c stat64_OBJECTS = stat64-stat64.$(OBJEXT) stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a statfs_SOURCES = statfs.c statfs_OBJECTS = statfs-statfs.$(OBJEXT) statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a sysinfo_SOURCES = sysinfo.c sysinfo_OBJECTS = sysinfo.$(OBJEXT) sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a time_SOURCES = time.c time_OBJECTS = time.$(OBJEXT) time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a timer_create_SOURCES = timer_create.c timer_create_OBJECTS = timer_create.$(OBJEXT) timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a timer_xettime_SOURCES = timer_xettime.c timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a timerfd_xettime_SOURCES = timerfd_xettime.c timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a times_SOURCES = times.c times_OBJECTS = times.$(OBJEXT) -times_DEPENDENCIES = +times_DEPENDENCIES = $(LDADD) times_fail_SOURCES = times-fail.c times_fail_OBJECTS = times-fail.$(OBJEXT) times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a truncate_SOURCES = truncate.c truncate_OBJECTS = truncate.$(OBJEXT) truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a truncate64_SOURCES = truncate64.c truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) truncate64_LDADD = $(LDADD) -uid_SOURCES = uid.c -uid_OBJECTS = uid.$(OBJEXT) -uid_LDADD = $(LDADD) -uid16_SOURCES = uid16.c -uid16_OBJECTS = uid16.$(OBJEXT) -uid16_LDADD = $(LDADD) -uid32_SOURCES = uid32.c -uid32_OBJECTS = uid32.$(OBJEXT) -uid32_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a uio_SOURCES = uio.c uio_OBJECTS = uio-uio.$(OBJEXT) uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a umount_SOURCES = umount.c umount_OBJECTS = umount.$(OBJEXT) umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a umount2_SOURCES = umount2.c umount2_OBJECTS = umount2.$(OBJEXT) umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a umovestr_SOURCES = umovestr.c umovestr_OBJECTS = umovestr.$(OBJEXT) umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a umovestr2_SOURCES = umovestr2.c umovestr2_OBJECTS = umovestr2.$(OBJEXT) umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a unix_pair_send_recv_SOURCES = unix-pair-send-recv.c unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a userfaultfd_SOURCES = userfaultfd.c userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a utime_SOURCES = utime.c utime_OBJECTS = utime.$(OBJEXT) utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a utimensat_SOURCES = utimensat.c utimensat_OBJECTS = utimensat.$(OBJEXT) utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a wait_SOURCES = wait.c wait_OBJECTS = wait.$(OBJEXT) wait_LDADD = $(LDADD) +wait_DEPENDENCIES = libtests.a xattr_SOURCES = xattr.c xattr_OBJECTS = xattr.$(OBJEXT) xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a xet_robust_list_SOURCES = xet_robust_list.c xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a xetitimer_SOURCES = xetitimer.c xetitimer_OBJECTS = xetitimer.$(OBJEXT) xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a xettimeofday_SOURCES = xettimeofday.c xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -489,49 +1346,122 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c clock_nanosleep.c \ - clock_xettime.c epoll_create1.c eventfd.c execve.c execveat.c \ - fanotify_mark.c fcntl.c fcntl64.c file_handle.c \ - filter-unavailable.c fstat.c fstat64.c fstatat64.c ftruncate.c \ - ftruncate64.c getdents.c getdents64.c getrandom.c \ - inet-accept-connect-send-recv.c inet-cmsg.c ioctl.c ip_mreq.c \ - ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c ksysent.c llseek.c \ - lseek.c lstat.c lstat64.c membarrier.c memfd_create.c mlock2.c \ - mmap.c mmap64.c mmsg.c mq.c nanosleep.c net-accept-connect.c \ - netlink_inet_diag.c netlink_unix_diag.c newfstatat.c \ - oldselect.c pc.c pipe.c ppoll.c pselect6.c readdir.c \ - readlink.c readlinkat.c restart_syscall.c rt_sigqueueinfo.c \ - sched_xetattr.c scm_rights.c seccomp.c select.c sendfile.c \ - sendfile64.c set_ptracer_any.c sigaction.c sigaltstack.c \ - signalfd.c sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c \ - statfs.c sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c -DIST_SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c \ - clock_nanosleep.c clock_xettime.c epoll_create1.c eventfd.c \ - execve.c execveat.c fanotify_mark.c fcntl.c fcntl64.c \ - file_handle.c filter-unavailable.c fstat.c fstat64.c \ - fstatat64.c ftruncate.c ftruncate64.c getdents.c getdents64.c \ - getrandom.c inet-accept-connect-send-recv.c inet-cmsg.c \ - ioctl.c ip_mreq.c ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c \ - ksysent.c llseek.c lseek.c lstat.c lstat64.c membarrier.c \ - memfd_create.c mlock2.c mmap.c mmap64.c mmsg.c mq.c \ - nanosleep.c net-accept-connect.c netlink_inet_diag.c \ - netlink_unix_diag.c newfstatat.c oldselect.c pc.c pipe.c \ - ppoll.c pselect6.c readdir.c readlink.c readlinkat.c \ - restart_syscall.c rt_sigqueueinfo.c sched_xetattr.c \ - scm_rights.c seccomp.c select.c sendfile.c sendfile64.c \ - set_ptracer_any.c sigaction.c sigaltstack.c signalfd.c \ - sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ - sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c +SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -740,6 +1670,7 @@ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) @@ -773,6 +1704,11 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ @@ -785,12 +1721,15 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBOBJS = @LIBOBJS@ @@ -810,6 +1749,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -875,6 +1815,7 @@ top_srcdir = @top_srcdir@ OS = linux ARCH = @arch@ +MPERS_NAME = ARCH_MFLAGS = AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -887,102 +1828,279 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -991,77 +2109,111 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test - + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) @@ -1103,6 +2255,14 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) @@ -1110,6 +2270,14 @@ @rm -f _newselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) @rm -f adjtimex$(EXEEXT) $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) @@ -1118,14 +2286,58 @@ @rm -f aio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) @rm -f bpf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) @rm -f caps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) @rm -f clock_nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) @@ -1134,10 +2346,50 @@ @rm -f clock_xettime$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) @rm -f epoll_create1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) @rm -f eventfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) @@ -1146,14 +2398,50 @@ @rm -f execve$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) @rm -f execveat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) @rm -f fanotify_mark$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) @rm -f fcntl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) @@ -1162,14 +2450,30 @@ @rm -f fcntl64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) @rm -f file_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) @rm -f filter-unavailable$(EXEEXT) $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) @rm -f fstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) @@ -1182,6 +2486,18 @@ @rm -f fstatat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) @rm -f ftruncate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) @@ -1190,6 +2506,18 @@ @rm -f ftruncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) @rm -f getdents$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) @@ -1198,13 +2526,81 @@ @rm -f getdents64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) @rm -f getrandom$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) -inet-accept-connect-send-recv$(EXEEXT): $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_DEPENDENCIES) $(EXTRA_inet_accept_connect_send_recv_DEPENDENCIES) - @rm -f inet-accept-connect-send-recv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_LDADD) $(LIBS) +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) @rm -f inet-cmsg$(EXEEXT) @@ -1214,6 +2610,46 @@ @rm -f ioctl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) @rm -f ip_mreq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) @@ -1234,10 +2670,30 @@ @rm -f ipc_shm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) @rm -f ksysent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) @rm -f llseek$(EXEEXT) $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) @@ -1254,6 +2710,10 @@ @rm -f lstat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) @rm -f membarrier$(EXEEXT) $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) @@ -1262,10 +2722,42 @@ @rm -f memfd_create$(EXEEXT) $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) @rm -f mlock2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) @rm -f mmap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) @@ -1278,10 +2770,22 @@ @rm -f mmsg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) @rm -f mq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) @rm -f nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) @@ -1290,10 +2794,34 @@ @rm -f net-accept-connect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) @rm -f netlink_inet_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) @rm -f netlink_unix_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) @@ -1302,26 +2830,90 @@ @rm -f newfstatat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) @rm -f oldselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) @rm -f pc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) @rm -f pipe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) @rm -f ppoll$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) @rm -f pselect6$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) @rm -f readdir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) @@ -1334,30 +2926,118 @@ @rm -f readlinkat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) @rm -f restart_syscall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) @rm -f rt_sigqueueinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) @rm -f sched_xetattr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) @rm -f scm_rights$(EXEEXT) $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) -seccomp$(EXEEXT): $(seccomp_OBJECTS) $(seccomp_DEPENDENCIES) $(EXTRA_seccomp_DEPENDENCIES) - @rm -f seccomp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(seccomp_OBJECTS) $(seccomp_LDADD) $(LIBS) +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) @rm -f select$(EXEEXT) $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) @rm -f sendfile$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) @@ -1366,10 +3046,98 @@ @rm -f sendfile64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) @rm -f set_ptracer_any$(EXEEXT) $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) @rm -f sigaction$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) @@ -1386,6 +3154,14 @@ @rm -f sigreturn$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) @rm -f stack-fcall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) @@ -1402,10 +3178,46 @@ @rm -f statfs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) @rm -f sysinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) @rm -f time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) @@ -1438,22 +3250,14 @@ @rm -f truncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) -uid$(EXEEXT): $(uid_OBJECTS) $(uid_DEPENDENCIES) $(EXTRA_uid_DEPENDENCIES) - @rm -f uid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid_OBJECTS) $(uid_LDADD) $(LIBS) - -uid16$(EXEEXT): $(uid16_OBJECTS) $(uid16_DEPENDENCIES) $(EXTRA_uid16_DEPENDENCIES) - @rm -f uid16$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid16_OBJECTS) $(uid16_LDADD) $(LIBS) - -uid32$(EXEEXT): $(uid32_OBJECTS) $(uid32_DEPENDENCIES) $(EXTRA_uid32_DEPENDENCIES) - @rm -f uid32$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid32_OBJECTS) $(uid32_LDADD) $(LIBS) - uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) @rm -f uio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) @rm -f umount$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) @@ -1470,10 +3274,26 @@ @rm -f umovestr2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) @rm -f unix-pair-send-recv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) @rm -f userfaultfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) @@ -1486,6 +3306,22 @@ @rm -f utimensat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + wait$(EXEEXT): $(wait_OBJECTS) $(wait_DEPENDENCIES) $(EXTRA_wait_DEPENDENCIES) @rm -f wait$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wait_OBJECTS) $(wait_LDADD) $(LIBS) @@ -1502,6 +3338,14 @@ @rm -f xetitimer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) @rm -f xettimeofday$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) @@ -1513,75 +3357,241 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-accept-connect-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ @@ -1590,7 +3600,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ @@ -1599,22 +3618,30 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid16.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ .c.o: @@ -1631,6 +3658,174 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + fstat64-fstat64.o: fstat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po @@ -1715,6 +3910,62 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + stat64-stat64.o: stat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po @@ -1953,7 +4204,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all $(check_PROGRAMS) +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -2010,7 +4261,7 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am @@ -2054,7 +4305,8 @@ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -2124,24 +4376,23 @@ .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am -net-fd.log: net.log ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests/mbind.c strace-4.12/tests/mbind.c --- strace-4.11/tests/mbind.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mbind.c 2016-05-16 23:48:05.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of mbind syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_mbind + +# include +# include + +int +main(void) +{ + const unsigned long len = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long mode = 3; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2; + const unsigned long flags = -1UL; + + long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); + printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n", + len, "MPOL_INTERLEAVE", nodemask, maxnode, + "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL", + (unsigned) flags & ~7, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mbind") + +#endif diff -Nru strace-4.11/tests/mbind.test strace-4.12/tests/mbind.test --- strace-4.11/tests/mbind.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mbind.test 2016-04-29 18:21:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mbind syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/membarrier.c strace-4.12/tests/membarrier.c --- strace-4.11/tests/membarrier.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/membarrier.c 2016-04-21 18:16:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +25,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_membarrier + +# include +# include +# include +# include + int main(void) { -#ifdef __NR_membarrier - if (syscall(__NR_membarrier, 3, 255) != -1) - return 77; - printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + assert(syscall(__NR_membarrier, 3, 255) == -1); + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); if (errno != ENOSYS) { - if (syscall(__NR_membarrier, 0, 0) != 1) - return 1; /* the test needs to be updated? */ + /* the test needs to be updated? */ + assert(syscall(__NR_membarrier, 0, 0) == 1); puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" " = 0x1 (MEMBARRIER_CMD_SHARED)"); } puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_membarrier") + #endif -} diff -Nru strace-4.11/tests/membarrier.test strace-4.12/tests/membarrier.test --- strace-4.11/tests/membarrier.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/membarrier.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check membarrier syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -emembarrier $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests/memfd_create.c strace-4.12/tests/memfd_create.c --- strace-4.11/tests/memfd_create.c 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests/memfd_create.c 2016-01-04 23:41:27.000000000 +0000 @@ -1,7 +1,4 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include @@ -16,10 +13,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_memfd_create") #endif diff -Nru strace-4.11/tests/migrate_pages.c strace-4.12/tests/migrate_pages.c --- strace-4.11/tests/migrate_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/migrate_pages.c 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Check decoding of migrate_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_migrate_pages + +# include +# include + +int +main(void) +{ + const long pid = (long) 0xfacefeedffffffff; + long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); + printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_migrate_pages") + +#endif diff -Nru strace-4.11/tests/migrate_pages.test strace-4.12/tests/migrate_pages.test --- strace-4.11/tests/migrate_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/migrate_pages.test 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check migrate_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff -Nru strace-4.11/tests/mincore.c strace-4.12/tests/mincore.c --- strace-4.11/tests/mincore.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mincore.c 2016-04-22 14:14:39.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define DEFAULT_STRLEN 32 + +static void +print_mincore(const unsigned int pages, void *const addr, + const size_t size, unsigned char *const vec) +{ + unsigned int i; + + if (mincore(addr, size, vec)) + perror_msg_and_skip("mincore"); + + printf("mincore(%p, %zu, [", addr, size); + for (i = 0; i < pages; ++i) { + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } + printf("%u", vec[i] & 1); + } + puts("]) = 0"); +} + +static void +test_mincore(const unsigned int pages) +{ + const size_t page_size = get_page_size(); + const size_t size = pages * page_size; + void *const addr = tail_alloc(size); + unsigned char *const vec = tail_alloc(pages); + + mincore(addr, size, NULL); + printf("mincore(%p, %zu, NULL) = -1 %s (%m)\n", + addr, size, errno2name()); + + print_mincore(pages, addr, size, vec); + if (size) + print_mincore(pages, addr, size - page_size + 1, vec); +} + +int main(void) +{ + test_mincore(1); + test_mincore(2); + test_mincore(DEFAULT_STRLEN); + test_mincore(DEFAULT_STRLEN + 1); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/mincore.test strace-4.12/tests/mincore.test --- strace-4.11/tests/mincore.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mincore.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mincore syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests/mkdirat.c strace-4.12/tests/mkdirat.c --- strace-4.11/tests/mkdirat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mkdirat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdirat + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdirat.sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_mkdirat, fd, sample, 0600); + printf("mkdirat(%d, \"%s\", 0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdirat") + +#endif diff -Nru strace-4.11/tests/mkdirat.test strace-4.12/tests/mkdirat.test --- strace-4.11/tests/mkdirat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mkdirat.test 2016-04-06 06:18:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdirat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests/mkdir.c strace-4.12/tests/mkdir.c --- strace-4.11/tests/mkdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mkdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdir"; + + long rc = syscall(__NR_mkdir, sample, 0600); + printf("mkdir(\"%s\", 0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdir") + +#endif diff -Nru strace-4.11/tests/mkdir.test strace-4.12/tests/mkdir.test --- strace-4.11/tests/mkdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mkdir.test 2016-04-21 17:34:38.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/mknodat.c strace-4.12/tests/mknodat.c --- strace-4.11/tests/mknodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mknodat.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,41 @@ +#include "tests.h" +#include + +#ifdef __NR_mknodat + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +int +main(void) +{ + static const char sample[] = "mknokat_sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + long rc = syscall(__NR_mknodat, fd, sample, S_IFREG|0600, 0); + printf("mknodat(%d, \"%s\", S_IFREG|0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + const unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknodat, fd, sample, S_IFCHR | 0400, dev); + printf("mknodat(%d, \"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknodat") + +#endif diff -Nru strace-4.11/tests/mknodat.test strace-4.12/tests/mknodat.test --- strace-4.11/tests/mknodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mknodat.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknodat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/mknod.c strace-4.12/tests/mknod.c --- strace-4.11/tests/mknod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mknod.c 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,60 @@ +#include "tests.h" +#include + +#ifdef __NR_mknod + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +# define TMP_FILE "mknod" + +int +main(void) +{ + long rc = syscall(__NR_mknod, TMP_FILE, 0, 0xdeadbeef); + printf("mknod(\"%s\", 0) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, -1L, 0xdeadbeef); + printf("mknod(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, -1, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFREG|0600, 0); + printf("mknod(\"%s\", S_IFREG|0600) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFCHR | 0400, dev); + printf("mknod(\"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + const unsigned long mode = + ((unsigned long) 0xfacefeedffffffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0ded; + + rc = syscall(__NR_mknod, TMP_FILE, mode, dev); + printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#o" + ", makedev(%u, %u)) = %ld %s (%m)\n", + TMP_FILE, (unsigned) mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknod") + +#endif diff -Nru strace-4.11/tests/mknod.test strace-4.12/tests/mknod.test --- strace-4.11/tests/mknod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mknod.test 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests/mlock2.c strace-4.12/tests/mlock2.c --- strace-4.11/tests/mlock2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/mlock2.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,28 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_mlock2 + +# include +# include + int main(void) { -#ifdef __NR_mlock2 - if (syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff) != -1) - return 77; - printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff); + printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe)" + " = %ld %s (%m)\n", rc, errno2name()); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_mlock2") + #endif -} diff -Nru strace-4.11/tests/mlock2.test strace-4.12/tests/mlock2.test --- strace-4.11/tests/mlock2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/mlock2.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check mlock2 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e mlock2 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/mlockall.c strace-4.12/tests/mlockall.c --- strace-4.11/tests/mlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mlockall.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Check decoding of mlockall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("mlockall(0) = %d EINVAL (%m)\n", mlockall(0)); + + if (mlockall(MCL_CURRENT) == 0) + puts("mlockall(MCL_CURRENT) = 0"); + else + printf("mlockall(MCL_CURRENT) = -1 %s (%m)\n", errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/mlockall.test strace-4.12/tests/mlockall.test --- strace-4.11/tests/mlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mlockall.test 2016-04-09 23:34:18.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mlockall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests/mlock.c strace-4.12/tests/mlock.c --- strace-4.11/tests/mlock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mlock.c 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#if defined __NR_mlock && defined __NR_munlock + +# include +# include + +const int size = 1024; + +int +main(void) +{ + const char *addr = tail_alloc(size); + if (syscall(__NR_mlock, addr, size) == 0) { + printf("mlock(%p, %d) = 0\n", addr, size); + } else { + printf("mlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + if (syscall(__NR_munlock, addr, size) == 0) { + printf("munlock(%p, %d) = 0\n", addr, size); + } else { + printf("munlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_DEFINED("__NR_mlock && __NR_munlock") + +#endif diff -Nru strace-4.11/tests/mlock.test strace-4.12/tests/mlock.test --- strace-4.11/tests/mlock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mlock.test 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock and munlock syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mlock,munlock -a20 diff -Nru strace-4.11/tests/mmap.c strace-4.12/tests/mmap.c --- strace-4.11/tests/mmap.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/mmap.c 2016-02-12 02:35:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -36,10 +33,13 @@ #include int -main(void) +main(int ac, char **av) { - const intmax_t pagesize = sysconf(_SC_PAGESIZE); - const unsigned long length = pagesize * 3; + const char *const name = ac > 1 ? av[1] : "mmap"; + const intmax_t pagesize = get_page_size(); + const unsigned long length1 = pagesize * 6; + const unsigned long length2 = pagesize * 3; + const unsigned long length3 = pagesize * 2; const int fd = -1; off_t offset; void *addr, *p; @@ -51,23 +51,56 @@ offset = 0xdeadbeef000 & -pagesize; addr = (void *) (unsigned int) (0xfaced000 & -pagesize); #endif + const uintmax_t uoffset = + sizeof(offset) == sizeof(int) ? (uintmax_t) (unsigned int) offset + : (uintmax_t) offset; + + (void) close(0); + (void) close(0); + printf("%s(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EBADF (%m)\n", + name); + mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0); - p = mmap(addr, length, PROT_READ | PROT_WRITE, + p = mmap(addr, length1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, fd, offset); - if (p == MAP_FAILED || - mprotect(p, length, PROT_NONE) || - munmap(p, length)) - return 77; - - if (sizeof(offset) == sizeof(int)) - printf("mmap2?\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#x\\) = %p\n", - addr, length, fd, (unsigned int) offset, p); - else - printf("(mmap2?|old_mmap)\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#jx\\) = %p\n", - addr, length, fd, (uintmax_t) offset, p); - printf("mprotect\\(%p, %lu, PROT_NONE\\) += 0\n", p, length); - printf("munmap\\(%p, %lu\\) += 0\n", p, length); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap"); + printf("%s(%p, %lu, PROT_READ|PROT_WRITE, " + "MAP_PRIVATE|MAP_ANONYMOUS, %d, %#jx) = %p\n", + name, addr, length1, fd, uoffset, p); + + if (msync(p, length1, MS_SYNC)) + perror_msg_and_fail("msync"); + printf("msync(%p, %lu, MS_SYNC) = 0\n", p, length1); + + if (mprotect(p, length1, PROT_NONE)) + perror_msg_and_fail("mprotect"); + printf("mprotect(%p, %lu, PROT_NONE) = 0\n", p, length1); + + addr = mremap(p, length1, length2, 0); + if (MAP_FAILED == addr) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, 0) = %p\n", p, length1, length2, addr); + + p = mremap(addr, length2, length3, MREMAP_MAYMOVE | MREMAP_FIXED, + addr + length2); + if (MAP_FAILED == p) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, MREMAP_MAYMOVE|MREMAP_FIXED" + ", %p) = %p\n", addr, length2, length3, addr + length2, p); + + if (madvise(p, length3, MADV_NORMAL)) + perror_msg_and_fail("madvise"); + printf("madvise(%p, %lu, MADV_NORMAL) = 0\n", p, length3); + + if (munmap(p, length3)) + perror_msg_and_fail("munmap"); + printf("munmap(%p, %lu) = 0\n", p, length3); + + if (mlockall(MCL_FUTURE)) + perror_msg_and_fail("mlockall"); + puts("mlockall(MCL_FUTURE) = 0"); + + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests/mmap.test strace-4.12/tests/mmap.test --- strace-4.11/tests/mmap.test 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/tests/mmap.test 2016-03-30 00:13:56.000000000 +0000 @@ -1,20 +1,58 @@ #!/bin/sh - -# Check mmap/mprotect/munmap syscalls decoding. +# +# Check mmap/mmap2, madvise, mlockall, mprotect, mremap, msync, and munmap +# syscalls decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . "${srcdir=.}/init.sh" -syscall=mprotect,munmap +check_prog grep +check_prog sed +run_prog > /dev/null + +syscall= for n in mmap mmap2; do $STRACE -e$n -h > /dev/null && syscall=$syscall,$n done +run_strace -e$syscall $args > /dev/null -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -e$syscall $args > "$OUT" -match_grep "$LOG" "$OUT" - -rm -f "$OUT" +if grep '^mmap(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap +elif grep '^mmap2(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap2 +else + dump_log_and_fail_with "mmap/mmap2 not found in $STRACE $args output" +fi + +syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap + +run_prog "./$NAME" $mmap > /dev/null +run_strace -a20 -e$syscall $args > "$EXP" +sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" -exit 0 +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/mmsg.c strace-4.12/tests/mmsg.c --- strace-4.11/tests/mmsg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/mmsg.c 2016-01-20 17:36:41.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2014 Masatake YAMATO - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,81 +26,218 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" +#include "tests.h" +# include + +#if (defined __NR_sendmmsg || defined HAVE_SENDMMSG) \ + && (defined __NR_recvmmsg || defined HAVE_RECVMMSG) + +# include +# include +# include +# include +# include + +# ifndef HAVE_STRUCT_MMSGHDR +struct mmsghdr { + struct msghdr msg_hdr; + unsigned msg_len; +}; +# endif + +static int +send_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags) +{ + int rc; +#ifdef __NR_sendmmsg + rc = syscall(__NR_sendmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("sendmmsg(%d, %p, %u, MSG_DONTROUTE|MSG_NOSIGNAL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_SENDMMSG + rc = sendmmsg(fd, vec, vlen, flags); +#endif + return rc; +} + +static int +recv_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags, + struct timespec *timeout) +{ + int rc; +#ifdef __NR_recvmmsg + rc = syscall(__NR_recvmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags, timeout); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("recvmmsg(%d, %p, %u, MSG_DONTWAIT, NULL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_RECVMMSG + rc = recvmmsg(fd, vec, vlen, flags, timeout); #endif -#include -#include -#include -#include -#include + return rc; +} int main(void) { -#if defined(HAVE_SENDMMSG) && defined(HAVE_STRUCT_MMSGHDR) - const int R = 0, W = 1; - int fd; - int sv[2]; - char one[] = "one"; - char two[] = "two"; - char three[] = "three"; + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); - struct iovec iov[] = { + const struct iovec w0_iov_[] = { { - .iov_base = one, - .iov_len = sizeof(one) - 1 - }, { - .iov_base = two, - .iov_len = sizeof(two) - 1 + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) }, { - .iov_base = three, - .iov_len = sizeof(three) - 1 + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + } + }; + struct iovec *w0_iov = tail_memdup(w0_iov_, sizeof(w0_iov_)); + + const struct iovec w1_iov_[] = { + { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) } }; + struct iovec *w1_iov = tail_memdup(w1_iov_, sizeof(w1_iov_)); - struct mmsghdr mmh[] = { + const struct mmsghdr w_mmh_[] = { { .msg_hdr = { - .msg_iov = iov + 0, - .msg_iovlen = 2, + .msg_iov = w0_iov, + .msg_iovlen = ARRAY_SIZE(w0_iov_), } }, { .msg_hdr = { - .msg_iov = iov + 2, - .msg_iovlen = 1, + .msg_iov = w1_iov, + .msg_iovlen = ARRAY_SIZE(w1_iov_), } } }; -#define n_mmh (sizeof(mmh)/sizeof(mmh[0])) - - /* - * Following open/dup2/close calls make the output of strace - * more predictable, so we can just compare the output and - * expected output (mmsg.expected) for testing purposes. - */ - while ((fd = open("/dev/null", O_RDWR)) < 3) - assert(fd >= 0); - (void) close(3); - - assert(socketpair(AF_UNIX, SOCK_DGRAM, 0, sv) == 0); - - assert(dup2(sv[W], W) == W); - assert(close(sv[W]) == 0); - assert(dup2(sv[R], R) == R); - assert(close(sv[R]) == 0); + void *w_mmh = tail_memdup(w_mmh_, sizeof(w_mmh_)); + const unsigned int n_w_mmh = ARRAY_SIZE(w_mmh_); - int r = sendmmsg(W, mmh, n_mmh, 0); + int r = send_mmsg(1, w_mmh, n_w_mmh, MSG_DONTROUTE | MSG_NOSIGNAL); if (r < 0 && errno == ENOSYS) - return 77; - assert((size_t)r == n_mmh); - assert(close(W) == 0); + perror_msg_and_skip("sendmmsg"); + assert(r == (int) n_w_mmh); + assert(close(1) == 0); + tprintf("sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}" + ", {\"%s\", %u}], msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTROUTE|MSG_NOSIGNAL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w0_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + LENGTH_OF(w0_c) + LENGTH_OF(w1_c), + ARRAY_SIZE(w1_iov_), w2_c, LENGTH_OF(w2_c), LENGTH_OF(w2_c), + n_w_mmh, r, + ARRAY_SIZE(w0_iov_), LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + ARRAY_SIZE(w1_iov_), LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r0_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = r_len + } + }; + struct iovec *r1_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); - assert(recvmmsg(R, mmh, n_mmh, 0, NULL) == n_mmh); - assert(close(R) == 0); + const struct mmsghdr r_mmh_[] = { + { + .msg_hdr = { + .msg_iov = r0_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = r1_iov, + .msg_iovlen = ARRAY_SIZE(r1_iov_), + } + } + }; + void *r_mmh = tail_memdup(r_mmh_, sizeof(r_mmh_)); + const unsigned int n_r_mmh = ARRAY_SIZE(r_mmh_); + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + assert(recv_mmsg(0, r_mmh, n_r_mmh, MSG_DONTWAIT, NULL) == (int) n_r_mmh); + assert(close(0) == 0); + tprintf("recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}, {\"\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTWAIT, NULL) = %d (left NULL)\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, LENGTH_OF(r0_c), + ARRAY_SIZE(r1_iov_), r1_c, r_len, r_len, LENGTH_OF(r1_c), + n_r_mmh, r, + ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), r0_d, r0_c, + ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), r1_d, r1_c); + + tprintf("+++ exited with 0 +++\n"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("(__NR_sendmmsg || HAVE_SENDMMSG) && (__NR_recvmmsg || HAVE_RECVMMSG)") + #endif -} diff -Nru strace-4.11/tests/mmsg.expected strace-4.12/tests/mmsg.expected --- strace-4.11/tests/mmsg.expected 2014-11-11 15:45:26.000000000 +0000 +++ strace-4.12/tests/mmsg.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0) = 2 - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0, NULL) = 2 (left NULL) - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -+++ exited with 0 +++ diff -Nru strace-4.11/tests/mmsg.test strace-4.12/tests/mmsg.test --- strace-4.11/tests/mmsg.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests/mmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check how iovecs in struct mmsghdr are decoded. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 $args -match_diff - -exit 0 +run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 diff -Nru strace-4.11/tests/mount.c strace-4.12/tests/mount.c --- strace-4.11/tests/mount.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mount.c 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of mount syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#ifndef MS_MGC_VAL +# define MS_MGC_VAL 0xC0ED0000 +#endif + +#ifndef MS_RELATIME +# define MS_RELATIME (1ul << 21) +#endif + +#define str_ro_nosuid_nodev_noexec "MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC" + +int +main(void) +{ + static const char source[] = "mount_source"; + static const char target[] = "mount_target"; + static const char fstype[] = "mount_fstype"; + static const char data[] = "mount_data"; + + int rc = mount(source, target, fstype, 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_RELATIME | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + str_ro_nosuid_nodev_noexec "|MS_RELATIME", + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_MGC_VAL", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + "MS_MGC_VAL|" str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_REMOUNT, data); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_REMOUNT", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_BIND, data); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", + source, target, fstype, "MS_BIND", data, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/mount.test strace-4.12/tests/mount.test --- strace-4.11/tests/mount.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/mount.test 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mount syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/move_pages.c strace-4.12/tests/move_pages.c --- strace-4.11/tests/move_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/move_pages.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,251 @@ +/* + * Check decoding of move_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_move_pages + +# include +# include +# include + +# define MAX_STRLEN 3 + +static void +print_page_array(const void **const pages, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", pages ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", pages); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", pages + i); + break; + } + const void *const addr = pages[i]; + if (addr) + printf("%p", addr); + else + printf("NULL"); + } + printf("]"); +} + +static void +print_node_array(const int *const nodes, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", nodes ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", nodes); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", nodes + i); + break; + } + printf("%d", nodes[i]); + } + printf("]"); +} + +static void +print_status_array(const int *const status, const unsigned long count) +{ + if (!count) { + printf("%s", status ? "[]" : "NULL"); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + if (status[i] >= 0) { + printf("%d", status[i]); + } else { + errno = -status[i]; + printf("%s", errno2name()); + } + } + printf("]"); +} + +static void +print_stat_pages(const unsigned long pid, const unsigned long count, + const void **const pages, int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000002; + + long rc = syscall(__NR_move_pages, + pid, count, pages, NULL, status, flags); + if (rc) { + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + if (count) + printf("%p", status); + else + printf("[]"); + errno = saved_errno; + printf(", MPOL_MF_MOVE) = %ld %s (%m)\n", + rc, errno2name()); + } else { + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + print_status_array(status, count); + printf(", MPOL_MF_MOVE) = 0\n"); + } +} + +static void +print_move_pages(const unsigned long pid, + unsigned long count, + const unsigned int offset, + const void **const pages, + int *const nodes, + int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000004; + count += offset; + + long rc = syscall(__NR_move_pages, + pid, count, pages, nodes, status, flags); + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, offset); + printf(", "); + print_node_array(nodes, count, offset); + printf(", "); + if (count) + printf("%p", status); + else + printf("[]"); + printf(", MPOL_MF_MOVE_ALL) = "); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +int +main(void) +{ + const unsigned long pid = + (unsigned long) 0xfacefeed00000000 | getpid(); + unsigned long count = 1; + const unsigned page_size = get_page_size(); + const void *const page = tail_alloc(page_size); + const void *const efault = page + page_size; + const void **pages = tail_alloc(sizeof(*pages)); + int *nodes = tail_alloc(sizeof(*nodes)); + int *status = tail_alloc(sizeof(*status)); + + print_stat_pages(pid, 0, pages, status); + print_move_pages(pid, 0, 0, pages, nodes, status); + print_move_pages(pid, 0, 1, pages + 1, nodes + 1, status + 1); + + *pages = page; + print_stat_pages(pid, count, pages, status); + *nodes = 0xdeadbee1; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = efault; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee2; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = nodes; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee3; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = status; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee4; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_move_pages") + +#endif diff -Nru strace-4.11/tests/move_pages.test strace-4.12/tests/move_pages.test --- strace-4.11/tests/move_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/move_pages.test 2016-04-29 18:21:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of move_pages syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 diff -Nru strace-4.11/tests/mq.c strace-4.12/tests/mq.c --- strace-4.11/tests/mq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/mq.c 2016-01-06 11:52:43.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,37 +26,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_MQUEUE_H -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include int main (void) { struct mq_attr attr; (void) close(0); - if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0) || - mq_getattr(0, &attr) || - mq_setattr(0, &attr, 0) || - mq_unlink("/strace-mq.test")) - return 77; + if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0)) + perror_msg_and_skip("mq_open"); + if (mq_getattr(0, &attr)) + perror_msg_and_skip("mq_getattr"); + if (mq_setattr(0, &attr, 0)) + perror_msg_and_skip("mq_setattr"); + if (mq_unlink("/strace-mq.test")) + perror_msg_and_skip("mq_unlink"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_MQUEUE_H") #endif diff -Nru strace-4.11/tests/munlockall.c strace-4.12/tests/munlockall.c --- strace-4.11/tests/munlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/munlockall.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("munlockall() = %d\n", munlockall()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/munlockall.test strace-4.12/tests/munlockall.test --- strace-4.11/tests/munlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/munlockall.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check munlockall syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests/nanosleep.c strace-4.12/tests/nanosleep.c --- strace-4.11/tests/nanosleep.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests/nanosleep.c 2016-01-06 09:56:09.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -54,32 +56,28 @@ const struct itimerval itv = { .it_value.tv_usec = 111111 }; if (nanosleep(&req.ts, NULL)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!nanosleep(NULL, &rem.ts)) - return 77; - printf("nanosleep(NULL, %p) = -1 EFAULT (Bad address)\n", &rem.ts); + assert(nanosleep(NULL, &rem.ts) == -1); + printf("nanosleep(NULL, %p) = -1 EFAULT (%m)\n", &rem.ts); if (nanosleep(&req.ts, &rem.ts)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 1000000000; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; - printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -88,8 +86,7 @@ (intmax_t) itv.it_value.tv_usec); req.ts.tv_nsec = 999999999; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; + assert(nanosleep(&req.ts, &rem.ts) == -1); printf("nanosleep({%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, diff -Nru strace-4.11/tests/nanosleep.test strace-4.12/tests/nanosleep.test --- strace-4.11/tests/nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check nanosleep syscall decoding. +# Check nanosleep and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=nanosleep,setitimer -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=nanosleep,setitimer diff -Nru strace-4.11/tests/net-accept-connect.c strace-4.12/tests/net-accept-connect.c --- strace-4.11/tests/net-accept-connect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/net-accept-connect.c 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Dmitry V. Levin + * Copyright (c) 2013-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -61,9 +62,12 @@ close(0); close(1); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 0); - assert(bind(0, (struct sockaddr *) &addr, len) == 0); - assert(listen(0, 5) == 0); + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); memset(&addr, 0, sizeof addr); assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); @@ -71,7 +75,8 @@ len = sizeof(addr); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(accept(0, (struct sockaddr *) &addr, &len) == 1); @@ -88,7 +93,7 @@ assert(sigprocmask(SIG_BLOCK, &set, NULL) == 0); assert(signal(SIGUSR1, handler) != SIG_ERR); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 1); + assert(socket(AF_LOCAL, SOCK_STREAM, 0) == 1); assert(close(0) == 0); assert(connect(1, (struct sockaddr *) &addr, len) == 0); assert(sigprocmask(SIG_UNBLOCK, &set, NULL) == 0); diff -Nru strace-4.11/tests/net.expected strace-4.12/tests/net.expected --- strace-4.11/tests/net.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests/net.expected 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, \[19\]\) += 0 diff -Nru strace-4.11/tests/net-fd.expected strace-4.12/tests/net-fd.expected --- strace-4.11/tests/net-fd.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests/net-fd.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, \[22\]\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +accept\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 diff -Nru strace-4.11/tests/net-fd.test strace-4.12/tests/net-fd.test --- strace-4.11/tests/net-fd.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests/net-fd.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh - -# Check how network syscalls are traced when decoding socket descriptors - -. "${srcdir=.}/init.sh" - -# strace -y is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -run_prog ./net-accept-connect net-fd-local-stream -# using -y to test socket descriptors 'paths' decoding -run_strace_merge -y -enetwork $args -match_grep - -exit 0 diff -Nru strace-4.11/tests/net-icmp_filter.c strace-4.12/tests/net-icmp_filter.c --- strace-4.11/tests/net-icmp_filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-icmp_filter.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of ICMP_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0) = -1 %s (%m)\n", + errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0) = -1 %s (%m)\n", + errno2name()); + + socklen_t *const plen = tail_alloc(sizeof(*plen)); + void *const efault = plen + 1; + struct icmp_filter *const f = tail_alloc(sizeof(*f)); + + getsockopt(-1, SOL_RAW, ICMP_FILTER, f, plen); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %p) = -1 %s (%m)\n", + f, plen, errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %u) = -1 %s (%m)\n", + efault, (unsigned) sizeof(*f), errno2name()); + + f->data = ~( + 1< + * This file is part of inet-yy strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" +#include #include #include #include @@ -33,7 +36,7 @@ #include #include -static int +static void send_query(const int fd, const int family, const int proto) { struct sockaddr_nl nladdr = { @@ -59,28 +62,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -88,12 +96,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct inet_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } int main(void) @@ -108,12 +129,16 @@ close(0); close(1); - if (socket(PF_INET, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5) || - socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) - return 77; - - return (send_query(1, AF_INET, IPPROTO_TCP) && - check_responses(1)) ? 0 : 77; + if (socket(AF_INET, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_INET"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1, AF_INET, IPPROTO_TCP); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests/netlink_netlink_diag.c strace-4.12/tests/netlink_netlink_diag.c --- strace-4.11/tests/netlink_netlink_diag.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/netlink_netlink_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct netlink_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + close(0); + close(1); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) + perror_msg_and_skip("socket AF_NETLINK"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff -Nru strace-4.11/tests/netlink_unix_diag.c strace-4.12/tests/netlink_unix_diag.c --- strace-4.11/tests/netlink_unix_diag.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/netlink_unix_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include #include #include #include @@ -40,8 +44,8 @@ # define NETLINK_SOCK_DIAG NETLINK_INET_DIAG #endif -static int -send_query(const int fd, const int family, const int proto) +static void +send_query(const int fd) { struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK @@ -53,11 +57,10 @@ .nlh = { .nlmsg_len = sizeof(req), .nlmsg_type = SOCK_DIAG_BY_FAMILY, - .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP }, .udr = { - .sdiag_family = family, - .sdiag_protocol = proto, + .sdiag_family = AF_UNIX, .udiag_states = -1, .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER } @@ -67,28 +70,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -96,12 +104,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct unix_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } #define SUN_PATH "netlink_unix_diag_socket" @@ -117,16 +138,19 @@ close(1); (void) unlink(SUN_PATH); - if (socket(PF_LOCAL, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5)) - return 77; + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_LOCAL"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); assert(unlink(SUN_PATH) == 0); if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) - return 77; + perror_msg_and_skip("socket AF_NETLINK"); - return (send_query(1, AF_UNIX, 0) && - check_responses(1)) ? 0 : 77; + send_query(1); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests/net-y-unix.c strace-4.12/tests/net-y-unix.c --- strace-4.11/tests/net-y-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-y-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,230 @@ +/* + * This file is part of net-y-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d\n", + listen_fd, listen_inode, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + listen_fd, listen_inode, av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d\n", + listen_fd, listen_inode, sun_path1, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(connect_fd, accept_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, sun_path1, (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/net-y-unix.test strace-4.12/tests/net-y-unix.test --- strace-4.11/tests/net-y-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-y-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of network syscalls in -y mode. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a20 -y -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/net-yy-accept.awk strace-4.12/tests/net-yy-accept.awk --- strace-4.11/tests/net-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/net-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 9 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_bind = "^bind\\(0, \\{sa_family=AF_INET, sin_port=htons\\(0\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 { - if (match($0, r_getsockname, a) && a[1] == a[2]) { - port_l = a[1] - r_accept = "^accept\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 1" r_localhost ":(" r_port ")\\]>$" - r_close0 = "^close\\(0) += 0$" - next - } -} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a) && a[1] == a[2]) { - port_r = a[1] - r_recv = "^recv\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL\\) += 4$" - r_recvfrom = "^recvfrom\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL, NULL, NULL\\) += 4$" - r_close1 = "^close\\(1" r_localhost ":" port_r "\\]>) += 0$" - next - } -} - -NR == 6 {if (r_close0 != "" && match($0, r_close0)) next} - -NR == 7 {if (r_recv != "" && (match($0, r_recv) || match($0, r_recvfrom))) next} - -NR == 8 {if (r_close1 != "" && match($0, r_close1)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests/net-yy-connect.awk strace-4.12/tests/net-yy-connect.awk --- strace-4.11/tests/net-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/net-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 5 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_connect = "^connect\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i ") += 0$" - next - } -} - -NR == 2 { - if (r_connect != "" && match($0, r_connect, a)) { - port_r = a[1] - r_send = "^send\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE\\) += 4$" - r_sendto = "^sendto\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE, NULL, 0\\) += 4$" - next - } -} - -NR == 3 { - if (r_send != "" && (match($0, r_send, a) || match($0, r_sendto, a))) { - port_l = a[1] - r_close = "^close\\(0" r_localhost ":" port_r "\\]>\\) += 0$" - next - } -} - -NR == 4 {if (r_close != "" && match($0, r_close)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests/net-yy-inet.c strace-4.12/tests/net-yy-inet.c --- strace-4.11/tests/net-yy-inet.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-inet.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * This file is part of net-yy-inet strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + const struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int listen_fd = socket(AF_INET, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + const unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + listen_fd, listen_inode); + + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_INET, sin_port=htons(0)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + listen_fd, listen_inode, (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + const unsigned int listen_port = + ntohs(((struct sockaddr_in *) listen_sa) -> sin_port); + printf("getsockname(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = 0\n", + listen_fd, listen_port, listen_port, (unsigned) *len); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_TCP, TCP_MAXSEG, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_TCP, TCP_MAXSEG" + ", [%u], [%u]) = 0\n", + listen_fd, listen_port, *optval, (unsigned) *len); + + const int connect_fd = socket(AF_INET, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + const unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + connect_fd, connect_inode); + + *len = sizeof(addr); + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + connect_fd, connect_inode, listen_port, (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + const int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + const unsigned int connect_port = + ntohs(((struct sockaddr_in *) accept_sa) -> sin_port); + printf("accept(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = %d127.0.0.1:%u]>\n", + listen_fd, listen_port, connect_port, (unsigned) *len, + accept_fd, listen_port, connect_port); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(accept_fd, accept_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + accept_fd, listen_port, connect_port, connect_port, + (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + connect_fd, connect_port, listen_port, listen_port, + (unsigned) *len); + + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_TCP, TCP_MAXSEG, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d127.0.0.1:%u]>" + ", SOL_TCP, TCP_MAXSEG, [%u], %u) = 0\n", + connect_fd, connect_port, listen_port, *optval, + (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, + MSG_DONTROUTE | MSG_DONTWAIT, NULL, 0) == sizeof(text) - 1); + printf("sendto(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_DONTROUTE|MSG_DONTWAIT, NULL, 0) = %u\n", + connect_fd, connect_port, listen_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + connect_fd, connect_port, listen_port); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_WAITALL, + NULL, NULL) == sizeof(text) - 1); + printf("recvfrom(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_WAITALL, NULL, NULL) = %u\n", + accept_fd, listen_port, connect_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + accept_fd, listen_port, connect_port); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_port); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/net-yy-inet.test strace-4.12/tests/net-yy-inet.test --- strace-4.11/tests/net-yy-inet.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-inet.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of ip:port pairs associated with socket descriptors +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_inet_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/net-yy-netlink.c strace-4.12/tests/net-yy-netlink.c --- strace-4.11/tests/net-yy-netlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-netlink.c 2016-05-23 10:26:46.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +int +main(void) +{ + unsigned magic = 1234; + struct sockaddr_nl addr = { + .nl_family = AF_NETLINK, + .nl_pid = 1234 + }; + struct sockaddr *const sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + if (fd < 0) + perror_msg_and_skip("socket"); + const unsigned long inode = inode_of_sockfd(fd); + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = " + "%d\n", fd, inode); + + if (bind(fd, sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, %u) = 0\n", + fd, inode, magic, (unsigned) *len); + + if (getsockname(fd, sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, [%u]) = 0\n", + fd, magic, magic, (unsigned) *len); + + if (close(fd)) + perror_msg_and_fail("close"); + printf("close(%d) = 0\n", fd, magic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/net-yy-netlink.test strace-4.12/tests/net-yy-netlink.test --- strace-4.11/tests/net-yy-netlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-netlink.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of protocol:portid pairs associated with socket +# descriptors +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# Copyright (c) 2016 Fabien Siron +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_netlink_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/net-yy.test strace-4.12/tests/net-yy.test --- strace-4.11/tests/net-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/net-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -#!/bin/sh -# -# Check decoding of ip:port pairs associated with socket descriptors -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_inet_diag -run_prog ./inet-accept-connect-send-recv -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/net-yy-connect.awk "$STRACE $args connect output mismatch" -match_awk "$LOG-accept" "$srcdir"/net-yy-accept.awk "$STRACE $args accept output mismatch" - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests/net-yy-unix.c strace-4.12/tests/net-yy-unix.c --- strace-4.11/tests/net-yy-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,227 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", + listen_fd, listen_inode, av[1]); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, av[1], *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu]>) = 0\n", + connect_fd, connect_inode, accept_inode); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], sun_path1, (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu,@\"%s\"]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, sun_path1, av[1], (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu,@\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, sun_path1, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu,@\"%s\"]>) = 0\n", + connect_fd, connect_inode, accept_inode, sun_path1); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode, av[1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/net-yy-unix.test strace-4.12/tests/net-yy-unix.test --- strace-4.11/tests/net-yy-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/net-yy-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of address information (inode[->peer][,path]) +# associated with unix domain socket descriptors. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_unix_diag + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/newfstatat.c strace-4.12/tests/newfstatat.c --- strace-4.11/tests/newfstatat.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests/newfstatat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_newfstatat -# define TEST_SYSCALL_NAME newfstatat -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_newfstatat +# define TEST_SYSCALL_STR "newfstatat" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_newfstatat") + +#endif diff -Nru strace-4.11/tests/_newselect.c strace-4.12/tests/_newselect.c --- strace-4.11/tests/_newselect.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests/_newselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR__newselect -# define TEST_SYSCALL_NAME _newselect -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR__newselect +# define TEST_SYSCALL_STR "_newselect" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR__newselect") + +#endif diff -Nru strace-4.11/tests/nsyscalls.c strace-4.12/tests/nsyscalls.c --- strace-4.11/tests/nsyscalls.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/nsyscalls.c 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of out-of-range syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "syscall.h" + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +#include + +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) != 0 +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif + +static const unsigned long nr = ARRAY_SIZE(syscallent) | SYSCALL_BIT; + +int +main(void) +{ + static const unsigned long a[] = { + (unsigned long) 0xface0fedbadc0ded, + (unsigned long) 0xface1fedbadc1ded, + (unsigned long) 0xface2fedbadc2ded, + (unsigned long) 0xface3fedbadc3ded, + (unsigned long) 0xface4fedbadc4ded, + (unsigned long) 0xface5fedbadc5ded + }; + + long rc = syscall(nr, a[0], a[1], a[2], a[3], a[4], a[5]); +#ifdef LINUX_MIPSO32 + printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld ENOSYS (%m)\n", nr, + a[0], a[1], a[2], a[3], a[4], a[5], rc); +#else + printf("syscall_%lu(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld (errno %d)\n", nr & (~SYSCALL_BIT), + a[0], a[1], a[2], a[3], a[4], a[5], rc, errno); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/nsyscalls.test strace-4.12/tests/nsyscalls.test --- strace-4.11/tests/nsyscalls.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/nsyscalls.test 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of out-of-range syscalls. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + mips) syscall=syscall ;; + *) syscall=none ;; +esac + +run_strace_match_diff -e trace=$syscall diff -Nru strace-4.11/tests/old_mmap.c strace-4.12/tests/old_mmap.c --- strace-4.11/tests/old_mmap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/old_mmap.c 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * Check decoding of "old mmap" edition of mmap syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +/* + * On s390x, this is the mmap syscall used by glibc, so, + * from one side, it's already covered by another test, and, from another side, + * it would require additional efforts to filter out mmap calls made by glibc. + */ + +#if defined __NR_mmap && \ +( defined __arm__ \ + || defined __i386__ \ + || defined __m68k__ \ + || (defined __s390__ && !defined __s390x__) \ +) + +# include +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_mmap, 0); + printf("mmap(NULL) = %ld %s (%m)\n", rc, errno2name()); + + const unsigned int args1_c[6] = { + 0xdeadbeef, /* addr */ + 0xfacefeed, /* len */ + PROT_READ|PROT_EXEC, /* prot */ + MAP_FILE|MAP_FIXED, /* flags */ + -2U, /* fd */ + 0xbadc0ded /* offset */ + }; + const unsigned int page_size = get_page_size(); + const unsigned int args2_c[6] = { + 0, + page_size, + PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1U, + 0xfaced000 & -page_size + }; + void *args = tail_memdup(args1_c, sizeof(args1_c)); + + rc = syscall(__NR_mmap, args); + printf("mmap(%#x, %u, PROT_READ|PROT_EXEC, MAP_FILE|MAP_FIXED" + ", %d, %#x) = %ld %s (%m)\n", + args1_c[0], args1_c[1], args1_c[4], args1_c[5], + rc, errno2name()); + + memcpy(args, args2_c, sizeof(args2_c)); + rc = syscall(__NR_mmap, args); + printf("mmap(NULL, %u, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS" + ", %d, %#x) = %#lx\n", + args2_c[1], args2_c[4], args2_c[5], rc); + + void *addr = (void *) rc; + if (mprotect(addr, page_size, PROT_NONE)) + perror_msg_and_fail("mprotect(%p, %u, PROT_NONE)", + addr, page_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__ || __m68k__" + " || (__s390__ && !__s390x__))") + +#endif diff -Nru strace-4.11/tests/old_mmap.test strace-4.12/tests/old_mmap.test --- strace-4.11/tests/old_mmap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/old_mmap.test 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of "old mmap" edition of mmap syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=mmap diff -Nru strace-4.11/tests/oldselect.c strace-4.12/tests/oldselect.c --- strace-4.11/tests/oldselect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/oldselect.c 2016-01-05 22:53:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include #if defined __NR_select && defined __NR__newselect \ && __NR_select != __NR__newselect \ && !defined SPARC +# include +# include + int main(void) { @@ -51,22 +49,18 @@ (void) close(0); (void) close(1); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); FD_SET(0, &w); FD_SET(1, &r); if (syscall(__NR_select, args)) - return 77; + perror_msg_and_skip("select"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_select && __NR__newselect") #endif diff -Nru strace-4.11/tests/openat.c strace-4.12/tests/openat.c --- strace-4.11/tests/openat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/openat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016 Katerina Koukiou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_openat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "openat.sample"; + int fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); + if (fd == -1) { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = -1 %s (%m)\n", sample, errno2name()); + } else { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d\n", sample, fd); + close(fd); + if (unlink(sample) == -1) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_openat, -100, sample, O_RDONLY); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_openat") + +#endif diff -Nru strace-4.11/tests/openat.test strace-4.12/tests/openat.test --- strace-4.11/tests/openat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/openat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check openat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -P $NAME.sample diff -Nru strace-4.11/tests/open.c strace-4.12/tests/open.c --- strace-4.11/tests/open.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/open.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_open + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "open.sample"; + int fd = syscall(__NR_open, sample, O_RDONLY|O_CREAT, 0400); + + if (fd < 0) { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } else { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400) = %d\n", + sample, fd); + close(fd); + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_open, sample, O_RDONLY); + printf("open(\"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + + fd = syscall(__NR_open, sample, O_WRONLY|O_NONBLOCK|0x80000000); + printf("open(\"%s\", O_WRONLY|O_NONBLOCK|0x80000000)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_open") + +#endif diff -Nru strace-4.11/tests/open.test strace-4.12/tests/open.test --- strace-4.11/tests/open.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/open.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check open syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -P $NAME.sample diff -Nru strace-4.11/tests/opipe.test strace-4.12/tests/opipe.test --- strace-4.11/tests/opipe.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/opipe.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +# Check how -o '|pipe' works. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog grep chdir $srcdir/umovestr.expected > "$EXP" +run_prog ./umovestr + +> "$LOG" || fail_ "failed to write $LOG" +$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || + dump_log_and_fail_with "$STRACE $args failed" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/overflowuid.c strace-4.12/tests/overflowuid.c --- strace-4.11/tests/overflowuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/overflowuid.c 2016-04-18 01:10:41.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static void +check_overflow_id(const int id, const char *overflowid) +{ + int fd = open(overflowid, O_RDONLY); + if (fd < 0) { + if (ENOENT == errno) + return; + perror_msg_and_fail("open: %s", overflowid); + } + + /* we trust the kernel */ + char buf[sizeof(int)*3]; + int n = read(fd, buf, sizeof(buf) - 1); + if (n > 0) { + buf[n] = '\0'; + n = atoi(buf); + if (id == n) + error_msg_and_skip("%d matches %s", id, overflowid); + } + + close(fd); +} + +void +check_overflowuid(const int uid) +{ + check_overflow_id(uid, "/proc/sys/kernel/overflowuid"); +} + +void +check_overflowgid(const int gid) +{ + check_overflow_id(gid, "/proc/sys/kernel/overflowgid"); +} diff -Nru strace-4.11/tests/pause.c strace-4.12/tests/pause.c --- strace-4.11/tests/pause.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pause.c 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check decoding of pause syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pause + +# include +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + pause(); + printf("pause() = ? ERESTARTNOHAND (To be restarted if no handler)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pause") + +#endif diff -Nru strace-4.11/tests/pause.test strace-4.12/tests/pause.test --- strace-4.11/tests/pause.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pause.test 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pause syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 -esignal=none diff -Nru strace-4.11/tests/pc.c strace-4.12/tests/pc.c --- strace-4.11/tests/pc.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/pc.c 2016-01-06 11:33:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" +#include #include #include #include @@ -37,27 +36,25 @@ int main(void) { - const unsigned long pagesize = sysconf(_SC_PAGESIZE); + const unsigned long pagesize = get_page_size(); #ifdef __s390__ /* * The si_addr field is unreliable: * https://marc.info/?l=linux-s390&m=142515870124248&w=2 */ - return 77; + error_msg_and_skip("s390: si_addr is unreliable"); #endif /* write instruction pointer length to the log */ - if (write(-1, NULL, 2 * sizeof(void *)) >= 0) - return 77; + assert(write(-1, NULL, 2 * sizeof(void *)) < 0); /* just a noticeable line in the log */ - if (munmap(&main, 0) >= 0) - return 77; + assert(munmap(&main, 0) < 0); int pid = fork(); if (pid < 0) - return 77; + perror_msg_and_fail("fork"); if (!pid) { const unsigned long mask = ~(pagesize - 1); @@ -83,14 +80,13 @@ /* SIGSEGV is expected */ (void) munmap((void *) addr, size); (void) munmap((void *) addr, size); - return 77; + error_msg_and_skip("SIGSEGV did not happen"); } int status; - if (wait(&status) != pid || - !WIFSIGNALED(status) || - WTERMSIG(status) != SIGSEGV) - return 77; + assert(wait(&status) == pid); + assert(WIFSIGNALED(status)); + assert(WTERMSIG(status) == SIGSEGV); /* dump process map for debug purposes */ close(0); diff -Nru strace-4.11/tests/personality.c strace-4.12/tests/personality.c --- strace-4.11/tests/personality.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/personality.c 2015-12-26 02:10:46.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int main(void) +{ + const unsigned int good_type = PER_BSD; + const char *good_type_str = "PER_BSD"; + + const unsigned int bad_type = 0x1f; + const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/"; + + const unsigned int good_flags = + SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS; + const char *good_flags_str = + "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS"; + + const unsigned int bad_flags = 0x10000; + const char *bad_flags_str = "0x10000"; + + const unsigned int saved_pers = personality(0xffffffff); + printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers); + + /* PER_LINUX */ + personality(PER_LINUX); + printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers); + + personality(0xffffffff); + puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)"); + + personality(good_flags); + printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n", + good_flags_str); + + personality(bad_flags); + printf("personality\\(PER_LINUX\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + bad_flags_str, good_flags, good_flags_str); + + personality(good_flags | bad_flags); + printf("personality\\(PER_LINUX\\|%s\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + good_flags_str, bad_flags_str, bad_flags, bad_flags_str); + + /* another valid type */ + personality(good_type); + printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", + good_type_str, good_flags | bad_flags, + good_flags_str, bad_flags_str); + + personality(good_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + good_type_str, good_flags_str, good_type, good_type_str); + + personality(good_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, bad_flags_str, good_type | good_flags, + good_type_str, good_flags_str); + + personality(good_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, good_flags_str, bad_flags_str, + good_type | bad_flags, + good_type_str, bad_flags_str); + + /* invalid type */ + personality(bad_type); + printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type_str, good_type | good_flags | bad_flags, + good_type_str, good_flags_str, bad_flags_str); + + personality(bad_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + bad_type_str, good_flags_str, bad_type, bad_type_str); + + personality(bad_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, bad_flags_str, bad_type | good_flags, + bad_type_str, good_flags_str); + + personality(bad_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, good_flags_str, bad_flags_str, + bad_type | bad_flags, bad_type_str, bad_flags_str); + + personality(saved_pers); + printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type | good_flags | bad_flags, + bad_type_str, good_flags_str, bad_flags_str); + + return 0; +} diff -Nru strace-4.11/tests/personality.test strace-4.12/tests/personality.test --- strace-4.11/tests/personality.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/personality.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check personality syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a20 -epersonality $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff -Nru strace-4.11/tests/pipe.c strace-4.12/tests/pipe.c --- strace-4.11/tests/pipe.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/pipe.c 2016-01-06 11:38:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" + +#ifdef HAVE_PIPE2 -#include -#include -#include +# include +# include +# include int main(void) @@ -39,16 +39,19 @@ (void) close(0); (void) close(1); int fds[2]; - if (pipe(fds) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe(fds)) + perror_msg_and_fail("pipe"); -#ifdef HAVE_PIPE2 (void) close(0); (void) close(1); - if (pipe2(fds, O_NONBLOCK) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe2(fds, O_NONBLOCK)) + perror_msg_and_skip("pipe2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PIPE2") + #endif -} diff -Nru strace-4.11/tests/poll.c strace-4.12/tests/poll.c --- strace-4.11/tests/poll.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/poll.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,259 @@ +/* + * This file is part of poll strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_poll + +# include +# include +# include +# include +# include +# include + +#define PRINT_EVENT(flag, member) \ + if (member & flag) { \ + if (member != pfd->member) \ + tprintf("|"); \ + tprintf(#flag); \ + member &= ~flag; \ + } + +static void +print_pollfd_entering(const struct pollfd *const pfd) +{ + tprintf("{fd=%d", pfd->fd); + if (pfd->fd >= 0) { + tprintf(", events="); + short events = pfd->events; + + if (pfd->events) { + PRINT_EVENT(POLLIN, events) + PRINT_EVENT(POLLPRI, events) + PRINT_EVENT(POLLOUT, events) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, events) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, events) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, events) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, events) +#endif + PRINT_EVENT(POLLERR, events) + PRINT_EVENT(POLLHUP, events) + PRINT_EVENT(POLLNVAL, events) + } else + tprintf("0"); + } + tprintf("}"); +} + +static void +print_pollfd_array_entering(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int valid, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int i; + for (i = 0; i < size; ++i) { + if (i) + tprintf(", "); + if (i >= valid) { + tprintf("%p", &pfd[i]); + break; + } + if (i >= abbrev) { + tprintf("..."); + break; + } + print_pollfd_entering(&pfd[i]); + } + tprintf("]"); +} + +static void +print_pollfd_exiting(const struct pollfd *const pfd, + unsigned int *const seen, + const unsigned int abbrev) +{ + if (!pfd->revents || pfd->fd < 0 || *seen > abbrev) + return; + + if (*seen) + tprintf(", "); + ++(*seen); + + if (*seen > abbrev) { + tprintf("..."); + return; + } + tprintf("{fd=%d, revents=", pfd->fd); + short revents = pfd->revents; + + PRINT_EVENT(POLLIN, revents) + PRINT_EVENT(POLLPRI, revents) + PRINT_EVENT(POLLOUT, revents) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, revents) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, revents) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, revents) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, revents) +#endif + PRINT_EVENT(POLLERR, revents) + PRINT_EVENT(POLLHUP, revents) + PRINT_EVENT(POLLNVAL, revents) + tprintf("}"); +} + +static void +print_pollfd_array_exiting(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int seen = 0; + unsigned int i; + for (i = 0; i < size; ++i) + print_pollfd_exiting(&pfd[i], &seen, abbrev); + tprintf("]"); +} + +int +main(int ac, char **av) +{ + tprintf("%s", ""); + + assert(syscall(__NR_poll, NULL, 42, 0) == -1); + if (ENOSYS == errno) + perror_msg_and_skip("poll"); + tprintf("poll(NULL, 42, 0) = -1 EFAULT (%m)\n"); + + int fds[2]; + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + const unsigned int abbrev = (ac > 1) ? atoi(av[1]) : -1; + const struct pollfd pfds0[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = fds[0], .events = POLLIN | POLLPRI }, + { .fd = fds[1], .events = POLLOUT }, + { .fd = 2, .events = POLLOUT | POLLWRBAND } + }; + struct pollfd *const tail_fds0 = tail_memdup(pfds0, sizeof(pfds0)); + const int timeout = 42; + int rc = syscall(__NR_poll, tail_fds0, 0, timeout); + assert(rc == 0); + + tprintf("poll([], 0, %d) = %d (Timeout)\n", timeout, rc); + + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 3); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[0].fd = -1; + tail_fds0[2].fd = -3; + tail_fds0[4].events = 0; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 2); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[1].fd = -2; + tail_fds0[4].fd = -5; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 1); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + struct pollfd pfds1[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + struct pollfd *const tail_fds1 = tail_memdup(pfds1, sizeof(pfds1)); + rc = syscall(__NR_poll, tail_fds1, ARRAY_SIZE(pfds1), timeout); + assert(rc == 0); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds1, ARRAY_SIZE(pfds1), + ARRAY_SIZE(pfds1), abbrev); + tprintf(", %u, %d) = %d (Timeout)\n", ARRAY_SIZE(pfds1), timeout, rc); + + const void *const efault = tail_fds0 + ARRAY_SIZE(pfds0); + rc = syscall(__NR_poll, efault, 1, 0); + assert(rc == -1); + tprintf("poll(%p, 1, 0) = -1 EFAULT (%m)\n", efault); + + const unsigned int valid = 1; + const void *const epfds = tail_fds0 + ARRAY_SIZE(pfds0) - valid; + rc = syscall(__NR_poll, epfds, valid + 1, 0); + assert(rc == -1); + tprintf("poll("); + print_pollfd_array_entering(epfds, valid + 1, valid, abbrev); + errno = EFAULT; + tprintf(", %u, 0) = -1 EFAULT (%m)\n", valid + 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_poll") + +#endif diff -Nru strace-4.11/tests/poll.test strace-4.12/tests/poll.test --- strace-4.11/tests/poll.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/poll.test 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check poll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -vepoll $args > "$OUT" +match_diff "$LOG" "$OUT" + +for abbrev in 0 1 2 3 4 5; do + run_prog "./$NAME" $abbrev > /dev/null + run_strace -a16 -epoll -s$abbrev $args > "$OUT" + match_diff "$LOG" "$OUT" +done + +rm -f "$OUT" diff -Nru strace-4.11/tests/ppoll.c strace-4.12/tests/ppoll.c --- strace-4.11/tests/ppoll.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/ppoll.c 2016-01-06 11:44:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include -static int +static void test1(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 42, .tv_nsec = 999999999 }; struct pollfd fds[] = { { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, @@ -45,35 +42,41 @@ { .fd = 4, .events = POLLOUT } }; + sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 2 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 2); } -static int +static void test2(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 0, .tv_nsec = 999 }; struct pollfd fds[] = { { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } }; + sigset_t mask; sigfillset(&mask); sigdelset(&mask, SIGHUP); sigdelset(&mask, SIGKILL); sigdelset(&mask, SIGSTOP); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 0 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 0); } int main(void) { - int rc; int fds[2]; (void) close(0); @@ -81,14 +84,11 @@ (void) close(3); (void) close(4); if (pipe(fds) || pipe(fds)) - return 77; - - - if ((rc = test1())) - return rc; + perror_msg_and_fail("pipe"); - if ((rc = test2())) - return rc; + test1(); + test2(); - return ppoll(NULL, 42, NULL, NULL) < 0 ? 0 : 77; + assert(ppoll(NULL, 42, NULL, NULL) < 0); + return 0; } diff -Nru strace-4.11/tests/ppoll.expected strace-4.12/tests/ppoll.expected --- strace-4.11/tests/ppoll.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests/ppoll.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \.\.\.\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests/ppoll.test strace-4.12/tests/ppoll.test --- strace-4.11/tests/ppoll.test 2015-07-30 22:03:07.000000000 +0000 +++ strace-4.12/tests/ppoll.test 2016-03-30 00:13:56.000000000 +0000 @@ -5,9 +5,9 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -s2 -e ppoll $args +run_strace -a30 -s2 -e ppoll $args match_grep -run_strace -v -s2 -e ppoll $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +run_strace -a30 -v -s2 -e ppoll $args +match_grep "$LOG" "$srcdir/$NAME-v.expected" exit 0 diff -Nru strace-4.11/tests/ppoll-v.expected strace-4.12/tests/ppoll-v.expected --- strace-4.11/tests/ppoll-v.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests/ppoll-v.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests/prctl-seccomp-filter-v.c strace-4.12/tests/prctl-seccomp-filter-v.c --- strace-4.11/tests/prctl-seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/prctl-seccomp-filter-v.c 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined HAVE_PRCTL \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined PR_SET_SECCOMP \ + && defined SECCOMP_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +static const struct sock_fprog prog = { + .len = ARRAY_SIZE(filter), + .filter = (struct sock_filter *) filter, +}; + +int +main(void) +{ + int fds[2]; + + puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); + + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", + prog.len); + + printf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + printf("BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"); + + puts("]}) = 0"); + puts("+++ exited with 0 +++"); + + fflush(stdout); + close(0); + close(1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) + perror_msg_and_skip("PR_SET_SECCOMP"); + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_NO_NEW_PRIVS && PR_SET_SECCOMP" + " && SECCOMP_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests/prctl-seccomp-filter-v.test strace-4.12/tests/prctl-seccomp-filter-v.test --- strace-4.11/tests/prctl-seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/prctl-seccomp-filter-v.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -v -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/prctl-seccomp-strict.c strace-4.12/tests/prctl-seccomp-strict.c --- strace-4.11/tests/prctl-seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/prctl-seccomp-strict.c 2016-05-16 23:50:59.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + + int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3); + printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)" + " = %d %s (%m)\n", -1L, rc, errno2name()); + fflush(stdout); + + rc = prctl(PR_SET_SECCOMP, 1); + if (rc) { + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)" + " = %d %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_SECCOMP && __NR_exit") + +#endif diff -Nru strace-4.11/tests/prctl-seccomp-strict.test strace-4.12/tests/prctl-seccomp-strict.test --- strace-4.11/tests/prctl-seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/prctl-seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +check_prog grep +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eprctl "$@" > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests/pread64-pwrite64.c strace-4.12/tests/pread64-pwrite64.c --- strace-4.11/tests/pread64-pwrite64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pread64-pwrite64.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * Check decoding of pread64 and pwrite64 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + const off_t offset = 0xdefaceddeadbeefLL + len; + long rc = pread(0, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pread64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pread64", 0); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = pwrite(1, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pwrite64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pwrite64", 1); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "pread64-pwrite64-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + char *nil = tail_alloc(1); + *nil = '\0'; + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = pwrite(1, w, 0, 0); + if (rc) + perror_msg_and_fail("pwrite64: expected 0, returned %ld", rc); + tprintf("pwrite64(1, \"\", 0, 0) = 0\n"); + + rc = pwrite(1, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("pwrite64(1, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pwrite(1, nil, 1, -3); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1, returned %ld", rc); + tprintf("pwrite64(1, \"\\0\", 1, -3) = -1 EINVAL (%m)\n"); + + rc = pwrite(1, w, w_len, 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwrite64: expected %u, returned %ld", + w_len, rc); + tprintf("pwrite64(1, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = pread(0, r0, 0, 0); + if (rc) + perror_msg_and_fail("pread64: expected 0, returned %ld", rc); + tprintf("pread64(0, \"\", 0, 0) = 0\n"); + + rc = pread(0, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pread(0, efault, 2, -7); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 2, -7) = -1 EINVAL (%m)\n", efault); + + rc = pread(0, r0, r0_len, 0); + if (rc != (int) r0_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r0_len, rc); + tprintf("pread64(0, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = pread(0, r1, w_len, r0_len); + if (rc != (int) r1_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r1_len, rc); + tprintf("pread64(0, \"%s\", %u, %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, r0_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests/pread64-pwrite64.test strace-4.12/tests/pread64-pwrite64.test --- strace-4.11/tests/pread64-pwrite64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pread64-pwrite64.test 2016-04-02 18:27:44.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of pread64 and pwrite64 syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=pread64-pwrite64-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests/preadv2-pwritev2.c strace-4.12/tests/preadv2-pwritev2.c --- strace-4.11/tests/preadv2-pwritev2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv2-pwritev2.c 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,211 @@ +/* + * Check decoding of preadv2 and pwritev2 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_preadv2 && defined __NR_pwritev2 + +# include +# include +# include +# include +# include + +static int +pr(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L); +} + +static int +pw(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L); +} + +static void +dumpio(void) +{ + static char tmp[] = "preadv2-pwritev2-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pw(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc); + tprintf("pwritev2(1, [], 0, 0, 0) = 0\n"); + + rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev2(1, [{\"%s\", %u}, %p], 2, 0, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev2: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev2(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv2: expected %u, returned %ld", + r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv2: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}, {\"\", %u}], %u, %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); +} + +int +main(void) +{ + const unsigned long vlen = (unsigned long) 0xfac1fed2dad3bef4; + const unsigned long long pos = 0xfac5fed6dad7bef8; + const unsigned long pos_l = (unsigned long) pos; + const unsigned long pos_h = (sizeof(long) == sizeof(long long)) ? + (unsigned long) 0xbadc0deddeadbeef : 0xfac5fed6UL; + int test_dumpio = 1; + + tprintf("%s", ""); + + syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + if (test_dumpio) + dumpio(); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2") + +#endif diff -Nru strace-4.11/tests/preadv2-pwritev2.test strace-4.12/tests/preadv2-pwritev2.test --- strace-4.11/tests/preadv2-pwritev2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv2-pwritev2.test 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv2 and pwritev2 syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -eread=0 -ewrite=1 -e trace=preadv2,pwritev2 diff -Nru strace-4.11/tests/preadv.c strace-4.12/tests/preadv.c --- strace-4.11/tests/preadv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv.c 2016-05-07 23:32:29.000000000 +0000 @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PREADV + +# include +# include +# include +# include + +# define LEN 8 + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) + printf("\\%d", (int) buf[i]); + printf("\", %u}", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt) +{ + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char *buf = tail_alloc(LEN); + struct iovec *iov = tail_alloc(sizeof(*iov)); + iov->iov_base = buf; + iov->iov_len = LEN; + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (preadv(0, iov, 1, offset) != LEN) + perror_msg_and_fail("preadv"); + printf("preadv(0, "); + print_iovec(iov, 1); + printf(", 1, %lld) = %u\n", (long long) offset, LEN); + + if (preadv(0, iov, 1, -1) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, %p, 1, -1) = -1 EINVAL (%m)\n", iov); + + if (preadv(0, NULL, 1, -2) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, NULL, 1, -2) = -1 EINVAL (%m)\n"); + + if (preadv(0, iov, 0, -3) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [], 0, -3) = -1 EINVAL (%m)\n"); + + static const char tmp[] = "preadv-tmpfile"; + int fd = open(tmp, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd < 0) + perror_msg_and_fail("open"); + if (unlink(tmp)) + perror_msg_and_fail("unlink"); + + static const char w[] = "0123456789abcde"; + if (write(fd, w, LENGTH_OF(w)) != LENGTH_OF(w)) + perror_msg_and_fail("write"); + + static const char r0_c[] = "01234567"; + static const char r1_c[] = "89abcde"; + + const unsigned int r_len = (LENGTH_OF(w) + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + long rc; + + rc = preadv(fd, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + printf("preadv(%d, [{\"%s\", %u}], %u, 0) = %u\n", + fd, r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(LENGTH_OF(w)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = LENGTH_OF(w) + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) LENGTH_OF(w) - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) LENGTH_OF(w) - r_len, rc); + printf("preadv(%d, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n", + fd, r1_c, r_len, LENGTH_OF(w), ARRAY_SIZE(r1_iov_), + r_len, LENGTH_OF(w) - r_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV") + +#endif diff -Nru strace-4.11/tests/preadv-pwritev.c strace-4.12/tests/preadv-pwritev.c --- strace-4.11/tests/preadv-pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv-pwritev.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Check decoding of preadv and pwritev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined HAVE_PREADV && defined HAVE_PWRITEV + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "preadv-pwritev-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + rc = pwritev(1, efault, 42, 0); + tprintf("pwritev(1, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = preadv(0, efault, 42, 0); + tprintf("preadv(0, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pwritev(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev: expected 0, returned %ld", rc); + tprintf("pwritev(1, [], 0, 0) = 0\n"); + + rc = pwritev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev(1, [{\"%s\", %u}, %p], 2, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pwritev(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests/preadv-pwritev.test strace-4.12/tests/preadv-pwritev.test --- strace-4.11/tests/preadv-pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv-pwritev.test 2016-03-31 00:01:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv and pwritev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev diff -Nru strace-4.11/tests/preadv.test strace-4.12/tests/preadv.test --- strace-4.11/tests/preadv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/preadv.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check preadv syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/printflags.c strace-4.12/tests/printflags.c --- strace-4.11/tests/printflags.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/printflags.c 2016-04-26 00:13:47.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printflags(const struct xlat *xlat, unsigned long long flags, + const char *const dflt) +{ + if (flags == 0 && xlat->val == 0 && xlat->str) { + fputs(xlat->str, stdout); + return 1; + } + + int n; + char sep = 0; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + if (sep) + putc(sep, stdout); + else + sep = '|'; + fputs(xlat->str, stdout); + flags &= ~xlat->val; + n++; + } + } + + if (n) { + if (flags) { + if (sep) + putc(sep, stdout); + printf("%#llx", flags); + n++; + } + } else { + if (flags) { + printf("%#llx", flags); + if (dflt) + printf(" /* %s */", dflt); + } else { + if (dflt) + putc('0', stdout); + } + } + + return n; +} diff -Nru strace-4.11/tests/print_quoted_string.c strace-4.12/tests/print_quoted_string.c --- strace-4.11/tests/print_quoted_string.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/print_quoted_string.c 2016-05-10 22:12:01.000000000 +0000 @@ -0,0 +1,75 @@ +#include "tests.h" + +#include +#include +#include + +/* + * Based on string_quote() from util.c. + * Assumes instr is NUL-terminated. + */ + +void +print_quoted_string(const char *instr) +{ + print_quoted_memory(instr, strlen(instr)); +} + +void +print_quoted_memory(const char *instr, const size_t len) +{ + const unsigned char *str = (const unsigned char*) instr; + size_t i; + + for (i = 0; i < len; ++i) { + const int c = str[i]; + switch (c) { + case '\"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + case '\v': + printf("\\v"); + break; + default: + if (c >= ' ' && c <= 0x7e) + putchar(c); + else { + putchar('\\'); + + char c1 = '0' + (c & 0x7); + char c2 = '0' + ((c >> 3) & 0x7); + char c3 = '0' + (c >> 6); + + if (*str >= '0' && *str <= '9') { + /* Print \octal */ + putchar(c3); + putchar(c2); + } else { + /* Print \[[o]o]o */ + if (c3 != '0') + putchar(c3); + if (c3 != '0' || c2 != '0') + putchar(c2); + } + putchar(c1); + } + break; + } + } + +} diff -Nru strace-4.11/tests/printxval.c strace-4.12/tests/printxval.c --- strace-4.11/tests/printxval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/printxval.c 2016-04-27 20:31:34.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printxval(const struct xlat *xlat, unsigned long long val, + const char *const dflt) +{ + for (; xlat->str; xlat++) { + if (xlat->val == val) { + fputs(xlat->str, stdout); + return 1; + } + } + + printf("%#llx", val); + if (dflt) + printf(" /* %s */", dflt); + return 0; +} diff -Nru strace-4.11/tests/pselect6.c strace-4.12/tests/pselect6.c --- strace-4.11/tests/pselect6.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/pselect6.c 2016-04-18 01:10:44.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,9 @@ /* * Based on test by Dr. David Alan Gilbert */ + +#include "tests.h" +#include #include #include #include @@ -68,7 +71,7 @@ sigaddset(&mask, SIGCHLD); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple pselect. @@ -79,8 +82,10 @@ FD_SET(fds[1], set[1]); FD_SET(1, set[2]); FD_SET(2, set[2]); - if (pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL) != 1) - return 77; + int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL); + if (rc < 0) + perror_msg_and_skip("pselect"); + assert(rc == 1); printf("pselect6(%d, [%d %d], [%d %d], [1 2], NULL, {NULL, %u}) " "= 1 (out [%d])\n", fds[1] + 1, fds[0], fds[1], @@ -94,8 +99,7 @@ FD_SET(2, set[1]); FD_SET(fds[0], set[1]); FD_SET(fds[1], set[1]); - if (syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) != 3) - return 77; + assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); printf("pselect6(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld}, NULL)" " = 3 (out [1 2 %d], left {%lld, %lld})\n", fds[1] + 1, fds[0], fds[1], @@ -109,10 +113,9 @@ */ FD_ZERO(set[0]); FD_SET(fds[1],set[0]); - if (pselect(-1, NULL, set[0], NULL, NULL, &mask) != -1) - return 77; + assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " - "= -1 EINVAL (Invalid argument)\n", set[0], NSIG / 8); + "= -1 EINVAL (%m)\n", set[0], NSIG / 8); /* * Another variant, with nfds exceeding FD_SETSIZE limit. @@ -122,24 +125,21 @@ FD_ZERO(set[1]); tm.ts.tv_sec = 0; tm.ts.tv_nsec = 123; - if (pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) != 0) - return 77; + assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); printf("pselect6(%d, [%d], [], NULL, {0, 123}, {[HUP CHLD], %u}) " "= 0 (Timeout)\n", FD_SETSIZE + 1, fds[0], NSIG / 8); /* * See how timeouts are decoded. */ - if (sigaction(SIGALRM, &act, NULL) != 0) - return 77; - if (setitimer(ITIMER_REAL, &itv, NULL) != 0) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(setitimer(ITIMER_REAL, &itv, NULL) == 0); tm.ts.tv_nsec = 222222222; - if (pselect(0, NULL, NULL, NULL, &tm.ts, &mask) != -1) - return 77; - puts("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], 8})" - " = ? ERESTARTNOHAND (To be restarted if no handler)"); + assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); + printf("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], %u})" + " = ? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG / 8); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); puts("+++ exited with 0 +++"); @@ -148,10 +148,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_pselect6") #endif diff -Nru strace-4.11/tests/pselect6.test strace-4.12/tests/pselect6.test --- strace-4.11/tests/pselect6.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/pselect6.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check pselect6 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e pselect6 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/ptrace.c strace-4.12/tests/ptrace.c --- strace-4.11/tests/ptrace.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ptrace.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,477 @@ +/* + * Check decoding of ptrace syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include +# include +# include "ptrace.h" +# include + +static long +do_ptrace(unsigned long request, unsigned long pid, + unsigned long addr, unsigned long data) +{ + return syscall(__NR_ptrace, request, pid, addr, data); +} + +static void +test_peeksiginfo(unsigned long pid, const unsigned long bad_request) +{ + long rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, 0, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, NULL, %#lx)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, rc, errno2name()); + + struct { + unsigned long long off; + unsigned int flags, nr; + } *const psi = tail_alloc(sizeof(*psi)); + + psi->off = 0xdeadbeeffacefeed; + psi->flags = 1; + psi->nr = 42; + + rc = do_ptrace(PTRACE_PEEKSIGINFO, + pid, (unsigned long) psi, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=PTRACE_PEEKSIGINFO_SHARED, nr=%u}, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, bad_request, rc, errno2name()); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGALRM); + + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + raise(SIGUSR2); + raise(SIGALRM); + + if (do_ptrace(PTRACE_TRACEME, 0, 0, 0)) + perror_msg_and_fail("child: PTRACE_TRACEME"); + + raise(SIGSTOP); + _exit(0); + } + + const unsigned int nsigs = 4; + const uid_t uid = geteuid(); + siginfo_t *sigs = tail_alloc(sizeof(*sigs) * nsigs); + + psi->off = 0; + psi->flags = 0; + psi->nr = nsigs; + + for (;;) { + int status, tracee, saved; + + errno = 0; + tracee = wait(&status); + if (tracee <= 0) { + if (errno == EINTR) + continue; + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("wait"); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_fail("unexpected exit status %u", + WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) + error_msg_and_fail("unexpected signal %u", + WTERMSIG(status)); + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill(pid, SIGKILL); + error_msg_and_fail("unexpected wait status %x", + status); + } + + rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, + (unsigned long) psi, (unsigned long) sigs); + if (rc < 0) { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}, %p) = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, sigs, + rc, errno2name()); + } else { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}" + ", [{si_signo=SIGUSR1, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGUSR2, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGALRM, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + "]) = %ld\n", + (unsigned) pid, psi->off, psi->nr, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + rc); + } + + if (do_ptrace(PTRACE_CONT, pid, 0, 0)) { + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("ptrace"); + } + printf("ptrace(PTRACE_CONT, %ld, NULL, SIG_0) = 0\n", pid); + } +} + +int +main(void) +{ + const unsigned long bad_request = + (unsigned long) 0xdeadbeeffffffeed; + const unsigned long bad_data = + (unsigned long) 0xdeadcafefffff00d; + const unsigned long pid = + (unsigned long) 0xdefaced00000000 | (unsigned) getpid(); + + unsigned int sigset_size; + + for (sigset_size = 1024 / 8; sigset_size; sigset_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, + SIG_SETMASK, NULL, NULL, sigset_size)) + break; + } + if (!sigset_size) + perror_msg_and_fail("rt_sigprocmask"); + + void *const k_set = tail_alloc(sigset_size); + siginfo_t *const sip = tail_alloc(sizeof(*sip)); + + long rc = do_ptrace(bad_request, pid, 0, 0); + printf("ptrace(%#lx /* PTRACE_??? */, %u, NULL, NULL) = %ld %s (%m)\n", + bad_request, (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_PEEKDATA, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKTEXT, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKUSER, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_POKEUSER, pid, bad_request, bad_data); + printf("ptrace(PTRACE_POKEUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + rc = do_ptrace(PTRACE_ATTACH, pid, 0, 0); + printf("ptrace(PTRACE_ATTACH, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_INTERRUPT, pid, 0, 0); + printf("ptrace(PTRACE_INTERRUPT, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_KILL, pid, 0, 0); + printf("ptrace(PTRACE_KILL, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_LISTEN, pid, 0, 0); + printf("ptrace(PTRACE_LISTEN, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + sigset_t libc_set; + sigemptyset(&libc_set); + sigaddset(&libc_set, SIGUSR1); + memcpy(k_set, &libc_set, sigset_size); + + rc = do_ptrace(PTRACE_SETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_SETSIGMASK, %u, %u, [USR1])" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_GETSIGMASK, %u, %u, %p)" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, k_set, rc, errno2name()); + + rc = do_ptrace(PTRACE_SECCOMP_GET_FILTER, pid, 42, 0); + printf("ptrace(PTRACE_SECCOMP_GET_FILTER, %u, 42, NULL)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETEVENTMSG, pid, bad_request, bad_data); + printf("ptrace(PTRACE_GETEVENTMSG, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGIO; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_band = -2; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGIO" + ", si_code=POLL_IN, si_errno=ENOENT, si_band=-2})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGTRAP; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_pid = 2; + sip->si_uid = 3; + sip->si_ptr = (void *) bad_request; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGTRAP" + ", si_code=TRAP_BRKPT, si_errno=ENOENT, si_pid=2, si_uid=3" + ", si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_int, sip->si_ptr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGILL; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGILL" + ", si_code=ILL_ILLOPC, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGFPE; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGFPE" + ", si_code=FPE_INTDIV, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGBUS; + sip->si_code = 1; + sip->si_errno = -2; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGBUS" + ", si_code=BUS_ADRALN, si_errno=%d, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_addr, + rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGPROF; + sip->si_code = 0xbadc0ded; + sip->si_errno = -2; + sip->si_pid = 0; + sip->si_uid = 3; + sip->si_ptr = 0; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGPROF" + ", si_code=%#x, si_errno=%d, si_pid=0, si_uid=3})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_code, sip->si_errno, + rc, errno2name()); + +#ifdef HAVE_SIGINFO_T_SI_SYSCALL + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGSYS; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_call_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + sip->si_syscall = -1U; + sip->si_arch = AUDIT_ARCH_X86_64; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" + ", si_syscall=__NR_syscall_%u, si_arch=AUDIT_ARCH_X86_64})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, + rc, errno2name()); +#endif + +#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGHUP; + sip->si_code = SI_TIMER; + sip->si_errno = ENOENT; + sip->si_timerid = 0xdeadbeef; + sip->si_overrun = -1; + sip->si_ptr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGHUP" + ", si_code=SI_TIMER, si_errno=ENOENT, si_timerid=%#x" + ", si_overrun=%d, si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_timerid, sip->si_overrun, + sip->si_int, sip->si_ptr, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_GETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_GETSIGINFO, %u, %#lx, %p)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, sip, rc, errno2name()); + + rc = do_ptrace(PTRACE_CONT, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_CONT, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_DETACH, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_DETACH, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SYSCALL, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSCALL, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + +#ifdef PTRACE_SINGLESTEP + rc = do_ptrace(PTRACE_SINGLESTEP, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SINGLESTEP, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SINGLEBLOCK + rc = do_ptrace(PTRACE_SINGLEBLOCK, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SINGLEBLOCK, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SYSEMU + rc = do_ptrace(PTRACE_SYSEMU, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SYSEMU, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + rc = do_ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSEMU_SINGLESTEP, %u, NULL, SIGUSR1)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_SETOPTIONS, + pid, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE); + printf("ptrace(PTRACE_SETOPTIONS, %u, NULL" + ", PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SEIZE, + pid, bad_request, PTRACE_O_TRACESYSGOOD); + printf("ptrace(PTRACE_SEIZE, %u, %#lx" + ", PTRACE_O_TRACESYSGOOD) = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_SETREGSET, pid, 1, bad_request); + printf("ptrace(PTRACE_SETREGSET, %u, NT_PRSTATUS, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETREGSET, pid, 3, bad_request); + printf("ptrace(PTRACE_GETREGSET, %u, NT_PRPSINFO, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + test_peeksiginfo(pid, bad_request); + + rc = do_ptrace(PTRACE_TRACEME, 0, 0, 0); + if (rc) + printf("ptrace(PTRACE_TRACEME) = %ld %s (%m)\n", + rc, errno2name()); + else + printf("ptrace(PTRACE_TRACEME) = 0\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests/ptrace.test strace-4.12/tests/ptrace.test --- strace-4.11/tests/ptrace.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/ptrace.test 2016-05-13 05:18:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ptrace syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e signal=none diff -Nru strace-4.11/tests/pwritev.c strace-4.12/tests/pwritev.c --- strace-4.11/tests/pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pwritev.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PWRITEV + +# include +# include +# include +# include + +# define LEN 8 +# define LIM (LEN - 1) + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) { + if (i < LIM) + printf("\\%d", (int) buf[i]); + } + printf("\"%s, %u}", + i > LIM ? "..." : "", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt, unsigned int size) +{ + if (!size) { + printf("%p", iov); + return; + } + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + if (i == size) { + printf("%p", &iov[i]); + break; + } + if (i == LIM) { + fputs("...", stdout); + break; + } + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + (void) close(0); + if (open("/dev/null", O_WRONLY)) + perror_msg_and_fail("open"); + + char *buf = tail_alloc(LEN); + unsigned i; + for (i = 0; i < LEN; ++i) + buf[i] = i; + + struct iovec *iov = tail_alloc(sizeof(*iov) * LEN); + for (i = 0; i < LEN; ++i) { + buf[i] = i; + iov[i].iov_base = &buf[i]; + iov[i].iov_len = LEN - i; + } + + const off_t offset = 0xdefaceddeadbeefLL; + long rc; + int written = 0; + for (i = 0; i < LEN; ++i) { + written += iov[i].iov_len; + if (pwritev(0, iov, i + 1, offset + i) != written) + perror_msg_and_fail("pwritev"); + fputs("pwritev(0, ", stdout); + print_iovec(iov, i + 1, LEN); + printf(", %u, %lld) = %d\n", + i + 1, (long long) offset + i, written); + } + + for (i = 0; i <= LEN; ++i) { + unsigned int n = LEN + 1 - i; + fputs("pwritev(0, ", stdout); + print_iovec(iov + i, n, LEN - i); + rc = pwritev(0, iov + i, n, offset + LEN + i); + printf(", %u, %lld) = %ld %s (%m)\n", + n, (long long) offset + LEN + i, rc, errno2name()); + } + + iov->iov_base = iov + LEN * 2; + rc = pwritev(0, iov, 1, -1); + printf("pwritev(0, [{%p, %d}], 1, -1) = %ld %s (%m)\n", + iov->iov_base, LEN, rc, errno2name()); + + iov += LEN; + rc = pwritev(0, iov, 42, -2); + printf("pwritev(0, %p, 42, -2) = %ld %s (%m)\n", + iov, rc, errno2name()); + + rc = pwritev(0, NULL, 1, -3); + printf("pwritev(0, NULL, 1, -3) = %ld %s (%m)\n", + rc, errno2name()); + + rc = pwritev(0, iov, 0, -4); + printf("pwritev(0, [], 0, -4) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests/pwritev.test strace-4.12/tests/pwritev.test --- strace-4.11/tests/pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/pwritev.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pwritev syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -s7 diff -Nru strace-4.11/tests/readdir.c strace-4.12/tests/readdir.c --- strace-4.11/tests/readdir.c 2015-11-19 22:57:42.000000000 +0000 +++ strace-4.12/tests/readdir.c 2016-01-06 12:03:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,21 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_readdir -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -82,7 +79,7 @@ assert(!open(".", O_RDONLY | O_DIRECTORY)); while ((rc = syscall(__NR_readdir, 0, &e, 1))) { if (rc < 0) - return 77; + perror_msg_and_skip("readdir"); e.d_name[e.d_reclen] = '\0'; printf("readdir(0, {d_ino=%lu, d_off=%lu, d_reclen=%u" ", d_name=\"%s\"}) = %d\n", @@ -100,10 +97,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_readdir") #endif diff -Nru strace-4.11/tests/readdir.test strace-4.12/tests/readdir.test --- strace-4.11/tests/readdir.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/readdir.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a16 -ereaddir $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a16 diff -Nru strace-4.11/tests/readlinkat.c strace-4.12/tests/readlinkat.c --- strace-4.11/tests/readlinkat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/readlinkat.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlinkat + +# include +# include + +# define PREFIX "test.readlinkat" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlinkat - static const char fname[] = "readlinkat.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlinkat, -100, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlinkat, -100, fname, buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlinkat, -100, fname, buf, size); + if (rc < 0) { + perror("readlinkat"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlinkat(AT_FDCWD, \""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests/readlinkat.test strace-4.12/tests/readlinkat.test --- strace-4.11/tests/readlinkat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/readlinkat.test 2016-02-04 03:36:25.000000000 +0000 @@ -2,20 +2,4 @@ # Check readlinkat syscall decoding. -. "${srcdir=.}/init.sh" - -syscall=readlinkat -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +. "${srcdir=.}/readlink.test" diff -Nru strace-4.11/tests/readlink.c strace-4.12/tests/readlink.c --- strace-4.11/tests/readlink.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/readlink.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlink + +# include +# include + +# define PREFIX "test.readlink" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlink - static const char fname[] = "readlink.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlink, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlink, fname, buf, size); + printf("readlink(\"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlink, fname, buf, size); + if (rc < 0) { + perror("readlink"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlink(\"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlink(\""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests/readlink.test strace-4.12/tests/readlink.test --- strace-4.11/tests/readlink.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/readlink.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,19 +3,4 @@ # Check readlink syscall decoding. . "${srcdir=.}/init.sh" - -syscall=readlink -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +run_strace_match_diff -xx diff -Nru strace-4.11/tests/readv.c strace-4.12/tests/readv.c --- strace-4.11/tests/readv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/readv.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,156 @@ +/* + * Check decoding of readv and writev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + long rc; + + rc = writev(1, efault, 42); + tprintf("writev(1, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = readv(0, efault, 42); + tprintf("readv(0, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + tprintf("writev(1, [], 0) = %ld\n", + (long) writev(1, w_iov, 0)); + + rc = writev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(1, [{\"%s\", %u}, %p], 2) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + assert(writev(1, w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(1); + tprintf("writev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(0, [{\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - r_len); + tprintf("readv(0, [{\"%s\", %u}, {\"\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests/readv.test strace-4.12/tests/readv.test --- strace-4.11/tests/readv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/readv.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of readv and writev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 -eread=0 -ewrite=1 -e trace=readv,writev diff -Nru strace-4.11/tests/read-write.c strace-4.12/tests/read-write.c --- strace-4.11/tests/read-write.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/read-write.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Check decoding and dumping of read and write syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + long rc = read(0, buf, len); + if (rc != (int) len) + perror_msg_and_fail("read: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "read", 0); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = write(1, buf, len); + if (rc != (int) len) + perror_msg_and_fail("write: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "write", 1); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "read-write-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = write(1, w, 0); + if (rc) + perror_msg_and_fail("write: expected 0, returned %ld", rc); + tprintf("write(1, \"\", 0) = 0\n"); + + rc = write(1, efault, 1); + if (rc != -1) + perror_msg_and_fail("write: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = write(1, w, w_len); + if (rc != (int) w_len) + perror_msg_and_fail("write: expected %u, returned %ld", + w_len, rc); + tprintf("write(1, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = read(0, r0, 0); + if (rc) + perror_msg_and_fail("read: expected 0, returned %ld", rc); + tprintf("read(0, \"\", 0) = 0\n"); + + rc = read(0, efault, 1); + if (rc != -1) + perror_msg_and_fail("read: expected -1, returned %ld", rc); + tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = read(0, r0, r0_len); + if (rc != (int) r0_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r0_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = read(0, r1, w_len); + if (rc != (int) r1_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r1_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests/read-write.test strace-4.12/tests/read-write.test --- strace-4.11/tests/read-write.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/read-write.test 2016-04-03 16:37:43.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of read and write syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=read-write-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a15 -eread=0 -ewrite=1 -e trace=read,write \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests/reboot.c strace-4.12/tests/reboot.c --- strace-4.11/tests/reboot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/reboot.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_reboot + +# include +# include +# include + +# define INVALID_MAGIC 319887762 +# define INVALID_CMD 0x01234568 + +int +main(void) +{ + static const char buf[] = "reboot"; + long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); + printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", + INVALID_MAGIC, buf, rc, errno2name()); + + rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + LINUX_REBOOT_MAGIC2, INVALID_CMD); + printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," + " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", + INVALID_CMD, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_reboot") + +#endif diff -Nru strace-4.11/tests/reboot.test strace-4.12/tests/reboot.test --- strace-4.11/tests/reboot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/reboot.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check reboot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/recvmsg.c strace-4.12/tests/recvmsg.c --- strace-4.11/tests/recvmsg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/recvmsg.c 2016-01-20 17:35:27.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Check decoding of recvmsg and sendmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + const struct msghdr w_mh_ = { + .msg_iov = w_iov, + .msg_iovlen = ARRAY_SIZE(w_iov_) + }; + const struct msghdr *w_mh = tail_memdup(&w_mh_, sizeof(w_mh_)); + + assert(sendmsg(1, w_mh, 0) == (int) w_len); + close(1); + tprintf("sendmsg(1, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"%s\", %u}, {\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), w2_c, LENGTH_OF(w2_c), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, LENGTH_OF(w1_c), w1_d, w1_c, + LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + const struct msghdr r_mh_ = { + .msg_iov = r_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_) + }; + struct msghdr *r_mh = tail_memdup(&r_mh_, sizeof(r_mh_)); + + assert(recvmsg(0, r_mh, 0) == (int) r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}], msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + r_mh->msg_iov = r_iov; + r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); + + assert(recvmsg(0, r_mh, 0) == (int) w_len - r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"\", %u}], msg_controllen=0" + ", msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r1_iov_), r1_c, r_len, w_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests/recvmsg.test strace-4.12/tests/recvmsg.test --- strace-4.11/tests/recvmsg.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/recvmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of recvmsg and sendmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg diff -Nru strace-4.11/tests/redirect.test strace-4.12/tests/redirect.test --- strace-4.11/tests/redirect.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/redirect.test 2016-02-14 00:59:42.000000000 +0000 @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Ensure that strace does not retain stdin and stdout descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep +check_prog yes + +> "$LOG" + +( + $SLEEP_A_BIT & + yes + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) | $STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard input" +fi + +$STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" | +( + $SLEEP_A_BIT & + cat > /dev/null + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard output" +fi diff -Nru strace-4.11/tests/remap_file_pages.c strace-4.12/tests/remap_file_pages.c --- strace-4.11/tests/remap_file_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/remap_file_pages.c 2016-05-16 23:47:34.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of remap_file_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_remap_file_pages + +# include +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00d; + const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; + + long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); + printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", + addr, size, "PROT_READ|PROT_WRITE|PROT_EXEC", pgoff, + "MAP_PRIVATE|MAP_ANONYMOUS", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_remap_file_pages") + +#endif diff -Nru strace-4.11/tests/remap_file_pages.test strace-4.12/tests/remap_file_pages.test --- strace-4.11/tests/remap_file_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/remap_file_pages.test 2016-04-27 16:04:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check remap_file_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/renameat2.c strace-4.12/tests/renameat2.c --- strace-4.11/tests/renameat2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/renameat2.c 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Check decoding of renameat2 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_renameat2 + +# include +# include + +int +main(void) +{ + static const char oldpath[] = "renameat2_oldpath"; + static const char newpath[] = "renameat2_newpath"; + const unsigned long olddirfd = + (unsigned long) 0xfacefeedffffffff; + const unsigned long newdirfd = + (unsigned long) 0xfacefeed00000000 | -100U; + + long rc = syscall(__NR_renameat2, + olddirfd, oldpath, newdirfd, newpath, 1); + printf("renameat2(%d, \"%s\", AT_FDCWD, \"%s\", RENAME_NOREPLACE)" + " = %ld %s (%m)\n", + (int) olddirfd, oldpath, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat2") + +#endif diff -Nru strace-4.11/tests/renameat2.test strace-4.12/tests/renameat2.test --- strace-4.11/tests/renameat2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/renameat2.test 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/renameat.c strace-4.12/tests/renameat.c --- strace-4.11/tests/renameat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/renameat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#ifdef __NR_renameat + +# include +# include + +# define OLD_FILE "renameat_old" +# define NEW_FILE "renameat_new" + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); + printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", + (int) fd_old, OLD_FILE, (int) fd_new, NEW_FILE, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat") + +#endif diff -Nru strace-4.11/tests/renameat.test strace-4.12/tests/renameat.test --- strace-4.11/tests/renameat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/renameat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/rename.c strace-4.12/tests/rename.c --- strace-4.11/tests/rename.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rename.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_rename + +# include +# include + +# define OLD_FILE "rename_old" +# define NEW_FILE "rename_new" + +int +main(void) +{ + long rc = syscall(__NR_rename, OLD_FILE, NEW_FILE); + printf("rename(\"%s\", \"%s\") = %ld %s (%m)\n", + OLD_FILE, NEW_FILE, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rename") + +#endif diff -Nru strace-4.11/tests/rename.test strace-4.12/tests/rename.test --- strace-4.11/tests/rename.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rename.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rename syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests/restart_syscall.c strace-4.12/tests/restart_syscall.c --- strace-4.11/tests/restart_syscall.c 2015-12-13 01:12:55.000000000 +0000 +++ strace-4.12/tests/restart_syscall.c 2016-01-05 23:14:25.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -43,21 +41,19 @@ * x32 is broken from the beginning: * https://lkml.org/lkml/2015/11/30/790 */ - return 77; + error_msg_and_skip("x32 is broken"); #else const sigset_t set = {}; const struct sigaction act = { .sa_handler = SIG_IGN }; const struct itimerval itv = { .it_value.tv_usec = 111111 }; struct timespec req = { .tv_nsec = 222222222 }, rem; - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); if (nanosleep(&req, &rem)) - return 0; + perror_msg_and_fail("nanosleep"); printf("nanosleep\\(\\{%jd, %jd\\}, \\{%jd, %jd\\}\\)" " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", diff -Nru strace-4.11/tests/restart_syscall.test strace-4.12/tests/restart_syscall.test --- strace-4.11/tests/restart_syscall.test 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests/restart_syscall.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" syscalls=nanosleep,restart_syscall run_strace -a20 -e trace=$syscalls $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests/rmdir.c strace-4.12/tests/rmdir.c --- strace-4.11/tests/rmdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rmdir.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_rmdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "rmdir_sample"; + long rc = syscall(__NR_rmdir, sample); + printf("rmdir(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rmdir") + +#endif diff -Nru strace-4.11/tests/rmdir.test strace-4.12/tests/rmdir.test --- strace-4.11/tests/rmdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rmdir.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rmdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests/rt_sigpending.c strace-4.12/tests/rt_sigpending.c --- strace-4.11/tests/rt_sigpending.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigpending.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * This file is part of rt_sigpending strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigpending + +# include +# include +# include +# include +# include + +static long +k_sigpending(void *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigpending, set, size); +} + +static void +iterate(const char *const text, unsigned int size, void *set) +{ + for (;;) { + if (k_sigpending(set, size)) { + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + set, size); + break; + } + if (size) { +#if WORDS_BIGENDIAN + if (size < sizeof(long)) + tprintf("rt_sigpending(%s, %u) = 0\n", + "[]", size); + else +#endif + tprintf("rt_sigpending(%s, %u) = 0\n", + text, size); + } else { + tprintf("rt_sigpending(%p, %u) = 0\n", set, size); + break; + } + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + sigemptyset(libc_set); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + memset(k_set, 0, big_size); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + if (!k_sigpending(k_set, set_size)) + break; + tprintf("rt_sigpending(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigpending"); + tprintf("rt_sigpending(%s, %u) = 0\n", "[]", set_size); + + iterate("[]", set_size >> 1, k_set + (set_size >> 1)); + + void *const efault = k_set + (set_size >> 1); + assert(k_sigpending(efault, set_size) == -1); + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + efault, set_size); + + sigaddset(libc_set, SIGHUP); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGHUP); + + iterate("[HUP]", set_size, k_set); + + sigaddset(libc_set, SIGINT); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGINT); + + iterate("[HUP INT]", set_size, k_set); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigpending") + +#endif diff -Nru strace-4.11/tests/rt_sigpending.test strace-4.12/tests/rt_sigpending.test --- strace-4.11/tests/rt_sigpending.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigpending.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigpending syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests/rt_sigprocmask.c strace-4.12/tests/rt_sigprocmask.c --- strace-4.11/tests/rt_sigprocmask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigprocmask.c 2016-02-19 01:44:33.000000000 +0000 @@ -0,0 +1,174 @@ +/* + * This file is part of rt_sigprocmask strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include + +static long +k_sigprocmask(const unsigned long how, void *const new_set, + void *const old_set, const unsigned long size) +{ + return syscall(__NR_rt_sigprocmask, how, new_set, old_set, size); +} + +static void +iterate(const char *const text, void *set, void *old, unsigned int size) +{ + for (;;) { + if (k_sigprocmask(SIG_UNBLOCK, set, old, size)) { + if (size < sizeof(long)) + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %p, %p, %u) = -1 EINVAL (%m)\n", + set, old, size); + else + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %s, %p, %u) = -1 EINVAL (%m)\n", + text, old, size); + } else { + tprintf("rt_sigprocmask(SIG_UNBLOCK, %s, [], %u)" + " = 0\n", text, size); + } + if (!size) + break; + size >>= 1; + set += size; + old += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!k_sigprocmask(SIG_SETMASK, NULL, NULL, set_size)) + break; + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u)" + " = -1 EINVAL (%m)\n", set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u) = 0\n", + set_size); + + void *const k_set = tail_alloc(set_size); + void *const old_set = tail_alloc(set_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + memset(k_set, 0, set_size); + if (k_sigprocmask(SIG_SETMASK, k_set, NULL, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, [], NULL, %u) = 0\n", set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set - set_size, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[], [], %u) = 0\n", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set - set_size, + old_set, set_size << 1) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, %p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, old_set, set_size << 1); + + iterate("~[]", k_set - set_size, old_set, set_size >> 1); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, [HUP], [], %u) = 0\n", set_size); + + memset(libc_set, -1, sizeof(sigset_t)); + sigdelset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP], [HUP], %u) = 0\n", + set_size); + + sigdelset(libc_set, SIGKILL); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP KILL], [HUP], %u) = 0\n", + set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + sigaddset(libc_set, SIGINT); + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, %s, [HUP], %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + if (k_sigprocmask(SIG_SETMASK, NULL, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, %s, %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set + (set_size >> 1), NULL, + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, NULL, %u) = -1 EFAULT (%m)\n", + k_set + (set_size >> 1), set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set, old_set + (set_size >> 1), + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %s, %p, %u) = -1 EFAULT (%m)\n", + "[HUP INT QUIT ALRM TERM]", + old_set + (set_size >> 1), set_size); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests/rt_sigprocmask.test strace-4.12/tests/rt_sigprocmask.test --- strace-4.11/tests/rt_sigprocmask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigprocmask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigprocmask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/rt_sigqueueinfo.c strace-4.12/tests/rt_sigqueueinfo.c --- strace-4.11/tests/rt_sigqueueinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/rt_sigqueueinfo.c 2016-01-06 00:14:36.000000000 +0000 @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -40,10 +42,9 @@ }; pid_t pid = getpid(); - if (sigaction(SIGUSR1, &sa, NULL) == -1) - return 77; - if (sigqueue(pid, SIGUSR1, value) == -1) - return 77; + assert(sigaction(SIGUSR1, &sa, NULL) == 0); + if (sigqueue(pid, SIGUSR1, value)) + perror_msg_and_skip("sigqueue"); printf("rt_sigqueueinfo(%u, SIGUSR1, {si_signo=SIGUSR1, " "si_code=SI_QUEUE, si_pid=%u, si_uid=%u, " "si_value={int=%d, ptr=%p}}) = 0\n", diff -Nru strace-4.11/tests/rt_sigqueueinfo.test strace-4.12/tests/rt_sigqueueinfo.test --- strace-4.11/tests/rt_sigqueueinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/rt_sigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of rt_sigqueueinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ert_sigqueueinfo -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests/rt_sigsuspend.c strace-4.12/tests/rt_sigsuspend.c --- strace-4.11/tests/rt_sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigsuspend.c 2016-04-20 04:35:25.000000000 +0000 @@ -0,0 +1,165 @@ +/* + * This file is part of rt_sigsuspend strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigsuspend + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigsuspend(const sigset_t *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigsuspend, set, size); +} + +static void +iterate(const char *const text, const int sig, + const void *const set, unsigned int size) +{ + const void *mask; + + for (mask = set;; size >>= 1, mask += size) { + raise(sig); + assert(k_sigsuspend(mask, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigsuspend(%s, %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", + text, size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigsuspend(%p, %u)" + " = -1 EINVAL (%m)\n", + mask, size); + else + tprintf("rt_sigsuspend(%s, %u)" + " = -1 EINVAL (%m)\n", + set == mask ? text : "~[]", size); + } + if (!size) + break; + } +} + +static void +handler(int signo) +{ +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR1); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct sigaction sa = { + .sa_handler = handler + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + raise(SIGUSR1); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigsuspend(k_set, set_size) == -1); + if (EINTR == errno) + break; + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigsuspend"); + tprintf("rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR2); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP INT USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + memset(libc_set, -1, sizeof(*libc_set)); + sigdelset(libc_set, SIGUSR1); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend(~[USR1], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + assert(k_sigsuspend(k_set - set_size, set_size << 1) == -1); + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, set_size << 1); + + iterate("~[USR1]", SIGUSR1, k_set, set_size >> 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigsuspend") + +#endif diff -Nru strace-4.11/tests/rt_sigsuspend.test strace-4.12/tests/rt_sigsuspend.test --- strace-4.11/tests/rt_sigsuspend.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigsuspend.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigsuspend syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -esignal=none diff -Nru strace-4.11/tests/rt_sigtimedwait.c strace-4.12/tests/rt_sigtimedwait.c --- strace-4.11/tests/rt_sigtimedwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigtimedwait.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,182 @@ +/* + * This file is part of rt_sigtimedwait strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigtimedwait + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigtimedwait(const sigset_t *const set, siginfo_t *const info, + const struct timespec *const timeout, const unsigned long size) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, size); +} + +static void +iterate(const char *const text, const void *set, + const struct timespec *const timeout, unsigned int size) +{ + for (;;) { + assert(k_sigtimedwait(set, NULL, timeout, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", text, + (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, + size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + else + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + text, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + } + if (!size) + break; + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + struct timespec *const timeout = tail_alloc(sizeof(*timeout)); + timeout->tv_sec = 0; + timeout->tv_nsec = 42; + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); + if (EAGAIN == errno) + break; + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}, %u)" + " = -1 EINVAL (%m)\n", + k_set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigtimedwait"); + tprintf("rt_sigtimedwait([], NULL, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP INT], %p, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(%s, %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + "[HUP INT QUIT ALRM TERM]", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + memset(k_set - set_size, -1, set_size); + assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(~[], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + assert(k_sigtimedwait(k_set - set_size, info, NULL, set_size << 1) == -1); + tprintf("rt_sigtimedwait(%p, %p, NULL, %u) = -1 EINVAL (%m)\n", + k_set - set_size, info, set_size << 1); + + iterate("~[]", k_set - set_size, timeout, set_size >> 1); + + timeout->tv_sec = 1; + raise(SIGALRM); + assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" + ", si_pid=%d, si_uid=%d}, {%jd, %jd}, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size, SIGALRM, "SIGALRM"); + + raise(SIGALRM); + assert(k_sigtimedwait(k_set, NULL, NULL, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, NULL, NULL, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", set_size, SIGALRM, "SIGALRM"); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigtimedwait") + +#endif diff -Nru strace-4.11/tests/rt_sigtimedwait.test strace-4.12/tests/rt_sigtimedwait.test --- strace-4.11/tests/rt_sigtimedwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_sigtimedwait.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigtimedwait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff -Nru strace-4.11/tests/rt_tgsigqueueinfo.c strace-4.12/tests/rt_tgsigqueueinfo.c --- strace-4.11/tests/rt_tgsigqueueinfo.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_tgsigqueueinfo.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * This file is part of rt_tgsigqueueinfo strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_tgsigqueueinfo + +# include +# include +# include +# include +# include + +static long +k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info) +{ + return syscall(__NR_rt_tgsigqueueinfo, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | sig, + info); +} + +int +main (void) +{ + const struct sigaction sa = { + .sa_handler = SIG_IGN + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->si_signo = SIGUSR1; + info->si_errno = ENOENT; + info->si_code = SI_QUEUE; + info->si_pid = getpid(); + info->si_uid = getuid(); + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed; + + if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) + perror_msg_and_fail("rt_tgsigqueueinfo"); + + printf("rt_tgsigqueueinfo(%u, %u, %s, {si_signo=%s" + ", si_code=SI_QUEUE, si_errno=ENOENT, si_pid=%u" + ", si_uid=%u, si_value={int=%d, ptr=%p}}) = 0\n", + info->si_pid, info->si_pid, "SIGUSR1", "SIGUSR1", + info->si_pid, info->si_uid, info->si_value.sival_int, + info->si_value.sival_ptr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_tgsigqueueinfo") + +#endif diff -Nru strace-4.11/tests/rt_tgsigqueueinfo.test strace-4.12/tests/rt_tgsigqueueinfo.test --- strace-4.11/tests/rt_tgsigqueueinfo.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/rt_tgsigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_tgsigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests/sched_get_priority_mxx.c strace-4.12/tests/sched_get_priority_mxx.c --- strace-4.11/tests/sched_get_priority_mxx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_get_priority_mxx.c 2016-03-10 09:12:23.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined(__NR_sched_get_priority_min) \ + && defined(__NR_sched_get_priority_max) + +# include +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_sched_get_priority_min, SCHED_FIFO); + printf("sched_get_priority_min(SCHED_FIFO) = %d\n", rc); + + rc = syscall(__NR_sched_get_priority_max, SCHED_RR); + printf("sched_get_priority_max(SCHED_RR) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_get_priority_min" + " && defined __NR_sched_get_priority_max"); + +#endif diff -Nru strace-4.11/tests/sched_get_priority_mxx.test strace-4.12/tests/sched_get_priority_mxx.test --- strace-4.11/tests/sched_get_priority_mxx.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_get_priority_mxx.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_get_priority_min and sched_get_priority_max syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max diff -Nru strace-4.11/tests/sched_rr_get_interval.c strace-4.12/tests/sched_rr_get_interval.c --- strace-4.11/tests/sched_rr_get_interval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_rr_get_interval.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_rr_get_interval + +# include +# include +# include + +int +main(void) +{ + struct timespec *const tp = tail_alloc(sizeof(struct timespec)); + long rc = syscall(__NR_sched_rr_get_interval, -1, tp); + printf("sched_rr_get_interval(-1, %p) = %ld %s (%m)\n", + tp, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") + +#endif diff -Nru strace-4.11/tests/sched_rr_get_interval.test strace-4.12/tests/sched_rr_get_interval.test --- strace-4.11/tests/sched_rr_get_interval.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_rr_get_interval.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_rr_get_interval syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests/sched_xetaffinity.c strace-4.12/tests/sched_xetaffinity.c --- strace-4.11/tests/sched_xetaffinity.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetaffinity.c 2016-02-08 18:18:51.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * This file is part of sched_xetaffinity strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_sched_getaffinity && defined __NR_sched_setaffinity \ + && defined CPU_ISSET_S && defined CPU_ZERO_S && defined CPU_SET_S + +# include +# include +# include +# include + +static int +getaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_getaffinity, pid, size, set); +} + +static int +setaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_setaffinity, pid, size, set); +} + +int +main(void) +{ + unsigned int cpuset_size = 1; + const pid_t pid = getpid(); + + while (cpuset_size) { + assert(getaffinity(pid, cpuset_size, NULL) == -1); + if (EFAULT == errno) + break; + if (EINVAL != errno) + perror_msg_and_skip("sched_getaffinity"); + printf("sched_getaffinity(%d, %u, NULL) = -1 EINVAL (%m)\n", + pid, cpuset_size); + cpuset_size <<= 1; + } + assert(cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = -1 EFAULT (%m)\n", + pid, cpuset_size); + + cpu_set_t *cpuset = tail_alloc(cpuset_size); + assert(getaffinity(pid, cpuset_size, cpuset + 1) == -1); + printf("sched_getaffinity(%d, %u, %p) = -1 EFAULT (%m)\n", + pid, cpuset_size, cpuset + 1); + + assert(getaffinity(pid, cpuset_size, cpuset) == (int) cpuset_size); + printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); + const char *sep; + unsigned int i, cpu; + for (i = 0, cpu = 0, sep = ""; i < cpuset_size * 8; ++i) { + if (CPU_ISSET_S(i, cpuset_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + cpu = i; + } + } + printf("]) = %u\n", cpuset_size); + + CPU_ZERO_S(cpuset_size, cpuset); + CPU_SET_S(cpu, cpuset_size, cpuset); + if (setaffinity(pid, cpuset_size, cpuset)) + perror_msg_and_skip("sched_setaffinity"); + printf("sched_setaffinity(%d, %u, [%u]) = 0\n", + pid, cpuset_size, cpu); + + const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; + cpuset = tail_alloc(big_size); + const int ret_size = getaffinity(pid, big_size, cpuset); + assert(ret_size >= (int) cpuset_size && ret_size <= (int) big_size); + printf("sched_getaffinity(%d, %u, [", pid, big_size); + for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + } + } + printf("]) = %d\n", ret_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getaffinity && __NR_sched_setaffinity" + " && CPU_ISSET_S && CPU_ZERO_S && CPU_SET_S") + +#endif diff -Nru strace-4.11/tests/sched_xetaffinity.test strace-4.12/tests/sched_xetaffinity.test --- strace-4.11/tests/sched_xetaffinity.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetaffinity.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getaffinity and sched_setaffinity syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity diff -Nru strace-4.11/tests/sched_xetattr.c strace-4.12/tests/sched_xetattr.c --- strace-4.11/tests/sched_xetattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/sched_xetattr.c 2016-01-06 11:25:47.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_sched_getattr && defined __NR_sched_setattr +# include +# include +# include + int main(void) { @@ -54,7 +52,7 @@ } sched; if (syscall(__NR_sched_getattr, 0, &sched, sizeof(sched), 0)) - return 77; + perror_msg_and_skip("sched_getattr"); printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 256, 0\\) += 0\n", sched.attr.size, @@ -67,7 +65,7 @@ sched.attr.sched_flags |= 1; if (syscall(__NR_sched_setattr, 0, &sched, 0)) - return 77; + perror_msg_and_skip("sched_setattr"); printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", sched.attr.size, @@ -83,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sched_getattr && __NR_sched_setattr") #endif diff -Nru strace-4.11/tests/sched_xetattr.test strace-4.12/tests/sched_xetattr.test --- strace-4.11/tests/sched_xetattr.test 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests/sched_xetattr.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e sched_getattr,sched_setattr $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests/sched_xetparam.c strace-4.12/tests/sched_xetparam.c --- strace-4.11/tests/sched_xetparam.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetparam.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,33 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getparam && defined __NR_sched_setparam + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = + tail_alloc(sizeof(struct sched_param)); + + long rc = syscall(__NR_sched_getparam, 0, param); + printf("sched_getparam(0, [%d]) = %ld\n", + param->sched_priority, rc); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setparam, 0, param); + printf("sched_setparam(0, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam") + +#endif diff -Nru strace-4.11/tests/sched_xetparam.test strace-4.12/tests/sched_xetparam.test --- strace-4.11/tests/sched_xetparam.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetparam.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getparam and sched_setparam syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam diff -Nru strace-4.11/tests/sched_xetscheduler.c strace-4.12/tests/sched_xetscheduler.c --- strace-4.11/tests/sched_xetscheduler.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetscheduler.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,62 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getscheduler && defined __NR_sched_setscheduler + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = tail_alloc(sizeof(struct sched_param)); + long rc = syscall(__NR_sched_getscheduler, 0); + const char *scheduler; + switch (rc) { + case SCHED_FIFO: + scheduler = "SCHED_FIFO"; + break; + case SCHED_RR: + scheduler = "SCHED_RR"; + break; +# ifdef SCHED_BATCH + case SCHED_BATCH: + scheduler = "SCHED_BATCH"; + break; +# endif +# ifdef SCHED_IDLE + case SCHED_IDLE: + scheduler = "SCHED_IDLE"; + break; +# endif +# ifdef SCHED_ISO + case SCHED_ISO: + scheduler = "SCHED_ISO"; + break; +# endif +# ifdef SCHED_DEADLINE + case SCHED_DEADLINE: + scheduler = "SCHED_DEADLINE"; + break; +# endif + default: + scheduler = "SCHED_OTHER"; + } + printf("sched_getscheduler(0) = %ld (%s)\n", + rc, scheduler); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param); + printf("sched_setscheduler(0, SCHED_FIFO, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getscheduler && __NR_sched_setscheduler") + +#endif diff -Nru strace-4.11/tests/sched_xetscheduler.test strace-4.12/tests/sched_xetscheduler.test --- strace-4.11/tests/sched_xetscheduler.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_xetscheduler.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getscheduler and sched_setscheduler syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler diff -Nru strace-4.11/tests/sched_yield.c strace-4.12/tests/sched_yield.c --- strace-4.11/tests/sched_yield.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_yield.c 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_yield + +# include +# include + +int +main(void) +{ + printf("sched_yield() = %ld\n", syscall(__NR_sched_yield)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_yield") + +#endif diff -Nru strace-4.11/tests/sched_yield.test strace-4.12/tests/sched_yield.test --- strace-4.11/tests/sched_yield.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sched_yield.test 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_yield syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests/scm_rights.c strace-4.12/tests/scm_rights.c --- strace-4.11/tests/scm_rights.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/scm_rights.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,86 +25,81 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include +#include #include +#include #include -#include -#include #include -#include int main(int ac, const char **av) { - int i; - int data = 0; - struct iovec iov = { - .iov_base = &data, - .iov_len = sizeof(iov) - }; + assert(ac > 0); + int fds[ac]; - while ((i = open("/dev/null", O_RDWR)) < 3) + static const char sample[] = + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + const unsigned int data_size = sizeof(sample) - 1; + void *data = tail_alloc(data_size); + memcpy(data, sample, data_size); + + struct iovec *iov = tail_alloc(sizeof(struct iovec)); + iov->iov_base = data; + iov->iov_len = data_size; + + struct msghdr *mh = tail_alloc(sizeof(struct msghdr)); + memset(mh, 0, sizeof(*mh)); + mh->msg_iov = iov; + mh->msg_iovlen = 1; + + int i; + while ((i = open("/dev/null", O_RDWR)) <= ac + 2) assert(i >= 0); - (void) close(3); + while (i > 2) + assert(close(i--) == 0); + assert(close(0) == 0); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); int one = 1; - assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0); + if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one))) + perror_msg_and_skip("setsockopt"); - pid_t pid = fork(); - assert(pid >= 0); + assert((fds[0] = open("/dev/null", O_RDWR)) == 4); + for (i = 1; i < ac; ++i) + assert((fds[i] = open(av[i], O_RDONLY)) == i + 4); + + unsigned int cmsg_size = CMSG_SPACE(sizeof(fds)); + struct cmsghdr *cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); + memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(sendmsg(sv[1], mh, 0) == (int) data_size); + + assert(close(sv[1]) == 0); + assert(open("/dev/null", O_RDWR) == sv[1]); + + for (i = 0; i < ac; ++i) { + assert(close(fds[i]) == 0); + fds[i] = 0; + } - if (pid) { - assert(close(sv[0]) == 0); - assert(dup2(sv[1], 1) == 1); - assert(close(sv[1]) == 0); - - int fds[ac]; - assert((fds[0] = open("/dev/null", O_RDWR)) == 3); - for (i = 1; i < ac; ++i) - assert((fds[i] = open(av[i], O_RDONLY)) == i + 3); - - union { - struct cmsghdr cmsg; - char buf[CMSG_LEN(sizeof(fds))]; - } control; - - control.cmsg.cmsg_level = SOL_SOCKET; - control.cmsg.cmsg_type = SCM_RIGHTS; - control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds)); - memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds)); - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = &control, - .msg_controllen = sizeof(control) - }; - - assert(sendmsg(1, &mh, 0) == sizeof(iov)); - assert(close(1) == 0); - - int status; - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - } else { - assert(close(sv[1]) == 0); - assert(dup2(sv[0], 0) == 0); - assert(close(sv[0]) == 0); - - struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)]; - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = control, - .msg_controllen = sizeof(control) - }; + cmsg_size += CMSG_SPACE(sizeof(struct ucred)); + cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; - assert(recvmsg(0, &mh, 0) == sizeof(iov)); - assert(close(0) == 0); - } + assert(recvmsg(0, mh, 0) == (int) data_size); + assert(close(0) == 0); return 0; } diff -Nru strace-4.11/tests/scm_rights-fd.test strace-4.12/tests/scm_rights-fd.test --- strace-4.11/tests/scm_rights-fd.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/scm_rights-fd.test 2016-03-23 19:13:13.000000000 +0000 @@ -49,18 +49,27 @@ framework_skip_ 'failed to create a file' run_prog ./scm_rights /dev/zero -run_strace_merge -y -x -enetwork $args "$file" +run_strace -y -x -enetwork $args "$file" +hex='[[:xdigit:]]' n='[1-9][0-9]*' -msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n" -rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3, 4, 5]*/(A\\n){127}Z>\]\}' -creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}' -prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +' +sample="$(for i in $(seq 1 15); do printf '\\\\xf%x' $i; done)" +socket='' + +path6='(/.*/(A\\n){127}Z|\\x2f(\\x'"$hex$hex"')*\\x2f(\\x41\\x0a){127}\\x5a)' +rights_data='\[4, 5, 6<'"$path6"'>\]' +iov='\[\{"'"$sample"'", 15\}\]' +ids='\{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}' + +msg='\{msg_name\(0\)=NULL, msg_iov\(1\)='"$iov"', msg_controllen='"$n" +rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, '"$rights_data"'\}' +creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, '"$ids"'\}' + EXPECTED="$LOG.expected" cat > "$EXPECTED" << __EOF__ -${prefix}sendmsg\\(1, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n -${prefix}recvmsg\\(0, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n +sendmsg\\(3$socket, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15 +recvmsg\\(0$socket, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15 __EOF__ match_grep "$LOG" "$EXPECTED" diff -Nru strace-4.11/tests/seccomp.c strace-4.12/tests/seccomp.c --- strace-4.11/tests/seccomp.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/seccomp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_PRCTL -# include -#endif -#ifdef HAVE_LINUX_SECCOMP_H -# include -#endif -#ifdef HAVE_LINUX_FILTER_H -# include -#endif - -#if defined HAVE_PRCTL \ - && defined PR_SET_NO_NEW_PRIVS \ - && defined PR_SET_SECCOMP \ - && defined SECCOMP_MODE_FILTER \ - && defined SECCOMP_RET_ERRNO \ - && defined BPF_JUMP \ - && defined BPF_STMT - -#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW) - -#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | (SECCOMP_RET_DATA & (err))) - -#define SOCK_FILTER_KILL_PROCESS \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL) - -#define PRINT_ALLOW_SYSCALL(nr) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), ", \ - __NR_ ## nr) - -#define PRINT_DENY_SYSCALL(nr, err) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | %#x), ", \ - __NR_ ## nr, err) - -static const struct sock_filter filter[] = { - /* load syscall number */ - BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)), - - /* allow syscalls */ - SOCK_FILTER_ALLOW_SYSCALL(close), - SOCK_FILTER_ALLOW_SYSCALL(exit), - SOCK_FILTER_ALLOW_SYSCALL(exit_group), - - /* deny syscalls */ - SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), - SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), - - /* kill process */ - SOCK_FILTER_KILL_PROCESS -}; - -static const struct sock_fprog prog = { - .len = sizeof(filter) / sizeof(filter[0]), - .filter = (struct sock_filter *) filter, -}; - -int -main(void) -{ - int fds[2]; - - puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); - - printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ["); - - printf("BPF_STMT(BPF_LD | BPF_W | BPF_ABS, %#x), ", - (unsigned) offsetof(struct seccomp_data, nr)); - - PRINT_ALLOW_SYSCALL(close); - PRINT_ALLOW_SYSCALL(exit); - PRINT_ALLOW_SYSCALL(exit_group); - - PRINT_DENY_SYSCALL(sync, EBUSY), - PRINT_DENY_SYSCALL(setsid, EPERM), - - printf("BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL)"); - - puts("]) = 0"); - puts("+++ exited with 0 +++"); - - fflush(stdout); - close(0); - close(1); - - if (pipe(fds) || - prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) || - prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) || - close(0) || close(1)) - _exit(77); - - _exit(0); -} - -#else - -int main(void) { return 77; } - -#endif diff -Nru strace-4.11/tests/seccomp-filter.c strace-4.12/tests/seccomp-filter.c --- strace-4.11/tests/seccomp-filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-filter.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp && defined SECCOMP_SET_MODE_FILTER + +# define N 7 + +int +main(void) +{ + struct sock_filter *const filter = tail_alloc(sizeof(*filter) * N); + const void *const efault = tail_alloc(1); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + long rc; + + prog->filter = filter; + prog->len = N; + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=%p})" + " = %ld %s (%m)\n", "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", + prog->len, prog->filter, rc, errno2name()); + + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -2L, efault); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, %p) = %ld %s (%m)\n", + "0xfffffffe /* SECCOMP_FILTER_FLAG_??? */", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && SECCOMP_SET_MODE_FILTER") + +#endif diff -Nru strace-4.11/tests/seccomp-filter.test strace-4.12/tests/seccomp-filter.test --- strace-4.11/tests/seccomp-filter.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-filter.test 2016-04-12 00:20:03.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=seccomp diff -Nru strace-4.11/tests/seccomp-filter-v.c strace-4.12/tests/seccomp-filter-v.c --- strace-4.11/tests/seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-filter-v.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined SECCOMP_SET_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter_c[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +int +main(void) +{ + tprintf("%s", ""); + + static const char kill_stmt_txt[] = + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"; + struct sock_filter *const filter = + tail_memdup(filter_c, sizeof(filter_c)); + struct sock_filter *const big_filter = + tail_alloc(sizeof(*big_filter) * (BPF_MAXINSNS + 1)); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + + prog->filter = filter + ARRAY_SIZE(filter_c); + prog->len = 1; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=1, filter=%p})" + " = -1 EFAULT (%m)\n", prog->filter); + + prog->filter = filter + ARRAY_SIZE(filter_c) - 1; + prog->len = 3; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u" + ", filter=[%s, %p]}) = -1 EFAULT (%m)\n", + prog->len, kill_stmt_txt, filter + ARRAY_SIZE(filter_c)); + + prog->len = 0; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=0, filter=[]})" + " = -1 EINVAL (%m)\n"); + + unsigned int i; + for (i = 0; i <= BPF_MAXINSNS; ++i) { + const struct sock_filter stmt = + BPF_STMT(BPF_CLASS(i), i << 16); + big_filter[i] = stmt; + } + + prog->filter = big_filter; + prog->len = BPF_MAXINSNS + 1; + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=[", + "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", prog->len); + for (i = 0; i < BPF_MAXINSNS; ++i) { + if (i) + tprintf(", "); + switch(BPF_CLASS(i)) { + case BPF_LD: + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_LDX: + tprintf("BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_ST: + tprintf("BPF_STMT(BPF_ST, %#x)", i << 16); + break; + case BPF_STX: + tprintf("BPF_STMT(BPF_STX, %#x)", i << 16); + break; + case BPF_ALU: + tprintf("BPF_STMT(BPF_ALU|BPF_K|BPF_ADD, %#x)", i << 16); + break; + case BPF_JMP: + tprintf("BPF_STMT(BPF_JMP|BPF_K|BPF_JA, %#x)", i << 16); + break; + case BPF_RET: + tprintf("BPF_STMT(BPF_RET|BPF_K, %#x" + " /* SECCOMP_RET_??? */)", i << 16); + break; + case BPF_MISC: + tprintf("BPF_STMT(BPF_MISC|BPF_TAX, %#x)", i << 16); + break; + } + } + tprintf(", ...]})"); + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + tprintf(" = -1 EINVAL (%m)\n"); + + prog->filter = filter; + prog->len = ARRAY_SIZE(filter_c); + + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u, filter=[", + prog->len); + + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + tprintf("%s]}) = 0\n+++ exited with 0 +++\n", kill_stmt_txt); + + if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog)) + perror_msg_and_skip("SECCOMP_SET_MODE_FILTER"); + + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && PR_SET_NO_NEW_PRIVS" + " && SECCOMP_SET_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests/seccomp-filter-v.test strace-4.12/tests/seccomp-filter-v.test --- strace-4.11/tests/seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-filter-v.test 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=seccomp diff -Nru strace-4.11/tests/seccomp-strict.c strace-4.12/tests/seccomp-strict.c --- strace-4.11/tests/seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-strict.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_seccomp && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + long rc; + + rc = syscall(__NR_seccomp, -1L, -1L, addr); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#lx)" + " = %ld %s (%m)\n", -1, -1, addr, rc, errno2name()); + fflush(stdout); + + rc = syscall(__NR_seccomp, 0, 0, 0); + if (rc) { + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL)" + " = %ld %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && __NR_exit") + +#endif diff -Nru strace-4.11/tests/seccomp-strict.test strace-4.12/tests/seccomp-strict.test --- strace-4.11/tests/seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eseccomp "$@" > "$EXP" +match_diff "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests/seccomp.test strace-4.12/tests/seccomp.test --- strace-4.11/tests/seccomp.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/seccomp.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh - -# Check how SECCOMP_MODE_FILTER is decoded. - -. "${srcdir=.}/init.sh" - -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -veprctl $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 diff -Nru strace-4.11/tests/select.c strace-4.12/tests/select.c --- strace-4.11/tests/select.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests/select.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #if defined __NR_select && !defined __NR__newselect -# define TEST_SYSCALL_NAME select -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR_select +# define TEST_SYSCALL_STR "select" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && !__NR__newselect") + +#endif diff -Nru strace-4.11/tests/select.test strace-4.12/tests/select.test --- strace-4.11/tests/select.test 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests/select.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check select syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -syscall=${ME_%.test} -OUT="$LOG.out" -run_strace -a36 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests/semop.c strace-4.12/tests/semop.c --- strace-4.11/tests/semop.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/semop.c 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,54 @@ +#include "tests.h" +#include +#include +#include +#include +#include +#include + +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + id = -1; +} + +int +main(void) +{ + id = semget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + atexit(cleanup); + + union semun sem_union = { .val = 0 }; + if (semctl(id, 0, SETVAL, sem_union) == -1) + perror_msg_and_skip("semctl"); + + struct sembuf *const sem_b = tail_alloc(sizeof(*sem_b)); + sem_b->sem_num = 0; + sem_b->sem_op = 1; + sem_b->sem_flg = SEM_UNDO; + + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, 1"); + printf("semop(%d, [{0, 1, SEM_UNDO}], 1) = 0\n", id); + + sem_b->sem_op = -1; + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, -1"); + printf("semop(%d, [{0, -1, SEM_UNDO}], 1) = 0\n", id); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/semop.test strace-4.12/tests/semop.test --- strace-4.11/tests/semop.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/semop.test 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check semop syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests/sendfile64.c strace-4.12/tests/sendfile64.c --- strace-4.11/tests/sendfile64.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests/sendfile64.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,80 +25,72 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile64 +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile64, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile64, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile64"); + printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile64, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint64_t *p_off = tail_alloc(sizeof(uint64_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile64, 0, 1, p, page_len) == -1); + printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile64(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint64_t *p_off = p + page_len - sizeof(uint64_t); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) + == (long) alen); printf("sendfile64(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile64(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, @@ -106,17 +98,13 @@ (unsigned long) blen); *p_off = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); printf("sendfile64(%d, %d, [14627392582579060461], 1)" - " = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off = 0xfacefeed; - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; - printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", sv[1], reg_in); puts("+++ exited with 0 +++"); return 0; @@ -124,10 +112,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile64") #endif diff -Nru strace-4.11/tests/sendfile64.test strace-4.12/tests/sendfile64.test --- strace-4.11/tests/sendfile64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/sendfile64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile64 syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a29 diff -Nru strace-4.11/tests/sendfile.c strace-4.12/tests/sendfile.c --- strace-4.11/tests/sendfile.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests/sendfile.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,106 +25,97 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile"); + printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint32_t *p_off = tail_alloc(sizeof(uint32_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile, 0, 1, p, page_len) == -1); + printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint32_t *p_off = p + page_len - sizeof(uint32_t); + p = p_off; if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) != (long) alen) { - printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (Bad address)\n", + printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (%m)\n", sv[1], reg_in, (unsigned long) p_off, (unsigned long) alen); --p_off; - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) - != (long) alen) - return 77; + *p_off = 0; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) + == (long) alen); } printf("sendfile(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, (unsigned long) stb.st_size + 1, (unsigned long) blen); - if (p_off == p + page_len - sizeof(uint64_t)) { + if (p_off != p) { uint64_t *p_off64 = (uint64_t *) p_off; *p_off64 = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1)) - return 77; - printf("sendfile(%d, %d, [14627392582579060461], 1) = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); + printf("sendfile(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off64 = 0xdefaced; } else { *p_off = 0xdefaced; } - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, 1) == 0); printf("sendfile(%d, %d, [233811181], 1) = 0\n", sv[1], reg_in); @@ -134,10 +125,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile") #endif diff -Nru strace-4.11/tests/sendfile.test strace-4.12/tests/sendfile.test --- strace-4.11/tests/sendfile.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/sendfile.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a27 diff -Nru strace-4.11/tests/setdomainname.c strace-4.12/tests/setdomainname.c --- strace-4.11/tests/setdomainname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setdomainname.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_setdomainname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_setdomainname, 0, 63); + printf("setdomainname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setdomainname") + +#endif diff -Nru strace-4.11/tests/setdomainname.test strace-4.12/tests/setdomainname.test --- strace-4.11/tests/setdomainname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setdomainname.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setdomainname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests/setfsgid32.c strace-4.12/tests/setfsgid32.c --- strace-4.11/tests/setfsgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid32 + +# define SYSCALL_NR __NR_setfsgid32 +# define SYSCALL_NAME "setfsgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid32") + +#endif diff -Nru strace-4.11/tests/setfsgid32.test strace-4.12/tests/setfsgid32.test --- strace-4.11/tests/setfsgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests/setfsgid.c strace-4.12/tests/setfsgid.c --- strace-4.11/tests/setfsgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid + +# define SYSCALL_NR __NR_setfsgid +# define SYSCALL_NAME "setfsgid" + +# if defined __NR_setfsgid32 && __NR_setfsgid != __NR_setfsgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid") + +#endif diff -Nru strace-4.11/tests/setfsgid.test strace-4.12/tests/setfsgid.test --- strace-4.11/tests/setfsgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests/setfsugid.c strace-4.12/tests/setfsugid.c --- strace-4.11/tests/setfsugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsugid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Check decoding of setfsuid/setfsgid/setfsuid32/setfsgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int +main(void) +{ + unsigned int ugid = GETUGID; + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L, + 0xc0deffffU, + 0xfacefeedU, + (long) 0xfacefeeddeadbeefULL + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + unsigned int rc; + + rc = syscall(SYSCALL_NR, tests[i]); + printf("%s(%u) = %u\n", SYSCALL_NAME, num, rc); + + rc = syscall(SYSCALL_NR, ugid); + printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/setfsuid32.c strace-4.12/tests/setfsuid32.c --- strace-4.11/tests/setfsuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid32 + +# define SYSCALL_NR __NR_setfsuid32 +# define SYSCALL_NAME "setfsuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid32") + +#endif diff -Nru strace-4.11/tests/setfsuid32.test strace-4.12/tests/setfsuid32.test --- strace-4.11/tests/setfsuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests/setfsuid.c strace-4.12/tests/setfsuid.c --- strace-4.11/tests/setfsuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid + +# define SYSCALL_NR __NR_setfsuid +# define SYSCALL_NAME "setfsuid" + +# if defined __NR_setfsuid32 && __NR_setfsuid != __NR_setfsuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid") + +#endif diff -Nru strace-4.11/tests/setfsuid.test strace-4.12/tests/setfsuid.test --- strace-4.11/tests/setfsuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setfsuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests/setgid32.c strace-4.12/tests/setgid32.c --- strace-4.11/tests/setgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid32 + +# define SYSCALL_NR __NR_setgid32 +# define SYSCALL_NAME "setgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid32") + +#endif diff -Nru strace-4.11/tests/setgid32.test strace-4.12/tests/setgid32.test --- strace-4.11/tests/setgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests/setgid.c strace-4.12/tests/setgid.c --- strace-4.11/tests/setgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid + +# define SYSCALL_NR __NR_setgid +# define SYSCALL_NAME "setgid" + +# if defined __NR_setgid32 && __NR_setgid != __NR_setgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid") + +#endif diff -Nru strace-4.11/tests/setgid.test strace-4.12/tests/setgid.test --- strace-4.11/tests/setgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/setgroups32.c strace-4.12/tests/setgroups32.c --- strace-4.11/tests/setgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_setgroups32 + +# include "setgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups32") + +#endif diff -Nru strace-4.11/tests/setgroups32.test strace-4.12/tests/setgroups32.test --- strace-4.11/tests/setgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a19 diff -Nru strace-4.11/tests/setgroups.c strace-4.12/tests/setgroups.c --- strace-4.11/tests/setgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of setgroups/setgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_setgroups32 + +# define SYSCALL_NR __NR_setgroups32 +# define SYSCALL_NAME "setgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_setgroups + +# define SYSCALL_NR __NR_setgroups +# define SYSCALL_NAME "setgroups" +# if defined __NR_setgroups32 && __NR_setgroups != __NR_setgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +int +main(void) +{ + /* check how the first argument is decoded */ + if (syscall(SYSCALL_NR, 0, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + syscall(SYSCALL_NR, 1, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, (long) 0xffffffff00000001ULL, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + /* check how the second argument is decoded */ + const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * 2); + GID_TYPE *const g3 = tail_alloc(sizeof(*g3) * 3); + + if (syscall(SYSCALL_NR, 0, g1 + 1)) + printf("%s(0, []) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, []) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, 1, g1)) + printf("%s(1, [%u]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, errno2name()); + else + printf("%s(1, [%u]) = 0\n", + SYSCALL_NAME, (unsigned) *g1); + + syscall(SYSCALL_NR, 1, g1 + 1); + printf("%s(1, %p) = -1 %s (%m)\n", + SYSCALL_NAME, g1 + 1, errno2name()); + + syscall(SYSCALL_NR, 1, -1L); + printf("%s(1, %#lx) = -1 %s (%m)\n", SYSCALL_NAME, -1L, errno2name()); + + syscall(SYSCALL_NR, 2, g1); + printf("%s(2, [%u, %p]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, g1 + 1, errno2name()); + + g2[0] = -2; + g2[1] = -3; + if (syscall(SYSCALL_NR, 2, g2)) + printf("%s(2, [%u, %u]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], errno2name()); + else + printf("%s(2, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1]); + + syscall(SYSCALL_NR, 3, g2); + printf("%s(3, [%u, %u, %p]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], g2 + 2, errno2name()); + + g3[0] = 0; + g3[1] = 1; + if (syscall(SYSCALL_NR, 3, g3)) + printf("%s(3, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + else + printf("%s(3, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1]); + + syscall(SYSCALL_NR, 4, g3); + printf("%s(4, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + + long rc = sysconf(_SC_NGROUPS_MAX); + const unsigned ngroups_max = rc; + + if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { + syscall(SYSCALL_NR, ngroups_max, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + const unsigned long size = + (unsigned long) 0xffffffff00000000ULL | ngroups_max; + syscall(SYSCALL_NR, size, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + syscall(SYSCALL_NR, ngroups_max + 1, g3); + printf("%s(%u, %p) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max + 1, g3, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups") + +#endif diff -Nru strace-4.11/tests/setgroups.test strace-4.12/tests/setgroups.test --- strace-4.11/tests/setgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a17 diff -Nru strace-4.11/tests/sethostname.c strace-4.12/tests/sethostname.c --- strace-4.11/tests/sethostname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sethostname.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_sethostname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_sethostname, 0, 63); + printf("sethostname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sethostname") + +#endif diff -Nru strace-4.11/tests/sethostname.test strace-4.12/tests/sethostname.test --- strace-4.11/tests/sethostname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sethostname.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sethostname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests/set_mempolicy.c strace-4.12/tests/set_mempolicy.c --- strace-4.11/tests/set_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/set_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,152 @@ +/* + * Check decoding of set_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_set_mempolicy + +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(const unsigned long maxnode, unsigned int offset) +{ + unsigned int nlongs = NLONGS(maxnode); + if (nlongs <= offset) + nlongs = 0; + else + nlongs -= offset; + const unsigned int size = nlongs * sizeof(long); + unsigned long *const nodemask = + tail_alloc(size ? size : (offset ? 1 : 0)); + memset(nodemask, 0, size); + + long rc = syscall(__NR_set_mempolicy, 0, nodemask, maxnode); + int saved_errno = errno; + + fputs("set_mempolicy(MPOL_DEFAULT, ", stdout); + + if (nlongs) { + putc('[', stdout); + unsigned int i; + for (i = 0; i < nlongs + offset; ++i) { + if (i) + fputs(", ", stdout); + if (i < nlongs) { + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(long) * 2 + 2, + nodemask[i]); + } else { + printf("%p", nodemask + i); + break; + } + } + putc(']', stdout); + } else { + if (maxnode) + printf("%p", nodemask); + else + printf("[]"); + } + + printf(", %lu) = ", maxnode); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +static void +test_offset(const unsigned int offset) +{ + unsigned long maxnode = get_page_size() * 8; + + print_nodes(maxnode, offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + + maxnode = sizeof(long) * 8; + print_nodes(0, offset); + print_nodes(1, offset); + print_nodes(2, offset); + print_nodes(maxnode - 1, offset); + print_nodes(maxnode , offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + print_nodes(maxnode * 2 - 1, offset); + print_nodes(maxnode * 2 , offset); + print_nodes(maxnode * 2 + 1, offset); + print_nodes(maxnode * 2 + 2, offset); + print_nodes(maxnode * 3 - 1, offset); + print_nodes(maxnode * 3 , offset); + print_nodes(maxnode * 3 + 1, offset); + print_nodes(maxnode * 3 + 2, offset); + print_nodes(maxnode * 4 + 2, offset); +} + +int +main(void) +{ + if (syscall(__NR_set_mempolicy, 0, 0, 0)) + perror_msg_and_skip("set_mempolicy"); + puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); + + const unsigned long *nodemask = (void *) 0xfacefeedfffffffe; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); + printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %ld %s (%m)\n", + nodemask, maxnode, rc, errno2name()); + + test_offset(0); + test_offset(1); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_set_mempolicy") + +#endif diff -Nru strace-4.11/tests/set_mempolicy.test strace-4.12/tests/set_mempolicy.test --- strace-4.11/tests/set_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/set_mempolicy.test 2016-05-07 23:37:52.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check set_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a35 diff -Nru strace-4.11/tests/set_ptracer_any.c strace-4.12/tests/set_ptracer_any.c --- strace-4.11/tests/set_ptracer_any.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/set_ptracer_any.c 2016-01-05 23:17:11.000000000 +0000 @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include #ifdef HAVE_PRCTL diff -Nru strace-4.11/tests/setregid32.c strace-4.12/tests/setregid32.c --- strace-4.11/tests/setregid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setregid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid32 + +# define SYSCALL_NR __NR_setregid32 +# define SYSCALL_NAME "setregid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid32") + +#endif diff -Nru strace-4.11/tests/setregid32.test strace-4.12/tests/setregid32.test --- strace-4.11/tests/setregid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setregid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests/setregid.c strace-4.12/tests/setregid.c --- strace-4.11/tests/setregid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setregid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid + +# define SYSCALL_NR __NR_setregid +# define SYSCALL_NAME "setregid" + +# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid") + +#endif diff -Nru strace-4.11/tests/setregid.test strace-4.12/tests/setregid.test --- strace-4.11/tests/setregid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setregid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests/setresgid32.c strace-4.12/tests/setresgid32.c --- strace-4.11/tests/setresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid32 + +# define SYSCALL_NR __NR_setresgid32 +# define SYSCALL_NAME "setresgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid32") + +#endif diff -Nru strace-4.11/tests/setresgid32.test strace-4.12/tests/setresgid32.test --- strace-4.11/tests/setresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/setresgid.c strace-4.12/tests/setresgid.c --- strace-4.11/tests/setresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid + +# define SYSCALL_NR __NR_setresgid +# define SYSCALL_NAME "setresgid" + +# if defined __NR_setresgid32 && __NR_setresgid != __NR_setresgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid") + +#endif diff -Nru strace-4.11/tests/setresgid.test strace-4.12/tests/setresgid.test --- strace-4.11/tests/setresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests/setresugid.c strace-4.12/tests/setresugid.c --- strace-4.11/tests/setresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Check decoding of setresuid/setresgid/setresuid32/setresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define TRIPLE(val) \ + { val, ugid, ugid }, { ugid, val, ugid }, { ugid, ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e, s; + } tests[] = { + { ugid, ugid, ugid }, + TRIPLE((unsigned long) 0xffffffff00000000ULL | ugid), + TRIPLE(-1U), + TRIPLE(-1L), + TRIPLE(0xffff0000U | ugid), + TRIPLE(0xffff), + TRIPLE(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + const unsigned int sn = ugid2int(tests[i].s); + + if (!num_matches_id(rn, ugid) || + !num_matches_id(en, ugid) || + !num_matches_id(sn, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e, tests[i].s)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx, %#lx)", + SYSCALL_NAME, + tests[i].r, tests[i].e, tests[i].s); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(", "); + print_int(sn); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/setresuid32.c strace-4.12/tests/setresuid32.c --- strace-4.11/tests/setresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid32 + +# define SYSCALL_NR __NR_setresuid32 +# define SYSCALL_NAME "setresuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid32") + +#endif diff -Nru strace-4.11/tests/setresuid32.test strace-4.12/tests/setresuid32.test --- strace-4.11/tests/setresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/setresuid.c strace-4.12/tests/setresuid.c --- strace-4.11/tests/setresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid + +# define SYSCALL_NR __NR_setresuid +# define SYSCALL_NAME "setresuid" + +# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid") + +#endif diff -Nru strace-4.11/tests/setresuid.test strace-4.12/tests/setresuid.test --- strace-4.11/tests/setresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setresuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests/setreugid.c strace-4.12/tests/setreugid.c --- strace-4.11/tests/setreugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setreugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Check decoding of setreuid/setregid/setreuid32/setregid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define PAIR(val) { val, ugid }, { ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e; + } tests[] = { + { ugid, ugid }, + PAIR((unsigned long) 0xffffffff00000000ULL | ugid), + PAIR(-1U), + PAIR(-1L), + PAIR(0xffff0000U | ugid), + PAIR(0xffff), + PAIR(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + + if (!num_matches_id(rn, ugid) || !num_matches_id(en, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx)", SYSCALL_NAME, + tests[i].r, tests[i].e); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/setreuid32.c strace-4.12/tests/setreuid32.c --- strace-4.11/tests/setreuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setreuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid32 + +# define SYSCALL_NR __NR_setreuid32 +# define SYSCALL_NAME "setreuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid32") + +#endif diff -Nru strace-4.11/tests/setreuid32.test strace-4.12/tests/setreuid32.test --- strace-4.11/tests/setreuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setreuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests/setreuid.c strace-4.12/tests/setreuid.c --- strace-4.11/tests/setreuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setreuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid + +# define SYSCALL_NR __NR_setreuid +# define SYSCALL_NAME "setreuid" + +# if defined __NR_setreuid32 && __NR_setreuid != __NR_setreuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid") + +#endif diff -Nru strace-4.11/tests/setreuid.test strace-4.12/tests/setreuid.test --- strace-4.11/tests/setreuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setreuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests/setugid.c strace-4.12/tests/setugid.c --- strace-4.11/tests/setugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setugid.c 2016-04-21 22:05:56.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Check decoding of setuid/setgid/setuid32/setgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = ugid2int(tests[i]); + long expected; + + if (num == ugid) + expected = 0; + else if (num == -1U) + expected = -1; + else + continue; + + const long rc = syscall(SYSCALL_NR, tests[i]); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(%u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid); + break; + } + perror_msg_and_fail("%s(%#lx) != %ld", + SYSCALL_NAME, tests[i], expected); + } + + printf("%s(", SYSCALL_NAME); + if (num == -1U) + printf("-1"); + else + printf("%u", num); + errno = saved_errno; + if (expected) + printf(") = -1 %s (%m)\n", errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/setuid32.c strace-4.12/tests/setuid32.c --- strace-4.11/tests/setuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid32 + +# define SYSCALL_NR __NR_setuid32 +# define SYSCALL_NAME "setuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid32") + +#endif diff -Nru strace-4.11/tests/setuid32.test strace-4.12/tests/setuid32.test --- strace-4.11/tests/setuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests/setuid.c strace-4.12/tests/setuid.c --- strace-4.11/tests/setuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid + +# define SYSCALL_NR __NR_setuid +# define SYSCALL_NAME "setuid" + +# if defined __NR_setuid32 && __NR_setuid != __NR_setuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid") + +#endif diff -Nru strace-4.11/tests/setuid.test strace-4.12/tests/setuid.test --- strace-4.11/tests/setuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/setuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/shmxt.c strace-4.12/tests/shmxt.c --- strace-4.11/tests/shmxt.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/shmxt.c 2016-04-25 01:54:05.000000000 +0000 @@ -0,0 +1,53 @@ +#include "tests.h" +#include +#include +#include + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + id = -1; +} + +#ifdef __alpha__ +# define SHMAT "osf_shmat" +#else +# define SHMAT "shmat" +#endif + +int +main(void) +{ + id = shmget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + atexit(cleanup); + + shmat(id, NULL, SHM_REMAP); + printf("%s(%d, NULL, SHM_REMAP) = -1 %s (%m)\n", + SHMAT, id, errno2name()); + + void *shmaddr = shmat(id, NULL, SHM_RDONLY); + if (shmaddr == (void *)(-1)) + perror_msg_and_skip("shmat SHM_RDONLY"); + printf("%s(%d, NULL, SHM_RDONLY) = %p\n", SHMAT, id, shmaddr); + + if (shmdt(shmaddr)) + perror_msg_and_skip("shmdt"); + printf("shmdt(%p) = 0\n", shmaddr); + + ++shmaddr; + void *shmaddr2 = shmat(id, shmaddr, SHM_RND); + if (shmaddr2 == (void *)(-1)) + printf("%s(%d, %p, SHM_RND) = -1 %s (%m)\n", + SHMAT, id, shmaddr, errno2name()); + else + printf("%s(%d, %p, SHM_RND) = %p\n", + SHMAT, id, shmaddr, shmaddr2); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/shmxt.test strace-4.12/tests/shmxt.test --- strace-4.11/tests/shmxt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/shmxt.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check shmat and shmdt syscalls decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) shmat=osf_shmat ;; + *) shmat=shmat ;; +esac + +run_strace_match_diff -e trace=$shmat,shmdt -a11 diff -Nru strace-4.11/tests/sigaltstack.c strace-4.12/tests/sigaltstack.c --- strace-4.11/tests/sigaltstack.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/tests/sigaltstack.c 2016-01-05 23:37:01.000000000 +0000 @@ -1,3 +1,4 @@ +#include "tests.h" #include int @@ -8,5 +9,7 @@ .ss_flags = SS_DISABLE, .ss_size = 0xdeadbeef }; - return sigaltstack(&ss, (stack_t *) 0) ? 77 : 0; + if (sigaltstack(&ss, (stack_t *) 0)) + perror_msg_and_skip("sigaltstack"); + return 0; } diff -Nru strace-4.11/tests/signalfd.c strace-4.12/tests/signalfd.c --- strace-4.11/tests/signalfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/signalfd.c 2016-01-06 11:35:23.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,30 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include -#include -#ifdef HAVE_SYS_SIGNALFD_H + +#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC + +# include +# include # include -#endif int main(void) { -#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); (void) close(0); - return signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("signalfd"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_SYS_SIGNALFD_H && HAVE_SIGNALFD && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests/sigreturn.c strace-4.12/tests/sigreturn.c --- strace-4.11/tests/sigreturn.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/sigreturn.c 2016-01-10 22:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include @@ -47,9 +45,9 @@ sigemptyset(&set); sigaddset(&set, SIGUSR2); sigaddset(&set, SIGCHLD); - sigaddset(&set, RT_0 + 2); sigaddset(&set, RT_0 + 3); sigaddset(&set, RT_0 + 4); + sigaddset(&set, RT_0 + 5); sigaddset(&set, RT_0 + 26); sigaddset(&set, RT_0 + 27); sigprocmask(SIG_SETMASK, &set, NULL); diff -Nru strace-4.11/tests/sigreturn.test strace-4.12/tests/sigreturn.test --- strace-4.11/tests/sigreturn.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/sigreturn.test 2016-01-10 22:48:51.000000000 +0000 @@ -2,7 +2,7 @@ # # Check rt_sigprocmask and sigreturn/rt_sigreturn decoding. # -# Copyright (c) 2015 Dmitry V. Levin +# Copyright (c) 2015-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ run_prog run_strace -esignal $args -mask='\[(USR2 CHLD|CHLD USR2) RT_2 RT_3 RT_4 RT_26 RT_27\]' +mask='\[(USR2 CHLD|CHLD USR2) RT_3 RT_4 RT_5 RT_26 RT_27\]' rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0' osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)' EXPECTED="$LOG.expected" diff -Nru strace-4.11/tests/sleep.c strace-4.12/tests/sleep.c --- strace-4.11/tests/sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sleep.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * A simple nanosleep based sleep(1) replacement. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + struct timespec ts = { atoi(av[1]), 0 }; + + if (nanosleep(&ts, NULL)) + perror_msg_and_fail("nanosleep"); + + return 0; +} diff -Nru strace-4.11/tests/splice.c strace-4.12/tests/splice.c --- strace-4.11/tests/splice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/splice.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of splice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_splice + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_splice") + +#endif diff -Nru strace-4.11/tests/splice.test strace-4.12/tests/splice.test --- strace-4.11/tests/splice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/splice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check splice syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/stat64.c strace-4.12/tests/stat64.c --- strace-4.11/tests/stat64.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests/stat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat64 -# define TEST_SYSCALL_NAME stat64 + +# define TEST_SYSCALL_NR __NR_stat64 +# define TEST_SYSCALL_STR "stat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat64") + +#endif diff -Nru strace-4.11/tests/stat.c strace-4.12/tests/stat.c --- strace-4.11/tests/stat.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests/stat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat -# define TEST_SYSCALL_NAME stat + +# define TEST_SYSCALL_NR __NR_stat +# define TEST_SYSCALL_STR "stat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat") + +#endif diff -Nru strace-4.11/tests/statfs64.c strace-4.12/tests/statfs64.c --- strace-4.11/tests/statfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/statfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs64 + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs64 +# define SYSCALL_NAME "statfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs64") + +#endif diff -Nru strace-4.11/tests/statfs64.test strace-4.12/tests/statfs64.test --- strace-4.11/tests/statfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/statfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check statfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests/statfs.c strace-4.12/tests/statfs.c --- strace-4.11/tests/statfs.c 2014-09-22 00:31:06.000000000 +0000 +++ strace-4.12/tests/statfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -1,13 +1,43 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs +# define SYSCALL_NAME "statfs" +# include "xstatfs.c" -int -main(void) -{ - struct statfs stb; - assert(statfs("/proc/self/status", &stb) == 0); - return 0; -} +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs") + +#endif diff -Nru strace-4.11/tests/statfs.expected strace-4.12/tests/statfs.expected --- strace-4.11/tests/statfs.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests/statfs.expected 2016-04-25 10:30:03.000000000 +0000 @@ -1 +1 @@ -statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type="PROC_SUPER_MAGIC", f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=[0-9]+)?\}\) += 0 +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff -Nru strace-4.11/tests/statfs.test strace-4.12/tests/statfs.test --- strace-4.11/tests/statfs.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests/statfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -1,15 +1,11 @@ #!/bin/sh -# Check how statfs/statfs64 syscalls are traced. +# Check statfs syscall decoding. . "${srcdir=.}/init.sh" # this test probes /proc/self/status [ -f /proc/self/status ] || - framework_skip_ '/proc/self/status is not available' + framework_skip_ '/proc/self/status is not available' -run_prog -run_strace -efile $args -match_grep - -exit 0 +run_strace_match_diff -a17 diff -Nru strace-4.11/tests/statx.sh strace-4.12/tests/statx.sh --- strace-4.11/tests/statx.sh 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests/statx.sh 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check decoding of stat family syscalls. . "${srcdir=.}/init.sh" - -syscall=${ME_%.test} -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ve$syscall -P$syscall.sample $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -v -P $NAME.sample diff -Nru strace-4.11/tests/strace-ff.expected strace-4.12/tests/strace-ff.expected --- strace-4.11/tests/strace-ff.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-ff.expected 2016-05-09 23:21:30.000000000 +0000 @@ -0,0 +1,2 @@ +exit_group(0) = ? ++++ exited with 0 +++ diff -Nru strace-4.11/tests/strace-ff.test strace-4.12/tests/strace-ff.test --- strace-4.11/tests/strace-ff.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-ff.test 2016-05-10 09:51:04.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -ff option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +./set_ptracer_any ./sleep 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +rm -f "$LOG".* +run_strace -a14 -eexit_group -ff -p $tracee_pid + +# check that output matches +match_diff "$LOG.$tracee_pid" + +# check that no other output files have been created +set -- "$LOG".* +[ "$LOG.$tracee_pid" = "$*" ] || + fail_ "too many output files: $*" + +rm -f "$OUT" "$LOG.$tracee_pid" diff -Nru strace-4.11/tests/strace-k.test strace-4.12/tests/strace-k.test --- strace-4.11/tests/strace-k.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/strace-k.test 2016-01-01 23:09:02.000000000 +0000 @@ -3,7 +3,7 @@ # Ensure that strace -k works. # # Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,9 +30,6 @@ . "${srcdir=.}/init.sh" -$STRACE -h | grep '^[[:space:]]*-k[[:space:]]' > /dev/null || - skip_ 'strace -k is not available' - # strace -k is implemented using /proc/$pid/maps [ -f /proc/self/maps ] || framework_skip_ '/proc/self/maps is not available' diff -Nru strace-4.11/tests/strace-r.expected strace-4.12/tests/strace-r.expected --- strace-4.11/tests/strace-r.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-r.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1,2 @@ +[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 +[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ diff -Nru strace-4.11/tests/strace-r.test strace-4.12/tests/strace-r.test --- strace-4.11/tests/strace-r.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-r.test 2016-03-24 01:27:03.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -r option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -r -eexecve ./sleep 1 +match_grep diff -Nru strace-4.11/tests/strace-S.test strace-4.12/tests/strace-S.test --- strace-4.11/tests/strace-S.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-S.test 2016-05-10 00:39:17.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -S option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date > /dev/null + +test_c() +{ + local sortby sortopts sedexpr + sortby="$1"; shift + sortopts="$1"; shift + sedexpr="$1"; shift + + run_strace -c -S "$sortby" date > /dev/null + sed -ne "$sedexpr" < "$LOG" > "$OUT" + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" + LC_ALL=C sort -c $sortopts "$OUT" || + fail_ "$STRACE $args output not sorted properly" +} + +c='[[:space:]]\+\([^[:space:]]\+\)' +test_c calls '-n -r' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'[[:space:]].*/\4/p' +test_c name '' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'\([[:space:]]\+[0-9]\+\)\?'"$c"'$/\6/p' + +rm -f "$OUT" diff -Nru strace-4.11/tests/strace-T.expected strace-4.12/tests/strace-T.expected --- strace-4.11/tests/strace-T.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-T.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1 @@ +nanosleep\(\{1, 0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff -Nru strace-4.11/tests/strace-t.test strace-4.12/tests/strace-t.test --- strace-4.11/tests/strace-t.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-t.test 2016-03-24 00:59:32.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -t option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -t -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests/strace-T.test strace-4.12/tests/strace-T.test --- strace-4.11/tests/strace-T.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-T.test 2016-03-24 00:31:23.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -T option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -T -enanosleep ./sleep 1 +match_grep diff -Nru strace-4.11/tests/strace-tt.test strace-4.12/tests/strace-tt.test --- strace-4.11/tests/strace-tt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-tt.test 2016-03-24 01:03:31.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -tt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -tt -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests/strace-ttt.test strace-4.12/tests/strace-ttt.test --- strace-4.11/tests/strace-ttt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-ttt.test 2016-03-24 01:10:02.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -ttt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > /dev/null +run_prog ./sleep 0 + +t0="$(date +%s)" +run_strace -ttt -eexecve $args +t1="$(date +%s)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests/strace-V.test strace-4.12/tests/strace-V.test --- strace-4.11/tests/strace-V.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/strace-V.test 2016-05-09 23:19:37.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check -V option. + +. "${srcdir=.}/init.sh" + +run_strace -V > "$LOG" + +getval() +{ + sed -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h +} + +printf "%s -- version %s\n" "$(getval PACKAGE_NAME)" "$(getval VERSION)" > "$EXP" + +match_diff "$EXP" "$LOG" +rm -f "$EXP" diff -Nru strace-4.11/tests/struct_flock.c strace-4.12/tests/struct_flock.c --- strace-4.11/tests/struct_flock.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests/struct_flock.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -35,25 +34,31 @@ #define FILE_LEN 4096 #define EINVAL_STR "-1 EINVAL (Invalid argument)" -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg - -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define TEST_FLOCK_EINVAL(cmd) test_flock_einval(cmd, #cmd) +#ifdef HAVE_TYPEOF +# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len) +#else +# define TYPEOF_FLOCK_OFF_T off_t +#endif + +static long +invoke_test_syscall(const unsigned int cmd, void *const p) +{ + const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd; + + return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); +} + static void test_flock_einval(const int cmd, const char *name) { struct_kernel_flock fl = { .l_type = F_RDLCK, - .l_start = (off_t) 0xdefaced1facefeed, - .l_len = (off_t) 0xdefaced2cafef00d + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -69,29 +74,34 @@ .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + long rc = invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK, &fl); + invoke_test_syscall(F_GETLK, &fl); printf("%s(0, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); } -static int +static void create_sample(void) { char fname[] = TEST_SYSCALL_STR "_XXXXXX"; (void) close(0); - return mkstemp(fname) || unlink(fname) || ftruncate(0, FILE_LEN) ? 77 : 0; + if (mkstemp(fname)) + perror_msg_and_fail("mkstemp: %s", fname); + if (unlink(fname)) + perror_msg_and_fail("unlink: %s", fname); + if (ftruncate(0, FILE_LEN)) + perror_msg_and_fail("ftruncate"); } diff -Nru strace-4.11/tests/swap.c strace-4.12/tests/swap.c --- strace-4.11/tests/swap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/swap.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,51 @@ +#include "tests.h" +#include + +#if defined __NR_swapon && defined __NR_swapoff + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "swap.sample"; + long rc; + + rc = syscall(__NR_swapon, sample, 0); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, -1L); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, + "SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE" + "|SWAP_FLAG_DISCARD_PAGES|0xfff80000|32767", + rc, errno2name()); + + rc = syscall(__NR_swapoff, sample); + printf("swapoff(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_swapon && __NR_swapoff") + +#endif diff -Nru strace-4.11/tests/swap.test strace-4.12/tests/swap.test --- strace-4.11/tests/swap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/swap.test 2016-04-06 06:18:50.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check swapon and swapoff syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=swapon,swapoff diff -Nru strace-4.11/tests/symlinkat.c strace-4.12/tests/symlinkat.c --- strace-4.11/tests/symlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/symlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include + +#ifdef __NR_symlinkat + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + static const char oldpath[] = "symlink_old"; + static const char newpath[] = "symlink_new"; + + long rc = syscall(__NR_symlinkat, oldpath, fd, newpath); + printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n", + oldpath, (int) fd, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlinkat") + +#endif diff -Nru strace-4.11/tests/symlinkat.test strace-4.12/tests/symlinkat.test --- strace-4.11/tests/symlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/symlinkat.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/symlink.c strace-4.12/tests/symlink.c --- strace-4.11/tests/symlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/symlink.c 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_symlink + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "symlink_new"; + static const char sample_2[] = "symlink"; + + long rc = syscall(__NR_symlink, sample_1, sample_2); + printf("symlink(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlink") + +#endif diff -Nru strace-4.11/tests/symlink.test strace-4.12/tests/symlink.test --- strace-4.11/tests/symlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/symlink.test 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 diff -Nru strace-4.11/tests/sync.c strace-4.12/tests/sync.c --- strace-4.11/tests/sync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync.c 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sync + +# include +# include + +int +main(void) +{ + printf("sync() = %ld\n", syscall(__NR_sync)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sync") + +#endif diff -Nru strace-4.11/tests/sync_file_range2.c strace-4.12/tests/sync_file_range2.c --- strace-4.11/tests/sync_file_range2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync_file_range2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range2 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range2 + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8, %lld, %lld) = %d %s (%m)\n", + "sync_file_range2", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range2") + +#endif diff -Nru strace-4.11/tests/sync_file_range2.test strace-4.12/tests/sync_file_range2.test --- strace-4.11/tests/sync_file_range2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync_file_range2.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/sync_file_range.c strace-4.12/tests/sync_file_range.c --- strace-4.11/tests/sync_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, %lld, %lld, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8) = %d %s (%m)\n", + "sync_file_range", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range") + +#endif diff -Nru strace-4.11/tests/sync_file_range.test strace-4.12/tests/sync_file_range.test --- strace-4.11/tests/sync_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync_file_range.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/sync.test strace-4.12/tests/sync.test --- strace-4.11/tests/sync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/sync.test 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a7 diff -Nru strace-4.11/tests/sysinfo.c strace-4.12/tests/sysinfo.c --- strace-4.11/tests/sysinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/sysinfo.c 2016-02-08 18:17:28.000000000 +0000 @@ -1,5 +1,8 @@ /* + * This file is part of sysinfo strace test. + * * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +28,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include int -main (void) +main(void) { - struct sysinfo si; - if (sysinfo(&si) == -1) - return 77; + sysinfo(NULL); + printf("sysinfo(NULL) = -1 EFAULT (%m)\n"); + + struct sysinfo * const si = tail_alloc(sizeof(*si)); + + if (sysinfo(si)) + perror_msg_and_skip("sysinfo"); printf("sysinfo({uptime=%llu" ", loads=[%llu, %llu, %llu]" ", totalram=%llu" @@ -46,22 +54,23 @@ ", totalhigh=%llu" ", freehigh=%llu" ", mem_unit=%u" - "}) = 0\n", - (unsigned long long) si.uptime - , (unsigned long long) si.loads[0] - , (unsigned long long) si.loads[1] - , (unsigned long long) si.loads[2] - , (unsigned long long) si.totalram - , (unsigned long long) si.freeram - , (unsigned long long) si.sharedram - , (unsigned long long) si.bufferram - , (unsigned long long) si.totalswap - , (unsigned long long) si.freeswap - , (unsigned) si.procs - , (unsigned long long) si.totalhigh - , (unsigned long long) si.freehigh - , si.mem_unit + "}) = 0\n" + , (unsigned long long) si->uptime + , (unsigned long long) si->loads[0] + , (unsigned long long) si->loads[1] + , (unsigned long long) si->loads[2] + , (unsigned long long) si->totalram + , (unsigned long long) si->freeram + , (unsigned long long) si->sharedram + , (unsigned long long) si->bufferram + , (unsigned long long) si->totalswap + , (unsigned long long) si->freeswap + , (unsigned) si->procs + , (unsigned long long) si->totalhigh + , (unsigned long long) si->freehigh + , si->mem_unit ); + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests/sysinfo.test strace-4.12/tests/sysinfo.test --- strace-4.11/tests/sysinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/sysinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of sysinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -esysinfo $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 diff -Nru strace-4.11/tests/syslog.c strace-4.12/tests/syslog.c --- strace-4.11/tests/syslog.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/syslog.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_syslog + +# include +# include + +# define SYSLOG_ACTION_READ 2 + +int +main(void) +{ + const long addr = (long) 0xfacefeeddeadbeef; + int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); + printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", + addr, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_syslog") + +#endif diff -Nru strace-4.11/tests/syslog.test strace-4.12/tests/syslog.test --- strace-4.11/tests/syslog.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/syslog.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check syslog syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests/tail_alloc.c strace-4.12/tests/tail_alloc.c --- strace-4.11/tests/tail_alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/tail_alloc.c 2016-05-22 22:21:48.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +void * +tail_alloc(const size_t size) +{ + const size_t page_size = get_page_size(); + const size_t len = (size + page_size - 1) & -page_size; + const size_t alloc_size = len + 6 * page_size; + + void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap(%zu)", alloc_size); + + void *start_work = p + 3 * page_size; + void *tail_guard = start_work + len; + + if (munmap(p, page_size) || + munmap(p + 2 * page_size, page_size) || + munmap(tail_guard, page_size) || + munmap(tail_guard + 2 * page_size, page_size)) + perror_msg_and_fail("munmap"); + + memset(start_work, 0xff, len); + return tail_guard - size; +} + +void * +tail_memdup(const void *p, const size_t size) +{ + void *dest = tail_alloc(size); + memcpy(dest, p, size); + return dest; +} diff -Nru strace-4.11/tests/tee.c strace-4.12/tests/tee.c --- strace-4.11/tests/tee.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/tee.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of tee strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_tee + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_tee, fd_in, fd_out, len, flags); + printf("tee(%d, %d, %zu, %s) = %ld %s (%m)\n", + (int) fd_in, (int) fd_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_tee") + +#endif diff -Nru strace-4.11/tests/tee.test strace-4.12/tests/tee.test --- strace-4.11/tests/tee.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/tee.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check tee syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests/tests.h strace-4.12/tests/tests.h --- strace-4.11/tests/tests.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/tests.h 2016-05-22 22:54:23.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TESTS_H_ +# define TESTS_H_ + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# include +# include "gcc_compat.h" + +/* Cached sysconf(_SC_PAGESIZE). */ +size_t get_page_size(void); + +/* Print message and strerror(errno) to stderr, then exit(1). */ +void perror_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(1). */ +void error_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(77). */ +void error_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message and strerror(errno) to stderr, then exit(77). */ +void perror_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; + +/* + * Allocate memory that ends on the page boundary. + * Pages allocated by this call are preceeded by an unmapped page + * and followed also by an unmapped page. + */ +void *tail_alloc(const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); +/* Allocate memory using tail_alloc, then memcpy. */ +void *tail_memdup(const void *, const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); + +/* Close stdin, move stdout to a non-standard descriptor, and print. */ +void tprintf(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)); + +/* Make a hexdump copy of C string */ +const char *hexdump_strdup(const char *); + +/* Make a hexdump copy of memory */ +const char *hexdump_memdup(const char *, size_t); + +/* Make a hexquoted copy of a string */ +const char *hexquote_strndup(const char *, size_t); + +/* Return inode number of socket descriptor. */ +unsigned long inode_of_sockfd(int); + +/* Print string in a quoted form. */ +void print_quoted_string(const char *); + +/* Print memory in a quoted form. */ +void print_quoted_memory(const char *, size_t); + +/* Check whether given uid matches kernel overflowuid. */ +void check_overflowuid(const int); + +/* Check whether given gid matches kernel overflowgid. */ +void check_overflowgid(const int); + +/* Translate errno to its name. */ +const char *errno2name(void); + +struct xlat; + +/* Print flags in symbolic form according to xlat table. */ +int printflags(const struct xlat *, const unsigned long long, const char *); + +/* Print constant in symbolic form according to xlat table. */ +int printxval(const struct xlat *, const unsigned long long, const char *); + +# define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) +# define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) + +# define SKIP_MAIN_UNDEFINED(arg) \ + int main(void) { error_msg_and_skip("undefined: %s", arg); } + +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +# if SIZEOF_LONG == 4 +# define PRI__64 "ll" +# elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +# else +# define PRI__64 "ll" +# endif + +# define PRI__d64 PRI__64"d" +# define PRI__u64 PRI__64"u" +# define PRI__x64 PRI__64"x" + +#endif diff -Nru strace-4.11/tests/time.c strace-4.12/tests/time.c --- strace-4.11/tests/time.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/time.c 2016-02-08 18:27:17.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of time strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +27,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_time +# include +# include +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; + time_t *p = tail_alloc(sizeof(time_t)); - time_t *p_t = p + page_len - sizeof(time_t); - time_t t = syscall(__NR_time, p_t); + time_t t = syscall(__NR_time, NULL); + if ((time_t) -1 == t) + perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); - if ((time_t) -1 == t || t != *p_t) - return 77; - - printf("time([%jd]) = %jd\n", (intmax_t) t, (intmax_t) t); + t = syscall(__NR_time, p); + printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_time") #endif diff -Nru strace-4.11/tests/timer_create.c strace-4.12/tests/timer_create.c --- strace-4.11/tests/timer_create.c 2015-09-17 13:22:57.000000000 +0000 +++ strace-4.12/tests/timer_create.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_create strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,45 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_timer_create +# include +# include +# include +# include +# include "sigevent.h" + int main(void) { + syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + int tid[4] = {}; - struct sigevent sev = { - .sigev_notify = SIGEV_NONE, + struct_sigevent sev = { + .sigev_notify = 0xdefaced, .sigev_signo = 0xfacefeed, - .sigev_value.sival_ptr = - (void *) (unsigned long) 0xdeadbeefbadc0ded + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded }; + syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}" + ", NULL) = -1 %s (%m)\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, sev.sigev_notify, + errno2name()); + + sev.sigev_notify = SIGEV_NONE; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" - ", sigev_signo=%u, sigev_notify=SIGEV_NONE}" - ", [%d]) = 0\n", + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, sev.sigev_signo, tid[0]); @@ -60,55 +73,43 @@ sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGALRM; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, tid[1]); sev.sigev_notify = SIGEV_THREAD; - sev.sigev_notify_function = - (void *) (unsigned long) 0xdeadbeefbadc0ded; - sev.sigev_notify_attributes = - (void *) (unsigned long) 0xcafef00dfacefeed; + sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded; + sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" - ", sigev_notify_function=%p, sigev_notify_attributes=%p}" + ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_function, - sev.sigev_notify_attributes, + sev.sigev_un.sigev_thread.function, + sev.sigev_un.sigev_thread.attribute, tid[2]); -#ifndef sigev_notify_thread_id -# if defined HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD -# define sigev_notify_thread_id _sigev_un._pad[0] -# elif defined HAVE_STRUCT_SIGEVENT___PAD -# define sigev_notify_thread_id __pad[0] -# endif -#endif /* !sigev_notify_thread_id */ - -#ifdef sigev_notify_thread_id -# ifndef SIGEV_THREAD_ID -# define SIGEV_THREAD_ID 4 -# endif +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif sev.sigev_notify = SIGEV_THREAD_ID; - sev.sigev_notify_thread_id = getpid(); + sev.sigev_un.tid = getpid(); if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID" ", sigev_notify_thread_id=%d}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_thread_id, + sev.sigev_un.tid, tid[3]); -#endif /* sigev_notify_thread_id */ puts("+++ exited with 0 +++"); return 0; @@ -116,10 +117,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create") #endif diff -Nru strace-4.11/tests/timer_create.test strace-4.12/tests/timer_create.test --- strace-4.11/tests/timer_create.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/timer_create.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check timer_create syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e timer_create $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/timerfd_xettime.c strace-4.12/tests/timerfd_xettime.c --- strace-4.11/tests/timerfd_xettime.c 2015-09-17 23:23:41.000000000 +0000 +++ strace-4.12/tests/timerfd_xettime.c 2016-01-06 09:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #include #if defined __NR_timerfd_create \ @@ -41,12 +34,17 @@ && defined __NR_timerfd_settime \ && defined O_CLOEXEC +# include +# include +# include +# include + int main(void) { (void) close(0); if (syscall(__NR_timerfd_create, CLOCK_MONOTONIC, O_CLOEXEC | O_NONBLOCK)) - return 77; + perror_msg_and_skip("timerfd_create"); puts("timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 0"); struct { @@ -63,7 +61,7 @@ }; if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timerfd_settime"); printf("timerfd_settime(0, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -78,7 +76,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timerfd_gettime, 0, &old.its)) - return 77; + perror_msg_and_skip("timerfd_gettime"); printf("timerfd_gettime(0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -93,10 +91,7 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timerfd_create && __NR_timerfd_gettime" + " && __NR_timerfd_settime && O_CLOEXEC") #endif diff -Nru strace-4.11/tests/timerfd_xettime.test strace-4.12/tests/timerfd_xettime.test --- strace-4.11/tests/timerfd_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/timerfd_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timerfd_create,timerfd_settime,timerfd_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime diff -Nru strace-4.11/tests/timer_xettime.c strace-4.12/tests/timer_xettime.c --- strace-4.11/tests/timer_xettime.c 2015-09-17 23:22:43.000000000 +0000 +++ strace-4.12/tests/timer_xettime.c 2016-02-08 18:28:36.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_xettime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +27,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #if defined __NR_timer_create \ && defined __NR_timer_gettime \ && defined __NR_timer_settime +# include +# include +# include +# include +# include + int main(void) { + syscall(__NR_timer_settime, 0xdefaced, TIMER_ABSTIME, NULL, NULL); + printf("timer_settime(%d, TIMER_ABSTIME, NULL, NULL)" + " = -1 EINVAL (%m)\n", 0xdefaced); + int tid; struct sigevent sev = { .sigev_notify = SIGEV_NONE }; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid)) - return 77; + perror_msg_and_skip("timer_create"); printf("timer_create(CLOCK_MONOTONIC, {sigev_signo=0" ", sigev_notify=SIGEV_NONE}, [%d]) = 0\n", tid); @@ -65,7 +69,7 @@ }; if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timer_settime"); printf("timer_settime(%d, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -81,7 +85,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timer_gettime, tid, &old.its)) - return 77; + perror_msg_and_skip("timer_gettime"); printf("timer_gettime(%d" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -97,10 +101,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create && __NR_timer_gettime && __NR_timer_settime") #endif diff -Nru strace-4.11/tests/timer_xettime.test strace-4.12/tests/timer_xettime.test --- strace-4.11/tests/timer_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/timer_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check timer_settime and timer_gettime syscalls decoding. +# Check timer_create, timer_settime, and timer_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timer_create,timer_settime,timer_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime diff -Nru strace-4.11/tests/times.c strace-4.12/tests/times.c --- strace-4.11/tests/times.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/times.c 2016-01-12 05:06:10.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Eugene Syromyatnikov - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,10 +32,7 @@ * get some non-zero values returned by times(2). */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -55,13 +52,12 @@ main (void) { struct timespec ts; - volatile int dummy; + volatile int dummy = 0; int i; pid_t pid = fork(); - if (pid < 0) - return 77; + perror_msg_and_fail("fork"); const long cputime_limit = pid ? PARENT_CPUTIME_LIMIT_NSEC : CHILD_CPUTIME_LIMIT_NSEC; @@ -108,7 +104,7 @@ long res = syscall(__NR_times, &tbuf); if (-1L == res) - return 77; + perror_msg_and_skip("times"); else llres = (unsigned long) res; #elif defined __NR_times && defined __x86_64__ && defined __ILP32__ @@ -123,7 +119,7 @@ clock_t res = times(&tbuf); if ((clock_t) -1 == res) - return 77; + perror_msg_and_skip("times"); if (sizeof(res) < sizeof(unsigned long long)) llres = (unsigned long) res; else diff -Nru strace-4.11/tests/times-fail.c strace-4.12/tests/times-fail.c --- strace-4.11/tests/times-fail.c 2015-08-28 08:46:24.000000000 +0000 +++ strace-4.12/tests/times-fail.c 2016-01-04 23:43:09.000000000 +0000 @@ -1,7 +1,5 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -9,9 +7,8 @@ int main (void) { - if (syscall(__NR_times, 0x42) != -1) - return 77; - puts("times(0x42) = -1 EFAULT (Bad address)"); + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests/times-fail.test strace-4.12/tests/times-fail.test --- strace-4.11/tests/times-fail.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/times-fail.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of failing times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a12 -etimes $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a12 -e trace=times diff -Nru strace-4.11/tests/times.test strace-4.12/tests/times.test --- strace-4.11/tests/times.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/times.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etimes -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests/time.test strace-4.12/tests/time.test --- strace-4.11/tests/time.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/time.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check time syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a10 -etime $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/tprintf.c strace-4.12/tests/tprintf.c --- strace-4.11/tests/tprintf.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/tprintf.c 2016-01-20 15:17:28.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * Close stdin, move stdout to a non-standard descriptor, and print. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static ssize_t +write_retry(int fd, const void *buf, size_t count) +{ + ssize_t rc; + + do { + errno = 0; + rc = write(fd, buf, count); + } while (rc == -1 && EINTR == errno); + + if (rc <= 0) + perror_msg_and_fail("write"); + + return rc; +} + +static void +write_loop(int fd, const char *buf, size_t count) +{ + ssize_t offset = 0; + + while (count > 0) { + ssize_t block = write_retry(fd, &buf[offset], count); + + offset += block; + count -= (size_t) block; + } +} + +void +tprintf(const char *fmt, ...) +{ + static int initialized; + if (!initialized) { + assert(dup2(1, 3) == 3); + assert(close(1) == 0); + (void) close(0); + initialized = 1; + } + + va_list p; + va_start(p, fmt); + + static char buf[65536]; + int len = vsnprintf(buf, sizeof(buf), fmt, p); + if (len < 0) + perror_msg_and_fail("vsnprintf"); + assert((unsigned) len < sizeof(buf)); + + write_loop(3, buf, len); + + va_end(p); +} diff -Nru strace-4.11/tests/truncate64.c strace-4.12/tests/truncate64.c --- strace-4.11/tests/truncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/truncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate64 -#include -#include -#include +# include +# include int main(void) @@ -43,13 +39,10 @@ static const char fname[] = "truncate64\nfilename"; static const char qname[] = "truncate64\\nfilename"; const off_t len = 0xdefaceddeadbeef; - int rc = truncate(fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate64(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + int rc = truncate(fname, len); + printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -57,10 +50,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate64") #endif diff -Nru strace-4.11/tests/truncate64.test strace-4.12/tests/truncate64.test --- strace-4.11/tests/truncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests/truncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/truncate.c strace-4.12/tests/truncate.c --- strace-4.11/tests/truncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/truncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +25,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) @@ -45,18 +40,15 @@ static const char fname[] = "truncate\nfilename"; static const char qname[] = "truncate\\nfilename"; const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = truncate(fname, len); else rc = syscall(__NR_truncate, fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + printf("truncate(\"%s\", %llu) = %ld %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -64,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate") #endif diff -Nru strace-4.11/tests/truncate.test strace-4.12/tests/truncate.test --- strace-4.11/tests/truncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests/truncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests/uid16.c strace-4.12/tests/uid16.c --- strace-4.11/tests/uid16.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/uid16.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) \ - \ - && defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) \ - \ - && __NR_getuid != __NR_getuid32 \ - && __NR_setuid != __NR_setuid32 \ - && __NR_getresuid != __NR_getresuid32 \ - && __NR_setreuid != __NR_setreuid32 \ - && __NR_setresuid != __NR_setresuid32 \ - && __NR_fchown != __NR_fchown32 \ - && __NR_getgroups != __NR_getgroups32 \ - /**/ - int uid; - int size; - int *list = 0; - - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, 0xffff) == 0); - assert(syscall(__NR_setresuid, uid, -1, 0xffff) == 0); - assert(syscall(__NR_fchown, 1, -1, 0xffff) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests/uid16.test strace-4.12/tests/uid16.test --- strace-4.11/tests/uid16.test 2014-12-16 01:07:12.000000000 +0000 +++ strace-4.12/tests/uid16.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid16_t decoding. - -uid_t_size=16 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests/uid32.c strace-4.12/tests/uid32.c --- strace-4.11/tests/uid32.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/uid32.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) - int r, e, s; - int size; - int *list = 0; - - r = syscall(__NR_getuid32); - assert(syscall(__NR_setuid32, r) == 0); - assert(syscall(__NR_getresuid32, &r, &e, &s) == 0); - assert(syscall(__NR_setreuid32, -1, -1L) == 0); - assert(syscall(__NR_setresuid32, r, -1, -1L) == 0); - assert(syscall(__NR_fchown32, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups32, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups32, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests/uid32.test strace-4.12/tests/uid32.test --- strace-4.11/tests/uid32.test 2014-12-14 03:54:04.000000000 +0000 +++ strace-4.12/tests/uid32.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid32 decoding. - -uid_syscall_suffix=32 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests/uid.awk strace-4.12/tests/uid.awk --- strace-4.11/tests/uid.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/uid.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - r_uint = "(0|[1-9][0-9]*)" - regexp = "^getx?uid" suffix "\\(\\)[[:space:]]+= " r_uint "$" - expected = "getuid" - fail = 0 -} - -regexp == "" { - fail = 1 - next -} - -{ - if (match($0, regexp, a)) { - if (expected == "getuid") { - uid = a[1] - expected = "setuid" - regexp = "^setuid" suffix "\\(" uid "\\)[[:space:]]+= 0$" - } else if (expected == "setuid") { - expected = "getresuid" - regexp = "^getresuid" suffix "\\(\\[" uid "\\], \\[" uid "\\], \\[" uid "\\]\\)[[:space:]]+= 0$" - } else if (expected == "getresuid") { - expected = "setreuid" - regexp = "^setreuid" suffix "\\(-1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setreuid") { - expected = "setresuid" - regexp = "^setresuid" suffix "\\(" uid ", -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setresuid") { - expected = "fchown" - regexp = "^fchown" suffix "\\(1, -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "fchown") { - expected = "1st getgroups" - regexp = "^getgroups" suffix "\\(0, NULL\\)[[:space:]]+= " r_uint "$" - } else if (expected == "1st getgroups") { - ngroups = a[1] - if (ngroups == "0") - list="" - else if (ngroups == "1") - list=r_uint - else - list=r_uint "(, " r_uint "){" (ngroups - 1) "}" - expected = "2nd getgroups" - regexp = "^getgroups" suffix "\\(" ngroups ", \\[" list "\\]\\)[[:space:]]+= " ngroups "$" - } else if (expected == "2nd getgroups") { - expected = "the last line" - regexp = "^\\+\\+\\+ exited with 0 \\+\\+\\+$" - } else if (expected == "the last line") { - expected = "nothing" - regexp = "" - } - } -} - -END { - if (fail) { - print "Unexpected output after exit" - exit 1 - } - if (regexp == "") - exit 0 - print "error: " expected " doesn't match" - exit 1 -} diff -Nru strace-4.11/tests/uid.c strace-4.12/tests/uid.c --- strace-4.11/tests/uid.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/uid.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if (defined __NR_getuid || defined __NR_getxuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) - int uid; - int size; - int *list = 0; - -#ifndef __NR_getuid -# define __NR_getuid __NR_getxuid -#endif - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - (void) close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, -1L) == 0); - assert(syscall(__NR_setresuid, uid, -1, -1L) == 0); - assert(syscall(__NR_fchown, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests/uid.test strace-4.12/tests/uid.test --- strace-4.11/tests/uid.test 2015-07-16 22:13:56.000000000 +0000 +++ strace-4.12/tests/uid.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/sh - -# Check uid decoding. - -. "${srcdir=.}/init.sh" - -s="${uid_syscall_suffix-}" -w="${uid_t_size-}" - -run_prog ./uid$s$w - -syscalls= -for n in "getuid$s" "getxuid$s"; do - if $STRACE -e "$n" -h > /dev/null; then - syscalls="$n" - break - fi -done -test -n "$syscalls" || - fail_ "neither getuid$s nor getxuid$s is supported on this architecture" - -syscalls="$syscalls,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s" -run_strace -e trace="$syscalls" $args - -AWK=gawk -match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s" - -exit 0 diff -Nru strace-4.11/tests/uio.c strace-4.12/tests/uio.c --- strace-4.11/tests/uio.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/uio.c 2016-01-06 11:31:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include +#include "tests.h" + +#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) + +# include +# include +# include +# include int main(void) { -#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) const off_t offset = 0xdefaceddeadbeefLL; char buf[4]; struct iovec iov = { buf, sizeof buf }; @@ -53,7 +53,10 @@ assert(!close(0)); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + #endif -} diff -Nru strace-4.11/tests/umask.c strace-4.12/tests/umask.c --- strace-4.11/tests/umask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/umask.c 2016-03-01 08:55:37.000000000 +0000 @@ -0,0 +1,12 @@ +#include +#include + +int +main(void) +{ + mode_t rc = umask(044); + printf("umask(%#o) = %#o\n", 044, rc); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/umask.test strace-4.12/tests/umask.test --- strace-4.11/tests/umask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/umask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check umask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests/umount2.c strace-4.12/tests/umount2.c --- strace-4.11/tests/umount2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/umount2.c 2016-01-06 00:05:41.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -42,14 +43,13 @@ main(void) { static const char sample[] = "umount2.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); (void) syscall(__NR_umount2, sample, 31); printf("%s(\"%s\", MNT_FORCE|MNT_DETACH|MNT_EXPIRE|UMOUNT_NOFOLLOW|0x10)" " = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, sample); - (void) rmdir(sample); + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests/umount2.test strace-4.12/tests/umount2.test --- strace-4.11/tests/umount2.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests/umount2.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha|ia64) syscall=umount ;; *) syscall=umount2 ;; esac -OUT="$LOG.out" -run_strace -s7 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -s7 -e trace=$syscall diff -Nru strace-4.11/tests/umount.c strace-4.12/tests/umount.c --- strace-4.11/tests/umount.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/umount.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +25,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include -#include #include #include #include +#include #ifdef __NR_oldumount # define TEST_SYSCALL_STR "oldumount" @@ -41,31 +41,28 @@ # endif #endif +#ifdef __NR_oldumount + int main(void) { -#ifdef __NR_oldumount static const char sample[] = "umount.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } - (void) syscall(__NR_oldumount, sample); - printf("%s(\"%s\") = -1 ", TEST_SYSCALL_STR, sample); - switch (errno) { - case ENOSYS: - printf("ENOSYS (%m)\n"); - break; - case EPERM: - printf("EPERM (%m)\n"); - break; - default: - printf("EINVAL (%m)\n"); - } - (void) rmdir(sample); + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + + long rc = syscall(__NR_oldumount, sample); + printf("%s(\"%s\") = %ld %s (%m)\n", + TEST_SYSCALL_STR, sample, rc, errno2name()); + + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_oldumount") + #endif -} diff -Nru strace-4.11/tests/umount.test strace-4.12/tests/umount.test --- strace-4.11/tests/umount.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests/umount.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha) syscall=oldumount ;; *) syscall=umount ;; esac -OUT="$LOG.out" -run_strace -a24 -s6 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -s6 -e trace=$syscall diff -Nru strace-4.11/tests/umovestr2.c strace-4.12/tests/umovestr2.c --- strace-4.11/tests/umovestr2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/umovestr2.c 2016-01-05 23:24:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,33 +25,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - const size_t work_len = page_len * 2; - const size_t tail_len = work_len - 1; - - void *p = mmap(NULL, page_len * 3, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + work_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, work_len); - char *addr = p + work_len - tail_len; - memset(addr, '0', tail_len - 1); + const size_t page_len = get_page_size(); + const size_t tail_len = page_len * 2 - 1; + const size_t str_len = tail_len - 1; + + char *addr = tail_alloc(tail_len); + memset(addr, '0', str_len); + addr[str_len] = '\0'; char *argv[] = { NULL }; char *envp[] = { addr, NULL }; execve("", argv, envp); - printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (No such file or directory)\n", - (int) tail_len - 1, 0); + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (%m)\n", + (int) str_len, 0); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests/umovestr2.test strace-4.12/tests/umovestr2.test --- strace-4.11/tests/umovestr2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/umovestr2.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,9 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" -EXP="$LOG.exp" - run_prog > /dev/null run_strace -veexecve -s262144 $args > "$EXP" check_prog sed diff -Nru strace-4.11/tests/umovestr3.c strace-4.12/tests/umovestr3.c --- strace-4.11/tests/umovestr3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/umovestr3.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const unsigned int size = PATH_MAX - 1; + const char *p = tail_alloc(size); + const char *const efault = p + size; + + for (; p <= efault; ++p) { + int rc = chdir(p); + printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/umovestr3.test strace-4.12/tests/umovestr3.test --- strace-4.11/tests/umovestr3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/umovestr3.test 2016-04-27 01:32:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# yet another umovestr short read test + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 -e trace=chdir diff -Nru strace-4.11/tests/umovestr.c strace-4.12/tests/umovestr.c --- strace-4.11/tests/umovestr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/umovestr.c 2016-01-05 23:24:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const size_t tail_len = 257; - - if (tail_len >= page_len) - return 77; - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, page_len); - char *addr = p + page_len - tail_len; + char *addr = tail_alloc(tail_len); memset(addr, '/', tail_len - 1); + addr[tail_len - 1] = '\0'; if (chdir(addr)) - return 77; - + perror_msg_and_skip("chdir"); return 0; } diff -Nru strace-4.11/tests/uname.c strace-4.12/tests/uname.c --- strace-4.11/tests/uname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/uname.c 2016-03-28 23:25:30.000000000 +0000 @@ -0,0 +1,44 @@ +#include "tests.h" +#include + +#ifdef __NR_uname + +# include +# include +# include + +int main(int ac, char **av) +{ + int abbrev = ac > 1; + struct utsname *const uname = tail_alloc(sizeof(struct utsname)); + int rc = syscall(__NR_uname, uname); + printf("uname({sysname=\""); + print_quoted_string(uname->sysname); + printf("\", nodename=\""); + print_quoted_string(uname->nodename); + if (abbrev) { + printf("\", ..."); + } else { + printf("\", release=\""); + print_quoted_string(uname->release); + printf("\", version=\""); + print_quoted_string(uname->version); + printf("\", machine=\""); + print_quoted_string(uname->machine); +# ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + printf("\", domainname=\""); + print_quoted_string(uname->domainname); +# endif + printf("\""); + } + printf("}) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_uname") + +#endif diff -Nru strace-4.11/tests/uname.test strace-4.12/tests/uname.test --- strace-4.11/tests/uname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/uname.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check uname syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq + +run_prog > /dev/null +run_strace -v -euname $args > "$EXP" +uniq < "$LOG" > "$OUT" + +run_prog "./$NAME" abbrev > /dev/null +run_strace -euname $args >> "$EXP" +uniq < "$LOG" >> "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests/unix-pair-send-recv.c strace-4.12/tests/unix-pair-send-recv.c --- strace-4.11/tests/unix-pair-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/unix-pair-send-recv.c 2016-01-05 23:02:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -54,12 +55,12 @@ (void) close(1); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); - assert(sv[0] == 0); - assert(sv[1] == 1); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(close(1) == 0); diff -Nru strace-4.11/tests/unix-yy-accept.awk strace-4.12/tests/unix-yy-accept.awk --- strace-4.11/tests/unix-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/unix-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 8 - fail = 0 - - addrlen = length(addr) + 3 - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode_listen = a[2] - r_bind = "^bind\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, \\[" addrlen "\\]\\) += 0$" - r_accept = "^accept\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), NULL\\}, \\[2\\]\\) += 1(" r_i "),\"" addr "\"\\]>" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 {if (r_getsockname != "" && match($0, r_getsockname)) next} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a)) { - inode_accepted = a[2] - inode_peer = a[3] - r_close_listen = "^close\\(0\\) += 0$" - r_close_accepted = "^close\\(1\\) += 0$" - next - } -} - -NR == 6 {if (r_close_listen != "" && match($0, r_close_listen)) next} -NR == 7 {if (r_close_accepted != "" && match($0, r_close_accepted)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests/unix-yy-connect.awk strace-4.12/tests/unix-yy-connect.awk --- strace-4.11/tests/unix-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/unix-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 6 - fail = 0 - addrlen = length(addr) + 3 - - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 1$" - r_close_listen = "^close\\(0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[2] - r_connect = "^connect\\(1, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - next - } -} - -NR == 2 {if (match($0, r_close_listen)) next} - -NR == 3 { - if (r_connect != "" && match($0, r_connect)) { - r_close_connected = "^close\\(1" r_i "\\]>\\) += 0$" - next - } -} - -NR == 4 && /^--- SIGUSR1 / {next} - -NR == 5 { - if (inode != "" && r_close_connected != "" && match($0, r_close_connected, a) && a[1] == inode) { - next - } -} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests/unix-yy.test strace-4.12/tests/unix-yy.test --- strace-4.11/tests/unix-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/unix-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -#!/bin/sh -# -# Check decoding of address information (inode[->peer][,path]) -# associated with unix domain socket descriptors. -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_unix_diag -addr=unix-yy-local-stream -run_prog ./net-accept-connect $addr -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/unix-yy-connect.awk "$STRACE $args connect output mismatch" -v addr=$addr -match_awk "$LOG-accept" "$srcdir"/unix-yy-accept.awk "$STRACE $args accept output mismatch" -v addr=$addr - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests/unlinkat.c strace-4.12/tests/unlinkat.c --- strace-4.11/tests/unlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/unlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_unlinkat + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlinkat_sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_unlinkat, fd, sample, 0); + printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlinkat") + +#endif diff -Nru strace-4.11/tests/unlinkat.test strace-4.12/tests/unlinkat.test --- strace-4.11/tests/unlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/unlinkat.test 2016-04-06 06:18:49.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests/unlink.c strace-4.12/tests/unlink.c --- strace-4.11/tests/unlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/unlink.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_unlink + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlink_sample"; + + long rc = syscall(__NR_unlink, sample); + printf("unlink(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlink") + +#endif diff -Nru strace-4.11/tests/unlink.test strace-4.12/tests/unlink.test --- strace-4.11/tests/unlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/unlink.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests/userfaultfd.c strace-4.12/tests/userfaultfd.c --- strace-4.11/tests/userfaultfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/userfaultfd.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" #include -#include -#include #include +#if defined __NR_userfaultfd && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_userfaultfd && defined O_CLOEXEC - if (syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC) != -1) - return 77; - printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC); + printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = %ld %s (%m)\n", + rc, errno2name()); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests/userfaultfd.test strace-4.12/tests/userfaultfd.test --- strace-4.11/tests/userfaultfd.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/userfaultfd.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check userfaultfd syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a38 -euserfaultfd $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a38 diff -Nru strace-4.11/tests/utime.c strace-4.12/tests/utime.c --- strace-4.11/tests/utime.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/utime.c 2016-02-08 18:18:05.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +27,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include #include static void -print_tm(struct tm *p) +print_tm(const struct tm * const p) { printf("%02d/%02d/%02d-%02d:%02d:%02d", p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, @@ -41,16 +45,23 @@ int main(void) { - time_t t = time(NULL); - struct utimbuf u = { .actime = t, .modtime = t }; - struct tm *p = localtime(&t); + utime("", NULL); + printf("utime(\"\", NULL) = -1 ENOENT (%m)\n"); + + const time_t t = time(NULL); + const struct tm * const p = localtime(&t); + const struct utimbuf u = { .actime = t, .modtime = t }; + const struct utimbuf const *tail_u = tail_memdup(&u, sizeof(u)); printf("utime(\"utime\\nfilename\", ["); print_tm(p); printf(", "); print_tm(p); - puts("]) = -1 ENOENT (No such file or directory)"); + printf("]) = -1 ENOENT "); + assert(utime("utime\nfilename", tail_u) == -1); + if (ENOENT != errno) + perror_msg_and_skip("utime"); + printf("(%m)\n"); puts("+++ exited with 0 +++"); - - return utime("utime\nfilename", &u) == -1 && errno == ENOENT ? 0 : 77; + return 0; } diff -Nru strace-4.11/tests/utimensat.c strace-4.12/tests/utimensat.c --- strace-4.11/tests/utimensat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/utimensat.c 2016-02-08 18:27:59.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utimensat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +27,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" +#include +#include #include +#include #include #include #include @@ -48,47 +49,52 @@ int main(void) { + static const char fname[] = "utimensat\nfilename"; + + assert(utimensat(AT_FDCWD, fname, NULL, 0) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + + #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", " + printf(PREFIX "NULL, 0) = -1 ENOENT (%m)\n"); + struct timeval tv; struct timespec ts[2]; if (gettimeofday(&tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); ts[0].tv_sec = tv.tv_sec; ts[0].tv_nsec = tv.tv_usec; ts[1].tv_sec = tv.tv_sec - 1; ts[1].tv_nsec = tv.tv_usec + 1; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; - #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", [" - - printf(PREFIX); + printf(PREFIX "["); print_ts(&ts[0]); printf(", "); print_ts(&ts[1]); - puts("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); + printf("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT "); + + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf("(%m)\n"); ts[0].tv_nsec = UTIME_NOW; ts[1].tv_nsec = UTIME_OMIT; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf(PREFIX "[UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW)" + " = -1 ENOENT (%m)\n"); - printf(PREFIX); - puts("UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); puts("+++ exited with 0 +++"); - return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_UTIMENSAT && AT_FDCWD && AT_SYMLINK_NOFOLLOW" + " && UTIME_NOW && UTIME_OMIT") #endif diff -Nru strace-4.11/tests/utimensat.test strace-4.12/tests/utimensat.test --- strace-4.11/tests/utimensat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/utimensat.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e utimensat $args > "$OUT" check_prog grep diff -Nru strace-4.11/tests/utimes.c strace-4.12/tests/utimes.c --- strace-4.11/tests/utimes.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/utimes.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Check decoding of utimes syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utimes + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "utimes_sample"; + + long rc = syscall(__NR_utimes, sample, 0); + printf("utimes(\"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, %p) = %ld %s (%m)\n", + ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_utimes, "", ts); + printf("utimes(\"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utimes") + +#endif diff -Nru strace-4.11/tests/utimes.test strace-4.12/tests/utimes.test --- strace-4.11/tests/utimes.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/utimes.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check utimes syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests/utime.test strace-4.12/tests/utime.test --- strace-4.11/tests/utime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/utime.test 2016-03-30 00:13:37.000000000 +0000 @@ -7,9 +7,8 @@ $STRACE -e utime -h > /dev/null || skip_ 'utime syscall is not supported on this architecture' -OUT="$LOG.out" run_prog > /dev/null -run_strace -e utime $args > "$OUT" +run_strace -a 16 -e utime $args > "$OUT" check_prog grep LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || { diff -Nru strace-4.11/tests/vfork-f.c strace-4.12/tests/vfork-f.c --- strace-4.11/tests/vfork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vfork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "vfork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) { + if (read(0, &ac, sizeof(int))) + return 2; + return logit("exec"); + } + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(child_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + int parent_wait_fds[2]; + if (pipe(parent_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(parent_wait_fds[0], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + if (fcntl(parent_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + char *const args[] = { av[0], (char *) "", NULL }; + pid_t pid = vfork(); + + if (pid < 0) + perror_msg_and_fail("vfork"); + + if (!pid) { + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + close(parent_wait_fds[1]); + + if (read(parent_wait_fds[0], &parent_wait_fds[1], sizeof(int))) + perror_msg_and_fail("read"); + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + pid, prefix, + ppid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests/vfork-f.test strace-4.12/tests/vfork-f.test --- strace-4.11/tests/vfork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vfork-f.test 2015-12-30 23:08:32.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check how strace -f follows vfork syscall. + +. "${srcdir=.}/fork-f.test" diff -Nru strace-4.11/tests/vhangup.c strace-4.12/tests/vhangup.c --- strace-4.11/tests/vhangup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vhangup.c 2016-05-24 20:12:25.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_vhangup + +# include +# include + +int +main(void) +{ + if (setsid() == -1) + perror_msg_and_skip("setsid"); + + long rc = syscall(__NR_vhangup); + printf("vhangup() = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vhangup") + +#endif diff -Nru strace-4.11/tests/vhangup.test strace-4.12/tests/vhangup.test --- strace-4.11/tests/vhangup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vhangup.test 2016-05-24 20:09:16.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check vhangup syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a10 diff -Nru strace-4.11/tests/vmsplice.c strace-4.12/tests/vmsplice.c --- strace-4.11/tests/vmsplice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vmsplice.c 2016-02-14 00:36:38.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * This file is part of vmsplice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_vmsplice + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *iov = tail_memdup(iov_, sizeof(iov_)); + const unsigned int len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + tprintf("vmsplice(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, %s) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_), + "SPLICE_F_NONBLOCK", len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const long rc = syscall(__NR_vmsplice, 1, iov, ARRAY_SIZE(iov_), 2); + if (rc < 0) + perror_msg_and_skip("vmsplice"); + assert(rc == (int) len); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vmsplice") + +#endif diff -Nru strace-4.11/tests/vmsplice.test strace-4.12/tests/vmsplice.test --- strace-4.11/tests/vmsplice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/vmsplice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of vmsplice syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -ewrite=1 diff -Nru strace-4.11/tests/wait.c strace-4.12/tests/wait.c --- strace-4.11/tests/wait.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/wait.c 2016-01-06 11:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -46,10 +43,13 @@ (void) close(0); (void) close(1); - assert(!pipe(fds) && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { char c; (void) close(1); @@ -67,16 +67,20 @@ assert(WIFEXITED(s) && WEXITSTATUS(s) == 42); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { (void) raise(SIGUSR1); - return 77; + return 1; } assert(wait4(pid, &s, __WALL, NULL) == pid); assert(WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { raise(SIGSTOP); return 0; diff -Nru strace-4.11/tests/xattr.c strace-4.12/tests/xattr.c --- strace-4.11/tests/xattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/xattr.c 2016-05-22 22:29:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,30 +25,124 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_SYS_XATTR_H + +# include +# include # include +# ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +# endif + int main(void) { -#define NAME "strace.test" -#define VALUE "foo\0bar" - if (!removexattr(".", NAME) || - !setxattr(".", NAME, VALUE, sizeof(VALUE), XATTR_CREATE)) - return 77; + static const char name[] = "strace.test"; + static const char c_value[] = "foo\0bar"; + static const char q_value[] = "foo\\0bar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + char *const efault = tail_alloc(1) + 1; + const char *const value = tail_memdup(c_value, sizeof(c_value) - 1); + char *const big = tail_alloc(XATTR_SIZE_MAX + 1); + + assert(fsetxattr(-1, 0, 0, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, NULL, 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, 0, z_value, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, \"\", 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, name, big, XATTR_SIZE_MAX + 1, XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value), XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value) - 1, XATTR_CREATE|XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_CREATE|XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(setxattr(".", name, z_value, sizeof(c_value), XATTR_CREATE) == -1); + printf("setxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(lsetxattr(".", name, value, sizeof(c_value) - 1, XATTR_CREATE) == -1); + printf("lsetxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(fgetxattr(-1, name, efault, 4) == -1); + printf("fgetxattr(-1, \"%s\", %p, 4) = -1 %s (%m)\n", + name, efault, errno2name()); + + assert(getxattr(".", name, big, XATTR_SIZE_MAX + 1) == -1); + printf("getxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(lgetxattr(".", name, big + 1, XATTR_SIZE_MAX) == -1); + printf("lgetxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big + 1, XATTR_SIZE_MAX, errno2name()); + + assert(flistxattr(-1, efault, 4) == -1); + printf("flistxattr(-1, %p, 4) = -1 %s (%m)\n", + efault, errno2name()); + + assert(llistxattr("", efault + 1, 4) == -1); + printf("llistxattr(\"\", %p, 4) = -1 %s (%m)\n", + efault + 1, errno2name()); + + ssize_t rc = listxattr(".", big, 0); + if (rc < 0) + printf("listxattr(\".\", %p, 0) = -1 %s (%m)\n", + big, errno2name()); + else + printf("listxattr(\".\", %p, 0) = %ld\n", + big, (long) rc); + + rc = listxattr(".", big, XATTR_SIZE_MAX + 1); + if (rc < 0) + printf("listxattr(\".\", %p, %u) = -1 %s (%m)\n", + big, XATTR_SIZE_MAX + 1, errno2name()); + else { + printf("listxattr(\".\", \""); + print_quoted_memory(big, rc); + printf("\", %u) = %ld\n", XATTR_SIZE_MAX + 1, (long) rc); + } + + assert(fremovexattr(-1, name) == -1); + printf("fremovexattr(-1, \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(removexattr(".", name) == -1); + printf("removexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(lremovexattr(".", name) == -1); + printf("lremovexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") #endif diff -Nru strace-4.11/tests/xattr.expected strace-4.12/tests/xattr.expected --- strace-4.11/tests/xattr.expected 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests/xattr.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -removexattr\("\.", "strace\.test"\) += -1 .* -setxattr\("\.", "strace\.test", "foo\\0bar", 8, XATTR_CREATE\) += -1 .* diff -Nru strace-4.11/tests/xattr.test strace-4.12/tests/xattr.test --- strace-4.11/tests/xattr.test 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests/xattr.test 2016-05-10 22:25:23.000000000 +0000 @@ -4,8 +4,9 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace -e removexattr,setxattr $args -match_grep +syscalls= +for n in getxattr setxattr listxattr removexattr; do + syscalls="$syscalls,${n},f${n},l${n}" +done -exit 0 +run_strace_match_diff -a22 -e trace=$syscalls diff -Nru strace-4.11/tests/xchownx.c strace-4.12/tests/xchownx.c --- strace-4.11/tests/xchownx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xchownx.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of chown/chown32/lchown/lchown32/fchown/fchown32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#ifdef UGID_TYPE_IS_SHORT +# define UGID_TYPE short +# define GETEUID syscall(__NR_geteuid) +# define GETEGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUID(arg) check_overflowuid(arg) +# define CHECK_OVERFLOWGID(arg) check_overflowgid(arg) +#else +# define UGID_TYPE int +# define GETEUID geteuid() +# define GETEGID getegid() +# define CHECK_OVERFLOWUID(arg) +# define CHECK_OVERFLOWGID(arg) +#endif + +#define UNLINK_SAMPLE \ + if (unlink(sample)) perror_msg_and_fail("unlink") +#define CLOSE_SAMPLE \ + if (close(fd)) perror_msg_and_fail("close") + +#ifdef ACCESS_BY_DESCRIPTOR +# define SYSCALL_ARG1 fd +# define FMT_ARG1 "%d" +# define EOK_CMD CLOSE_SAMPLE +# define CLEANUP_CMD UNLINK_SAMPLE +#else +# define SYSCALL_ARG1 sample +# define FMT_ARG1 "\"%s\"" +# define EOK_CMD UNLINK_SAMPLE +# define CLEANUP_CMD CLOSE_SAMPLE +#endif + +static int +ugid2int(const unsigned UGID_TYPE id) +{ + if ((unsigned UGID_TYPE) -1U == id) + return -1; + else + return id; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf(", -1"); + else + printf(", %u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int id) +{ + return num == id || num == -1U; +} + +#define PAIR(val) { val, gid }, { uid, val } + +int +main(void) +{ + static const char sample[] = SYSCALL_NAME "_sample"; + + unsigned int uid = GETEUID; + CHECK_OVERFLOWUID(uid); + unsigned int gid = GETEGID; + CHECK_OVERFLOWUID(gid); + + const struct { + const long uid, gid; + } tests[] = { + { uid, gid }, + { (unsigned long) 0xffffffff00000000ULL | uid, gid }, + { uid, (unsigned long) 0xffffffff00000000ULL | gid }, + PAIR(-1U), + PAIR(-1L), + { 0xffff0000U | uid, gid }, + { uid, 0xffff0000U | gid }, + PAIR(0xffff), + PAIR(0xc0deffffU), + PAIR(0xfacefeedU), + PAIR((long) 0xfacefeeddeadbeefULL) + }; + + int fd = open(sample, O_RDONLY | O_CREAT, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + CLEANUP_CMD; + + unsigned int i; + long expected = 0; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int unum = ugid2int(tests[i].uid); + const unsigned int gnum = ugid2int(tests[i].gid); + + if (num_matches_id(unum, uid) && + num_matches_id(gnum, gid)) { + if (expected) + continue; + } else { + if (!expected) { + expected = -1; + EOK_CMD; + } + } + + const long rc = syscall(SYSCALL_NR, SYSCALL_ARG1, + tests[i].uid, tests[i].gid); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(" FMT_ARG1 ", %u, %u)" + " = -1 ENOSYS (%m)\n", + SYSCALL_NAME, SYSCALL_ARG1, uid, gid); + break; + } + perror_msg_and_fail("%s(" FMT_ARG1 + ", %#lx, %#lx) != %ld", + SYSCALL_NAME, SYSCALL_ARG1, + tests[i].uid, tests[i].gid, + expected); + } + + printf("%s(" FMT_ARG1, SYSCALL_NAME, SYSCALL_ARG1); + print_int(unum); + print_int(gnum); + errno = saved_errno; + if (expected) + printf(") = %ld %s (%m)\n", expected, errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/xetitimer.c strace-4.12/tests/xetitimer.c --- strace-4.11/tests/xetitimer.c 2015-09-19 01:04:27.000000000 +0000 +++ strace-4.12/tests/xetitimer.c 2016-01-04 23:38:19.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,7 +47,7 @@ }; if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -61,7 +62,7 @@ (intmax_t) old.itv.it_value.tv_usec); if (getitimer(ITIMER_REAL, &old.itv)) - return 77; + perror_msg_and_skip("getitimer"); printf("getitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", diff -Nru strace-4.11/tests/xetitimer.test strace-4.12/tests/xetitimer.test --- strace-4.11/tests/xetitimer.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/xetitimer.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check setitimer and getitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=setitimer,getitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=setitimer,getitimer diff -Nru strace-4.11/tests/xetpgid.c strace-4.12/tests/xetpgid.c --- strace-4.11/tests/xetpgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xetpgid.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of xetpgid strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getpgid && defined __NR_setpgid + +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpgid, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpgid(%d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpgid, + (unsigned long) 0xffffffff00000000, + (unsigned long) 0xffffffff00000000 | pid); + printf("setpgid(0, %d) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgid && __NR_setpgid") + +#endif diff -Nru strace-4.11/tests/xetpgid.test strace-4.12/tests/xetpgid.test --- strace-4.11/tests/xetpgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xetpgid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgid and setpgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=getpgid,setpgid diff -Nru strace-4.11/tests/xetpriority.c strace-4.12/tests/xetpriority.c --- strace-4.11/tests/xetpriority.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xetpriority.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,35 @@ +#include "tests.h" +#include + +#if defined __NR_getpriority && defined __NR_setpriority + +# include +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000); + if (rc) + printf("setpriority(PRIO_PROCESS, %d, 0) = %ld %s (%m)\n", + pid, rc, errno2name()); + else + printf("setpriority(PRIO_PROCESS, %d, 0) = 0\n", pid); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpriority && _NR_setpriority") + +#endif diff -Nru strace-4.11/tests/xetpriority.test strace-4.12/tests/xetpriority.test --- strace-4.11/tests/xetpriority.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xetpriority.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpriority and setpriority syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 -e trace=getpriority,setpriority diff -Nru strace-4.11/tests/xet_robust_list.c strace-4.12/tests/xet_robust_list.c --- strace-4.11/tests/xet_robust_list.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests/xet_robust_list.c 2016-01-05 23:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,46 +25,35 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_get_robust_list && defined __NR_set_robust_list +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const pid_t pid = getpid(); const long long_pid = (unsigned long) (0xdeadbeef00000000LL | pid); - - void *p = mmap(NULL, page_len * 4, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || - mprotect(p + page_len, page_len, PROT_NONE) || - mprotect(p + page_len * 3, page_len, PROT_NONE)) - return 77; - - void **p_head = p + page_len - sizeof(void *); - size_t *p_len = p + page_len * 3 - sizeof(size_t); + void **p_head = tail_alloc(sizeof(void *)); + size_t *p_len = tail_alloc(sizeof(size_t)); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); - if (syscall(__NR_set_robust_list, p, *p_len)) - return 77; - printf("set_robust_list(%#lx, %lu) = 0\n", - (unsigned long) p, (unsigned long) *p_len); + void *head = tail_alloc(*p_len); + if (syscall(__NR_set_robust_list, head, *p_len)) + perror_msg_and_skip("set_robust_list"); + printf("set_robust_list(%p, %lu) = 0\n", + head, (unsigned long) *p_len); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); @@ -74,10 +63,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_get_robust_list && __NR_set_robust_list") #endif diff -Nru strace-4.11/tests/xet_robust_list.test strace-4.12/tests/xet_robust_list.test --- strace-4.11/tests/xet_robust_list.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/xet_robust_list.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check get_robust_list and set_robust_list syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eget_robust_list,set_robust_list $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list diff -Nru strace-4.11/tests/xettimeofday.c strace-4.12/tests/xettimeofday.c --- strace-4.11/tests/xettimeofday.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests/xettimeofday.c 2016-01-09 13:06:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -45,12 +47,12 @@ }; if (syscall(__NR_gettimeofday, &t.tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}, NULL) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, @@ -58,11 +60,10 @@ t.tv.tv_sec = -1; t.tv.tv_usec = 1000000000; - if (!settimeofday(&t.tv, &t.tz)) - return 77; + assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); printf("settimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, t.tz.tz_minuteswest, t.tz.tz_dsttime); diff -Nru strace-4.11/tests/xettimeofday.test strace-4.12/tests/xettimeofday.test --- strace-4.11/tests/xettimeofday.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests/xettimeofday.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check gettimeofday and settimeofday syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=gettimeofday,settimeofday -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday diff -Nru strace-4.11/tests/xselect.c strace-4.12/tests/xselect.c --- strace-4.11/tests/xselect.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/xselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,19 +29,10 @@ * Based on test by Dr. David Alan Gilbert */ -#ifdef TEST_SYSCALL_NAME - -# include -# include -# include - -# define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -# define nrify(arg) nrify_(arg) -# define nrify_(arg) __NR_ ## arg - -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg +#include +#include +#include +#include static fd_set set[0x1000000 / sizeof(fd_set)]; @@ -57,7 +48,7 @@ }, tm = tm_in; if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple select. @@ -65,8 +56,10 @@ FD_ZERO(set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL) != 1) - return 77; + int rc = syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + assert(rc == 1); printf("%s(%d, [%d %d], [%d %d], [%d %d], NULL) = 1 ()\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], fds[0], fds[1], fds[0], fds[1]); @@ -78,8 +71,7 @@ FD_SET(2, set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) != 3) - return 77; + assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); printf("%s(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld})" " = 3 (out [1 2 %d], left {%lld, %lld})\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], @@ -93,8 +85,7 @@ */ FD_ZERO(set); FD_SET(fds[1],set); - if (syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) != -1) - return 77; + assert(syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) == -1); printf("%s(-1, NULL, %p, NULL, NULL) = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, set); @@ -105,21 +96,10 @@ FD_SET(fds[0],set); tm.tv.tv_sec = 0; tm.tv.tv_usec = 123; - if (syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv)) - return 77; + assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); printf("%s(%d, [%d], [], NULL, {0, 123}) = 0 (Timeout)\n", TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); puts("+++ exited with 0 +++"); return 0; } - -#else - -int -main(void) -{ - return 77; -} - -#endif diff -Nru strace-4.11/tests/xstatfs64.c strace-4.12/tests/xstatfs64.c --- strace-4.11/tests/xstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), size, ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", %u, ", SYSCALL_NAME, \ + SYSCALL_ARG(file, desc), (unsigned) size) + +#define STRUCT_STATFS struct statfs64 +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif +#define CHECK_ODD_SIZE + +#include "xstatfsx.c" diff -Nru strace-4.11/tests/xstatfs.c strace-4.12/tests/xstatfs.c --- strace-4.11/tests/xstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", ", SYSCALL_NAME, SYSCALL_ARG(file, desc)) + +#define STRUCT_STATFS struct statfs +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif + +#include "xstatfsx.c" diff -Nru strace-4.11/tests/xstatfsx.c strace-4.12/tests/xstatfsx.c --- strace-4.11/tests/xstatfsx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests/xstatfsx.c 2016-05-05 21:20:58.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include "xlat.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +#define PRINT_NUM(arg) \ + if (sizeof(b->arg) == sizeof(int)) \ + printf(", %s=%u", #arg, (unsigned int) b->arg); \ + else if (sizeof(b->arg) == sizeof(long)) \ + printf(", %s=%lu", #arg, (unsigned long) b->arg); \ + else \ + printf(", %s=%llu", #arg, (unsigned long long) b->arg) + +static void +print_statfs_type(const char *const prefix, const unsigned int magic) +{ + fputs(prefix, stdout); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(fsmagic); ++i) + if (magic == fsmagic[i].val) { + fputs(fsmagic[i].str, stdout); + return; + } + printf("%#x", magic); +} + +static void +print_statfs(const char *const sample, const char *magic_str) +{ + int fd = open(sample, O_RDONLY); + if (fd < 0) + perror_msg_and_fail("open: %s", sample); + + STRUCT_STATFS *const b = tail_alloc(sizeof(*b)); + long rc = SYSCALL_INVOKE(sample, fd, b, sizeof(*b)); + if (rc) + perror_msg_and_skip(SYSCALL_NAME); + + PRINT_SYSCALL_HEADER(sample, fd, sizeof(*b)); + if (magic_str) + printf("{f_type=%s", magic_str); + else + print_statfs_type("{f_type=", b->f_type); + PRINT_NUM(f_bsize); + PRINT_NUM(f_blocks); + PRINT_NUM(f_bfree); + PRINT_NUM(f_bavail); + PRINT_NUM(f_files); + PRINT_NUM(f_ffree); +#ifdef PRINT_F_FSID + printf(", f_fsid={%u, %u}", + (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); +#endif + PRINT_NUM(f_namelen); +#ifdef PRINT_F_FRSIZE + PRINT_NUM(f_frsize); +#endif +#ifdef PRINT_F_FLAGS + if (b->f_flags & ST_VALID) { + printf(", f_flags="); + printflags(statfs_flags, b->f_flags, "ST_???"); + } +#endif + printf("}) = 0\n"); +} + +int +main(void) +{ + print_statfs("/proc/self/status", "PROC_SUPER_MAGIC"); + + print_statfs(".", NULL); + + long rc = SYSCALL_INVOKE("", -1, 0, sizeof(STRUCT_STATFS)); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS)); + printf("NULL) = %ld %s (%m)\n", rc, errno2name()); + +#ifdef CHECK_ODD_SIZE + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); + printf("%#lx) = %ld %s (%m)\n", addr, rc, errno2name()); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests/xstatx.c strace-4.12/tests/xstatx.c --- strace-4.11/tests/xstatx.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests/xstatx.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined TEST_SYSCALL_NAME \ - && defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +#if defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +# ifndef TEST_SYSCALL_STR +# error TEST_SYSCALL_STR must be defined +# endif # ifndef TEST_SYSCALL_INVOKE # error TEST_SYSCALL_INVOKE must be defined # endif @@ -38,7 +40,6 @@ # error PRINT_SYSCALL_FOOTER must be defined # endif -# include # include # include # include @@ -131,6 +132,7 @@ # ifndef STRUCT_STAT # define STRUCT_STAT struct stat +# define STRUCT_STAT_STR "struct stat" # endif # ifndef SAMPLE_SIZE # define SAMPLE_SIZE 43147718418 @@ -228,11 +230,6 @@ return 0; } -# define stringify_(arg) #arg -# define stringify(arg) stringify_(arg) -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define STRUCT_STAT_STR stringify(STRUCT_STAT) - int main(void) { @@ -314,10 +311,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_FTRUNCATE && HAVE_FUTIMENS") #endif diff -Nru strace-4.11/tests-m32/access.c strace-4.12/tests-m32/access.c --- strace-4.11/tests-m32/access.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/access.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#ifdef __NR_access + +# include +# include + +int +main(void) +{ + static const char sample[] = "access_sample"; + + long rc = syscall(__NR_access, sample, F_OK); + printf("access(\"%s\", F_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK); + printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_access") + +#endif diff -Nru strace-4.11/tests-m32/access.test strace-4.12/tests-m32/access.test --- strace-4.11/tests-m32/access.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/access.test 2016-04-21 17:37:43.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check access syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eaccess -a30 $args > "$EXP" + +# Filter out access() calls made by libc. +grep -F access_sample < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/acct.c strace-4.12/tests-m32/acct.c --- strace-4.11/tests-m32/acct.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/acct.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_acct + +# include +# include + +int +main(void) +{ + const char sample[] = "acct_sample"; + + long rc = syscall(__NR_acct, sample); + printf("acct(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__acct") + +#endif diff -Nru strace-4.11/tests-m32/acct.test strace-4.12/tests-m32/acct.test --- strace-4.11/tests-m32/acct.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/acct.test 2016-04-21 20:20:42.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check acct syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests-m32/adjtimex.c strace-4.12/tests-m32/adjtimex.c --- strace-4.11/tests-m32/adjtimex.c 2015-09-17 13:26:22.000000000 +0000 +++ strace-4.12/tests-m32/adjtimex.c 2016-02-08 18:16:27.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of adjtimex strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +27,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include +#include #include int main(void) { - struct timex tx = {}; - int state = adjtimex(&tx); + adjtimex(NULL); + printf("adjtimex\\(NULL\\) = -1 EFAULT \\(%m\\)\n"); + + struct timex * const tx = tail_alloc(sizeof(*tx)); + memset(tx, 0, sizeof(*tx)); + int state = adjtimex(tx); if (state < 0) - return 77; + perror_msg_and_skip("adjtimex"); printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" ", esterror=%jd, status=%s, constant=%jd, precision=%jd" @@ -51,27 +55,27 @@ ", tai=%d" #endif "\\}\\) = %d \\(TIME_[A-Z]+\\)\n", - (intmax_t) tx.offset, - (intmax_t) tx.freq, - (intmax_t) tx.maxerror, - (intmax_t) tx.esterror, - tx.status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", - (intmax_t) tx.constant, - (intmax_t) tx.precision, - (intmax_t) tx.tolerance, - (intmax_t) tx.time.tv_sec, - (intmax_t) tx.time.tv_usec, - (intmax_t) tx.tick, - (intmax_t) tx.ppsfreq, - (intmax_t) tx.jitter, - tx.shift, - (intmax_t) tx.stabil, - (intmax_t) tx.jitcnt, - (intmax_t) tx.calcnt, - (intmax_t) tx.errcnt, - (intmax_t) tx.stbcnt, + (intmax_t) tx->offset, + (intmax_t) tx->freq, + (intmax_t) tx->maxerror, + (intmax_t) tx->esterror, + tx->status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", + (intmax_t) tx->constant, + (intmax_t) tx->precision, + (intmax_t) tx->tolerance, + (intmax_t) tx->time.tv_sec, + (intmax_t) tx->time.tv_usec, + (intmax_t) tx->tick, + (intmax_t) tx->ppsfreq, + (intmax_t) tx->jitter, + tx->shift, + (intmax_t) tx->stabil, + (intmax_t) tx->jitcnt, + (intmax_t) tx->calcnt, + (intmax_t) tx->errcnt, + (intmax_t) tx->stbcnt, #ifdef HAVE_STRUCT_TIMEX_TAI - tx.tai, + tx->tai, #endif state); diff -Nru strace-4.11/tests-m32/adjtimex.test strace-4.12/tests-m32/adjtimex.test --- strace-4.11/tests-m32/adjtimex.test 2015-09-17 13:25:53.000000000 +0000 +++ strace-4.12/tests-m32/adjtimex.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,8 +5,7 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -e adjtimex $args > "$OUT" +run_strace -a 15 -e adjtimex $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-m32/aio.c strace-4.12/tests-m32/aio.c --- strace-4.11/tests-m32/aio.c 2015-12-16 02:00:01.000000000 +0000 +++ strace-4.12/tests-m32/aio.c 2016-05-07 22:40:06.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include +#include #include #include #include #include -#include #include #if defined __NR_io_setup \ @@ -45,139 +41,154 @@ && defined __NR_io_destroy # include -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - int main(void) { - static char data0[4096]; - static char data1[8192]; + const unsigned int sizeof_data0 = 4096; + const unsigned int sizeof_data1 = 8192; + void *data0 = tail_alloc(sizeof_data0); + void *data1 = tail_alloc(sizeof_data1); - const struct iocb cb[] = { + const struct iocb proto_cb[] = { { .aio_data = 0xfeedface11111111, .aio_reqprio = 11, .aio_buf = (unsigned long) data0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = sizeof(data0) + .aio_nbytes = sizeof_data0 }, { .aio_data = 0xfeedface22222222, .aio_reqprio = 22, .aio_buf = (unsigned long) data1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = sizeof(data1) + .aio_nbytes = sizeof_data1 } }; - const struct iovec iov0[] = { + const struct iocb *cb = tail_memdup(proto_cb, sizeof(proto_cb)); + + const struct iovec proto_iov0[] = { { .iov_base = data0, - .iov_len = sizeof(data0) / 4 + .iov_len = sizeof_data0 / 4 }, { - .iov_base = data0 + sizeof(data0) / 4, - .iov_len = sizeof(data0) / 4 * 3 + .iov_base = data0 + sizeof_data0 / 4, + .iov_len = sizeof_data0 / 4 * 3 }, }; - const struct iovec iov1[] = { + const struct iovec *iov0 = tail_memdup(proto_iov0, sizeof(proto_iov0)); + + const struct iovec proto_iov1[] = { { .iov_base = data1, - .iov_len = sizeof(data1) / 4 + .iov_len = sizeof_data1 / 4 }, { - .iov_base = data1 + sizeof(data1) / 4, - .iov_len = sizeof(data1) / 4 * 3 + .iov_base = data1 + sizeof_data1 / 4, + .iov_len = sizeof_data1 / 4 * 3 }, }; - const struct iocb cbv[] = { + const struct iovec *iov1 = tail_memdup(proto_iov1, sizeof(proto_iov1)); + + const struct iocb proto_cbv[] = { { .aio_data = 0xfeed11111111face, .aio_lio_opcode = 7, .aio_reqprio = 111, - .aio_buf = (unsigned long) &iov0, + .aio_buf = (unsigned long) iov0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = ARRAY_SIZE(iov0) + .aio_nbytes = ARRAY_SIZE(proto_iov0) }, { .aio_data = 0xfeed22222222face, .aio_lio_opcode = 7, .aio_reqprio = 222, - .aio_buf = (unsigned long) &iov1, + .aio_buf = (unsigned long) iov1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = ARRAY_SIZE(iov1) + .aio_nbytes = ARRAY_SIZE(proto_iov1) } }; - struct iocb cbc = { + const struct iocb *cbv = tail_memdup(proto_cbv, sizeof(proto_cbv)); + + const struct iocb proto_cbc = { .aio_data = 0xdeadbeefbadc0ded, .aio_reqprio = 99, .aio_fildes = -42 }; + const struct iocb *cbc = tail_memdup(&proto_cbc, sizeof(proto_cbc)); - const long cbs[ARRAY_SIZE(cb) + 2] = { - (long) &cb[0], (long) &cb[1], - 0xdeadbeef, 0xbadc0ded + const long proto_cbs[] = { + (long) &cb[0], (long) &cb[1] }; - const long cbvs[ARRAY_SIZE(cb) + 2] = { + const long *cbs = tail_memdup(proto_cbs, sizeof(proto_cbs)); + + const long proto_cbvs[] = { (long) &cbv[0], (long) &cbv[1], - 0xdeadbeef, 0xbadc0ded }; + const long *cbvs = tail_memdup(proto_cbvs, sizeof(proto_cbvs)); + + unsigned long *ctx = tail_alloc(sizeof(unsigned long)); + *ctx = 0; - unsigned long ctx = 0; - const unsigned int nr = ARRAY_SIZE(cb); + const unsigned int nr = ARRAY_SIZE(proto_cb); const unsigned long lnr = (unsigned long) (0xdeadbeef00000000ULL | nr); - struct io_event ev[nr]; - const struct timespec ts = { .tv_nsec = 123456789 }; + const struct io_event *ev = tail_alloc(nr * sizeof(struct io_event)); + const struct timespec proto_ts = { .tv_nsec = 123456789 }; + const struct timespec *ts = tail_memdup(&proto_ts, sizeof(proto_ts)); (void) close(0); if (open("/dev/zero", O_RDONLY)) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); - if (syscall(__NR_io_setup, lnr, &ctx)) - return 77; - printf("io_setup(%u, [%lu]) = 0\n", nr, ctx); + if (syscall(__NR_io_setup, lnr, ctx)) + perror_msg_and_skip("io_setup"); + printf("io_setup(%u, [%lu]) = 0\n", nr, *ctx); + + assert(syscall(__NR_io_submit, *ctx, -1L, cbs) == -1); + printf("io_submit(%lu, -1, %p) = -1 %s (%m)\n", + *ctx, cbs, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, pread, reqprio=11, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}, " "{data=%#llx, pread, reqprio=22, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cb[0].aio_data, data0, - (unsigned int) sizeof(data0), (long long) cb[0].aio_offset, + sizeof_data0, (long long) cb[0].aio_offset, (unsigned long long) cb[1].aio_data, data1, - (unsigned int) sizeof(data1), (long long) cb[1].aio_offset, + sizeof_data1, (long long) cb[1].aio_offset, nr); - assert(syscall(__NR_io_getevents, ctx, nr, nr + 1, ev, &ts) == (long) nr); + assert(syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts) == (long) nr); printf("io_getevents(%lu, %u, %u, [" "{data=%#llx, obj=%p, res=%u, res2=0}, " "{data=%#llx, obj=%p, res=%u, res2=0}" "], {0, 123456789}) = %u\n", - ctx, nr, nr + 1, - (unsigned long long) cb[0].aio_data, &cb[0], - (unsigned int) sizeof(data0), - (unsigned long long) cb[1].aio_data, &cb[1], - (unsigned int) sizeof(data1), + *ctx, nr, nr + 1, + (unsigned long long) cb[0].aio_data, &cb[0], sizeof_data0, + (unsigned long long) cb[1].aio_data, &cb[1], sizeof_data1, nr); - assert(syscall(__NR_io_cancel, ctx, &cbc, ev) == -1 && EINVAL == errno); + assert(syscall(__NR_io_cancel, *ctx, cbc, ev) == -1); printf("io_cancel(%lu, {data=%#llx, pread, reqprio=99, fildes=-42}, %p) " - "= -1 EINVAL (Invalid argument)\n", - ctx, (unsigned long long) cbc.aio_data, ev); + "= -1 %s (%m)\n", + *ctx, (unsigned long long) cbc->aio_data, ev, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbvs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbvs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}, " "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cbv[0].aio_data, cbv[0].aio_reqprio, iov0[0].iov_base, (unsigned int) iov0[0].iov_len, iov0[1].iov_base, (unsigned int) iov0[1].iov_len, @@ -188,8 +199,8 @@ (long long) cbv[1].aio_offset, nr); - assert(syscall(__NR_io_destroy, ctx) == 0); - printf("io_destroy(%lu) = 0\n", ctx); + assert(syscall(__NR_io_destroy, *ctx) == 0); + printf("io_destroy(%lu) = 0\n", *ctx); puts("+++ exited with 0 +++"); return 0; @@ -197,10 +208,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_io_*") #endif diff -Nru strace-4.11/tests-m32/aio.test strace-4.12/tests-m32/aio.test --- strace-4.11/tests-m32/aio.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/aio.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,11 +4,5 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null -OUT="$LOG.out" syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy -run_strace -a14 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 -e trace=$syscalls diff -Nru strace-4.11/tests-m32/alarm.c strace-4.12/tests-m32/alarm.c --- strace-4.11/tests-m32/alarm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/alarm.c 2016-02-14 22:30:27.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * This file is part of alarm strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_alarm + +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a); + printf("alarm(%u) = %d\n", 42, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_alarm") + +#endif diff -Nru strace-4.11/tests-m32/alarm.test strace-4.12/tests-m32/alarm.test --- strace-4.11/tests-m32/alarm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/alarm.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check alarm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/attach-f-p.c strace-4.12/tests-m32/attach-f-p.c --- strace-4.11/tests-m32/attach-f-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/attach-f-p.c 2016-05-24 12:14:33.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 3 + +typedef union { + void *ptr; + pid_t pid; +} retval_t; + +typedef struct { + sigset_t set; + unsigned int no; +} thread_arg_t; + +static const char text_parent[] = "attach-f-p.test parent"; +static const char *child[N] = { + "attach-f-p.test child 0", + "attach-f-p.test child 1", + "attach-f-p.test child 2" +}; +static const int sigs[N] = { SIGALRM, SIGUSR1, SIGUSR2 }; +static const struct itimerspec its[N] = { + { .it_value.tv_sec = 1 }, + { .it_value.tv_sec = 2 }, + { .it_value.tv_sec = 3 } +}; +static thread_arg_t args[N] = { + { .no = 0 }, + { .no = 1 }, + { .no = 2 } +}; + +static void * +thread(void *a) +{ + thread_arg_t *arg = a; + int signo; + errno = sigwait(&arg->set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + assert(chdir(child[arg->no]) == -1); + retval_t retval = { .pid = syscall(__NR_gettid) }; + return retval.ptr; +} + +int +main(void) +{ + static timer_t timerid[N]; + pthread_t t[N]; + unsigned int i; + + for (i = 0; i < N; ++i) { + sigemptyset(&args[i].set); + sigaddset(&args[i].set, sigs[i]); + + errno = pthread_sigmask(SIG_BLOCK, &args[i].set, NULL); + if (errno) + perror_msg_and_fail("pthread_sigmask"); + } + + for (i = 0; i < N; ++i) { + struct sigevent sev = { + .sigev_notify = SIGEV_SIGNAL, + .sigev_signo = sigs[i] + }; + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid[i])) + perror_msg_and_skip("timer_create"); + + if (timer_settime(timerid[i], 0, &its[i], NULL)) + perror_msg_and_fail("timer_settime"); + + errno = pthread_create(&t[i], NULL, thread, (void *) &args[i]); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + if (write(3, "\n", 1) != 1) + perror_msg_and_fail("write"); + + for (i = 0; i < N; ++i) { + retval_t retval; + errno = pthread_join(t[i], &retval.ptr); + if (errno) + perror_msg_and_fail("pthread_join"); + errno = ENOENT; + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", + retval.pid, child[i], retval.pid); + } + + /* sleep a bit more to late the tracer catch up */ + if (timer_settime(timerid[0], 0, &its[0], NULL)) + perror_msg_and_fail("timer_settime"); + int signo; + errno = sigwait(&args[0].set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + + pid_t pid = getpid(); + assert(chdir(text_parent) == -1); + + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text_parent, pid); + + return 0; +} diff -Nru strace-4.11/tests-m32/attach-f-p.test strace-4.12/tests-m32/attach-f-p.test --- strace-4.11/tests-m32/attach-f-p.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/attach-f-p.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check that -f -p attaches to threads properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -f -p is implemented using /proc/$pid/task/ +[ -d /proc/self/task/ ] || + framework_skip_ '/proc/self/task/ is not available' +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-f-p > /dev/null 3>&1 + +./set_ptracer_any sh -c "exec ./attach-f-p > $EXP 3> $OUT" > /dev/null & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a32 -f -echdir -esignal=none -p $tracee_pid +match_diff "$LOG" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/attach-p-cmd-cmd.c strace-4.12/tests-m32/attach-p-cmd-cmd.c --- strace-4.11/tests-m32/attach-p-cmd-cmd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/attach-p-cmd-cmd.c 2016-05-23 16:39:23.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + static const char text[] = "attach-p-cmd.test cmd"; + pid_t pid = getpid(); + assert(chdir(text) == -1); + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text, pid); + return 0; +} diff -Nru strace-4.11/tests-m32/attach-p-cmd-p.c strace-4.12/tests-m32/attach-p-cmd-p.c --- strace-4.11/tests-m32/attach-p-cmd-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/attach-p-cmd-p.c 2016-01-22 19:37:11.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ + _exit(!chdir("attach-p-cmd.test -p")); +} + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_sec = atoi(av[1]) }; + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + + for (;;); + + return 0; +} diff -Nru strace-4.11/tests-m32/attach-p-cmd.test strace-4.12/tests-m32/attach-p-cmd.test --- strace-4.11/tests-m32/attach-p-cmd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/attach-p-cmd.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check that simultaneous use of -p option and tracing of a command works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-p-cmd-cmd > /dev/null +run_prog ./attach-p-cmd-p 1 > /dev/null + +./set_ptracer_any ./attach-p-cmd-p 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" +{ +printf '%-5d --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---\n' $tracee_pid +printf '%-5d chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory)\n' $tracee_pid +printf '%-5d +++ exited with 0 +++\n' $tracee_pid +} >> "$OUT" + +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff -Nru strace-4.11/tests-m32/bpf.c strace-4.12/tests-m32/bpf.c --- strace-4.11/tests-m32/bpf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/bpf.c 2016-01-06 11:29:16.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -83,39 +80,39 @@ main(void) { if (!map_create()) - return 77; + perror_msg_and_skip("BPF_MAP_CREATE"); printf("bpf\\(BPF_MAP_CREATE, " "\\{map_type=BPF_MAP_TYPE_UNSPEC, key_size=4, value_size=8, max_entries=256\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_LOOKUP_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_LOOKUP_ELEM"); printf("bpf\\(BPF_MAP_LOOKUP_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_UPDATE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_UPDATE_ELEM"); printf("bpf\\(BPF_MAP_UPDATE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef, value=0xbadc0ded, flags=BPF_ANY\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_DELETE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_DELETE_ELEM"); printf("bpf\\(BPF_MAP_DELETE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_GET_NEXT_KEY)) - return 77; + perror_msg_and_skip("BPF_MAP_GET_NEXT_KEY"); printf("bpf\\(BPF_MAP_GET_NEXT_KEY, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!prog_load()) - return 77; + perror_msg_and_skip("BPF_PROG_LOAD"); printf("bpf\\(BPF_PROG_LOAD, " "\\{prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p, " "license=\"GPL\", log_level=42, log_size=4096, log_buf=%p, " @@ -127,10 +124,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_bpf") #endif diff -Nru strace-4.11/tests-m32/bpf.test strace-4.12/tests-m32/bpf.test --- strace-4.11/tests-m32/bpf.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/bpf.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -ebpf $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-m32/brk.c strace-4.12/tests-m32/brk.c --- strace-4.11/tests-m32/brk.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/brk.c 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_brk + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_brk, NULL); + printf("brk\\(NULL\\) = %#lx\n", rc); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_brk") + +#endif diff -Nru strace-4.11/tests-m32/brk.test strace-4.12/tests-m32/brk.test --- strace-4.11/tests-m32/brk.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/brk.test 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +# Check brk syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a10 -ebrk $args > "$EXP" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests-m32/btrfs.c strace-4.12/tests-m32/btrfs.c --- strace-4.11/tests-m32/btrfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/btrfs.c 2016-05-28 00:37:02.000000000 +0000 @@ -0,0 +1,1920 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_tree_objectids.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_NAME_LEN +# define BTRFS_NAME_LEN 255 +#endif + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +static const char *btrfs_test_root; +static int btrfs_test_dir_fd; +static bool verbose = false; +static bool write_ok = false; + +const unsigned char uuid_reference[BTRFS_UUID_SIZE] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, +}; + +const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210"; + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + + +static const char * +maybe_print_uint64max(uint64_t val) +{ + if (val == UINT64_MAX) + return " /* UINT64_MAX */"; + return ""; +} + +/* takes highest valid flag bit */ +static uint64_t +max_flags_plus_one(int bit) +{ + int i; + uint64_t val = 0; + if (bit == -1) + return 1; + for (i = 0; i <= bit + 1 && i < 64; i++) + val |= (1ULL << i); + return val; +} + +/* + * Consumes no arguments, returns nothing: + * + * - BTRFS_IOC_TRANS_START + * - BTRFS_IOC_TRANS_END + */ +static void +btrfs_test_trans_ioctls(void) +{ + ioctl(-1, BTRFS_IOC_TRANS_START, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_START) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TRANS_END, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_END) = -1 EBADF (%m)\n"); +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SYNC + * + * Consumes argument, returns nothing + * - BTRFS_IOC_WAIT_SYNC + */ +static void +btrfs_test_sync_ioctls(void) +{ + uint64_t u64val = 0xdeadbeefbadc0ded; + + ioctl(-1, BTRFS_IOC_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, &u64val); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, [%" PRIu64 + "]) = -1 EBADF (%m)\n", u64val); + + /* + * The live test of BTRFS_IOC_SYNC happens as a part of the test + * for BTRFS_IOC_LOGICAL_INO + */ +} + +static void +btrfs_print_qgroup_inherit(struct btrfs_qgroup_inherit *inherit) +{ + printf("{flags="); + printflags(btrfs_qgroup_inherit_flags, inherit->flags, + "BTRFS_QGROUP_INHERIT_???"); + printf(", num_qgroups=%" PRI__u64 + ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64", lim={flags=", + inherit->num_qgroups, inherit->num_ref_copies, + inherit->num_excl_copies); + printflags(btrfs_qgroup_limit_flags, + inherit->lim.flags, + "BTRFS_QGROUP_LIMIT_???"); + printf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 + "}, qgroups=", + inherit->lim.max_rfer, inherit->lim.max_excl, + inherit->lim.rsv_rfer, inherit->lim.rsv_excl); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < inherit->num_qgroups; i++) { + if (i > 0) + printf(", "); + printf("%" PRI__u64, inherit->qgroups[i]); + } + printf("]"); + } else + printf("..."); + printf("}"); +} + + +static void +btrfs_print_vol_args_v2(struct btrfs_ioctl_vol_args_v2 *args, int print_qgroups) +{ + printf("{fd=%d, flags=", (int) args->fd); + printflags(btrfs_snap_flags_v2, args->flags, "BTRFS_SUBVOL_???"); + + if (args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + printf(", size=%" PRI__u64 ", qgroup_inherit=", args->size); + if (args->qgroup_inherit && print_qgroups) + btrfs_print_qgroup_inherit(args->qgroup_inherit); + else if (args->qgroup_inherit) + printf("%p", args->qgroup_inherit); + else + printf("NULL"); + } + printf(", name=\"%s\"}", args->name); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SNAP_CREATE + * - BTRFS_IOC_SUBVOL_CREATE + * - BTRFS_IOC_SNAP_DESTROY + * - BTRFS_IOC_DEFAULT_SUBVOL + * + * Consumes argument, returns u64: + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + +static void +btrfs_test_subvol_ioctls(void) +{ + const char *subvol_name = "subvol-name"; + char *long_subvol_name; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed; + uint64_t u64val = 0xdeadbeefbadc0ded; + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { + .fd = 2, + .flags = max_flags_plus_one(2), + }; + + long_subvol_name = malloc(BTRFS_PATH_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("malloc failed"); + memset(long_subvol_name, 'f', BTRFS_PATH_NAME_MAX); + long_subvol_name[BTRFS_PATH_NAME_MAX - 1] = '\0'; + + strcpy(vol_args.name, subvol_name); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + strncpy(vol_args.name, long_subvol_name, BTRFS_PATH_NAME_MAX); + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + long_subvol_name = realloc(long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("realloc failed"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + vol_args_v2.qgroup_inherit = bad_pointer; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + const unsigned int n_qgroups = 8; + unsigned int i; + struct btrfs_qgroup_inherit *inherit; + vol_args_v2.size = + sizeof(*inherit) + n_qgroups * sizeof(inherit->qgroups[0]); + inherit = tail_alloc(vol_args_v2.size); + + inherit->flags = 0x3; + inherit->num_ref_copies = 0; + inherit->num_excl_copies = 0; + inherit->num_qgroups = n_qgroups; + for (i = 0; i < n_qgroups; i++) + inherit->qgroups[i] = 1ULL << i; + inherit->lim.flags = 0x7f; + inherit->lim.max_rfer = u64val; + inherit->lim.max_excl = u64val; + inherit->lim.rsv_rfer = u64val; + inherit->lim.rsv_excl = u64val; + vol_args_v2.qgroup_inherit = inherit; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, &u64val); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, [%" + PRIu64 "]) = -1 EBADF (%m)\n", u64val); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, "); + printflags(btrfs_snap_flags_v2, vol_args_v2.flags, + "BTRFS_SUBVOL_???"); + ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, &vol_args_v2.flags); + printf(") = -1 EBADF (%m)\n"); + + if (write_ok) { + struct btrfs_ioctl_vol_args_v2 args_passed; + /* + * Returns transid if flags & BTRFS_SUBVOL_CREATE_ASYNC + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + int subvolfd; + + strncpy(vol_args_v2.name, subvol_name, + sizeof(vol_args_v2.name)); + vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; + vol_args_v2.size = 0; + vol_args_v2.qgroup_inherit = NULL; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SUBVOL_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SUBVOL_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + subvolfd = openat(btrfs_test_dir_fd, subvol_name, + O_RDONLY|O_DIRECTORY); + if (subvolfd < 0) + perror_msg_and_fail("openat(%s) failed", subvol_name); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_NAME_LEN); + vol_args_v2.fd = subvolfd; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SNAP_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&args_passed, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + /* This only works when mounted w/ -ouser_subvol_rm_allowed */ + strncpy(vol_args.name, long_subvol_name, 255); + vol_args.name[255] = 0; + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%.*s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, 255, long_subvol_name); + + strcpy(vol_args.name, subvol_name); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, subvol_name); + + close(subvolfd); + } + free(long_subvol_name); +} + +static void +btrfs_print_balance_args(struct btrfs_balance_args *args) +{ + printf("{profiles="); + printflags(btrfs_space_info_flags, args->profiles, + "BTRFS_BLOCK_GROUP_???"); + printf(", usage=%"PRI__u64 "%s, devid=%"PRI__u64 "%s, pstart=%"PRI__u64 + "%s, pend=%"PRI__u64 "%s, vstart=%"PRI__u64 "%s, vend=%"PRI__u64 + "%s, target=%"PRI__u64 "%s, flags=", + args->usage, maybe_print_uint64max(args->usage), + args->devid, maybe_print_uint64max(args->devid), + args->pstart, maybe_print_uint64max(args->pstart), + args->pend, maybe_print_uint64max(args->pend), + args->vstart, maybe_print_uint64max(args->vstart), + args->vend, maybe_print_uint64max(args->vend), + args->target, maybe_print_uint64max(args->target)); + printflags(btrfs_balance_args, args->flags, "BTRFS_BALANCE_ARGS_???"); + printf("}"); +} + +/* + * Accepts argument, returns nothing + * - BTRFS_IOC_BALANCE + * - BTRFS_IOC_BALANCE_CTL + * + * Accepts argument, returns argument + * - BTRFS_IOC_BALANCE_V2 + */ +static void +btrfs_test_balance_ioctls(void) +{ + struct btrfs_ioctl_balance_args args = { + .flags = 0x3f, + .data = { + .profiles = 0x7, + .flags = 0x7, + .devid = 1, + .pend = -1ULL, + .vend = -1ULL, + }, + + .meta = { + .profiles = 0x38, + .flags = 0x38, + .devid = 1, + }, + + .sys = { + .profiles = 0x1c0 | (1ULL << 48), + .flags = 0x4c0, + .devid = 1, + }, + }; + struct btrfs_ioctl_vol_args vol_args = {}; + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_PAUSE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 2); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_CANCEL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_balance_args */ + ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, {flags="); + printflags(btrfs_balance_flags, args.flags, "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(-1, BTRFS_IOC_BALANCE_V2, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + args.flags = BTRFS_BALANCE_DATA | BTRFS_BALANCE_METADATA | + BTRFS_BALANCE_SYSTEM; + args.data.flags = 0; + args.data.profiles = 0; + args.meta.flags = 0; + args.meta.profiles = 0; + args.sys.flags = 0; + args.sys.profiles = 0; + printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=", + btrfs_test_dir_fd); + + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_BALANCE_V2, &args); + printf("} => {flags="); + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", state="); + printflags(btrfs_balance_state, args.state, + "BTRFS_BALANCE_STATE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + printf("}) = 0\n"); + } +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_RESIZE + * + * Requires /dev/btrfs-control, consumes argument, returns nothing: + * - BTRFS_IOC_SCAN_DEV + * - BTRFS_IOC_DEVICES_READY + * + */ +static void +btrfs_test_device_ioctls(void) +{ + const char *devid = "1"; + const char *devname = "/dev/sda1"; + struct btrfs_ioctl_vol_args args = { + .fd = 2, + }; + + ioctl(-1, BTRFS_IOC_RESIZE, NULL); + printf("ioctl(-1, BTRFS_IOC_RESIZE, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devid); + ioctl(-1, BTRFS_IOC_RESIZE, &args); + printf("ioctl(-1, BTRFS_IOC_RESIZE, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devname); + ioctl(-1, BTRFS_IOC_SCAN_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_ADD_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_ADD_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_RM_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_RM_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_CLONE + * - BTRFS_IOC_CLONE_RANGE + */ +static void +btrfs_test_clone_ioctls(void) +{ + int clone_fd = 4; + struct btrfs_ioctl_clone_range_args args = { + .src_fd = clone_fd, + .src_offset = 4096, + .src_length = 16384, + .dest_offset = 128 * 1024, + }; + + ioctl(-1, BTRFS_IOC_CLONE, clone_fd); + printf("ioctl(-1, BTRFS_IOC_CLONE or FICLONE, %x) = -1 EBADF (%m)\n", + clone_fd); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, &args); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "{src_fd=%d, src_offset=%" PRI__u64 ", src_length=%" PRI__u64 + ", dest_offset=%" PRI__u64 "}) = -1 EBADF (%m)\n", + (int) args.src_fd, args.src_offset, args.src_length, + args.dest_offset); +} + +#define BTRFS_COMPRESS_TYPES 2 +#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1) + +static void +btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args) +{ + printf("{start=%" PRIu64", len=%" PRIu64 "%s, flags=", + args->start, args->len, maybe_print_uint64max(args->len)); + + printflags(btrfs_defrag_flags, args->flags, "BTRFS_DEFRAG_RANGE_???"); + printf(", extent_thresh=%u, compress_type=", args->extent_thresh); + printxval(btrfs_compress_types, args->compress_type, + "BTRFS_COMPRESS_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_DEFRAG + * - BTRFS_DEFRAG_RANGE + */ +static void +btrfs_test_defrag_ioctls(void) +{ + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_defrag_range_args args = { + .start = 0, + .len = -1ULL, + .flags = max_flags_plus_one(1), + .extent_thresh = 128 * 1024, + .compress_type = 2, /* BTRFS_COMPRESS_LZO */ + }; + + /* + * These are documented as using vol_args but don't + * actually consume it. + */ + ioctl(-1, BTRFS_IOC_DEFRAG, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFRAG, &vol_args); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_defrag_range_args */ + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.compress_type = BTRFS_INVALID_COMPRESS; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.len--; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); +} + +static const char * +xlookup(const struct xlat *xlat, const uint64_t val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + printf("%" PRIu64, objectid); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + printf("%u", type); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_search_key(struct btrfs_ioctl_search_key *key) +{ + printf("key={tree_id="); + btrfs_print_objectid(key->tree_id); + if (verbose || key->min_objectid != 256) { + printf(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + if (verbose || key->max_objectid != -256ULL) { + printf(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + if (key->min_offset) + printf(", min_offset=%" PRI__u64 "%s", + key->min_offset, maybe_print_uint64max(key->min_offset)); + if (key->max_offset) + printf(", max_offset=%" PRI__u64 "%s", + key->max_offset, maybe_print_uint64max(key->max_offset)); + if (key->min_transid) + printf(", min_transid=%" PRI__u64"%s", key->min_transid, + maybe_print_uint64max(key->min_transid)); + if (key->max_transid) + printf(", max_transid=%" PRI__u64"%s", key->max_transid, + maybe_print_uint64max(key->max_transid)); + printf(", min_type="); + btrfs_print_key_type(key->min_type); + printf(", max_type="); + btrfs_print_key_type(key->max_type); + printf(", nr_items=%u}", key->nr_items); +} + +static void +btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, + void *buf, uint64_t buf_size) +{ + if (verbose) { + uint64_t i; + uint64_t off = 0; + printf("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header *sh; + sh = (typeof(sh))(buf + off); + if (i) + printf(", "); + printf("{transid=%" PRI__u64 ", objectid=", + sh->transid); + btrfs_print_objectid(sh->objectid); + printf(", offset=%" PRI__u64 ", type=", sh->offset); + btrfs_print_key_type(sh->type); + printf(", len=%u}", sh->len); + off += sizeof(*sh) + sh->len; + } + printf("]"); + } else + printf("..."); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_TREE_SEARCH + * - BTRFS_IOC_TREE_SEARCH_V2 + */ +static void +btrfs_test_search_ioctls(void) +{ + struct btrfs_ioctl_search_key key_reference = { + .tree_id = 5, + .min_objectid = 256, + .max_objectid = -1ULL, + .min_offset = 0, + .max_offset = -1ULL, + .min_transid = 0, + .max_transid = -1ULL, + .min_type = 0, + .max_type = -1U, + .nr_items = 10, + }; + struct btrfs_ioctl_search_args search_args; + struct btrfs_ioctl_search_args_v2 search_args_v2 = { + .buf_size = 4096, + }; + + ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL) = -1 EBADF (%m)\n"); + + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_objectid = 6; + key_reference.max_objectid = 7; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_offset++; + key_reference.max_offset--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_transid++; + key_reference.max_transid--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_type = 1; + key_reference.max_type = 12; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + if (btrfs_test_root) { + struct btrfs_ioctl_search_args_v2 *args; + int bufsize = 4096; + + key_reference.tree_id = 5; + key_reference.min_type = 1; + key_reference.max_type = 1; + key_reference.min_objectid = 256; + key_reference.max_objectid = 357; + key_reference.min_offset = 0; + key_reference.max_offset = -1ULL; + + search_args.key = key_reference; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&search_args.key); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("} => {key={nr_items=%u}, buf=", + search_args.key.nr_items); + btrfs_print_tree_search_buf(&search_args.key, search_args.buf, + sizeof(search_args.buf)); + printf("}) = 0\n"); + + args = malloc(sizeof(*args) + bufsize); + if (!args) + perror_msg_and_fail("malloc failed"); + + args->key = key_reference; + args->buf_size = bufsize; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&key_reference); + printf(", buf_size=%" PRIu64 "}", (uint64_t) args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {key={nr_items=%u}, buf_size=%" PRIu64 ", buf=", + args->key.nr_items, (uint64_t)args->buf_size); + btrfs_print_tree_search_buf(&args->key, args->buf, + args->buf_size); + printf("}) = 0\n"); + + args->key = key_reference; + args->buf_size = sizeof(struct btrfs_ioctl_search_header); + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&args->key); + printf(", buf_size=%" PRIu64 "}", (uint64_t)args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {buf_size=%" PRIu64 "}) = -1 EOVERFLOW (%m)\n", + (uint64_t)args->buf_size); + free(args); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_LOOKUP + */ +static void +btrfs_test_ino_lookup_ioctl(void) +{ + struct btrfs_ioctl_ino_lookup_args args = { + .treeid = 5, + .objectid = 256, + }; + + ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, {treeid="); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(-1, BTRFS_IOC_INO_LOOKUP, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_INO_LOOKUP, {treeid=", + btrfs_test_dir_fd); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_LOOKUP, &args); + printf("} => {name=\"%s\"}) = 0\n", args.name); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SPACE_INFO + */ +static void +btrfs_test_space_info_ioctl(void) +{ + struct btrfs_ioctl_space_args args = {}; + + ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SPACE_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}) = -1 EBADF (%m)\n", + args.space_slots); + + if (btrfs_test_root) { + struct btrfs_ioctl_space_args args_passed; + struct btrfs_ioctl_space_args *argsp; + args_passed = args; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, args_passed.space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, &args_passed); + printf(" => {total_spaces=%" PRI__u64 "}) = 0\n", + args_passed.total_spaces); + + argsp = malloc(sizeof(args) + + args_passed.total_spaces * sizeof(args.spaces[0])); + if (!argsp) + perror_msg_and_fail("malloc failed"); + + *argsp = args; + argsp->space_slots = args_passed.total_spaces; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, argsp->space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, argsp); + printf(" => {total_spaces=%" PRI__u64 ", spaces=", + argsp->total_spaces); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < argsp->total_spaces; i++) { + struct btrfs_ioctl_space_info *info; + info = &argsp->spaces[i]; + if (i) + printf(", "); + printf("{flags="); + printflags(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + printf(", total_bytes=%" PRI__u64 + ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + } + + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + free(argsp); + } +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SCRUB_CANCEL + * Consumes argument, returns argument: + - * BTRFS_IOC_SCRUB + - * BTRFS_IOC_SCRUB_PROGRESS + */ +static void +btrfs_test_scrub_ioctls(void) +{ + struct btrfs_ioctl_scrub_args args = { + .devid = 1, + .start = 0, + .end = -1ULL, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_SCRUB, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_CANCEL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SCRUB, {devid=%" PRI__u64 ", start=%" + PRI__u64 "%s, end=%" PRI__u64"%s, flags=", + args.devid, args.start, maybe_print_uint64max(args.start), + args.end, maybe_print_uint64max(args.end)); + printflags(btrfs_scrub_flags, args.flags, "BTRFS_SCRUB_???"); + ioctl(-1, BTRFS_IOC_SCRUB, &args); + printf("}) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, " + "{devid=%" PRI__u64 "}) = -1 EBADF (%m)\n", args.devid); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_INFO + */ +static void +btrfs_test_dev_info_ioctl(void) +{ + struct btrfs_ioctl_dev_info_args args = { + .devid = 1, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_DEV_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, " + "{devid=%" PRI__u64", uuid=%s}) = -1 EBADF (%m)\n", + args.devid, uuid_reference_string); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_PATHS + * - BTRFS_IOC_LOGICAL_INO + */ +static void +btrfs_test_ino_path_ioctls(void) +{ + char buf[16384]; + struct btrfs_ioctl_ino_path_args args = { + .inum = 256, + .size = sizeof(buf), + .fspath = (unsigned long)buf, + }; + + ioctl(-1, BTRFS_IOC_INO_PATHS, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_INO_PATHS, &args); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64 "}) = -1 EBADF (%m)\n", + args.inum, args.size, args.fspath); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64 + "}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath); + +#ifdef HAVE_LINUX_FIEMAP_H + if (btrfs_test_root) { + int size; + struct stat si; + int ret; + struct btrfs_data_container *data = (void *)buf; + struct fiemap *fiemap; + int fd; + + ret = fstat(btrfs_test_dir_fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + args.inum = si.st_ino; + printf("ioctl(%d, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64"}", + btrfs_test_dir_fd, args.inum, args.size, + args.fspath); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_PATHS, &args); + printf(" => {fspath={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[\"strace-test\"]"); + } else + printf("..."); + printf("}}) = 0\n"); + + fd = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd < 0) + perror_msg_and_fail("openat(file1) failed"); + + ret = fstat(fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + if (write(fd, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd"); + + /* + * Force delalloc so we can actually + * search for the extent. + */ + fsync(fd); + ioctl(fd, BTRFS_IOC_SYNC, NULL); + printf("ioctl(%d, BTRFS_IOC_SYNC) = 0\n", fd); + + size = sizeof(*fiemap) + 2 * sizeof(fiemap->fm_extents[0]); + fiemap = malloc(size); + if (!fiemap) + perror_msg_and_fail("malloc failed"); + memset(fiemap, 0, size); + + fiemap->fm_length = sizeof(buf); + fiemap->fm_extent_count = 2; + + /* This is also a live test for FIEMAP */ + printf("ioctl(%d, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + fd, fiemap->fm_start, fiemap->fm_length); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u}", fiemap->fm_extent_count); + ioctl(fd, FS_IOC_FIEMAP, fiemap); + printf(" => {fm_flags="); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_mapped_extents=%u, fm_extents=", + fiemap->fm_mapped_extents); + if (verbose) { + printf("["); + unsigned int i; + for (i = 0; i < fiemap->fm_mapped_extents; i++) { + struct fiemap_extent *fe; + fe = &fiemap->fm_extents[i]; + if (i) + printf(", "); + printf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 + ", ", + fe->fe_logical, fe->fe_physical, + fe->fe_length); + printflags(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + printf("}"); + } + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + + args.inum = fiemap->fm_extents[0].fe_physical; + printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64"}", + fd, args.inum, args.size, args.fspath); + ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args); + printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[{inum=%llu, offset=0, root=5}]", + (unsigned long long) si.st_ino); + } else + printf("..."); + printf("}}) = 0\n"); + close(fd); + free(fiemap); + } +#endif /* HAVE_LINUX_FIEMAP_H */ +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SET_RECEIVED_SUBVOL + */ +static void +btrfs_test_set_received_subvol_ioctl(void) +{ + struct btrfs_ioctl_received_subvol_args args = { + .stransid = 0x12345, + .stime = { + .sec = 1463193386, + .nsec = 12345, + }, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, &args); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "{uuid=%s, stransid=%" PRI__u64", stime=%" PRI__u64 + ".%u, flags=0}) = -1 EBADF (%m)\n", + uuid_reference_string, args.stransid, args.stime.sec, + args.stime.nsec); +} + +/* + * Consumes argument, returns nothing (output is via send_fd) + * - BTRFS_IOC_SEND + */ +static void +btrfs_test_send_ioctl(void) +{ + uint64_t u64_array[2] = { 256, 257 }; + struct btrfs_ioctl_send_args args = { + .send_fd = 4, + .parent_root = 257, + .flags = max_flags_plus_one(2), + }; + + ioctl(-1, BTRFS_IOC_SEND, NULL); + printf("ioctl(-1, BTRFS_IOC_SEND, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) + printf("NULL"); + else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); + + args.clone_sources_count = 2; + args.clone_sources = (__u64 *)u64_array; + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) { + printf("["); + btrfs_print_objectid(u64_array[0]); + printf(", "); + btrfs_print_objectid(u64_array[1]); + printf("]"); + } else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_CTL + */ +static void +btrfs_test_quota_ctl_ioctl(void) +{ + struct btrfs_ioctl_quota_ctl_args args = { + .cmd = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_ENABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 2; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_DISABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 3; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_RESCAN__NOTUSED}) = -1 EBADF (%m)\n"); + + args.cmd = 4; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "0x4 /* BTRFS_QUOTA_CTL_??? */}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_ASSIGN + */ +static void +btrfs_test_qgroup_assign_ioctl(void) +{ + struct btrfs_ioctl_qgroup_assign_args args = { + .assign = 1, + .src = 257, + .dst = 258, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, " + "{assign=%" PRI__u64", src=%" PRI__u64", dst=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.assign, args.src, args.dst); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_CREATE + */ +static void +btrfs_test_qgroup_create_ioctl(void) +{ + struct btrfs_ioctl_qgroup_create_args args = { + .create = 1, + .qgroupid = 257, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, " + "{create=%" PRI__u64", qgroupid=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.create, args.qgroupid); +} + +/* + * Consumes nothing, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN_WAIT + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN + */ +static void +btrfs_test_quota_rescan_ioctl(void) +{ + struct btrfs_ioctl_quota_rescan_args args = { + .progress = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, " + "{flags=0}) = -1 EBADF (%m)\n"); + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT) = -1 EBADF (%m)\n"); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FSLABEL + * + * Consumes no argument, returns argument: + * - BTRFS_IOC_GET_FS_LABEL + */ +static void +btrfs_test_label_ioctls(void) +{ + char label[BTRFS_LABEL_SIZE] = "btrfs-label"; + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, \"%s\") = -1 EBADF (%m)\n", + label); + + if (write_ok) { + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_SET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_GET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_GET_DEV_STATS + */ +static void +btrfs_test_get_dev_stats_ioctl(void) +{ + struct btrfs_ioctl_get_dev_stats args = { + .devid = 1, + .nr_items = 5, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL); + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + unsigned int i; + args.flags = BTRFS_DEV_STATS_RESET; + printf("ioctl(%d, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + btrfs_test_dir_fd, args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_DEV_STATS, &args); + printf("} => {nr_items=%" PRI__u64 ", flags=", + args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + printf(", ["); + for (i = 0; i < args.nr_items; i++) { + const char *name = xlookup(btrfs_dev_stats_values, i); + if (i) + printf(", "); + if (name) + printf("/* %s */ ", name); + printf("%" PRI__u64, args.values[i]); + } + printf("]}) = 0\n"); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_REPLACE + * + * Test environment for this is more difficult; It's better to do it by hand. + */ +static void +btrfs_test_dev_replace_ioctl(void) +{ + struct btrfs_ioctl_dev_replace_args args = { + .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, + .start = { + .srcdevid = 1, + }, + }; + strcpy((char *)args.start.srcdev_name, "/dev/sda1"); + strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); + + /* struct btrfs_ioctl_dev_replace_args */ + ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_START, start={srcdevid=%" + PRI__u64", cont_reading_from_srcdev_mode=%" PRI__u64 + ", srcdev_name=\"%s\", tgtdev_name=\"%s\"}}) = -1 EBADF (%m)\n", + args.start.srcdevid, + args.start.cont_reading_from_srcdev_mode, + (char *)args.start.srcdev_name, + (char *)args.start.tgtdev_name); + + args.cmd = 1; + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS}) = -1 EBADF (%m)\n"); +} + +static void +btrfs_test_extent_same_ioctl(void) +{ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + struct file_dedupe_range args = { + .src_offset = 1024, + .src_length = 10240, + }; + struct file_dedupe_range *argsp; + + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, NULL); + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=[]", + (uint64_t)args.src_offset, + (uint64_t)args.src_length, args.dest_count); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, &args); + printf("}) = -1 EBADF (%m)\n"); + + argsp = malloc(sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + if (!argsp) + perror_msg_and_fail("malloc failed"); + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + *argsp = args; + argsp->dest_count = 3; + argsp->info[0].dest_fd = 2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = 2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = 2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=", + (int64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + printf("]"); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + int fd1, fd2; + char buf[16384]; + + memset(buf, 0, sizeof(buf)); + + fd1 = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd1 < 0) + perror_msg_and_fail("open file1 failed"); + + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDWR|O_CREAT, 0600); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + + close(fd2); + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDONLY); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + argsp->src_offset = 0; + argsp->src_length = 4096; + argsp->dest_count = 3; + argsp->info[0].dest_fd = fd2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = fd2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = fd2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(%d, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 ", src_length=%" PRIu64 + ", dest_count=%hu, info=", fd1, + (uint64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 + ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + + ioctl(fd1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("]} => {info="); + printf("[{bytes_deduped=%" PRIu64 ", status=%d}, " + "{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[0].bytes_deduped, + argsp->info[0].status, + (uint64_t)argsp->info[1].bytes_deduped, + argsp->info[1].status); + if (verbose) + printf(", {bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[2].bytes_deduped, + argsp->info[2].status); + else + printf(", ..."); + printf("]}) = 0\n"); + close(fd1); + close(fd2); + unlinkat(btrfs_test_dir_fd, "file1", 0); + unlinkat(btrfs_test_dir_fd, "file2", 0); + close(fd1); + close(fd2); + } + free(argsp); +#endif /* BTRFS_IOC_FILE_EXTENT_SAME */ +} + +static void +btrfs_print_features(struct btrfs_ioctl_feature_flags *flags) +{ + printf("{compat_flags="); + printflags(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + printf(", compat_ro_flags="); + printflags(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + printf(", incompat_flags="); + printflags(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FEATURES + * + * Consumes nothing, returns argument: + * - BTRFS_IOC_GET_FEATURES + * - BTRFS_IOC_GET_SUPPORTED_FEATURES + */ +static void +btrfs_test_features_ioctls(void) +{ + struct btrfs_ioctl_feature_flags args[2] = { + { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, + }; + struct btrfs_ioctl_feature_flags supported_features[3]; + + ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, ["); + btrfs_print_features(&args[0]); + printf(", "); + btrfs_print_features(&args[1]); + ioctl(-1, BTRFS_IOC_SET_FEATURES, &args); + printf("]) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_GET_FEATURES, ", + btrfs_test_dir_fd); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FEATURES, + &supported_features); + btrfs_print_features(&supported_features[0]); + printf(") = 0\n"); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_SUPPORTED_FEATURES, + &supported_features); + printf("ioctl(%d, BTRFS_IOC_GET_SUPPORTED_FEATURES, ", + btrfs_test_dir_fd); + printf("[ /* supported */ "); + btrfs_print_features(&supported_features[0]); + printf(", /* safe to set */ "); + btrfs_print_features(&supported_features[1]); + printf(", /* safe to clear */ "); + btrfs_print_features(&supported_features[2]); + printf("]) = 0\n"); + } +} + +static void +btrfs_test_read_ioctls(void) +{ + static const struct xlat btrfs_read_cmd[] = { + XLAT(BTRFS_IOC_BALANCE_PROGRESS), + XLAT(BTRFS_IOC_FS_INFO), + XLAT(BTRFS_IOC_GET_FEATURES), + XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), + XLAT(BTRFS_IOC_QGROUP_LIMIT), + XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS), + XLAT(BTRFS_IOC_START_SYNC), + XLAT(BTRFS_IOC_SUBVOL_GETFLAGS), + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(btrfs_read_cmd); ++i) { + ioctl(-1, (unsigned long) btrfs_read_cmd[i].val, 0); + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", btrfs_read_cmd[i].str); + } +} + +int +main(int argc, char *argv[]) +{ + + int opt; + int ret; + const char *path; + + while ((opt = getopt(argc, argv, "wv")) != -1) { + switch (opt) { + case 'v': + /* + * These tests are incomplete, especially when + * printing arrays of objects are involved. + */ + verbose = true; + break; + case 'w': + write_ok = true; + break; + default: + error_msg_and_fail("usage: btrfs [-v] [-w] [path]"); + } + } + + /* + * This will enable optional tests that require a valid file descriptor + */ + if (optind < argc) { + int rootfd; + struct statfs sfi; + path = argv[optind]; + + ret = statfs(path, &sfi); + if (ret) + perror_msg_and_fail("statfs(%s) failed", path); + + if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC) + error_msg_and_fail("%s is not a btrfs file system", + path); + + btrfs_test_root = path; + rootfd = open(path, O_RDONLY|O_DIRECTORY); + if (rootfd < 0) + perror_msg_and_fail("open(%s) failed", path); + + ret = mkdirat(rootfd, "strace-test", 0755); + if (ret < 0 && errno != EEXIST) + perror_msg_and_fail("mkdirat(strace-test) failed"); + + btrfs_test_dir_fd = openat(rootfd, "strace-test", + O_RDONLY|O_DIRECTORY); + if (btrfs_test_dir_fd < 0) + perror_msg_and_fail("openat(strace-test) failed"); + close(rootfd); + } else + write_ok = false; + + if (btrfs_test_root) { + fprintf(stderr, "Testing live ioctls on %s (%s)\n", + btrfs_test_root, write_ok ? "read/write" : "read only"); + } + + btrfs_test_read_ioctls(); + btrfs_test_trans_ioctls(); + btrfs_test_sync_ioctls(); + btrfs_test_subvol_ioctls(); + btrfs_test_balance_ioctls(); + btrfs_test_device_ioctls(); + btrfs_test_clone_ioctls(); + btrfs_test_defrag_ioctls(); + btrfs_test_search_ioctls(); + btrfs_test_ino_lookup_ioctl(); + btrfs_test_space_info_ioctl(); + btrfs_test_scrub_ioctls(); + btrfs_test_dev_info_ioctl(); + btrfs_test_ino_path_ioctls(); + btrfs_test_set_received_subvol_ioctl(); + btrfs_test_send_ioctl(); + btrfs_test_quota_ctl_ioctl(); + btrfs_test_qgroup_assign_ioctl(); + btrfs_test_qgroup_create_ioctl(); + btrfs_test_quota_rescan_ioctl(); + btrfs_test_label_ioctls(); + btrfs_test_get_dev_stats_ioctl(); + btrfs_test_dev_replace_ioctl(); + btrfs_test_extent_same_ioctl(); + btrfs_test_features_ioctls(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BTRFS_H") + +#endif diff -Nru strace-4.11/tests-m32/btrfs.test strace-4.12/tests-m32/btrfs.test --- strace-4.11/tests-m32/btrfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/btrfs.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic btrfs ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/btrfs-v.test strace-4.12/tests-m32/btrfs-v.test --- strace-4.11/tests-m32/btrfs-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/btrfs-v.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl + +. "${srcdir=.}/init.sh" + +run_prog ./btrfs -v > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-m32/btrfs-vw.test strace-4.12/tests-m32/btrfs-vw.test --- strace-4.11/tests-m32/btrfs-vw.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/btrfs-vw.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-m32/btrfs-w.test strace-4.12/tests-m32/btrfs-w.test --- strace-4.11/tests-m32/btrfs-w.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/btrfs-w.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-w" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-m32/caps.awk strace-4.12/tests-m32/caps.awk --- strace-4.11/tests-m32/caps.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/caps.awk 2016-05-05 22:20:40.000000000 +0000 @@ -1,6 +1,8 @@ #!/bin/gawk # -# Copyright (c) 2014-2015 Dmitry V. Levin +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,13 +28,19 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BEGIN { - cap = "(0|CAP_[A-Z_]+(\\|CAP_[A-Z_]+)*|CAP_[A-Z_]+(\\|CAP_[A-Z_]+){37}\\|0xffffffc0)" - r[1] = "^capget\\(\\{_LINUX_CAPABILITY_VERSION_3, 0\\}, \\{" cap ", " cap ", " cap "\\}\\) = 0$" - capset_data = "{CAP_DAC_OVERRIDE|CAP_WAKE_ALARM, CAP_DAC_READ_SEARCH|CAP_BLOCK_SUSPEND, 0}" - s[2] = "capset({_LINUX_CAPABILITY_VERSION_3, 0}, " capset_data ") = -1 EPERM (Operation not permitted)" - s[3] = "+++ exited with 0 +++" + cap = "(0|1< + * This file is part of caps strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include extern int capget(int *, int *); extern int capset(int *, const int *); @@ -33,14 +37,26 @@ int main(void) { - int unused[6]; const int data[] = { 2, 4, 0, 8, 16, 0 }; const int v3 = 0x20080522; - int head[] = { v3, 0 }; - if (capget(head, unused) || head[0] != v3 || - capset(head, data) == 0 || errno != EPERM) - return 77; + int * const head = tail_alloc(sizeof(int) * 2); + head[0] = v3; + head[1] = 0; + int * const tail_data = tail_alloc(sizeof(data)); + + capget(NULL, NULL); + capget(head + 2, tail_data); + capget(head, tail_data + ARRAY_SIZE(data)); + + if (capget(head, tail_data)) + perror_msg_and_skip("capget"); + if (head[0] != v3) + error_msg_and_skip("capget: v3 expected"); + + memcpy(tail_data, data, sizeof(data)); + if (capset(head, data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); return 0; } diff -Nru strace-4.11/tests-m32/caps.test strace-4.12/tests-m32/caps.test --- strace-4.11/tests-m32/caps.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-m32/caps.test 2016-02-08 18:21:10.000000000 +0000 @@ -5,7 +5,7 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -e trace=capget,capset $args +run_strace -a 19 -e trace=capget,capset $args match_awk exit 0 diff -Nru strace-4.11/tests-m32/chmod.c strace-4.12/tests-m32/chmod.c --- strace-4.11/tests-m32/chmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chmod.c 2016-03-07 23:13:28.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2016 Anchit Jain + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_chmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "chmod_test_file"; + + if (open(fname, O_CREAT|O_RDONLY, 0400) == -1) + perror_msg_and_fail("open"); + + int chmod_res = syscall(__NR_chmod, fname, 0600); + + if (chmod_res == 0) { + printf("chmod(\"%s\", 0600) = 0\n", fname); + } else { + if (errno == ENOSYS) { + printf("chmod(\"%s\", 0600) = -1 ENOSYS (%m)\n", fname); + } else { + perror_msg_and_fail("chmod"); + } + } + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (chmod_res == 0) { + if (syscall(__NR_chmod, fname, 0600) != -1) + perror_msg_and_fail("chmod"); + + printf("chmod(\"%s\", 0600) = -1 ENOENT (%m)\n", fname); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chmod") + +#endif diff -Nru strace-4.11/tests-m32/chmod.test strace-4.12/tests-m32/chmod.test --- strace-4.11/tests-m32/chmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-m32/chown32.c strace-4.12/tests-m32/chown32.c --- strace-4.11/tests-m32/chown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chown32.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_chown32 + +# define SYSCALL_NR __NR_chown32 +# define SYSCALL_NAME "chown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown32") + +#endif diff -Nru strace-4.11/tests-m32/chown32.test strace-4.12/tests-m32/chown32.test --- strace-4.11/tests-m32/chown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chown32.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests-m32/chown.c strace-4.12/tests-m32/chown.c --- strace-4.11/tests-m32/chown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_chown + +# define SYSCALL_NR __NR_chown +# define SYSCALL_NAME "chown" + +# if defined __NR_chown32 && __NR_chown != __NR_chown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown") + +#endif diff -Nru strace-4.11/tests-m32/chown.test strace-4.12/tests-m32/chown.test --- strace-4.11/tests-m32/chown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 diff -Nru strace-4.11/tests-m32/chroot.c strace-4.12/tests-m32/chroot.c --- strace-4.11/tests-m32/chroot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chroot.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_chroot + +# include +# include + +int +main(void) +{ + static const char sample[] = "chroot.sample"; + + long rc = syscall(__NR_chroot, sample); + printf("chroot(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chroot") + +#endif diff -Nru strace-4.11/tests-m32/chroot.test strace-4.12/tests-m32/chroot.test --- strace-4.11/tests-m32/chroot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/chroot.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chroot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-m32/clock_adjtime.c strace-4.12/tests-m32/clock_adjtime.c --- strace-4.11/tests-m32/clock_adjtime.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/clock_adjtime.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of clock_adjtime strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_clock_adjtime + +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_clock_adjtime, CLOCK_MONOTONIC, NULL); + printf("clock_adjtime(CLOCK_MONOTONIC, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + void *efault = tail_alloc(1); + + rc = syscall(__NR_clock_adjtime, CLOCK_REALTIME, efault); + printf("clock_adjtime(CLOCK_REALTIME, %p) = %ld %s (%m)\n", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_adjtime") + +#endif diff -Nru strace-4.11/tests-m32/clock_adjtime.test strace-4.12/tests-m32/clock_adjtime.test --- strace-4.11/tests-m32/clock_adjtime.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/clock_adjtime.test 2016-04-22 01:13:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_adjtime syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff -Nru strace-4.11/tests-m32/clock_nanosleep.c strace-4.12/tests-m32/clock_nanosleep.c --- strace-4.11/tests-m32/clock_nanosleep.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests-m32/clock_nanosleep.c 2016-01-06 09:46:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -63,34 +61,32 @@ }; if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, NULL)) - return 77; + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, NULL, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + NULL, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, NULL, %p)" - " = -1 EFAULT (Bad address)\n", &rem.ts); + " = -1 EFAULT (%m)\n", &rem.ts); - if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == 0); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 999999999 + 1; - if (!syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_MONOTONIC, 0" - ", {%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + ", {%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -99,25 +95,23 @@ (intmax_t) itv.it_value.tv_usec); --req.ts.tv_nsec; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); - if (syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts)) - return 77; + assert(syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts) == 0); printf("clock_gettime(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); ++req.ts.tv_sec; rem.ts.tv_sec = 0xc0de4; rem.ts.tv_nsec = 0xc0de5; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, - &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {%jd, %jd}, %p)" " = ? ERESTARTNOHAND (To be restarted if no handler)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); diff -Nru strace-4.11/tests-m32/clock_nanosleep.test strace-4.12/tests-m32/clock_nanosleep.test --- strace-4.11/tests-m32/clock_nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/clock_nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check clock_nanosleep syscall decoding. +# Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_nanosleep,clock_gettime,setitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer diff -Nru strace-4.11/tests-m32/clock_xettime.c strace-4.12/tests-m32/clock_xettime.c --- strace-4.11/tests-m32/clock_xettime.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-m32/clock_xettime.c 2016-01-06 09:48:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,13 +47,13 @@ }; if (syscall(__NR_clock_getres, CLOCK_REALTIME, &t.ts)) - return 77; + perror_msg_and_skip("clock_getres CLOCK_REALTIME"); printf("clock_getres(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); if (syscall(__NR_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &t.ts)) - return 77; + perror_msg_and_skip("clock_gettime CLOCK_PROCESS_CPUTIME_ID"); printf("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -60,9 +61,10 @@ t.ts.tv_sec = 0xdeface1; t.ts.tv_nsec = 0xdeface2; if (!syscall(__NR_clock_settime, CLOCK_THREAD_CPUTIME_ID, &t.ts)) - return 77; + error_msg_and_skip("clock_settime CLOCK_THREAD_CPUTIME_ID:" + " EINVAL expected"); printf("clock_settime(CLOCK_THREAD_CPUTIME_ID, {%jd, %jd})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -72,10 +74,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_clock_getres && __NR_clock_gettime && __NR_clock_settime") #endif diff -Nru strace-4.11/tests-m32/clock_xettime.test strace-4.12/tests-m32/clock_xettime.test --- strace-4.11/tests-m32/clock_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/clock_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check clock_getres, clock_gettime, and clock_settime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_getres,clock_gettime,clock_settime -run_strace -a36 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime diff -Nru strace-4.11/tests-m32/copy_file_range.c strace-4.12/tests-m32/copy_file_range.c --- strace-4.11/tests-m32/copy_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/copy_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of copy_file_range strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_copy_file_range + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 0; + + long rc = syscall(__NR_copy_file_range, + fd_in, off_in, fd_out, off_out, len, flags); + printf("copy_file_range(%d, [%lld], %d, [%lld], %zu, %u)" + " = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, flags, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_copy_file_range") + +#endif diff -Nru strace-4.11/tests-m32/copy_file_range.test strace-4.12/tests-m32/copy_file_range.test --- strace-4.11/tests-m32/copy_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/copy_file_range.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check copy_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/count-f.c strace-4.12/tests-m32/count-f.c --- strace-4.11/tests-m32/count-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/count-f.c 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * This file is part of count-f strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#define N 32 +#define P 8 +#define T 4 + +static void * +thread(void *arg) +{ + unsigned int i; + + assert(chdir(".") == 0); + for (i = 0; i < N; ++i) { + assert(chdir("") == -1); + assert(chdir(".") == 0); + } + + return NULL; +} + +static int +process(void) +{ + unsigned int i; + pthread_t t[T]; + + for (i = 0; i < T; ++i) { + errno = pthread_create(&t[i], NULL, thread, NULL); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + for (i = 0; i < T; ++i) { + void *retval; + errno = pthread_join(t[i], &retval); + if (errno) + perror_msg_and_fail("pthread_join"); + } + + return 0; +} + +int +main(void) +{ + unsigned int i; + pid_t p[P]; + + for (i = 0; i < P; ++i) { + p[i] = fork(); + if (p[i] < 0) + perror_msg_and_fail("fork"); + if (!p[i]) + return process(); + } + for (i = 0; i < P; ++i) { + int s; + + assert(waitpid(p[i], &s, 0) == p[i]); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + + return 0; +} diff -Nru strace-4.11/tests-m32/count-f.expected strace-4.12/tests-m32/count-f.expected --- strace-4.11/tests-m32/count-f.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/count-f.expected 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1 @@ +[ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir diff -Nru strace-4.11/tests-m32/count-f.test strace-4.12/tests-m32/count-f.test --- strace-4.11/tests-m32/count-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/count-f.test 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check whether -c counts through forks and clones properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -q -f -c $args +match_grep + +exit 0 diff -Nru strace-4.11/tests-m32/count.test strace-4.12/tests-m32/count.test --- strace-4.11/tests-m32/count.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/count.test 2016-05-08 00:00:18.000000000 +0000 @@ -2,7 +2,7 @@ # # Check whether -c and -w options work. # -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,14 +29,14 @@ . "${srcdir=.}/init.sh" +run_prog ./sleep 0 check_prog grep -check_prog sleep grep_log() { local pattern="$1"; shift - run_strace "$@" + run_strace "$@" ./sleep 1 grep nanosleep "$LOG" > /dev/null || framework_skip_ 'sleep does not use nanosleep' @@ -48,9 +48,9 @@ } } -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c sleep 1 -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep sleep 1 -grep_log ' *[^ ]+ +(1\.0|0\.99)[^n]*nanosleep' -cw sleep 1 -grep_log '100\.00 +(1\.0|0\.99)[^n]*nanosleep' -cw -enanosleep sleep 1 +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep +grep_log ' *[^ ]+ +(1\.[01]|0\.99)[^n]*nanosleep' -cw +grep_log '100\.00 +(1\.[01]|0\.99)[^n]*nanosleep' -cw -enanosleep exit 0 diff -Nru strace-4.11/tests-m32/creat.c strace-4.12/tests-m32/creat.c --- strace-4.11/tests-m32/creat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/creat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_creat + +# include +# include + +# define TMP_FILE "creat" + +int +main(void) +{ + long rc = syscall(__NR_creat, TMP_FILE, 0400); + printf("creat(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, 0400, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_creat") + +#endif diff -Nru strace-4.11/tests-m32/creat.test strace-4.12/tests-m32/creat.test --- strace-4.11/tests-m32/creat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/creat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check creat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/dup2.c strace-4.12/tests-m32/dup2.c --- strace-4.11/tests-m32/dup2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_dup2 + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup2, fd_old, fd_new); + printf("dup2(%d, %d) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup2") + +#endif diff -Nru strace-4.11/tests-m32/dup2.test strace-4.12/tests-m32/dup2.test --- strace-4.11/tests-m32/dup2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup2.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests-m32/dup3.c strace-4.12/tests-m32/dup3.c --- strace-4.11/tests-m32/dup3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup3.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include +#include + +#if defined __NR_dup3 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup3 && && O_CLOEXEC") + +#endif diff -Nru strace-4.11/tests-m32/dup3.test strace-4.12/tests-m32/dup3.test --- strace-4.11/tests-m32/dup3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup3.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup3 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-m32/dup.c strace-4.12/tests-m32/dup.c --- strace-4.11/tests-m32/dup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = dup(-1); + printf("dup(-1) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/dup.test strace-4.12/tests-m32/dup.test --- strace-4.11/tests-m32/dup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/dup.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-m32/epoll_create1.c strace-4.12/tests-m32/epoll_create1.c --- strace-4.11/tests-m32/epoll_create1.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/epoll_create1.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include #include +#if defined __NR_epoll_create1 && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_epoll_create1 && defined O_CLOEXEC - (void) close(0); - if (syscall(__NR_epoll_create1, O_CLOEXEC)) - return 77; - return syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK) >= 0; + long rc = syscall(__NR_epoll_create1, O_CLOEXEC); + if (rc == -1) { + printf("epoll_create1(EPOLL_CLOEXEC) = -1 %s (%m)\n", + errno2name()); + } else { + printf("epoll_create1(EPOLL_CLOEXEC) = %ld\n", rc); + } + + rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK); + printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %ld %s (%m)\n", + O_NONBLOCK, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-m32/epoll_create1.expected strace-4.12/tests-m32/epoll_create1.expected --- strace-4.11/tests-m32/epoll_create1.expected 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests-m32/epoll_create1.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -epoll_create1\(EPOLL_CLOEXEC\) += 0 -epoll_create1\(EPOLL_CLOEXEC\|0x[[:xdigit:]]+\) += -1 EINVAL .* diff -Nru strace-4.11/tests-m32/epoll_create1.test strace-4.12/tests-m32/epoll_create1.test --- strace-4.11/tests-m32/epoll_create1.test 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests-m32/epoll_create1.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check epoll_create1 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e epoll_create1 $args -match_grep - -exit 0 +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-m32/epoll_create.c strace-4.12/tests-m32/epoll_create.c --- strace-4.11/tests-m32/epoll_create.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_create.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_create + +# include +# include + +int +main(void) +{ + const long int size = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_epoll_create, size); + printf("epoll_create(%d) = %ld %s (%m)\n", + (int) size, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_creat") + +#endif diff -Nru strace-4.11/tests-m32/epoll_create.test strace-4.12/tests-m32/epoll_create.test --- strace-4.11/tests-m32/epoll_create.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_create.test 2016-04-08 07:59:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-m32/epoll_ctl.c strace-4.12/tests-m32/epoll_ctl.c --- strace-4.11/tests-m32/epoll_ctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_ctl.c 2016-05-16 21:47:09.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_ctl + +# include +# include +# include +# include + +static long +invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) +{ + op |= (unsigned long) 0xffffffff00000000; + return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); +} + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + ev->events = EPOLLIN; + + long rc = invoke_syscall(-1U, EPOLL_CTL_ADD, -2U, ev); + printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); + + rc = invoke_syscall(-3U, EPOLL_CTL_DEL, -4U, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", + ev, rc, errno2name()); + + rc = invoke_syscall(-1UL, EPOLL_CTL_MOD, -16UL, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_ctl") + +#endif diff -Nru strace-4.11/tests-m32/epoll_ctl.test strace-4.12/tests-m32/epoll_ctl.test --- strace-4.11/tests-m32/epoll_ctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_ctl.test 2016-04-08 07:59:15.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_ctl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/epoll_pwait.c strace-4.12/tests-m32/epoll_pwait.c --- strace-4.11/tests-m32/epoll_pwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_pwait.c 2016-05-10 01:37:46.000000000 +0000 @@ -0,0 +1,32 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_pwait + +# include +# include +# include +# include + +# include "kernel_types.h" + +int +main(void) +{ + sigset_t set[2]; + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, + set, (kernel_ulong_t) sizeof(set)); + printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n", + ev, set, (unsigned) sizeof(set), rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_pwait") + +#endif diff -Nru strace-4.11/tests-m32/epoll_pwait.test strace-4.12/tests-m32/epoll_pwait.test --- strace-4.11/tests-m32/epoll_pwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_pwait.test 2016-05-09 22:12:57.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of epoll_pwait syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/epoll_wait.c strace-4.12/tests-m32/epoll_wait.c --- strace-4.11/tests-m32/epoll_wait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_wait.c 2016-05-09 21:46:17.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_wait + +# include +# include +# include + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2); + printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n", + ev, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_wait") + +#endif diff -Nru strace-4.11/tests-m32/epoll_wait.test strace-4.12/tests-m32/epoll_wait.test --- strace-4.11/tests-m32/epoll_wait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/epoll_wait.test 2016-04-08 07:59:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_wait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 diff -Nru strace-4.11/tests-m32/errno2name.c strace-4.12/tests-m32/errno2name.c --- strace-4.11/tests-m32/errno2name.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/errno2name.c 2016-04-21 01:08:55.000000000 +0000 @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +errno2name(void) +{ + switch (errno) { + /* names taken from linux/errnoent.h */ +#ifdef E2BIG + CASE(E2BIG); +#endif +#ifdef EACCES + CASE(EACCES); +#endif +#ifdef EADDRINUSE + CASE(EADDRINUSE); +#endif +#ifdef EADDRNOTAVAIL + CASE(EADDRNOTAVAIL); +#endif +#ifdef EADV + CASE(EADV); +#endif +#ifdef EAFNOSUPPORT + CASE(EAFNOSUPPORT); +#endif +#ifdef EAGAIN + CASE(EAGAIN); +#endif +#ifdef EALREADY + CASE(EALREADY); +#endif +#ifdef EBADCOOKIE + CASE(EBADCOOKIE); +#endif +#ifdef EBADE + CASE(EBADE); +#endif +#ifdef EBADF + CASE(EBADF); +#endif +#ifdef EBADFD + CASE(EBADFD); +#endif +#ifdef EBADHANDLE + CASE(EBADHANDLE); +#endif +#ifdef EBADMSG + CASE(EBADMSG); +#endif +#ifdef EBADR + CASE(EBADR); +#endif +#ifdef EBADRQC + CASE(EBADRQC); +#endif +#ifdef EBADSLT + CASE(EBADSLT); +#endif +#ifdef EBADTYPE + CASE(EBADTYPE); +#endif +#ifdef EBFONT + CASE(EBFONT); +#endif +#ifdef EBUSY + CASE(EBUSY); +#endif +#ifdef ECANCELED + CASE(ECANCELED); +#endif +#ifdef ECHILD + CASE(ECHILD); +#endif +#ifdef ECHRNG + CASE(ECHRNG); +#endif +#ifdef ECOMM + CASE(ECOMM); +#endif +#ifdef ECONNABORTED + CASE(ECONNABORTED); +#endif +#ifdef ECONNREFUSED + CASE(ECONNREFUSED); +#endif +#ifdef ECONNRESET + CASE(ECONNRESET); +#endif +#ifdef EDEADLK + CASE(EDEADLK); +#endif +#ifdef EDESTADDRREQ + CASE(EDESTADDRREQ); +#endif +#ifdef EDOM + CASE(EDOM); +#endif +#ifdef EDOTDOT + CASE(EDOTDOT); +#endif +#ifdef EDQUOT + CASE(EDQUOT); +#endif +#ifdef EEXIST + CASE(EEXIST); +#endif +#ifdef EFAULT + CASE(EFAULT); +#endif +#ifdef EFBIG + CASE(EFBIG); +#endif +#ifdef EHOSTDOWN + CASE(EHOSTDOWN); +#endif +#ifdef EHOSTUNREACH + CASE(EHOSTUNREACH); +#endif +#ifdef EHWPOISON + CASE(EHWPOISON); +#endif +#ifdef EIDRM + CASE(EIDRM); +#endif +#ifdef EILSEQ + CASE(EILSEQ); +#endif +#ifdef EINPROGRESS + CASE(EINPROGRESS); +#endif +#ifdef EINTR + CASE(EINTR); +#endif +#ifdef EINVAL + CASE(EINVAL); +#endif +#ifdef EIO + CASE(EIO); +#endif +#ifdef EIOCBQUEUED + CASE(EIOCBQUEUED); +#endif +#ifdef EISCONN + CASE(EISCONN); +#endif +#ifdef EISDIR + CASE(EISDIR); +#endif +#ifdef EISNAM + CASE(EISNAM); +#endif +#ifdef EJUKEBOX + CASE(EJUKEBOX); +#endif +#ifdef EKEYEXPIRED + CASE(EKEYEXPIRED); +#endif +#ifdef EKEYREJECTED + CASE(EKEYREJECTED); +#endif +#ifdef EKEYREVOKED + CASE(EKEYREVOKED); +#endif +#ifdef EL2HLT + CASE(EL2HLT); +#endif +#ifdef EL2NSYNC + CASE(EL2NSYNC); +#endif +#ifdef EL3HLT + CASE(EL3HLT); +#endif +#ifdef EL3RST + CASE(EL3RST); +#endif +#ifdef ELIBACC + CASE(ELIBACC); +#endif +#ifdef ELIBBAD + CASE(ELIBBAD); +#endif +#ifdef ELIBEXEC + CASE(ELIBEXEC); +#endif +#ifdef ELIBMAX + CASE(ELIBMAX); +#endif +#ifdef ELIBSCN + CASE(ELIBSCN); +#endif +#ifdef ELNRNG + CASE(ELNRNG); +#endif +#ifdef ELOOP + CASE(ELOOP); +#endif +#ifdef EMEDIUMTYPE + CASE(EMEDIUMTYPE); +#endif +#ifdef EMFILE + CASE(EMFILE); +#endif +#ifdef EMLINK + CASE(EMLINK); +#endif +#ifdef EMSGSIZE + CASE(EMSGSIZE); +#endif +#ifdef EMULTIHOP + CASE(EMULTIHOP); +#endif +#ifdef ENAMETOOLONG + CASE(ENAMETOOLONG); +#endif +#ifdef ENAVAIL + CASE(ENAVAIL); +#endif +#ifdef ENETDOWN + CASE(ENETDOWN); +#endif +#ifdef ENETRESET + CASE(ENETRESET); +#endif +#ifdef ENETUNREACH + CASE(ENETUNREACH); +#endif +#ifdef ENFILE + CASE(ENFILE); +#endif +#ifdef ENOANO + CASE(ENOANO); +#endif +#ifdef ENOBUFS + CASE(ENOBUFS); +#endif +#ifdef ENOCSI + CASE(ENOCSI); +#endif +#ifdef ENODATA + CASE(ENODATA); +#endif +#ifdef ENODEV + CASE(ENODEV); +#endif +#ifdef ENOENT + CASE(ENOENT); +#endif +#ifdef ENOEXEC + CASE(ENOEXEC); +#endif +#ifdef ENOIOCTLCMD + CASE(ENOIOCTLCMD); +#endif +#ifdef ENOKEY + CASE(ENOKEY); +#endif +#ifdef ENOLCK + CASE(ENOLCK); +#endif +#ifdef ENOLINK + CASE(ENOLINK); +#endif +#ifdef ENOMEDIUM + CASE(ENOMEDIUM); +#endif +#ifdef ENOMEM + CASE(ENOMEM); +#endif +#ifdef ENOMSG + CASE(ENOMSG); +#endif +#ifdef ENONET + CASE(ENONET); +#endif +#ifdef ENOPKG + CASE(ENOPKG); +#endif +#ifdef ENOPROTOOPT + CASE(ENOPROTOOPT); +#endif +#ifdef ENOSPC + CASE(ENOSPC); +#endif +#ifdef ENOSR + CASE(ENOSR); +#endif +#ifdef ENOSTR + CASE(ENOSTR); +#endif +#ifdef ENOSYS + CASE(ENOSYS); +#endif +#ifdef ENOTBLK + CASE(ENOTBLK); +#endif +#ifdef ENOTCONN + CASE(ENOTCONN); +#endif +#ifdef ENOTDIR + CASE(ENOTDIR); +#endif +#ifdef ENOTEMPTY + CASE(ENOTEMPTY); +#endif +#ifdef ENOTNAM + CASE(ENOTNAM); +#endif +#ifdef ENOTRECOVERABLE + CASE(ENOTRECOVERABLE); +#endif +#ifdef ENOTSOCK + CASE(ENOTSOCK); +#endif +#ifdef ENOTSUPP + CASE(ENOTSUPP); +#endif +#ifdef ENOTSYNC + CASE(ENOTSYNC); +#endif +#ifdef ENOTTY + CASE(ENOTTY); +#endif +#ifdef ENOTUNIQ + CASE(ENOTUNIQ); +#endif +#ifdef ENXIO + CASE(ENXIO); +#endif +#ifdef EOPENSTALE + CASE(EOPENSTALE); +#endif +#ifdef EOPNOTSUPP + CASE(EOPNOTSUPP); +#endif +#ifdef EOVERFLOW + CASE(EOVERFLOW); +#endif +#ifdef EOWNERDEAD + CASE(EOWNERDEAD); +#endif +#ifdef EPERM + CASE(EPERM); +#endif +#ifdef EPFNOSUPPORT + CASE(EPFNOSUPPORT); +#endif +#ifdef EPIPE + CASE(EPIPE); +#endif +#ifdef EPROBE_DEFER + CASE(EPROBE_DEFER); +#endif +#ifdef EPROTO + CASE(EPROTO); +#endif +#ifdef EPROTONOSUPPORT + CASE(EPROTONOSUPPORT); +#endif +#ifdef EPROTOTYPE + CASE(EPROTOTYPE); +#endif +#ifdef ERANGE + CASE(ERANGE); +#endif +#ifdef EREMCHG + CASE(EREMCHG); +#endif +#ifdef EREMOTE + CASE(EREMOTE); +#endif +#ifdef EREMOTEIO + CASE(EREMOTEIO); +#endif +#ifdef ERESTART + CASE(ERESTART); +#endif +#ifdef ERESTARTNOHAND + CASE(ERESTARTNOHAND); +#endif +#ifdef ERESTARTNOINTR + CASE(ERESTARTNOINTR); +#endif +#ifdef ERESTARTSYS + CASE(ERESTARTSYS); +#endif +#ifdef ERESTART_RESTARTBLOCK + CASE(ERESTART_RESTARTBLOCK); +#endif +#ifdef ERFKILL + CASE(ERFKILL); +#endif +#ifdef EROFS + CASE(EROFS); +#endif +#ifdef ESERVERFAULT + CASE(ESERVERFAULT); +#endif +#ifdef ESHUTDOWN + CASE(ESHUTDOWN); +#endif +#ifdef ESOCKTNOSUPPORT + CASE(ESOCKTNOSUPPORT); +#endif +#ifdef ESPIPE + CASE(ESPIPE); +#endif +#ifdef ESRCH + CASE(ESRCH); +#endif +#ifdef ESRMNT + CASE(ESRMNT); +#endif +#ifdef ESTALE + CASE(ESTALE); +#endif +#ifdef ESTRPIPE + CASE(ESTRPIPE); +#endif +#ifdef ETIME + CASE(ETIME); +#endif +#ifdef ETIMEDOUT + CASE(ETIMEDOUT); +#endif +#ifdef ETOOMANYREFS + CASE(ETOOMANYREFS); +#endif +#ifdef ETOOSMALL + CASE(ETOOSMALL); +#endif +#ifdef ETXTBSY + CASE(ETXTBSY); +#endif +#ifdef EUCLEAN + CASE(EUCLEAN); +#endif +#ifdef EUNATCH + CASE(EUNATCH); +#endif +#ifdef EUSERS + CASE(EUSERS); +#endif +#ifdef EXDEV + CASE(EXDEV); +#endif +#ifdef EXFULL + CASE(EXFULL); +#endif + default: perror_msg_and_fail("unknown errno %d", errno); + } +} diff -Nru strace-4.11/tests-m32/error_msg.c strace-4.12/tests-m32/error_msg.c --- strace-4.11/tests-m32/error_msg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/error_msg.c 2016-01-21 23:46:43.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +void +perror_msg_and_fail(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_fail(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_skip(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(77); +} + +void +perror_msg_and_skip(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(77); +} diff -Nru strace-4.11/tests-m32/eventfd.c strace-4.12/tests-m32/eventfd.c --- strace-4.11/tests-m32/eventfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/eventfd.c 2016-01-05 23:12:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include +#if defined __NR_eventfd2 && defined O_CLOEXEC + int main(void) { -#if defined __NR_eventfd2 && defined O_CLOEXEC (void) close(0); - return syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("eventfd2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-m32/execveat.c strace-4.12/tests-m32/execveat.c --- strace-4.11/tests-m32/execveat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/execveat.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execveat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,160 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #ifdef __NR_execveat -#define FILENAME "execveat\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +# define FILENAME "test.execveat\nfilename" +# define Q_FILENAME "test.execveat\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - syscall(__NR_execveat, -100, FILENAME, argv, envp, 0x1100); + const char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + const char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], envp[2], envp[3], envp[4], +#endif + errno2name()); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], +#endif + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[1], +#endif + errno2name()); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", []" +#ifdef VERBOSE_EXECVEAT + ", []" +#else + ", [/* 0 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, errno2name()); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + syscall(__NR_execveat, -100, FILENAME, a, b, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVEAT + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, a + 1, b + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, NULL, efault, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", NULL, %p" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + syscall(__NR_execveat, -100, FILENAME, efault, NULL, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", %p, NULL" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_execveat") #endif diff -Nru strace-4.11/tests-m32/execveat.expected strace-4.12/tests-m32/execveat.expected --- strace-4.11/tests-m32/execveat.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execveat.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \[/\* 2 vars \*/\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests-m32/execveat.test strace-4.12/tests-m32/execveat.test --- strace-4.11/tests-m32/execveat.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execveat.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check execveat syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/execveat-v.c strace-4.12/tests-m32/execveat-v.c --- strace-4.11/tests-m32/execveat-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/execveat-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execveat-v strace test. */ +#define VERBOSE_EXECVEAT +#include "execveat.c" diff -Nru strace-4.11/tests-m32/execveat-v.expected strace-4.12/tests-m32/execveat-v.expected --- strace-4.11/tests-m32/execveat-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execveat-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests-m32/execveat-v.test strace-4.12/tests-m32/execveat-v.test --- strace-4.11/tests-m32/execveat-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/execveat-v.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of execveat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=execveat diff -Nru strace-4.11/tests-m32/execve.c strace-4.12/tests-m32/execve.c --- strace-4.11/tests-m32/execve.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/execve.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execve strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +27,145 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include -#define FILENAME "execve\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +#define FILENAME "test.execve\nfilename" +#define Q_FILENAME "test.execve\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - execve(FILENAME, (char * const *) argv, (char * const *) envp); + char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1], envp[2], envp[3], envp[4] +#endif + ); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1] +#endif + ); + + execve(FILENAME, tail_argv + 2, tail_envp + 1); + printf("execve(\"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[1] +#endif + ); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + execve(FILENAME, empty, empty); + printf("execve(\"%s\", []" +#ifdef VERBOSE_EXECVE + ", []" +#else + ", [/* 0 vars */]" +#endif + ") = -1 ENOENT (%m)\n", Q_FILENAME); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + execve(FILENAME, a, b); + printf("execve(\"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, a + 1, b + 1); + printf("execve(\"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, (char **) tail_argv[ARRAY_SIZE(q_argv)], efault); + printf("execve(\"%s\", NULL, %p) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + execve(FILENAME, efault, NULL); + printf("execve(\"%s\", %p, NULL) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + return 0; } diff -Nru strace-4.11/tests-m32/execve.expected strace-4.12/tests-m32/execve.expected --- strace-4.11/tests-m32/execve.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execve.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \[/\* 2 vars \*/\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests-m32/execve.test strace-4.12/tests-m32/execve.test --- strace-4.11/tests-m32/execve.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execve.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +check_prog grep +run_prog > /dev/null +run_strace -eexecve $args > "$EXP" -exit 0 +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/execve-v.c strace-4.12/tests-m32/execve-v.c --- strace-4.11/tests-m32/execve-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/execve-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execve-v strace test. */ +#define VERBOSE_EXECVE +#include "execve.c" diff -Nru strace-4.11/tests-m32/execve-v.expected strace-4.12/tests-m32/execve-v.expected --- strace-4.11/tests-m32/execve-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-m32/execve-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests-m32/execve-v.test strace-4.12/tests-m32/execve-v.test --- strace-4.11/tests-m32/execve-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/execve-v.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of execve syscall. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -veexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/faccessat.c strace-4.12/tests-m32/faccessat.c --- strace-4.11/tests-m32/faccessat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/faccessat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_faccessat + +# include +# include + +int +main(void) +{ + static const char sample[] = "faccessat.sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_faccessat, fd, sample, F_OK); + printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_faccessat") + +#endif diff -Nru strace-4.11/tests-m32/faccessat.test strace-4.12/tests-m32/faccessat.test --- strace-4.11/tests-m32/faccessat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/faccessat.test 2016-03-28 00:16:17.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check faccessat syscall decoding. + +. "${srcdir=.}/openat.test" diff -Nru strace-4.11/tests-m32/fanotify_mark.c strace-4.12/tests-m32/fanotify_mark.c --- strace-4.11/tests-m32/fanotify_mark.c 2015-01-10 00:40:10.000000000 +0000 +++ strace-4.12/tests-m32/fanotify_mark.c 2016-01-05 23:06:14.000000000 +0000 @@ -1,19 +1,18 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK + # include + int main(void) { fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, "."); return 0; } + #else -int -main(void) -{ - return 77; -} + +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK") + #endif diff -Nru strace-4.11/tests-m32/fchdir.c strace-4.12/tests-m32/fchdir.c --- strace-4.11/tests-m32/fchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_fchdir + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fchdir, fd); + printf("fchdir(%d) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchdir") + +#endif diff -Nru strace-4.11/tests-m32/fchdir.test strace-4.12/tests-m32/fchdir.test --- strace-4.11/tests-m32/fchdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchdir.test 2016-04-21 17:35:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests-m32/fchmodat.c strace-4.12/tests-m32/fchmodat.c --- strace-4.11/tests-m32/fchmodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchmodat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Check decoding of fchmodat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmodat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "fchmodat_sample"; + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) == 0) { + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = 0\n", sample); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) != -1) + perror_msg_and_fail("fchmodat"); + } + + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = -1 %s (%m)\n", + sample, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmodat") + +#endif diff -Nru strace-4.11/tests-m32/fchmodat.test strace-4.12/tests-m32/fchmodat.test --- strace-4.11/tests-m32/fchmodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchmodat.test 2016-04-02 13:13:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchmodat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/fchmod.c strace-4.12/tests-m32/fchmod.c --- strace-4.11/tests-m32/fchmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchmod.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_fchmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "fchmod_test_file"; + + int fd = open(fname, O_CREAT|O_RDONLY, 0400); + + if (fd == -1) + perror_msg_and_fail("open"); + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmod, fd, 0600) == 0) { + close(fd); + + printf("fchmod(%d, 0600) = 0\n", fd); + + if (syscall(__NR_fchmod, fd, 0600) != -1) + perror_msg_and_fail("fchmod"); + } + printf("fchmod(%d, 0600) = -1 %s (%m)\n", fd, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmod") + +#endif diff -Nru strace-4.11/tests-m32/fchmod.test strace-4.12/tests-m32/fchmod.test --- strace-4.11/tests-m32/fchmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-m32/fchown32.c strace-4.12/tests-m32/fchown32.c --- strace-4.11/tests-m32/fchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown32 + +# define SYSCALL_NR __NR_fchown32 +# define SYSCALL_NAME "fchown32" +# define ACCESS_BY_DESCRIPTOR +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown32") + +#endif diff -Nru strace-4.11/tests-m32/fchown32.test strace-4.12/tests-m32/fchown32.test --- strace-4.11/tests-m32/fchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-m32/fchownat.c strace-4.12/tests-m32/fchownat.c --- strace-4.11/tests-m32/fchownat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchownat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of fchownat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_fchownat && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW + +# include +# include + +int +main(void) +{ + static const char sample[] = "fchownat_sample"; + uid_t uid = geteuid(); + uid_t gid = getegid(); + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchownat, AT_FDCWD, sample, uid, gid, 0); + if (rc == 0) { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0) = 0\n", + sample, uid, gid); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchownat, AT_FDCWD, + sample, -1, -1L, AT_SYMLINK_NOFOLLOW); + + printf("fchownat(AT_FDCWD, \"%s\", -1, -1, AT_SYMLINK_NOFOLLOW)" + " = %ld %s (%m)\n", sample, rc, errno2name()); + } else { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0)" + " = %ld %s (%m)\n", sample, uid, gid, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchownat && AT_FDCWD && AT_SYMLINK_NOFOLLOW") + +#endif diff -Nru strace-4.11/tests-m32/fchownat.test strace-4.12/tests-m32/fchownat.test --- strace-4.11/tests-m32/fchownat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchownat.test 2016-04-02 14:07:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchownat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/fchown.c strace-4.12/tests-m32/fchown.c --- strace-4.11/tests-m32/fchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchown.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown + +# define SYSCALL_NR __NR_fchown +# define SYSCALL_NAME "fchown" +# define ACCESS_BY_DESCRIPTOR + +# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown") + +#endif diff -Nru strace-4.11/tests-m32/fchown.test strace-4.12/tests-m32/fchown.test --- strace-4.11/tests-m32/fchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fchown.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-m32/fcntl64.c strace-4.12/tests-m32/fcntl64.c --- strace-4.11/tests-m32/fcntl64.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-m32/fcntl64.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl64 -# define TEST_SYSCALL_NAME fcntl64 +# define TEST_SYSCALL_NR __NR_fcntl64 +# define TEST_SYSCALL_STR "fcntl64" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -57,16 +55,16 @@ { TEST_FLOCK64_EINVAL(F_SETLK64); TEST_FLOCK64_EINVAL(F_SETLKW64); -#ifdef F_OFD_SETLK +# ifdef F_OFD_SETLK TEST_FLOCK64_EINVAL(F_OFD_SETLK); TEST_FLOCK64_EINVAL(F_OFD_SETLKW); -#endif +# endif struct_kernel_flock64 fl = { .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + long rc = invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); @@ -74,12 +72,12 @@ if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK64, &fl); + invoke_test_syscall(F_GETLK64, &fl); printf("%s(0, F_GETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); @@ -88,9 +86,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -100,10 +96,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl64") #endif diff -Nru strace-4.11/tests-m32/fcntl.c strace-4.12/tests-m32/fcntl.c --- strace-4.11/tests-m32/fcntl.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-m32/fcntl.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl -# define TEST_SYSCALL_NAME fcntl +# define TEST_SYSCALL_NR __NR_fcntl +# define TEST_SYSCALL_STR "fcntl" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, %p) = %s\n", TEST_SYSCALL_STR, name, &fl, EINVAL_STR); } @@ -70,9 +68,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -82,10 +78,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl") #endif diff -Nru strace-4.11/tests-m32/fcntl.test strace-4.12/tests-m32/fcntl.test --- strace-4.11/tests-m32/fcntl.test 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-m32/fcntl.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check fcntl decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscall=${ME_%.test} -run_strace -a8 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-m32/fdatasync.c strace-4.12/tests-m32/fdatasync.c --- strace-4.11/tests-m32/fdatasync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fdatasync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fdatasync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fdatasync, fd); + printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fdatasync") + +#endif diff -Nru strace-4.11/tests-m32/fdatasync.test strace-4.12/tests-m32/fdatasync.test --- strace-4.11/tests-m32/fdatasync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fdatasync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fdatasync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-m32/file_handle.c strace-4.12/tests-m32/file_handle.c --- strace-4.11/tests-m32/file_handle.c 2015-11-26 16:49:39.000000000 +0000 +++ strace-4.12/tests-m32/file_handle.c 2016-04-21 22:05:53.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #ifdef MAX_HANDLE_SZ +# include +# include +# include +# include + int main(void) { @@ -49,26 +47,20 @@ handle->handle_bytes = 0; - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) != -1 - || EINVAL != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) == -1); + if (EINVAL != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" - ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (Invalid argument)\n", - &mount_id); + ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags) != -1 - || EOVERFLOW != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == -1); + if (EOVERFLOW != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" - ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW" - " (Value too large for defined data type)\n", + ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", handle->handle_bytes, &mount_id); - assert(!name_to_handle_at(dirfd, ".", handle, &mount_id, flags)); + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == 0); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" ", handle_type=%d, f_handle=0x", handle->handle_bytes, handle->handle_type); @@ -76,15 +68,12 @@ printf("%02x", handle->f_handle[i]); printf("}, [%d], AT_SYMLINK_FOLLOW) = 0\n", mount_id); - assert(open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY)); printf("open_by_handle_at(-1, {handle_bytes=%u, handle_type=%d" ", f_handle=0x", handle->handle_bytes, handle->handle_type); for (i = 0; i < handle->handle_bytes; ++i) printf("%02x", handle->f_handle[i]); - printf("}, O_RDONLY|O_DIRECTORY) = -1 %s\n", - EPERM == errno ? "EPERM (Operation not permitted)" : - EINVAL == errno ? "EINVAL (Invalid argument)" : - "EBADF (Bad file descriptor)"); + int rc = open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY); + printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -92,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MAX_HANDLE_SZ") #endif diff -Nru strace-4.11/tests-m32/file_handle.test strace-4.12/tests-m32/file_handle.test --- strace-4.11/tests-m32/file_handle.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/file_handle.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check name_to_handle_at and open_by_handle_at syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -ename_to_handle_at,open_by_handle_at $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at diff -Nru strace-4.11/tests-m32/file_ioctl.c strace-4.12/tests-m32/file_ioctl.c --- strace-4.11/tests-m32/file_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/file_ioctl.c 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_FIEMAP_H + +# include +# include +# include +# include +# include "xlat.h" +# include "xlat/fiemap_flags.h" + +static void +test_fiemap(void) +{ + (void) tail_alloc(1); + struct fiemap *const args = tail_alloc(sizeof(*args)); + + printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + args->fm_start, args->fm_length); + printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u})", args->fm_extent_count); + ioctl(-1, FS_IOC_FIEMAP, args); + printf(" = -1 EBADF (%m)\n"); + + /* The live version of this test is in btrfs.c */ +} + +/* clone and dedupe ioctls are in btrfs.c since they originated there */ + +int +main(int argc, char *argv[]) +{ + test_fiemap(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H") + +#endif diff -Nru strace-4.11/tests-m32/file_ioctl.test strace-4.12/tests-m32/file_ioctl.test --- strace-4.11/tests-m32/file_ioctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/file_ioctl.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check FS_IOC_FIEMAP ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/filter-unavailable.c strace-4.12/tests-m32/filter-unavailable.c --- strace-4.11/tests-m32/filter-unavailable.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/filter-unavailable.c 2016-01-06 00:14:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -52,7 +53,8 @@ (void) close(0); (void) close(1); - assert(pipe(fds) == 0 && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); for (i = 0; i < T; ++i) assert(pthread_create(&t, NULL, thread, NULL) == 0); @@ -70,10 +72,13 @@ pid_t p; for (i = 0; i < P; ++i) { - assert((p = fork()) >= 0); + p = fork(); + if (p < 0) + perror_msg_and_fail("fork"); if (p == 0) return process(); - assert(waitpid(p, &s, 0) == p && WIFEXITED(s)); + assert(waitpid(p, &s, 0) == p); + assert(WIFEXITED(s)); if (WEXITSTATUS(s)) return WEXITSTATUS(s); } diff -Nru strace-4.11/tests-m32/flock.c strace-4.12/tests-m32/flock.c --- strace-4.11/tests-m32/flock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/flock.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_flock + +# include +# include +# include + +int +main(void) +{ + const unsigned long fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_flock, fd, LOCK_SH); + printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_flock") + +#endif diff -Nru strace-4.11/tests-m32/flock.test strace-4.12/tests-m32/flock.test --- strace-4.11/tests-m32/flock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/flock.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check flock syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-m32/fork-f.c strace-4.12/tests-m32/fork-f.c --- strace-4.11/tests-m32/fork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "fork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) + return logit("exec"); + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + close(child_wait_fds[1]); + + if (read(0, child_wait_fds, sizeof(int))) + _exit(2); + + char *const args[] = { av[0], (char *) "", NULL }; + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + ppid, prefix, + pid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests-m32/fork-f.test strace-4.12/tests-m32/fork-f.test --- strace-4.11/tests-m32/fork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fork-f.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how strace -f follows fork syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none diff -Nru strace-4.11/tests-m32/fstat64.c strace-4.12/tests-m32/fstat64.c --- strace-4.11/tests-m32/fstat64.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-m32/fstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat64 -# define TEST_SYSCALL_NAME fstat64 + +# define TEST_SYSCALL_NR __NR_fstat64 +# define TEST_SYSCALL_STR "fstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat64") + +#endif diff -Nru strace-4.11/tests-m32/fstatat64.c strace-4.12/tests-m32/fstatat64.c --- strace-4.11/tests-m32/fstatat64.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-m32/fstatat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstatat64 -# define TEST_SYSCALL_NAME fstatat64 -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_fstatat64 +# define TEST_SYSCALL_STR "fstatat64" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatat64") + +#endif diff -Nru strace-4.11/tests-m32/fstatat.c strace-4.12/tests-m32/fstatat.c --- strace-4.11/tests-m32/fstatat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/fstatat.c 2016-01-05 22:41:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HAVE_FSTATAT -# undef TEST_SYSCALL_NAME -#endif +#ifdef HAVE_FSTATAT -#define TEST_SYSCALL_INVOKE(sample, pst) \ +# define TEST_SYSCALL_INVOKE(sample, pst) \ fstatat(AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) -#define PRINT_SYSCALL_HEADER(sample) \ +# define PRINT_SYSCALL_HEADER(sample) \ printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) -#define PRINT_SYSCALL_FOOTER \ +# define PRINT_SYSCALL_FOOTER \ puts(", AT_SYMLINK_NOFOLLOW) = 0") -#include "xstatx.c" +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif diff -Nru strace-4.11/tests-m32/fstat.c strace-4.12/tests-m32/fstat.c --- strace-4.11/tests-m32/fstat.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-m32/fstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat -# define TEST_SYSCALL_NAME fstat + +# define TEST_SYSCALL_NR __NR_fstat +# define TEST_SYSCALL_STR "fstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat") + +#endif diff -Nru strace-4.11/tests-m32/fstatfs64.c strace-4.12/tests-m32/fstatfs64.c --- strace-4.11/tests-m32/fstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs64 + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs64 +# define SYSCALL_NAME "fstatfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs64") + +#endif diff -Nru strace-4.11/tests-m32/fstatfs64.test strace-4.12/tests-m32/fstatfs64.test --- strace-4.11/tests-m32/fstatfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fstatfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-m32/fstatfs.c strace-4.12/tests-m32/fstatfs.c --- strace-4.11/tests-m32/fstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs +# define SYSCALL_NAME "fstatfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs") + +#endif diff -Nru strace-4.11/tests-m32/fstatfs.test strace-4.12/tests-m32/fstatfs.test --- strace-4.11/tests-m32/fstatfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fstatfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-m32/fstat.test strace-4.12/tests-m32/fstat.test --- strace-4.11/tests-m32/fstat.test 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-m32/fstat.test 2016-03-30 00:13:56.000000000 +0000 @@ -8,9 +8,8 @@ [ -d /proc/self/fd/ ] || framework_skip_ '/proc/self/fd/ is not available' -syscall=${ME_%.test} +syscall=$NAME run_prog > /dev/null -OUT="$LOG.out" sample=$syscall.sample > "$sample" run_strace -ve$syscall -P$sample $args > "$OUT" diff -Nru strace-4.11/tests-m32/fstatx.c strace-4.12/tests-m32/fstatx.c --- strace-4.11/tests-m32/fstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/fstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests-m32/fsync.c strace-4.12/tests-m32/fsync.c --- strace-4.11/tests-m32/fsync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fsync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fsync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fsync, fd); + printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fsync") + +#endif diff -Nru strace-4.11/tests-m32/fsync.test strace-4.12/tests-m32/fsync.test --- strace-4.11/tests-m32/fsync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/fsync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fsync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/ftruncate64.c strace-4.12/tests-m32/ftruncate64.c --- strace-4.11/tests-m32/ftruncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/ftruncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate64 -#include -#include -#include +# include +# include int main(void) { const off_t len = 0xdefaceddeadbeef; - int rc = ftruncate(-1, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate64(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + int rc = ftruncate(-1, len); + printf("ftruncate64(-1, %llu) = %d %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -55,10 +48,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate64") #endif diff -Nru strace-4.11/tests-m32/ftruncate64.test strace-4.12/tests-m32/ftruncate64.test --- strace-4.11/tests-m32/ftruncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests-m32/ftruncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -eftruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-m32/ftruncate.c strace-4.12/tests-m32/ftruncate.c --- strace-4.11/tests-m32/ftruncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/ftruncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,29 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate -#include -#include -#include +# include +# include -#include "kernel_types.h" +# include "kernel_types.h" int main(void) { const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = ftruncate(-1, len); else rc = syscall(__NR_ftruncate, -1L, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + printf("ftruncate(-1, %llu) = %ld %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +55,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate") #endif diff -Nru strace-4.11/tests-m32/ftruncate.test strace-4.12/tests-m32/ftruncate.test --- strace-4.11/tests-m32/ftruncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests-m32/ftruncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eftruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-m32/futimesat.c strace-4.12/tests-m32/futimesat.c --- strace-4.11/tests-m32/futimesat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/futimesat.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of futimesat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_futimesat + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "futimesat_sample"; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U; + + long rc = syscall(__NR_futimesat, dirfd, sample, 0); + printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + dirfd = (unsigned long) 0xdeadbeefffffffff; + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + (void) close(0); + rc = syscall(__NR_futimesat, 0, "", ts); + printf("futimesat(0, \"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futimesat") + +#endif diff -Nru strace-4.11/tests-m32/futimesat.test strace-4.12/tests-m32/futimesat.test --- strace-4.11/tests-m32/futimesat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/futimesat.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check futimesat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-m32/getcwd.c strace-4.12/tests-m32/getcwd.c --- strace-4.11/tests-m32/getcwd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getcwd.c 2016-03-23 13:38:35.000000000 +0000 @@ -0,0 +1,39 @@ +#include "tests.h" + +#include + +#ifdef __NR_getcwd + +# include +# include +# include + +int +main(void) +{ + long res; + char cur_dir[PATH_MAX + 1]; + + res = syscall(__NR_getcwd, cur_dir, sizeof(cur_dir)); + + if (res <= 0) + perror_msg_and_fail("getcwd"); + + printf("getcwd(\""); + print_quoted_string(cur_dir); + printf("\", %zu) = %ld\n", sizeof(cur_dir), res); + + syscall(__NR_getcwd, cur_dir, 0); + + printf("getcwd(%p, 0) = -1 ERANGE (%m)\n", cur_dir); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcwd"); + +#endif diff -Nru strace-4.11/tests-m32/getcwd.test strace-4.12/tests-m32/getcwd.test --- strace-4.11/tests-m32/getcwd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getcwd.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-m32/getdents64.c strace-4.12/tests-m32/getdents64.c --- strace-4.11/tests-m32/getdents64.c 2015-11-20 00:08:48.000000000 +0000 +++ strace-4.12/tests-m32/getdents64.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents64 -#include -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -104,7 +101,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -114,12 +110,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents64, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count); + printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents64, 0, buf, count))) { kernel_dirent64 *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents64"); printf("getdents64(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent64 *) &buf[i]; @@ -127,9 +130,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents64(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents64(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -140,10 +143,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents64") #endif diff -Nru strace-4.11/tests-m32/getdents64.test strace-4.12/tests-m32/getdents64.test --- strace-4.11/tests-m32/getdents64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/getdents64.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a24 -vegetdents64 $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -v diff -Nru strace-4.11/tests-m32/getdents.c strace-4.12/tests-m32/getdents.c --- strace-4.11/tests-m32/getdents.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/getdents.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents -#include -#include -#include -#include -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include +# include +# include +# include +# include +# include "kernel_types.h" static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -100,7 +96,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -110,12 +105,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count); + printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents, 0, buf, count))) { kernel_dirent *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents"); printf("getdents(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent *) &buf[i]; @@ -123,9 +125,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -136,10 +138,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents") #endif diff -Nru strace-4.11/tests-m32/getdents.test strace-4.12/tests-m32/getdents.test --- strace-4.11/tests-m32/getdents.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/getdents.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a22 -vegetdents $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a22 -v diff -Nru strace-4.11/tests-m32/getegid32.c strace-4.12/tests-m32/getegid32.c --- strace-4.11/tests-m32/getegid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getegid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid32 + +# include +# include + +int +main(void) +{ + printf("getegid32() = %ld\n", syscall(__NR_getegid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid32") + +#endif diff -Nru strace-4.11/tests-m32/getegid32.test strace-4.12/tests-m32/getegid32.test --- strace-4.11/tests-m32/getegid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getegid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/getegid.c strace-4.12/tests-m32/getegid.c --- strace-4.11/tests-m32/getegid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getegid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid + +# include +# include + +int +main(void) +{ + printf("getegid() = %ld\n", syscall(__NR_getegid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid") + +#endif diff -Nru strace-4.11/tests-m32/getegid.test strace-4.12/tests-m32/getegid.test --- strace-4.11/tests-m32/getegid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getegid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/geteuid32.c strace-4.12/tests-m32/geteuid32.c --- strace-4.11/tests-m32/geteuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/geteuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid32 + +# include +# include + +int +main(void) +{ + printf("geteuid32() = %ld\n", syscall(__NR_geteuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid32") + +#endif diff -Nru strace-4.11/tests-m32/geteuid32.test strace-4.12/tests-m32/geteuid32.test --- strace-4.11/tests-m32/geteuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/geteuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/geteuid.c strace-4.12/tests-m32/geteuid.c --- strace-4.11/tests-m32/geteuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/geteuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid + +# include +# include + +int +main(void) +{ + printf("geteuid() = %ld\n", syscall(__NR_geteuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid") + +#endif diff -Nru strace-4.11/tests-m32/geteuid.test strace-4.12/tests-m32/geteuid.test --- strace-4.11/tests-m32/geteuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/geteuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/getgid32.c strace-4.12/tests-m32/getgid32.c --- strace-4.11/tests-m32/getgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid32 + +# include +# include + +int +main(void) +{ + printf("getgid32() = %ld\n", syscall(__NR_getgid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid32") + +#endif diff -Nru strace-4.11/tests-m32/getgid32.test strace-4.12/tests-m32/getgid32.test --- strace-4.11/tests-m32/getgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/getgid.c strace-4.12/tests-m32/getgid.c --- strace-4.11/tests-m32/getgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid + +# include +# include + +int +main(void) +{ + printf("getgid() = %ld\n", syscall(__NR_getgid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid") + +#endif diff -Nru strace-4.11/tests-m32/getgid.test strace-4.12/tests-m32/getgid.test --- strace-4.11/tests-m32/getgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/getgroups32.c strace-4.12/tests-m32/getgroups32.c --- strace-4.11/tests-m32/getgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_getgroups32 + +# include "getgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups32") + +#endif diff -Nru strace-4.11/tests-m32/getgroups32.test strace-4.12/tests-m32/getgroups32.test --- strace-4.11/tests-m32/getgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-m32/getgroups.c strace-4.12/tests-m32/getgroups.c --- strace-4.11/tests-m32/getgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,148 @@ +/* + * Check decoding of getgroups/getgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_getgroups32 + +# define SYSCALL_NR __NR_getgroups32 +# define SYSCALL_NAME "getgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_getgroups + +# define SYSCALL_NR __NR_getgroups +# define SYSCALL_NAME "getgroups" +# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +#define MAX_STRLEN 32 +static long ngroups; + +static void +get_groups(const long size, GID_TYPE *const g) +{ + long i = syscall(SYSCALL_NR, size, g); + if (i != ngroups) + perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); + + printf("%s(%u, [", SYSCALL_NAME, (unsigned) size); + for (i = 0; i < ngroups; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + printf("%u", (unsigned int) g[i]); + } + printf("]) = %ld\n", ngroups); +} + +int +main(void) +{ + long rc; + + /* check how the first argument is decoded */ + ngroups = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, ngroups); + if (ngroups < 0) + perror_msg_and_fail(SYSCALL_NAME); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); + + rc = syscall(SYSCALL_NR, ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + /* check how the second argument is decoded */ + GID_TYPE *const g1 = + tail_alloc(ngroups ? sizeof(*g1) * ngroups : 1); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * (ngroups + 1)); + void *efault = g2 + ngroups + 1; + + get_groups(ngroups, g1); + get_groups(ngroups + 1, g1); + get_groups(ngroups + 1, g2); + + if (ngroups) { + rc = syscall(SYSCALL_NR, ngroups, efault); + printf("%s(%u, %p) = %ld %s (%m)\n", + SYSCALL_NAME, (unsigned) ngroups, efault, + rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups") + +#endif diff -Nru strace-4.11/tests-m32/getgroups.test strace-4.12/tests-m32/getgroups.test --- strace-4.11/tests-m32/getgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-m32/get_mempolicy.c strace-4.12/tests-m32/get_mempolicy.c --- strace-4.11/tests-m32/get_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/get_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,135 @@ +/* + * Check decoding of get_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_get_mempolicy + +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(unsigned long maxnode) +{ + unsigned long *const nodemask = + tail_alloc(sizeof(*nodemask) * NLONGS(maxnode)); + + if (syscall(__NR_get_mempolicy, 0, nodemask, maxnode, 0, 0)) { + printf("get_mempolicy(NULL, %p, %lu, NULL, 0) = -1 %s (%m)\n", + nodemask, maxnode, errno2name()); + return; + } + + printf("get_mempolicy(NULL, ["); + + unsigned int nlongs = NLONGS(maxnode); + unsigned int i; + for (i = 0; i < nlongs; ++i) { + if (i) + fputs(", ", stdout); + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(*nodemask) * 2 + 2, nodemask[i]); + } + + printf("], %lu, NULL, 0) = 0\n", maxnode); +} + +int +main(void) +{ + long rc; + + if (syscall(__NR_get_mempolicy, 0, 0, 0, 0, 0)) + perror_msg_and_skip("get_mempolicy"); + puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); + + int *mode = (void *) 0xdefaced1baddeed2; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long flags = -1U; + rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); + printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", + mode, nodemask, maxnode, addr, + "MPOL_F_NODE|MPOL_F_ADDR", + flags & ~3, rc, errno2name()); + + mode = tail_alloc(sizeof(*mode)); + + rc = syscall(__NR_get_mempolicy, mode, 0, 0, 0, 0); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, NULL, 0) = %ld\n", rc); + + *mode = -1; + rc = syscall(__NR_get_mempolicy, mode, 0, 0, mode - 1, 2); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, %p, MPOL_F_ADDR) = %ld\n", mode - 1, rc); + + maxnode = get_page_size() * 8; + + print_nodes(maxnode); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + + maxnode = sizeof(*nodemask) * 8; + print_nodes(maxnode - 1); + print_nodes(maxnode ); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + print_nodes(maxnode * 2 - 1); + print_nodes(maxnode * 2 ); + print_nodes(maxnode * 2 + 1); + print_nodes(maxnode * 2 + 2); + print_nodes(maxnode * 3 - 1); + print_nodes(maxnode * 3 ); + print_nodes(maxnode * 3 + 1); + print_nodes(maxnode * 3 + 2); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_mempolicy") + +#endif diff -Nru strace-4.11/tests-m32/get_mempolicy.test strace-4.12/tests-m32/get_mempolicy.test --- strace-4.11/tests-m32/get_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/get_mempolicy.test 2016-04-28 01:17:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a38 diff -Nru strace-4.11/tests-m32/get_page_size.c strace-4.12/tests-m32/get_page_size.c --- strace-4.11/tests-m32/get_page_size.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/get_page_size.c 2016-01-05 23:17:07.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include + +size_t +get_page_size(void) +{ + static size_t page_size; + + if (!page_size) + page_size = sysconf(_SC_PAGESIZE); + + return page_size; +} diff -Nru strace-4.11/tests-m32/getpgrp.c strace-4.12/tests-m32/getpgrp.c --- strace-4.11/tests-m32/getpgrp.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getpgrp.c 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_getpgrp + +# include +# include + +int +main(void) +{ + printf("getpgrp() = %ld\n", syscall(__NR_getpgrp)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgrp") + +#endif diff -Nru strace-4.11/tests-m32/getpgrp.test strace-4.12/tests-m32/getpgrp.test --- strace-4.11/tests-m32/getpgrp.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getpgrp.test 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgrp syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/getrandom.c strace-4.12/tests-m32/getrandom.c --- strace-4.11/tests-m32/getrandom.c 2015-08-28 08:16:43.000000000 +0000 +++ strace-4.12/tests-m32/getrandom.c 2016-01-06 11:36:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,38 +25,40 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_getrandom + +# include +# include + int main(void) { -#ifdef __NR_getrandom unsigned char buf[4]; if (syscall(__NR_getrandom, buf, sizeof(buf) - 1, 0) != sizeof(buf) - 1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\", 3, 0) = 3\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 1) != sizeof(buf)) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\"..., 4, GRND_NONBLOCK) = 4\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 0x3003) != -1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(%p, 4, GRND_NONBLOCK|GRND_RANDOM|0x3000) = " - "-1 EINVAL (Invalid argument)\n", buf); + "-1 EINVAL (%m)\n", buf); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_getrandom") + #endif -} diff -Nru strace-4.11/tests-m32/getrandom.test strace-4.12/tests-m32/getrandom.test --- strace-4.11/tests-m32/getrandom.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/getrandom.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check getrandom syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e getrandom -xx -s3 -a32 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a32 -xx -s3 diff -Nru strace-4.11/tests-m32/getresgid32.c strace-4.12/tests-m32/getresgid32.c --- strace-4.11/tests-m32/getresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid32 + +# define SYSCALL_NR __NR_getresgid32 +# define SYSCALL_NAME "getresgid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid32") + +#endif diff -Nru strace-4.11/tests-m32/getresgid32.test strace-4.12/tests-m32/getresgid32.test --- strace-4.11/tests-m32/getresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-m32/getresgid.c strace-4.12/tests-m32/getresgid.c --- strace-4.11/tests-m32/getresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid + +# define SYSCALL_NR __NR_getresgid +# define SYSCALL_NAME "getresgid" + +# if defined __NR_getresgid32 && __NR_getresgid != __NR_getresgid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid") + +#endif diff -Nru strace-4.11/tests-m32/getresgid.test strace-4.12/tests-m32/getresgid.test --- strace-4.11/tests-m32/getresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests-m32/getresugid.c strace-4.12/tests-m32/getresugid.c --- strace-4.11/tests-m32/getresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresugid.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Check decoding of getresuid/getresgid/getresuid32/getresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +main(void) +{ + unsigned UGID_TYPE *const r = tail_alloc(sizeof(*r)); + unsigned UGID_TYPE *const e = tail_alloc(sizeof(*e)); + unsigned UGID_TYPE *const s = tail_alloc(sizeof(*s)); + + if (syscall(SYSCALL_NR, r, e, s)) + perror_msg_and_fail(SYSCALL_NAME); + + printf("%s([%u], [%u], [%u]) = 0\n", SYSCALL_NAME, + (unsigned) *r, (unsigned) *e, (unsigned) *s); + + assert(syscall(SYSCALL_NR, NULL, e, s) == -1); + printf("%s(NULL, %p, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, e, s); + + assert(syscall(SYSCALL_NR, r, NULL, s) == -1); + printf("%s(%p, NULL, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, s); + + assert(syscall(SYSCALL_NR, r, e, NULL) == -1); + printf("%s(%p, %p, NULL) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, e); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/getresuid32.c strace-4.12/tests-m32/getresuid32.c --- strace-4.11/tests-m32/getresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid32 + +# define SYSCALL_NR __NR_getresuid32 +# define SYSCALL_NAME "getresuid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid32") + +#endif diff -Nru strace-4.11/tests-m32/getresuid32.test strace-4.12/tests-m32/getresuid32.test --- strace-4.11/tests-m32/getresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-m32/getresuid.c strace-4.12/tests-m32/getresuid.c --- strace-4.11/tests-m32/getresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid + +# define SYSCALL_NR __NR_getresuid +# define SYSCALL_NAME "getresuid" + +# if defined __NR_getresuid32 && __NR_getresuid != __NR_getresuid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid") + +#endif diff -Nru strace-4.11/tests-m32/getresuid.test strace-4.12/tests-m32/getresuid.test --- strace-4.11/tests-m32/getresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getresuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests-m32/getrusage.c strace-4.12/tests-m32/getrusage.c --- strace-4.11/tests-m32/getrusage.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getrusage.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrusage + +# include +# include +# include +# include + +int +main(void) +{ + struct rusage *const usage = tail_alloc(sizeof(struct rusage)); + int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); + printf("getrusage(RUSAGE_SELF, {ru_utime={%ju, %ju}" + ", ru_stime={%ju, %ju}, ru_maxrss=%lu, ru_ixrss=%lu" + ", ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" + ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" + ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", + (uintmax_t) usage->ru_utime.tv_sec, + (uintmax_t) usage->ru_utime.tv_usec, + (uintmax_t) usage->ru_stime.tv_sec, + (uintmax_t) usage->ru_stime.tv_usec, + usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, + usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, + usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, + usage->ru_msgsnd, usage->ru_msgrcv, usage->ru_nsignals, + usage->ru_nvcsw, usage->ru_nivcsw, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrusage") + +#endif diff -Nru strace-4.11/tests-m32/getrusage.test strace-4.12/tests-m32/getrusage.test --- strace-4.11/tests-m32/getrusage.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getrusage.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrusage syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v diff -Nru strace-4.11/tests-m32/getsid.c strace-4.12/tests-m32/getsid.c --- strace-4.11/tests-m32/getsid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getsid.c 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/getsid.test strace-4.12/tests-m32/getsid.test --- strace-4.11/tests-m32/getsid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getsid.test 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/getuid32.c strace-4.12/tests-m32/getuid32.c --- strace-4.11/tests-m32/getuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid32 + +# include +# include + +int +main(void) +{ + printf("getuid32() = %ld\n", syscall(__NR_getuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid32") + +#endif diff -Nru strace-4.11/tests-m32/getuid32.test strace-4.12/tests-m32/getuid32.test --- strace-4.11/tests-m32/getuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-m32/getuid.c strace-4.12/tests-m32/getuid.c --- strace-4.11/tests-m32/getuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid + +# include +# include + +int +main(void) +{ + printf("getuid() = %ld\n", syscall(__NR_getuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid") + +#endif diff -Nru strace-4.11/tests-m32/getuid.test strace-4.12/tests-m32/getuid.test --- strace-4.11/tests-m32/getuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check getuid syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq +run_prog > /dev/null +run_strace -qq -a9 -e$NAME $args > "$EXP" +uniq < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests-m32/getxxid.c strace-4.12/tests-m32/getxxid.c --- strace-4.11/tests-m32/getxxid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getxxid.c 2016-01-09 00:09:04.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getxpid && defined __NR_getxuid && defined __NR_getxgid + +# include +# include + +int +main(void) +{ + long id; + pid_t ppid; + + id = syscall(__NR_getxpid); + ppid = getppid(); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + + id = syscall(__NR_getxuid); + printf("getxuid() = %ld (euid %ld)\n", id, id); + + id = syscall(__NR_getxgid); + printf("getxgid() = %ld (egid %ld)\n", id, id); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getxpid && __NR_getxuid && __NR_getxgid") + +#endif diff -Nru strace-4.11/tests-m32/getxxid.test strace-4.12/tests-m32/getxxid.test --- strace-4.11/tests-m32/getxxid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/getxxid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getxpid, getxuid, and getxgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid diff -Nru strace-4.11/tests-m32/hexdump_strdup.c strace-4.12/tests-m32/hexdump_strdup.c --- strace-4.11/tests-m32/hexdump_strdup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/hexdump_strdup.c 2016-04-02 18:24:36.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Make a hexdump copy of C string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexdump_memdup(const char *src, size_t len) +{ + size_t dst_size = 3 * len + 2; + assert(dst_size > len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + const unsigned char *usrc = (const unsigned char *) src; + size_t i; + for (i = 0; i < len; ++i) { + unsigned int c = usrc[i]; + *(p++) = ' '; + if (i == 8) + *(p++) = ' '; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} + +const char * +hexdump_strdup(const char *src) +{ + return hexdump_memdup(src, strlen(src)); +} diff -Nru strace-4.11/tests-m32/hexquote_strndup.c strace-4.12/tests-m32/hexquote_strndup.c --- strace-4.11/tests-m32/hexquote_strndup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/hexquote_strndup.c 2016-02-04 03:36:25.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Make a hexquoted copy of a string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexquote_strndup(const char *src, const size_t src_len) +{ + const size_t dst_size = 4 * src_len + 1; + assert(dst_size > src_len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + size_t i; + for (i = 0; i < src_len; ++i) { + unsigned int c = ((const unsigned char *) src)[i]; + *(p++) = '\\'; + *(p++) = 'x'; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} diff -Nru strace-4.11/tests-m32/inet-accept-connect-send-recv.c strace-4.12/tests-m32/inet-accept-connect-send-recv.c --- strace-4.11/tests-m32/inet-accept-connect-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/inet-accept-connect-send-recv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main(void) -{ - static const char data[] = "data"; - const size_t size = sizeof(data) - 1; - struct sockaddr_in addr; - socklen_t len = sizeof(addr); - pid_t pid; - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - close(0); - close(1); - - if (socket(PF_INET, SOCK_STREAM, 0)) { - perror("socket"); - return 77; - } - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } - assert(listen(0, 5) == 0); - - memset(&addr, 0, sizeof(addr)); - assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); - - assert((pid = fork()) >= 0); - - if (pid) { - char buf[sizeof(data)]; - int status; - - assert(accept(0, (struct sockaddr *) &addr, &len) == 1); - assert(close(0) == 0); - assert(recv(1, buf, sizeof(buf), MSG_WAITALL) == (int) size); - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - assert(close(1) == 0); - } else { - assert(close(0) == 0); - assert(socket(PF_INET, SOCK_STREAM, 0) == 0); - assert(connect(0, (struct sockaddr *) &addr, len) == 0); - assert(send(0, data, size, MSG_DONTROUTE) == (int) size); - assert(close(0) == 0); - } - - return 0; -} diff -Nru strace-4.11/tests-m32/inet-cmsg.c strace-4.12/tests-m32/inet-cmsg.c --- strace-4.11/tests-m32/inet-cmsg.c 2015-12-06 01:02:17.000000000 +0000 +++ strace-4.12/tests-m32/inet-cmsg.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,8 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include #include #include #include @@ -75,6 +75,7 @@ } } +#ifdef IP_ORIGDSTADDR static void print_origdstaddr(const struct cmsghdr *c) { @@ -84,6 +85,7 @@ printf("IP_ORIGDSTADDR, {sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}", ntohs(sin->sin_port)); } +#endif int main(void) @@ -94,22 +96,18 @@ assert(!close(0)); assert(!close(3)); - if (socket(PF_INET, SOCK_DGRAM, 0)) { - perror("socket"); - return 77; - } + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); struct sockaddr_in addr = { .sin_family = AF_INET, .sin_addr.s_addr = htonl(INADDR_LOOPBACK) }; socklen_t len = sizeof(addr); - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); assert(!getsockname(0, (struct sockaddr *) &addr, &len)); - assert(socket(PF_INET, SOCK_DGRAM, 0) == 3); + assert(socket(AF_INET, SOCK_DGRAM, 0) == 3); assert(!connect(3, (struct sockaddr *) &addr, len)); const int opt_1 = htonl(0x01000000); @@ -149,9 +147,9 @@ printf("recvmsg(0, {msg_name(%u)={sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}, msg_iov(1)=[{\"%s\", %zu}]" - ", msg_controllen=%zu, [", + ", msg_controllen=%lu, [", (unsigned) mh.msg_namelen, ntohs(addr.sin_port), - data, size, mh.msg_controllen); + data, size, (unsigned long) mh.msg_controllen); struct cmsghdr *c; for (c = CMSG_FIRSTHDR(&mh); c; c = CMSG_NXTHDR(&mh, c)) { @@ -159,8 +157,8 @@ continue; if (c != control) printf(", "); - printf("{cmsg_len=%zu, cmsg_level=SOL_IP, cmsg_type=", - c->cmsg_len); + printf("{cmsg_len=%lu, cmsg_level=SOL_IP, cmsg_type=", + (unsigned long) c->cmsg_len); switch (c->cmsg_type) { case IP_PKTINFO: print_pktinfo(c); diff -Nru strace-4.11/tests-m32/inet-cmsg.test strace-4.12/tests-m32/inet-cmsg.test --- strace-4.11/tests-m32/inet-cmsg.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/inet-cmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check IPPROTO_IP control messages decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -erecvmsg $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=recvmsg diff -Nru strace-4.11/tests-m32/init.sh strace-4.12/tests-m32/init.sh --- strace-4.11/tests-m32/init.sh 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/init.sh 2016-03-30 00:16:24.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,6 +26,10 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ME_="${0##*/}" +LOG="$ME_.tmp" +OUT="$LOG.out" +EXP="$LOG.exp" +NAME="${ME_%.test}" warn_() { printf >&2 '%s\n' "$*"; } fail_() { warn_ "$ME_: failed test: $*"; exit 1; } @@ -48,7 +52,7 @@ run_prog() { if [ $# -eq 0 ]; then - set -- "./${ME_%.test}" + set -- "./$NAME" fi args="$*" "$@" || { @@ -108,7 +112,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - program="$srcdir/${ME_%.test}.awk" + program="$srcdir/$NAME.awk" else program="$1"; shift fi @@ -138,7 +142,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - expected="$srcdir/${ME_%.test}.expected" + expected="$srcdir/$NAME.expected" else expected="$1"; shift fi @@ -168,7 +172,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - patterns="$srcdir/${ME_%.test}.expected" + patterns="$srcdir/$NAME.expected" else patterns="$1"; shift fi @@ -197,10 +201,21 @@ } } +# Usage: run_strace_match_diff [args to run_strace] +run_strace_match_diff() +{ + args="$*" + [ -n "$args" -a -z "${args##*-e trace=*}" ] || + set -- -e trace="$NAME" "$@" + run_prog > /dev/null + run_strace "$@" $args > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + check_prog cat check_prog rm -LOG="$ME_.tmp" rm -f "$LOG" : "${STRACE:=../strace}" diff -Nru strace-4.11/tests-m32/inode_of_sockfd.c strace-4.12/tests-m32/inode_of_sockfd.c --- strace-4.11/tests-m32/inode_of_sockfd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/inode_of_sockfd.c 2016-02-02 00:24:48.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of strace test suite. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +unsigned long +inode_of_sockfd(const int fd) +{ + assert(fd >= 0); + + char linkpath[sizeof("/proc/self/fd/%u") + sizeof(int) * 3]; + assert(snprintf(linkpath, sizeof(linkpath), "/proc/self/fd/%u", fd) + < (int) sizeof(linkpath)); + + char path[PATH_MAX + 1]; + const ssize_t path_len = readlink(linkpath, path, sizeof(path) - 1); + if (path_len < 0) + perror_msg_and_fail("readlink: %s", linkpath); + path[path_len] = '\0'; + + static const char prefix[] = "socket:["; + const size_t prefix_len = sizeof(prefix) - 1; + assert(strncmp(path, prefix, prefix_len) == 0 + && path[path_len - 1] == ']'); + + return strtoul(path + prefix_len, NULL, 10); +} diff -Nru strace-4.11/tests-m32/ioctl_block.c strace-4.12/tests-m32/ioctl_block.c --- strace-4.11/tests-m32/ioctl_block.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_block.c 2016-05-26 15:16:31.000000000 +0000 @@ -0,0 +1,216 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRUCT_BLK_USER_TRACE_SETUP +# include +#endif +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static struct xlat block_argless[] = { + XLAT(BLKRRPART), + XLAT(BLKFLSBUF), +#ifdef BLKTRACESTART + XLAT(BLKTRACESTART), +#endif +#ifdef BLKTRACESTOP + XLAT(BLKTRACESTOP), +#endif +#ifdef BLKTRACETEARDOWN + XLAT(BLKTRACETEARDOWN), +#endif +}; + +#define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(BLKBSZGET); + TEST_NULL_ARG(BLKBSZSET); + TEST_NULL_ARG(BLKFRAGET); + TEST_NULL_ARG(BLKGETSIZE); + TEST_NULL_ARG(BLKGETSIZE64); + TEST_NULL_ARG(BLKPG); + TEST_NULL_ARG(BLKRAGET); + TEST_NULL_ARG(BLKROGET); + TEST_NULL_ARG(BLKROSET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSSZGET); +#ifdef BLKALIGNOFF + TEST_NULL_ARG(BLKALIGNOFF); +#endif +#ifdef BLKDAXGET + TEST_NULL_ARG(BLKDAXGET); +#endif +#ifdef BLKDISCARD + TEST_NULL_ARG(BLKDISCARD); +#endif +#ifdef BLKDISCARDZEROES + TEST_NULL_ARG(BLKDISCARDZEROES); +#endif +#ifdef BLKIOMIN + TEST_NULL_ARG(BLKIOMIN); +#endif +#ifdef BLKIOOPT + TEST_NULL_ARG(BLKIOOPT); +#endif +#ifdef BLKPBSZGET + TEST_NULL_ARG(BLKPBSZGET); +#endif +#ifdef BLKROTATIONAL + TEST_NULL_ARG(BLKROTATIONAL); +#endif +#ifdef BLKSECDISCARD + TEST_NULL_ARG(BLKSECDISCARD); +#endif +#ifdef BLKZEROOUT + TEST_NULL_ARG(BLKZEROOUT); +#endif +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + TEST_NULL_ARG(BLKTRACESETUP); +#endif + + ioctl(-1, BLKRASET, lmagic); + printf("ioctl(-1, BLKRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + ioctl(-1, BLKFRASET, lmagic); + printf("ioctl(-1, BLKFRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + + ioctl(-1, BLKROSET, val_int); + printf("ioctl(-1, BLKROSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + ioctl(-1, BLKBSZSET, val_int); + printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); + pair_int64[0] = 0xdeadbeefbadc0ded; + pair_int64[1] = 0xfacefeedcafef00d; + +#ifdef BLKDISCARD + ioctl(-1, BLKDISCARD, pair_int64); + printf("ioctl(-1, BLKDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKSECDISCARD + ioctl(-1, BLKSECDISCARD, pair_int64); + printf("ioctl(-1, BLKSECDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKZEROOUT + ioctl(-1, BLKZEROOUT, pair_int64); + printf("ioctl(-1, BLKZEROOUT, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + + struct blkpg_ioctl_arg *const blkpg = tail_alloc(sizeof(*blkpg)); + blkpg->op = 3; + blkpg->flags = 0xdeadbeef; + blkpg->datalen = 0xbadc0ded; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data=%#lx}) = -1 EBADF (%m)\n", + "BLKPG_RESIZE_PARTITION", blkpg->flags, blkpg->datalen, + (unsigned long) blkpg->data); + + struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); + bp->start = 0xfac1fed2dad3bef4; + bp->length = 0xfac5fed6dad7bef8; + bp->pno = magic; + memset(bp->devname, 'A', sizeof(bp->devname)); + memset(bp->volname, 'B', sizeof(bp->volname)); + blkpg->op = 1; + blkpg->data = bp; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data={start=%lld, length=%lld, pno=%d" + ", devname=\"%.*s\", volname=\"%.*s\"}})" + " = -1 EBADF (%m)\n", + "BLKPG_ADD_PARTITION", + blkpg->flags, blkpg->datalen, + bp->start, bp->length, bp->pno, + (int) sizeof(bp->devname) - 1, bp->devname, + (int) sizeof(bp->volname) - 1, bp->volname); + +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); + init_magic(buts, sizeof(*buts)); + + ioctl(-1, BLKTRACESETUP, buts); + printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" + ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})" + " = -1 EBADF (%m)\n", + buts->act_mask, buts->buf_size, buts->buf_nr, + buts->start_lba, buts->end_lba, buts->pid); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(block_argless); ++i) { + ioctl(-1, (unsigned long) block_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", block_argless[i].str); + } + + ioctl(-1, _IOC(_IOC_READ, 0x12, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x12, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/ioctl_block.test strace-4.12/tests-m32/ioctl_block.test --- strace-4.11/tests-m32/ioctl_block.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_block.test 2016-05-26 14:44:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of BLK* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioctl.c strace-4.12/tests-m32/ioctl.c --- strace-4.11/tests-m32/ioctl.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ioctl.c 2016-05-05 21:20:45.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -64,36 +61,36 @@ struct termios tty; (void) ioctl(-1, TCGETS, &tty); printf("ioctl(-1, TCGETS, %p)" - " = -1 EBADF (Bad file descriptor)\n", &tty); + " = -1 EBADF (%m)\n", &tty); #endif (void) ioctl(-1, MMTIMER_GETRES, &data); printf("ioctl(-1, MMTIMER_GETRES, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, VIDIOC_ENUMINPUT, 0); - printf("ioctl(-1, VIDIOC_ENUMINPUT, 0)" - " = -1 EBADF (Bad file descriptor)\n"); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL)" + " = -1 EBADF (%m)\n"); (void) ioctl(-1, HIDIOCGVERSION, &data); printf("ioctl(-1, HIDIOCGRDESCSIZE or HIDIOCGVERSION, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, HIDIOCGPHYS(8), &data); printf("ioctl(-1, HIDIOCGPHYS(8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data); printf("ioctl(-1, EVIOCGBIT(EV_KEY, 8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, _IOR('M', 13, int), &data); printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" - " = -1 EBADF (Bad file descriptor)\n"); + " = -1 EBADF (%m)\n"); (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x08), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); puts("+++ exited with 0 +++"); return 0; @@ -101,10 +98,8 @@ #else -int -main(void ) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MMTIMER_GETRES && VIDIOC_ENUMINPUT" + " && HIDIOCGVERSION && HIDIOCGPHYS" + " && EVIOCGBIT && EV_KEY") #endif diff -Nru strace-4.11/tests-m32/ioctl_evdev.c strace-4.12/tests-m32/ioctl_evdev.c --- strace-4.11/tests-m32/ioctl_evdev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_evdev.c 2016-05-28 22:13:27.000000000 +0000 @@ -0,0 +1,284 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_INPUT_H + +# include +# include +# include +# include +# include +# include + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +# ifdef VERBOSE_IOCTL +static void +print_envelope(const struct ff_envelope *const e) +{ + printf(", envelope={attack_length=%hu, attack_level=%hu" + ", fade_length=%hu, fade_level=%#hx}", + e->attack_length, e->attack_level, + e->fade_length, e->fade_level); +} +# endif /* VERBOSE_IOCTL */ + +static void +print_ffe_common(const struct ff_effect *const ffe, const char *const type_str) +{ + printf("ioctl(-1, EVIOCSFF, {type=%s, id=%" PRIu16 + ", direction=%" PRIu16 ", ", + type_str, ffe->id, ffe->direction); +# ifdef VERBOSE_IOCTL + printf("trigger={button=%hu, interval=%hu}" + ", replay={length=%hu, delay=%hu}", + ffe->trigger.button, ffe->trigger.interval, + ffe->replay.length, ffe->replay.delay); +# endif /* VERBOSE_IOCTL */ +} + +# define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(EVIOCGVERSION); + TEST_NULL_ARG(EVIOCGEFFECTS); + TEST_NULL_ARG(EVIOCGID); + TEST_NULL_ARG(EVIOCGKEYCODE); + TEST_NULL_ARG(EVIOCSKEYCODE); + TEST_NULL_ARG(EVIOCSFF); +# ifdef EVIOCGKEYCODE_V2 + TEST_NULL_ARG(EVIOCGKEYCODE_V2); +# endif +# ifdef EVIOCSKEYCODE_V2 + TEST_NULL_ARG(EVIOCSKEYCODE_V2); +# endif +# ifdef EVIOCGREP + TEST_NULL_ARG(EVIOCGREP); +# endif +# ifdef EVIOCSREP + TEST_NULL_ARG(EVIOCSREP); +# endif +# ifdef EVIOCSCLOCKID + TEST_NULL_ARG(EVIOCSCLOCKID); +# endif + + TEST_NULL_ARG(EVIOCGNAME(0)); + TEST_NULL_ARG(EVIOCGPHYS(0)); + TEST_NULL_ARG(EVIOCGUNIQ(0)); + TEST_NULL_ARG(EVIOCGKEY(0)); + TEST_NULL_ARG(EVIOCGLED(0)); +# ifdef EVIOCGMTSLOTS + TEST_NULL_ARG(EVIOCGMTSLOTS(0)); +# endif +# ifdef EVIOCGPROP + TEST_NULL_ARG(EVIOCGPROP(0)); +# endif + TEST_NULL_ARG(EVIOCGSND(0)); +# ifdef EVIOCGSW + TEST_NULL_ARG(EVIOCGSW(0)); +# endif + + TEST_NULL_ARG(EVIOCGABS(ABS_X)); + TEST_NULL_ARG(EVIOCSABS(ABS_X)); + + TEST_NULL_ARG(EVIOCGBIT(EV_SYN, 0)); + TEST_NULL_ARG(EVIOCGBIT(EV_KEY, 1)); + TEST_NULL_ARG(EVIOCGBIT(EV_REL, 2)); + TEST_NULL_ARG(EVIOCGBIT(EV_ABS, 3)); + TEST_NULL_ARG(EVIOCGBIT(EV_MSC, 4)); +# ifdef EV_SW + TEST_NULL_ARG(EVIOCGBIT(EV_SW, 5)); +# endif + TEST_NULL_ARG(EVIOCGBIT(EV_LED, 6)); + TEST_NULL_ARG(EVIOCGBIT(EV_SND, 7)); + TEST_NULL_ARG(EVIOCGBIT(EV_REP, 8)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF, 9)); + TEST_NULL_ARG(EVIOCGBIT(EV_PWR, 10)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF_STATUS, 11)); + + ioctl(-1, EVIOCGBIT(EV_MAX, 42), 0); + printf("ioctl(-1, EVIOCGBIT(%#x /* EV_??? */, 42), NULL)" + " = -1 EBADF (%m)\n", EV_MAX); + + ioctl(-1, EVIOCRMFF, lmagic); + printf("ioctl(-1, EVIOCRMFF, %d) = -1 EBADF (%m)\n", (int) lmagic); + + ioctl(-1, EVIOCGRAB, lmagic); + printf("ioctl(-1, EVIOCGRAB, %lu) = -1 EBADF (%m)\n", lmagic); + +# ifdef EVIOCREVOKE + ioctl(-1, EVIOCREVOKE, lmagic); + printf("ioctl(-1, EVIOCREVOKE, %lu) = -1 EBADF (%m)\n", lmagic); +# endif + + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + +# ifdef EVIOCSCLOCKID + ioctl(-1, EVIOCSCLOCKID, val_int); + printf("ioctl(-1, EVIOCSCLOCKID, [%u]) = -1 EBADF (%m)\n", *val_int); +# endif + + int *pair_int = tail_alloc(sizeof(*pair_int) * 2); + pair_int[0] = 0xdeadbeef; + pair_int[1] = 0xbadc0ded; + +# ifdef EVIOSGREP + ioctl(-1, EVIOCSREP, pair_int); + printf("ioctl(-1, EVIOCSREP, [%u, %u]) = -1 EBADF (%m)\n", + pair_int[0], pair_int[1]); +# endif + + pair_int[1] = 1; + ioctl(-1, EVIOCSKEYCODE, pair_int); + printf("ioctl(-1, EVIOCSKEYCODE, [%u, %s]) = -1 EBADF (%m)\n", + pair_int[0], "KEY_ESC"); + +# ifdef EVIOCSKEYCODE_V2 + struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); + init_magic(ike, sizeof(*ike)); + ike->keycode = 2; + + ioctl(-1, EVIOCSKEYCODE_V2, ike); + printf("ioctl(-1, EVIOCSKEYCODE_V2, {flags=%" PRIu8 + ", len=%" PRIu8 ", ", ike->flags, ike->len); +# ifdef VERBOSE_IOCTL + printf("index=%" PRIu16 ", keycode=%s, scancode=[", + ike->index, "KEY_1"); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(ike->scancode); ++i) { + if (i > 0) + printf(", "); + printf("%" PRIx8, ike->scancode[i]); + } + printf("]"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); + init_magic(ffe, sizeof(*ffe)); + + ffe->type = FF_CONSTANT; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_CONSTANT"); + +# ifdef VERBOSE_IOCTL + printf(", constant={level=%hd", ffe->u.constant.level); + print_envelope(&ffe->u.constant.envelope); + printf("}"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + +# ifdef VERBOSE_IOCTL + ffe->type = FF_RAMP; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RAMP"); + printf(", ramp={start_level=%hd, end_level=%hd", + ffe->u.ramp.start_level, ffe->u.ramp.end_level); + print_envelope(&ffe->u.ramp.envelope); + errno = EBADF; + printf("}}) = -1 EBADF (%m)\n"); + + ffe->type = FF_PERIODIC; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_PERIODIC"); + printf(", periodic={waveform=%hu, period=%hu, magnitude=%hd" + ", offset=%hd, phase=%hu", + ffe->u.periodic.waveform, ffe->u.periodic.period, + ffe->u.periodic.magnitude, ffe->u.periodic.offset, + ffe->u.periodic.phase); + print_envelope(&ffe->u.periodic.envelope); + printf(", custom_len=%u, custom_data=%p}", + ffe->u.periodic.custom_len, ffe->u.periodic.custom_data); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = FF_RUMBLE; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RUMBLE"); + printf(", rumble={strong_magnitude=%hu, weak_magnitude=%hu}", + ffe->u.rumble.strong_magnitude, ffe->u.rumble.weak_magnitude); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = 0xff; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "0xff /* FF_??? */"); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_WRITE, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_INPUT_H") + +#endif diff -Nru strace-4.11/tests-m32/ioctl_evdev.test strace-4.12/tests-m32/ioctl_evdev.test --- strace-4.11/tests-m32/ioctl_evdev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_evdev.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of EVIOC* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioctl_evdev-v.c strace-4.12/tests-m32/ioctl_evdev-v.c --- strace-4.11/tests-m32/ioctl_evdev-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_evdev-v.c 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_evdev-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_evdev.c" diff -Nru strace-4.11/tests-m32/ioctl_evdev-v.test strace-4.12/tests-m32/ioctl_evdev-v.test --- strace-4.11/tests-m32/ioctl_evdev-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_evdev-v.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding EVIOC* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/ioctl_mtd.c strace-4.12/tests-m32/ioctl_mtd.c --- strace-4.11/tests-m32/ioctl_mtd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_mtd.c 2016-05-28 19:55:01.000000000 +0000 @@ -0,0 +1,208 @@ +/* + * This file is part of ioctl_mtd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +#define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + if (_IOC_DIR(cmd) == _IOC_WRITE) \ + printf("ioctl(-1, MIXER_WRITE(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else if (_IOC_DIR(cmd) == _IOC_READ) \ + printf("ioctl(-1, MIXER_READ(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +#define TEST_erase_info_user(cmd, eiu) \ + ioctl(-1, cmd, eiu); \ + printf("ioctl(-1, MIXER_%s(%u) or %s, {start=%#x, length=%#x})" \ + " = -1 EBADF (%m)\n", \ + (_IOC_DIR(cmd) == _IOC_READ) ? "READ" : "WRITE", \ + (unsigned int) _IOC_NR(cmd), #cmd, \ + eiu->start, eiu->length) + +int +main(void) +{ + TEST_NULL_ARG(ECCGETLAYOUT); + TEST_NULL_ARG(ECCGETSTATS); + TEST_NULL_ARG(MEMERASE); + TEST_NULL_ARG(MEMERASE64); + TEST_NULL_ARG(MEMGETBADBLOCK); + TEST_NULL_ARG(MEMGETINFO); + TEST_NULL_ARG(MEMGETOOBSEL); + TEST_NULL_ARG(MEMGETREGIONCOUNT); + TEST_NULL_ARG(MEMISLOCKED); + TEST_NULL_ARG(MEMLOCK); + TEST_NULL_ARG(MEMREADOOB); + TEST_NULL_ARG(MEMREADOOB64); + TEST_NULL_ARG(MEMSETBADBLOCK); + TEST_NULL_ARG(MEMUNLOCK); + TEST_NULL_ARG(MEMWRITE); + TEST_NULL_ARG(MEMWRITEOOB); + TEST_NULL_ARG(MEMWRITEOOB64); + TEST_NULL_ARG(OTPGETREGIONCOUNT); + TEST_NULL_ARG(OTPGETREGIONINFO); + TEST_NULL_ARG(OTPLOCK); + TEST_NULL_ARG(OTPSELECT); + + ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL); + printf("ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL) = -1 EBADF (%m)\n"); + + int *const opt = tail_alloc(sizeof(*opt)); + *opt = MTD_OTP_OFF; + ioctl(-1, OTPSELECT, opt); + printf("ioctl(-1, MIXER_READ(%u) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); + + uint64_t *const v64 = tail_alloc(sizeof(*v64)); + init_magic(v64, sizeof(*v64)); + + ioctl(-1, MEMGETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMGETBADBLOCK), *v64); + + ioctl(-1, MEMSETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMSETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); + + struct region_info_user *const riu = tail_alloc(sizeof(*riu)); + init_magic(riu, sizeof(*riu)); + ioctl(-1, MEMGETREGIONINFO, riu); + printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", + "MEMGETREGIONINFO" +#ifdef __i386__ + " or MTRRIOC_GET_PAGE_ENTRY" +#endif + , riu->regionindex); + + struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); + init_magic(eiu, sizeof(*eiu)); + + TEST_erase_info_user(MEMERASE, eiu); + TEST_erase_info_user(MEMLOCK, eiu); + TEST_erase_info_user(MEMUNLOCK, eiu); + TEST_erase_info_user(MEMISLOCKED, eiu); + + struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); + init_magic(eiu64, sizeof(*eiu64)); + ioctl(-1, MEMERASE64, eiu64); + printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMERASE64), "MEMERASE64", + (unsigned long long) eiu64->start, + (unsigned long long) eiu64->length); + + struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); + init_magic(oob, sizeof(*oob)); + + ioctl(-1, MEMWRITEOOB, oob); + printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + ioctl(-1, MEMREADOOB, oob); + printf("ioctl(-1, MEMREADOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); + init_magic(oob64, sizeof(*oob64)); + + ioctl(-1, MEMWRITEOOB64, oob64); + printf("ioctl(-1, MEMWRITEOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + ioctl(-1, MEMREADOOB64, oob64); + printf("ioctl(-1, MEMREADOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + + struct otp_info *const oi = tail_alloc(sizeof(*oi)); + init_magic(oi, sizeof(*oi)); + ioctl(-1, OTPLOCK, oi); + printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" + ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); + + struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); + init_magic(wr, sizeof(*wr)); + wr->mode = MTD_OPS_PLACE_OOB; + ioctl(-1, MEMWRITE, wr); + printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" + ", usr_data=%#llx, usr_oob=%#llx, mode=MTD_OPS_PLACE_OOB})" + " = -1 EBADF (%m)\n", + (unsigned long long) wr->start, + (unsigned long long) wr->len, + (unsigned long long) wr->ooblen, + (unsigned long long) wr->usr_data, + (unsigned long long) wr->usr_oob); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/ioctl_mtd.test strace-4.12/tests-m32/ioctl_mtd.test --- strace-4.11/tests-m32/ioctl_mtd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_mtd.test 2016-05-28 19:31:50.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of 'M' type ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioctl_rtc.c strace-4.12/tests-m32/ioctl_rtc.c --- strace-4.11/tests-m32/ioctl_rtc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_rtc.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,218 @@ +/* + * This file is part of ioctl_rtc strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static void +print_rtc_time(const struct rtc_time *rt) +{ + printf("{tm_sec=%d, tm_min=%d, tm_hour=%d" + ", tm_mday=%d, tm_mon=%d, tm_year=%d", + rt->tm_sec, rt->tm_min, rt->tm_hour, + rt->tm_mday, rt->tm_mon, rt->tm_year); +#ifdef VERBOSE_IOCTL + printf(", tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); +#else + printf(", ...}"); +#endif +} + +static struct xlat rtc_argless[] = { + XLAT(RTC_AIE_OFF), + XLAT(RTC_PIE_ON), + XLAT(RTC_PIE_OFF), + XLAT(RTC_UIE_ON), + XLAT(RTC_WIE_ON), + XLAT(RTC_WIE_OFF), +#ifdef RTC_VL_CLR + XLAT(RTC_VL_CLR), +#endif +}; + +int +main(void) +{ + const unsigned int size = get_page_size(); + + void *const page = tail_alloc(size); + init_magic(page, size); + + struct rtc_time *rt = tail_alloc(sizeof(*rt)); + init_magic(rt, sizeof(*rt)); + + struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); + init_magic(wk, sizeof(*wk)); + + struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); + init_magic(pll, sizeof(*pll)); + + /* RTC_ALM_READ */ + ioctl(-1, RTC_ALM_READ, 0); + printf("ioctl(-1, RTC_ALM_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_READ, page); + printf("ioctl(-1, RTC_ALM_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_RD_TIME */ + ioctl(-1, RTC_RD_TIME, 0); + printf("ioctl(-1, RTC_RD_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_RD_TIME, page); + printf("ioctl(-1, RTC_RD_TIME, %p) = -1 EBADF (%m)\n", page); + + /* RTC_ALM_SET */ + ioctl(-1, RTC_ALM_SET, 0); + printf("ioctl(-1, RTC_ALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_SET, rt); + printf("ioctl(-1, RTC_ALM_SET, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_SET_TIME */ + ioctl(-1, RTC_SET_TIME, 0); + printf("ioctl(-1, RTC_SET_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_SET_TIME, rt); + printf("ioctl(-1, RTC_SET_TIME, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_IRQP_SET */ + ioctl(-1, RTC_IRQP_SET, lmagic); + printf("ioctl(-1, RTC_IRQP_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_EPOCH_SET */ + ioctl(-1, RTC_EPOCH_SET, lmagic); + printf("ioctl(-1, RTC_EPOCH_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_IRQP_READ */ + ioctl(-1, RTC_IRQP_READ, 0); + printf("ioctl(-1, RTC_IRQP_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_IRQP_READ, page); + printf("ioctl(-1, RTC_IRQP_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_EPOCH_READ */ + ioctl(-1, RTC_EPOCH_READ, 0); + printf("ioctl(-1, RTC_EPOCH_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_EPOCH_READ, page); + printf("ioctl(-1, RTC_EPOCH_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_RD */ + ioctl(-1, RTC_WKALM_RD, 0); + printf("ioctl(-1, RTC_WKALM_RD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_RD, page); + printf("ioctl(-1, RTC_WKALM_RD, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_SET */ + ioctl(-1, RTC_WKALM_SET, 0); + printf("ioctl(-1, RTC_WKALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_SET, wk); + printf("ioctl(-1, RTC_WKALM_SET, {enabled=%u, pending=%u, time=", + (unsigned) wk->enabled, (unsigned) wk->pending); + print_rtc_time(&wk->time); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + /* RTC_PLL_GET */ + ioctl(-1, RTC_PLL_GET, 0); + printf("ioctl(-1, RTC_PLL_GET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_GET, page); + printf("ioctl(-1, RTC_PLL_GET, %p) = -1 EBADF (%m)\n", page); + + /* RTC_PLL_SET */ + ioctl(-1, RTC_PLL_SET, 0); + printf("ioctl(-1, RTC_PLL_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_SET, pll); + printf("ioctl(-1, RTC_PLL_SET, {pll_ctrl=%d, pll_value=%d" + ", pll_max=%d, pll_min=%d, pll_posmult=%d, pll_negmult=%d" + ", pll_clock=%ld}) = -1 EBADF (%m)\n", + pll->pll_ctrl, pll->pll_value, pll->pll_max, pll->pll_min, + pll->pll_posmult, pll->pll_negmult, pll->pll_clock); + +#ifdef RTC_VL_READ + /* RTC_VL_READ */ + ioctl(-1, RTC_VL_READ, 0); + printf("ioctl(-1, RTC_VL_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_VL_READ, page); + printf("ioctl(-1, RTC_VL_READ, %p) = -1 EBADF (%m)\n", page); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(rtc_argless); ++i) { + ioctl(-1, (unsigned long) rtc_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", rtc_argless[i].str); + } + + ioctl(-1, RTC_UIE_OFF, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PHN_NOT_OH or RTC_UIE_OFF"); + + ioctl(-1, RTC_AIE_ON, lmagic); +#ifdef HPPA + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PA_PERF_ON or RTC_AIE_ON"); +#else + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "RTC_AIE_ON"); +#endif + + ioctl(-1, _IO(0x70, 0x40), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "NVRAM_INIT", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/ioctl_rtc.test strace-4.12/tests-m32/ioctl_rtc.test --- strace-4.11/tests-m32/ioctl_rtc.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_rtc.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic decoding of RTC_* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioctl_rtc-v.c strace-4.12/tests-m32/ioctl_rtc-v.c --- strace-4.11/tests-m32/ioctl_rtc-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_rtc-v.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_rtc-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_rtc.c" diff -Nru strace-4.11/tests-m32/ioctl_rtc-v.test strace-4.12/tests-m32/ioctl_rtc-v.test --- strace-4.11/tests-m32/ioctl_rtc-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_rtc-v.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding of RTC_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/ioctl.test strace-4.12/tests-m32/ioctl.test --- strace-4.11/tests-m32/ioctl.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/ioctl.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,9 +5,11 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -a16 -e ioctl $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-m32/ioctl_uffdio.c strace-4.12/tests-m32/ioctl_uffdio.c --- strace-4.11/tests-m32/ioctl_uffdio.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_uffdio.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_userfaultfd && defined HAVE_LINUX_USERFAULTFD_H + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +int +main(void) +{ + int rc; + int fd = syscall(__NR_userfaultfd, O_NONBLOCK); + size_t pagesize = getpagesize(); + + if (fd < 0) + perror_msg_and_skip("userfaultfd"); + + /* ---- API ---- */ + struct uffdio_api *api_struct = tail_alloc(sizeof(*api_struct)); + + /* With a bad fd */ + memset(api_struct, 0, sizeof(*api_struct)); + rc = ioctl(-1, UFFDIO_API, api_struct); + printf("ioctl(-1, UFFDIO_API, {api=0, features=0}) = %d %s (%m)\n", + rc, errno2name()); + /* With a bad pointer */ + rc = ioctl(fd, UFFDIO_API, NULL); + printf("ioctl(%d, UFFDIO_API, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + /* Normal call */ + api_struct->api = UFFD_API; + api_struct->features = 0; + rc = ioctl(fd, UFFDIO_API, api_struct); + printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, " + "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|" + "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API", + fd, (uint64_t)api_struct->features); + api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER| + 1ull<<_UFFDIO_UNREGISTER| + 1ull<<_UFFDIO_API); + if (api_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)api_struct->ioctls); + printf("}) = %d\n", rc); + + /* For the rest of the tests we need some anonymous memory */ + void *area1 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area1 == MAP_FAILED) + perror_msg_and_fail("mmap area1"); + void *area2 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area2 == MAP_FAILED) + perror_msg_and_fail("mmap area2"); + madvise(area2, pagesize, MADV_DONTNEED); + *(char *)area1 = 42; + + /* ---- REGISTER ---- */ + struct uffdio_register *register_struct = + tail_alloc(sizeof(*register_struct)); + memset(register_struct, 0, sizeof(*register_struct)); + + rc = ioctl(-1, UFFDIO_REGISTER, register_struct); + printf("ioctl(-1, UFFDIO_REGISTER, {range={start=0, len=0}, " + "mode=0}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_REGISTER, NULL); + printf("ioctl(%d, UFFDIO_REGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + register_struct->range.start = (uint64_t)(uintptr_t)area2; + register_struct->range.len = pagesize; + register_struct->mode = UFFDIO_REGISTER_MODE_MISSING; + rc = ioctl(fd, UFFDIO_REGISTER, register_struct); + printf("ioctl(%d, UFFDIO_REGISTER, {range={start=%p, len=%#zx}, " + "mode=UFFDIO_REGISTER_MODE_MISSING, ioctls=" + "1<<_UFFDIO_WAKE|1<<_UFFDIO_COPY|1<<_UFFDIO_ZEROPAGE", + fd, area2, pagesize); + register_struct->ioctls &= ~(1ull<<_UFFDIO_WAKE| + 1ull<<_UFFDIO_COPY| + 1ull<<_UFFDIO_ZEROPAGE); + if (register_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)register_struct->ioctls); + printf("}) = %d\n", rc); + + /* With area2 registered we can now do the atomic copies onto it + * but be careful not to access it in any other way otherwise + * userfaultfd will cause us to stall. + */ + /* ---- COPY ---- */ + struct uffdio_copy *copy_struct = tail_alloc(sizeof(*copy_struct)); + + memset(copy_struct, 0, sizeof(*copy_struct)); + rc = ioctl(-1, UFFDIO_COPY, copy_struct); + printf("ioctl(-1, UFFDIO_COPY, {dst=0, src=0, len=0, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_COPY, NULL); + printf("ioctl(%d, UFFDIO_COPY, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + copy_struct->dst = (uint64_t)(uintptr_t)area2; + copy_struct->src = (uint64_t)(uintptr_t)area1; + copy_struct->len = pagesize; + copy_struct->mode = UFFDIO_COPY_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_COPY, copy_struct); + printf("ioctl(%d, UFFDIO_COPY, {dst=%p, src=%p, len=%#zx," + " mode=UFFDIO_COPY_MODE_DONTWAKE, copy=%#zx}) = %d\n", + fd, area2, area1, pagesize, pagesize, rc); + + /* ---- ZEROPAGE ---- */ + struct uffdio_zeropage *zero_struct = tail_alloc(sizeof(*zero_struct)); + madvise(area2, pagesize, MADV_DONTNEED); + + memset(zero_struct, 0, sizeof(*zero_struct)); + rc = ioctl(-1, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(-1, UFFDIO_ZEROPAGE, {range={start=0, len=0}, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_ZEROPAGE, NULL); + printf("ioctl(%d, UFFDIO_ZEROPAGE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + zero_struct->range.start = (uint64_t)(uintptr_t)area2; + zero_struct->range.len = pagesize; + zero_struct->mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(%d, UFFDIO_ZEROPAGE, {range={start=%p, len=%#zx}," + " mode=UFFDIO_ZEROPAGE_MODE_DONTWAKE, zeropage=%#zx}) = %d\n", + fd, area2, pagesize, pagesize, rc); + + /* ---- WAKE ---- */ + struct uffdio_range *range_struct = tail_alloc(sizeof(*range_struct)); + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_WAKE, range_struct); + printf("ioctl(-1, UFFDIO_WAKE, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_WAKE, NULL); + printf("ioctl(%d, UFFDIO_WAKE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_WAKE, range_struct); + printf("ioctl(%d, UFFDIO_WAKE, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + + /* ---- UNREGISTER ---- */ + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(-1, UFFDIO_UNREGISTER, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_UNREGISTER, NULL); + printf("ioctl(%d, UFFDIO_UNREGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(%d, UFFDIO_UNREGISTER, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && HAVE_LINUX_USERFAULTFD_H") + +#endif diff -Nru strace-4.11/tests-m32/ioctl_uffdio.test strace-4.12/tests-m32/ioctl_uffdio.test --- strace-4.11/tests-m32/ioctl_uffdio.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_uffdio.test 2016-05-10 11:00:12.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check userfaultfd ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioctl_v4l2.c strace-4.12/tests-m32/ioctl_v4l2.c --- strace-4.11/tests-m32/ioctl_v4l2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_v4l2.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,522 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static const unsigned int magic = 0xdeadbeef; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size; + + for (; p < end; ++p) + *(unsigned int *) p = magic; +} + +int +main(void ) +{ + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + const union u_pixel_format { + unsigned int pixelformat; + unsigned char cc[sizeof(int)]; + } u = { +#if WORDS_BIGENDIAN + .cc = { + (unsigned char) (magic >> 24), + (unsigned char) (magic >> 16), + (unsigned char) (magic >> 8), + (unsigned char) magic + } +#else + .pixelformat = magic +#endif + }; + + /* VIDIOC_QUERYCAP */ + ioctl(-1, VIDIOC_QUERYCAP, 0); + printf("ioctl(-1, VIDIOC_QUERYCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCAP, page); + printf("ioctl(-1, VIDIOC_QUERYCAP, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_ENUM_FMT */ + ioctl(-1, VIDIOC_ENUM_FMT, 0); + printf("ioctl(-1, VIDIOC_ENUM_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_fmtdesc *const p_fmtdesc = tail_alloc(sizeof(*p_fmtdesc)); + p_fmtdesc->index = magic; + p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); + printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FMT */ + ioctl(-1, VIDIOC_G_FMT, 0); + printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_format *const p_format = + tail_alloc(sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + + ioctl(-1, VIDIOC_G_FMT, p_format); + printf("ioctl(-1, VIDIOC_G_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n"); + + /* VIDIOC_S_FMT */ + ioctl(-1, VIDIOC_S_FMT, 0); + printf("ioctl(-1, VIDIOC_S_FMT, NULL) = -1 EBADF (%m)\n"); + + p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_format->fmt.pix.width = 0xdad1beaf; + p_format->fmt.pix.height = 0xdad2beaf; + p_format->fmt.pix.pixelformat = 0xdeadbeef; + p_format->fmt.pix.field = V4L2_FIELD_NONE; + p_format->fmt.pix.bytesperline = 0xdad3beaf; + p_format->fmt.pix.sizeimage = 0xdad4beaf; + p_format->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; + + ioctl(-1, VIDIOC_S_FMT, p_format); + printf("ioctl(-1, VIDIOC_S_FMT, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", fmt.pix={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" + ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", + p_format->fmt.pix.width, p_format->fmt.pix.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3], + p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); + + /* VIDIOC_TRY_FMT */ + ioctl(-1, VIDIOC_TRY_FMT, 0); + printf("ioctl(-1, VIDIOC_TRY_FMT, NULL) = -1 EBADF (%m)\n"); + +#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + memset(p_format, -1, sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + p_format->fmt.pix_mp.width = 0xdad1beaf; + p_format->fmt.pix_mp.height = 0xdad2beaf; + p_format->fmt.pix_mp.pixelformat = 0xdeadbeef; + p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; + p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; + unsigned int i; + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + p_format->fmt.pix_mp.plane_fmt[i].sizeimage = 0xbadc0de0 | i; + p_format->fmt.pix_mp.plane_fmt[i].bytesperline = 0xdadbeaf0 | i; + } + ioctl(-1, VIDIOC_TRY_FMT, p_format); + printf("ioctl(-1, VIDIOC_TRY_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" + ", fmt.pix_mp={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" + ", plane_fmt=[", + p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3]); + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + if (i) + printf(", "); + printf("{sizeimage=%u, bytesperline=%u}", + p_format->fmt.pix_mp.plane_fmt[i].sizeimage, + p_format->fmt.pix_mp.plane_fmt[i].bytesperline); + } + printf("], num_planes=%u}}) = -1 EBADF (%m)\n", + p_format->fmt.pix_mp.num_planes); +#else + ioctl(-1, VIDIOC_TRY_FMT, page); + printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); +#endif + + /* VIDIOC_REQBUFS */ + ioctl(-1, VIDIOC_REQBUFS, 0); + printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_REQBUFS, + page + size - sizeof(struct v4l2_requestbuffers)); + printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" + " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" + " = -1 EBADF (%m)\n", magic, magic, magic); + + /* VIDIOC_QUERYBUF */ + ioctl(-1, VIDIOC_QUERYBUF, 0); + printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QBUF */ + ioctl(-1, VIDIOC_QBUF, 0); + printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_DQBUF */ + ioctl(-1, VIDIOC_DQBUF, 0); + printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_DQBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FBUF */ + ioctl(-1, VIDIOC_G_FBUF, 0); + printf("ioctl(-1, VIDIOC_G_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_FBUF, page); + printf("ioctl(-1, VIDIOC_G_FBUF, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_FBUF */ + ioctl(-1, VIDIOC_S_FBUF, 0); + printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_FBUF, page + size - sizeof(struct v4l2_framebuffer)); + printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" + ", flags=%#x, base=%#lx}) = -1 EBADF (%m)\n", + magic, magic, *(unsigned long *) page); + + /* VIDIOC_STREAMON */ + ioctl(-1, VIDIOC_STREAMON, 0); + printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMON, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_STREAMOFF */ + ioctl(-1, VIDIOC_STREAMOFF, 0); + printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMOFF, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_PARM */ + ioctl(-1, VIDIOC_G_PARM, 0); + printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_PARM, page + size - sizeof(struct v4l2_streamparm)); + printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_PARM */ + ioctl(-1, VIDIOC_S_PARM, 0); + printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_PARM, page); + printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + struct v4l2_streamparm *const p_streamparm = + tail_alloc(sizeof(*p_streamparm)); + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + p_streamparm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + p_streamparm->parm.capture.capturemode = V4L2_MODE_HIGHQUALITY; + p_streamparm->parm.capture.timeperframe.numerator = 0xdeadbeef; + p_streamparm->parm.capture.timeperframe.denominator = 0xbadc0ded; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE" + ", parm.capture={capability=V4L2_CAP_TIMEPERFRAME" + ", capturemode=V4L2_MODE_HIGHQUALITY, timeperframe=%u/%u" + ", extendedmode=%u, readbuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.capture.timeperframe.numerator, + p_streamparm->parm.capture.timeperframe.denominator, -1U, -1U); + + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_streamparm->parm.output.outputmode = 0; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", parm.output={capability=V4L2_CAP_TIMEPERFRAME" + ", outputmode=0, timeperframe=%u/%u" + ", extendedmode=%u, writebuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.output.timeperframe.numerator, + p_streamparm->parm.output.timeperframe.denominator, -1U, -1U); + + /* VIDIOC_G_STD */ + ioctl(-1, VIDIOC_G_STD, 0); + printf("ioctl(-1, VIDIOC_G_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_STD, page); + printf("ioctl(-1, VIDIOC_G_STD, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_STD */ + ioctl(-1, VIDIOC_S_STD, 0); + printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_STD, page + size - sizeof(long long)); + printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", + *(unsigned long long *) page); + + /* VIDIOC_ENUMSTD */ + ioctl(-1, VIDIOC_ENUMSTD, 0); + printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_standard *const p_standard = + tail_alloc(sizeof(*p_standard)); + p_standard->index = magic; + ioctl(-1, VIDIOC_ENUMSTD, p_standard); + printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_ENUMINPUT */ + ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUMINPUT, page); + printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_G_CTRL */ + ioctl(-1, VIDIOC_G_CTRL, 0); + printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CTRL */ + ioctl(-1, VIDIOC_S_CTRL, 0); + printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" + ", value=%d}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QUERYCTRL */ + ioctl(-1, VIDIOC_QUERYCTRL, 0); + printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCTRL, + page + size - sizeof(struct v4l2_queryctrl)); +# ifdef V4L2_CTRL_FLAG_NEXT_CTRL + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" + "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", + magic & ~V4L2_CTRL_FLAG_NEXT_CTRL); +# else + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); +# endif + + struct v4l2_queryctrl *const p_queryctrl = + tail_alloc(sizeof(*p_queryctrl)); + p_queryctrl->id = V4L2_CID_SATURATION; + ioctl(-1, VIDIOC_QUERYCTRL, p_queryctrl); + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CID_SATURATION})" + " = -1 EBADF (%m)\n"); + + /* VIDIOC_G_INPUT */ + ioctl(-1, VIDIOC_G_INPUT, 0); + printf("ioctl(-1, VIDIOC_G_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_INPUT, page); + printf("ioctl(-1, VIDIOC_G_INPUT, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_INPUT */ + ioctl(-1, VIDIOC_S_INPUT, 0); + printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_INPUT, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_CROPCAP */ + ioctl(-1, VIDIOC_CROPCAP, 0); + printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CROPCAP, page + size - sizeof(struct v4l2_cropcap)); + printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_CROP */ + ioctl(-1, VIDIOC_G_CROP, 0); + printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CROP */ + ioctl(-1, VIDIOC_S_CROP, 0); + printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", + magic, magic, magic, magic, magic); + +#ifdef VIDIOC_S_EXT_CTRLS + /* VIDIOC_S_EXT_CTRLS */ + ioctl(-1, VIDIOC_S_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_ext_controls *const p_ext_controls = + tail_alloc(sizeof(*p_ext_controls)); + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = 0; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_USER" + ", count=%u}) = -1 EBADF (%m)\n", p_ext_controls->count); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_MPEG; + p_ext_controls->count = magic; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_MPEG" + ", count=%u, controls=%p}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + p_ext_controls->count = 2; + p_ext_controls->controls = + tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); + p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; + p_ext_controls->controls[0].size = 0; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef; + p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; + p_ext_controls->controls[1].size = 2; + p_ext_controls->controls[1].string = + tail_alloc(p_ext_controls->controls[1].size); + + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "] => controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "], error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->error_idx); + + ++p_ext_controls->count; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + ", %p]}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls + 2); +# endif /* HAVE_DECL_V4L2_CTRL_TYPE_STRING */ + + /* VIDIOC_TRY_EXT_CTRLS */ + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = magic; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p})" + " = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + + /* VIDIOC_G_EXT_CTRLS */ + ioctl(-1, VIDIOC_G_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p" + ", error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls, + p_ext_controls->error_idx); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmsizeenum *const p_frmsizeenum = + tail_alloc(sizeof(*p_frmsizeenum)); + p_frmsizeenum->index = magic; + const union u_pixel_format u_frmsizeenum = { + .cc = { 'A', '\'', '\\', '\xfa' } + }; +#if WORDS_BIGENDIAN + p_frmsizeenum->pixel_format = + (unsigned) u_frmsizeenum.cc[0] << 24 | + (unsigned) u_frmsizeenum.cc[1] << 16 | + (unsigned) u_frmsizeenum.cc[2] << 8 | + (unsigned) u_frmsizeenum.cc[3]; +#else + p_frmsizeenum->pixel_format = u_frmsizeenum.pixelformat; +#endif + + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" + ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" + " = -1 EBADF (%m)\n", p_frmsizeenum->index, + u_frmsizeenum.cc[0], u_frmsizeenum.cc[1], + u_frmsizeenum.cc[2], u_frmsizeenum.cc[3]); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, page); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" + ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", width=%u, height=%u}) = -1 EBADF (%m)\n", + magic, u.cc[0], u.cc[1], u.cc[2], u.cc[3], magic, magic); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + ioctl(-1, VIDIOC_CREATE_BUFS, 0); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CREATE_BUFS, + page + size - sizeof(struct v4l2_create_buffers)); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" + " /* V4L2_MEMORY_??? */, format={type=%#x" + " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", + magic, magic, magic); +#endif /* VIDIOC_CREATE_BUFS */ + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/ioctl_v4l2.test strace-4.12/tests-m32/ioctl_v4l2.test --- strace-4.11/tests-m32/ioctl_v4l2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioctl_v4l2.test 2016-05-05 21:20:56.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic VIDIOC_* ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-m32/ioperm.c strace-4.12/tests-m32/ioperm.c --- strace-4.11/tests-m32/ioperm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioperm.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_ioperm + +# include +# include + +int +main(void) +{ + const unsigned long port = (unsigned long) 0xdeafbeefffffffff; + + long rc = syscall(__NR_ioperm, port, 1, 0); + printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", + port, 1UL, 0, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioperm") + +#endif diff -Nru strace-4.11/tests-m32/ioperm.test strace-4.12/tests-m32/ioperm.test --- strace-4.11/tests-m32/ioperm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ioperm.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ioperm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-m32/iopl.c strace-4.12/tests-m32/iopl.c --- strace-4.11/tests-m32/iopl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/iopl.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_iopl + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_iopl, 4); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_iopl") + +#endif diff -Nru strace-4.11/tests-m32/iopl.test strace-4.12/tests-m32/iopl.test --- strace-4.11/tests-m32/iopl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/iopl.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iopl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-m32/ipc_msgbuf.c strace-4.12/tests-m32/ipc_msgbuf.c --- strace-4.11/tests-m32/ipc_msgbuf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ipc_msgbuf.c 2016-01-06 11:55:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +26,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include - #include "kernel_types.h" #define text_string "STRACE_STRING" #define msgsz sizeof(text_string) +static int msqid = -1; + +static void +cleanup(void) +{ + msgctl(msqid, IPC_RMID, 0); + msqid = -1; +} + int main (void) { @@ -49,18 +56,13 @@ .mtype = mtype, .mtext = text_string }; - int msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); + msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); if (msqid == -1) - return 77; + perror_msg_and_skip("msgget"); + atexit(cleanup); if (msgsnd(msqid, &msg, msgsz, 0) == -1) - goto cleanup; + perror_msg_and_skip("msgsnd"); if (msgrcv(msqid, &msg, msgsz, mtype, 0) != msgsz) - goto cleanup; - if (msgctl(msqid, IPC_RMID, 0) == -1) - return 77; + perror_msg_and_skip("msgrcv"); return 0; - -cleanup: - msgctl(msqid, IPC_RMID, 0); - return 77; } diff -Nru strace-4.11/tests-m32/ipc_msg.c strace-4.12/tests-m32/ipc_msg.c --- strace-4.11/tests-m32/ipc_msg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ipc_msg.c 2016-01-06 11:59:06.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + msgctl(id, IPC_RMID, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct msqid_ds ds; id = msgget(IPC_PRIVATE, 0600); if (id < 0) - return 77; + perror_msg_and_skip("msgget"); printf("msgget\\(IPC_PRIVATE, 0600\\) += %d\n", id); + atexit(cleanup); if (msgctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("msgctl IPC_STAT"); printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{msg_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u, msg_rtime=%u, " "msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u, msg_lspid=%u, " @@ -57,7 +70,7 @@ int max = msgctl(0, MSG_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("msgctl MSG_INFO"); printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %d\n", &ds, max); rc = msgctl(id, MSG_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("msgctl MSG_STAT"); + printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (msgctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-m32/ipc_sem.c strace-4.12/tests-m32/ipc_sem.c --- strace-4.11/tests-m32/ipc_sem.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ipc_sem.c 2016-01-06 11:59:29.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Andreas Schwab + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,8 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include union semun { @@ -38,29 +40,40 @@ (Linux-specific) */ }; +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; union semun un; struct semid_ds ds; struct seminfo info; id = semget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("semget"); printf("semget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); un.buf = &ds; if (semctl(id, 0, IPC_STAT, un)) - goto fail; + perror_msg_and_skip("semctl IPC_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, \\[?%p\\]?\\) += 0\n", id, &ds); un.__buf = &info; int max = semctl(0, 0, SEM_INFO, un); if (max < 0) - goto fail; + perror_msg_and_skip("semctl SEM_INFO"); printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, \\[?%p\\]?\\) += %d\n", &info, max); @@ -72,22 +85,13 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; + perror_msg_and_skip("semctl SEM_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" - " += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + " += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" " += %d\n", id, &ds, id); } - rc = 0; -done: - if (semctl(id, 0, IPC_RMID, 0) < 0) - return 1; - printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-m32/ipc.sh strace-4.12/tests-m32/ipc.sh --- strace-4.11/tests-m32/ipc.sh 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-m32/ipc.sh 2016-03-30 00:13:37.000000000 +0000 @@ -4,8 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" - run_prog > /dev/null run_strace -eipc $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests-m32/ipc_shm.c strace-4.12/tests-m32/ipc_shm.c --- strace-4.11/tests-m32/ipc_shm.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ipc_shm.c 2016-01-06 11:59:58.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct shmid_ds ds; id = shmget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("shmget"); printf("shmget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); if (shmctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("shmctl IPC_STAT"); printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{shm_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, " "shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, " @@ -57,7 +70,7 @@ int max = shmctl(0, SHM_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("shmctl SHM_INFO"); printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %d\n", &ds, max); rc = shmctl(id, SHM_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("shmctl SHM_STAT"); + printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (shmctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-m32/ip_mreq.c strace-4.12/tests-m32/ip_mreq.c --- strace-4.11/tests-m32/ip_mreq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ip_mreq.c 2016-01-06 11:42:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,20 +25,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include +#include "tests.h" #include -#include + +#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ + && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON + +# include +# include +# include +# include int main(void) { -#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ - && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON struct ip_mreq m4; struct ipv6_mreq m6; @@ -48,13 +48,14 @@ m6.ipv6mr_interface = 1; (void) close(0); - assert(socket(AF_INET, SOCK_DGRAM, 0) == 0); + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); assert(setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, 1) == -1); assert(setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, 1) == -1); if (setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, sizeof(m4)) || setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, sizeof(m4))) - return 77; + perror_msg_and_skip("setsockopt"); assert(setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &m6, 1) == -1); assert(setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &m6, 1) == -1); @@ -67,7 +68,11 @@ assert(setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, &m6, sizeof(m6)) == -1); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("IP_ADD_MEMBERSHIP && IPV6_ADD_MEMBERSHIP" + " && IPV6_JOIN_ANYCAST && HAVE_INET_PTON") + #endif -} diff -Nru strace-4.11/tests-m32/kill.c strace-4.12/tests-m32/kill.c --- strace-4.11/tests-m32/kill.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/kill.c 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Check decoding of kill syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_kill + +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const int pid = getpid(); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM); + printf("kill(%d, SIGALRM) = %ld\n", pid, rc); + + const long big_pid = (long) 0xfacefeedbadc0ded; + const long big_sig = (long) 0xdeadbeefcafef00d; + rc = syscall(__NR_kill, big_pid, big_sig); + printf("kill(%d, %d) = %ld %s (%m)\n", + (int) big_pid, (int) big_sig, rc, errno2name()); + + rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0); + printf("kill(%d, SIG_0) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kill") + +#endif diff -Nru strace-4.11/tests-m32/kill.test strace-4.12/tests-m32/kill.test --- strace-4.11/tests-m32/kill.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/kill.test 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kill syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -esignal=none diff -Nru strace-4.11/tests-m32/ksysent.c strace-4.12/tests-m32/ksysent.c --- strace-4.11/tests-m32/ksysent.c 2015-12-10 02:06:25.000000000 +0000 +++ strace-4.12/tests-m32/ksysent.c 2016-01-12 05:06:10.000000000 +0000 @@ -45,7 +45,7 @@ #include "syscallent.h" }; -typedef const char const *pstr_t; +typedef const char *pstr_t; static const pstr_t ksyslist[] = { #include "ksysent.h" }; diff -Nru strace-4.11/tests-m32/lchown32.c strace-4.12/tests-m32/lchown32.c --- strace-4.11/tests-m32/lchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/lchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown32 + +# define SYSCALL_NR __NR_lchown32 +# define SYSCALL_NAME "lchown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown32") + +#endif diff -Nru strace-4.11/tests-m32/lchown32.test strace-4.12/tests-m32/lchown32.test --- strace-4.11/tests-m32/lchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/lchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests-m32/lchown.c strace-4.12/tests-m32/lchown.c --- strace-4.11/tests-m32/lchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/lchown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown + +# define SYSCALL_NR __NR_lchown +# define SYSCALL_NAME "lchown" + +# if defined __NR_lchown32 && __NR_lchown != __NR_lchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown") + +#endif diff -Nru strace-4.11/tests-m32/lchown.test strace-4.12/tests-m32/lchown.test --- strace-4.11/tests-m32/lchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/lchown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 diff -Nru strace-4.11/tests-m32/linkat.c strace-4.12/tests-m32/linkat.c --- strace-4.11/tests-m32/linkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/linkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_linkat + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "linkat_sample_old"; + static const char sample_2[] = "linkat_sample_new"; + const long fd_old = (long) 0xdeadbeefffffffff; + const long fd_new = (long) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); + printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd_old, sample_1, (int) fd_new, sample_2, + rc, errno2name()); + + rc = syscall(__NR_linkat, -100, sample_1, -100, sample_2, -1L); + printf("linkat(%s, \"%s\", %s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample_1, "AT_FDCWD", sample_2, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_linkat") + +#endif diff -Nru strace-4.11/tests-m32/linkat.test strace-4.12/tests-m32/linkat.test --- strace-4.11/tests-m32/linkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/linkat.test 2016-04-06 06:18:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check linkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/link.c strace-4.12/tests-m32/link.c --- strace-4.11/tests-m32/link.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/link.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_link + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "link_sample_old"; + static const char sample_2[] = "link_sample_new"; + + long rc = syscall(__NR_link, sample_1, sample_2); + printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_link") + +#endif diff -Nru strace-4.11/tests-m32/link.test strace-4.12/tests-m32/link.test --- strace-4.11/tests-m32/link.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/link.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check link syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/llseek.c strace-4.12/tests-m32/llseek.c --- strace-4.11/tests-m32/llseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/llseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,32 +25,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR__llseek -#include -#include -#include +# include +# include int main(void) { - const unsigned long high = 0xdefaced; + const unsigned long high = 0xfacefeed; const unsigned long low = 0xdeadbeef; - const unsigned long long offset = 0xdefaceddeadbeef; + const long long offset = 0xfacefeeddeadbeefLL; unsigned long long result; - int rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); - if (rc != -1 || EBADF != errno) - return 77; - - printf("_llseek(-1, %llu, %p, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - offset, &result); + long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); + printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n", + offset, &result, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -58,10 +51,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR__llseek") #endif diff -Nru strace-4.11/tests-m32/llseek.test strace-4.12/tests-m32/llseek.test --- strace-4.11/tests-m32/llseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests-m32/llseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -e_llseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -e_llseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-m32/lseek.c strace-4.12/tests-m32/lseek.c --- strace-4.11/tests-m32/lseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/lseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,33 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_lseek -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) { - const kernel_ulong_t offset = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; - - if (sizeof(offset) > sizeof(long)) - rc = lseek(-1, offset, SEEK_SET); - else - rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); - - if (rc != -1 || EBADF != errno) - return 77; + const kernel_ulong_t offset = (kernel_ulong_t) 0xfacefeeddeadbeefULL; - printf("lseek(-1, %llu, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) offset); + if (sizeof(offset) > sizeof(long)) { + /* + * Cannot use syscall because it takes long arguments. + * Let's call lseek with hope it will invoke lseek syscall. + */ + long long rc = lseek(-1, offset, SEEK_SET); + printf("lseek(-1, %lld, SEEK_SET) = %lld %s (%m)\n", + (long long) offset, rc, errno2name()); + } else { + long rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); + printf("lseek(-1, %ld, SEEK_SET) = %ld %s (%m)\n", + (long) offset, rc, errno2name()); + } puts("+++ exited with 0 +++"); return 0; @@ -62,10 +59,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_lseek") #endif diff -Nru strace-4.11/tests-m32/lseek.test strace-4.12/tests-m32/lseek.test --- strace-4.11/tests-m32/lseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests-m32/lseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -a30 -elseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a30 -elseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-m32/lstat64.c strace-4.12/tests-m32/lstat64.c --- strace-4.11/tests-m32/lstat64.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests-m32/lstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat64 -# define TEST_SYSCALL_NAME lstat64 + +# define TEST_SYSCALL_NR __NR_lstat64 +# define TEST_SYSCALL_STR "lstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat64") + +#endif diff -Nru strace-4.11/tests-m32/lstat.c strace-4.12/tests-m32/lstat.c --- strace-4.11/tests-m32/lstat.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests-m32/lstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat -# define TEST_SYSCALL_NAME lstat + +# define TEST_SYSCALL_NR __NR_lstat +# define TEST_SYSCALL_STR "lstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat") + +#endif diff -Nru strace-4.11/tests-m32/lstatx.c strace-4.12/tests-m32/lstatx.c --- strace-4.11/tests-m32/lstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/lstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests-m32/Makefile.am strace-4.12/tests-m32/Makefile.am --- strace-4.11/tests-m32/Makefile.am 2015-12-21 23:23:44.000000000 +0000 +++ strace-4.12/tests-m32/Makefile.am 2016-05-31 11:35:28.000000000 +0000 @@ -1,6 +1,6 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ OS = linux ARCH = @arch_m32@ +MPERS_NAME = m32 ARCH_MFLAGS = -m32 AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -39,82 +40,264 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a + check_PROGRAMS = \ _newselect \ + access \ + acct \ adjtimex \ aio \ + alarm \ + attach-f-p \ + attach-p-cmd-cmd \ + attach-p-cmd-p \ bpf \ + brk \ + btrfs \ caps \ + chmod \ + chown \ + chown32 \ + chroot \ + clock_adjtime \ clock_nanosleep \ clock_xettime \ + copy_file_range \ + count-f \ + creat \ + dup \ + dup2 \ + dup3 \ + epoll_create \ epoll_create1 \ + epoll_ctl \ + epoll_pwait \ + epoll_wait \ eventfd \ execve \ + execve-v \ execveat \ + execveat-v \ + faccessat \ fanotify_mark \ + fchdir \ + fchmod \ + fchmodat \ + fchown \ + fchown32 \ + fchownat \ fcntl \ fcntl64 \ + fdatasync \ file_handle \ + file_ioctl \ filter-unavailable \ + flock \ + fork-f \ fstat \ fstat64 \ fstatat64 \ + fstatfs \ + fstatfs64 \ + fsync \ ftruncate \ ftruncate64 \ + futimesat \ + get_mempolicy \ + getcwd \ getdents \ getdents64 \ + getegid \ + getegid32 \ + geteuid \ + geteuid32 \ + getgid \ + getgid32 \ + getgroups \ + getgroups32 \ + getpgrp \ getrandom \ - inet-accept-connect-send-recv \ + getresgid \ + getresgid32 \ + getresuid \ + getresuid32 \ + getrusage \ + getsid \ + getuid \ + getuid32 \ + getxxid \ inet-cmsg \ ioctl \ + ioctl_block \ + ioctl_evdev \ + ioctl_evdev-v \ + ioctl_mtd \ + ioctl_rtc \ + ioctl_rtc-v \ + ioctl_uffdio \ + ioctl_v4l2 \ + ioperm \ + iopl \ ip_mreq \ ipc_msg \ ipc_msgbuf \ ipc_sem \ ipc_shm \ + kill \ ksysent \ + lchown \ + lchown32 \ + link \ + linkat \ llseek \ lseek \ lstat \ lstat64 \ + mbind \ membarrier \ memfd_create \ + migrate_pages \ + mincore \ + mkdir \ + mkdirat \ + mknod \ + mknodat \ + mlock \ mlock2 \ + mlockall \ mmap \ mmap64 \ mmsg \ + mount \ + move_pages \ mq \ + munlockall \ nanosleep \ net-accept-connect \ + net-icmp_filter \ + net-y-unix \ + net-yy-inet \ + net-yy-netlink \ + net-yy-unix \ netlink_inet_diag \ + netlink_netlink_diag \ netlink_unix_diag \ newfstatat \ + nsyscalls \ + old_mmap \ oldselect \ + open \ + openat \ + pause \ pc \ + personality \ pipe \ + poll \ ppoll \ + prctl-seccomp-filter-v \ + prctl-seccomp-strict \ + pread64-pwrite64 \ + preadv \ + preadv-pwritev \ + preadv2-pwritev2 \ pselect6 \ + ptrace \ + pwritev \ + read-write \ readdir \ readlink \ readlinkat \ + readv \ + reboot \ + recvmsg \ + remap_file_pages \ + rename \ + renameat \ + renameat2 \ restart_syscall \ + rmdir \ + rt_sigpending \ + rt_sigprocmask \ rt_sigqueueinfo \ + rt_sigsuspend \ + rt_sigtimedwait \ + rt_tgsigqueueinfo \ + sched_get_priority_mxx \ + sched_rr_get_interval \ + sched_xetaffinity \ sched_xetattr \ + sched_xetparam \ + sched_xetscheduler \ + sched_yield \ scm_rights \ - seccomp \ + seccomp-filter \ + seccomp-filter-v \ + seccomp-strict \ select \ + semop \ sendfile \ sendfile64 \ + set_mempolicy \ set_ptracer_any \ + setdomainname \ + setfsgid \ + setfsgid32 \ + setfsuid \ + setfsuid32 \ + setgid \ + setgid32 \ + setgroups \ + setgroups32 \ + sethostname \ + setregid \ + setregid32 \ + setresgid \ + setresgid32 \ + setresuid \ + setresuid32 \ + setreuid \ + setreuid32 \ + setuid \ + setuid32 \ + shmxt \ sigaction \ sigaltstack \ signalfd \ sigreturn \ + sleep \ + splice \ stack-fcall \ stat \ stat64 \ statfs \ + statfs64 \ + swap \ + symlink \ + symlinkat \ + sync \ + sync_file_range \ + sync_file_range2 \ sysinfo \ + syslog \ + tee \ time \ timer_create \ timer_xettime \ @@ -123,121 +306,292 @@ times-fail \ truncate \ truncate64 \ - uid \ - uid16 \ - uid32 \ uio \ + umask \ umount \ umount2 \ umovestr \ umovestr2 \ + umovestr3 \ + uname \ unix-pair-send-recv \ + unlink \ + unlinkat \ userfaultfd \ utime \ utimensat \ + utimes \ + vfork-f \ + vhangup \ + vmsplice \ wait \ xattr \ xet_robust_list \ xetitimer \ + xetpgid \ + xetpriority \ xettimeofday \ # end of check_PROGRAMS -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 + stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -246,86 +600,121 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) -net-fd.log: net.log +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests-m32/Makefile.in strace-4.12/tests-m32/Makefile.in --- strace-4.11/tests-m32/Makefile.in 2015-12-21 23:24:05.000000000 +0000 +++ strace-4.12/tests-m32/Makefile.in 2016-05-31 11:35:58.000000000 +0000 @@ -16,7 +16,7 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -104,46 +104,108 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = _newselect$(EXEEXT) adjtimex$(EXEEXT) aio$(EXEEXT) \ - bpf$(EXEEXT) caps$(EXEEXT) clock_nanosleep$(EXEEXT) \ - clock_xettime$(EXEEXT) epoll_create1$(EXEEXT) eventfd$(EXEEXT) \ - execve$(EXEEXT) execveat$(EXEEXT) fanotify_mark$(EXEEXT) \ - fcntl$(EXEEXT) fcntl64$(EXEEXT) file_handle$(EXEEXT) \ - filter-unavailable$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ - fstatat64$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ - getdents$(EXEEXT) getdents64$(EXEEXT) getrandom$(EXEEXT) \ - inet-accept-connect-send-recv$(EXEEXT) inet-cmsg$(EXEEXT) \ - ioctl$(EXEEXT) ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) \ - ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ - ksysent$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) lstat$(EXEEXT) \ - lstat64$(EXEEXT) membarrier$(EXEEXT) memfd_create$(EXEEXT) \ - mlock2$(EXEEXT) mmap$(EXEEXT) mmap64$(EXEEXT) mmsg$(EXEEXT) \ - mq$(EXEEXT) nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ - netlink_inet_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ - newfstatat$(EXEEXT) oldselect$(EXEEXT) pc$(EXEEXT) \ - pipe$(EXEEXT) ppoll$(EXEEXT) pselect6$(EXEEXT) \ - readdir$(EXEEXT) readlink$(EXEEXT) readlinkat$(EXEEXT) \ - restart_syscall$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ - sched_xetattr$(EXEEXT) scm_rights$(EXEEXT) seccomp$(EXEEXT) \ - select$(EXEEXT) sendfile$(EXEEXT) sendfile64$(EXEEXT) \ - set_ptracer_any$(EXEEXT) sigaction$(EXEEXT) \ +check_PROGRAMS = _newselect$(EXEEXT) access$(EXEEXT) acct$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-p-cmd-cmd$(EXEEXT) \ + attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) brk$(EXEEXT) \ + btrfs$(EXEEXT) caps$(EXEEXT) chmod$(EXEEXT) chown$(EXEEXT) \ + chown32$(EXEEXT) chroot$(EXEEXT) clock_adjtime$(EXEEXT) \ + clock_nanosleep$(EXEEXT) clock_xettime$(EXEEXT) \ + copy_file_range$(EXEEXT) count-f$(EXEEXT) creat$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) eventfd$(EXEEXT) execve$(EXEEXT) \ + execve-v$(EXEEXT) execveat$(EXEEXT) execveat-v$(EXEEXT) \ + faccessat$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) flock$(EXEEXT) \ + fork-f$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ + fstatat64$(EXEEXT) fstatfs$(EXEEXT) fstatfs64$(EXEEXT) \ + fsync$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcwd$(EXEEXT) \ + getdents$(EXEEXT) getdents64$(EXEEXT) getegid$(EXEEXT) \ + getegid32$(EXEEXT) geteuid$(EXEEXT) geteuid32$(EXEEXT) \ + getgid$(EXEEXT) getgid32$(EXEEXT) getgroups$(EXEEXT) \ + getgroups32$(EXEEXT) getpgrp$(EXEEXT) getrandom$(EXEEXT) \ + getresgid$(EXEEXT) getresgid32$(EXEEXT) getresuid$(EXEEXT) \ + getresuid32$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getuid$(EXEEXT) getuid32$(EXEEXT) getxxid$(EXEEXT) \ + inet-cmsg$(EXEEXT) ioctl$(EXEEXT) ioctl_block$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) ioctl_mtd$(EXEEXT) \ + ioctl_rtc$(EXEEXT) ioctl_rtc-v$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) ipc_msgbuf$(EXEEXT) \ + ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) kill$(EXEEXT) \ + ksysent$(EXEEXT) lchown$(EXEEXT) lchown32$(EXEEXT) \ + link$(EXEEXT) linkat$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) munlockall$(EXEEXT) \ + nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ + net-icmp_filter$(EXEEXT) net-y-unix$(EXEEXT) \ + net-yy-inet$(EXEEXT) net-yy-netlink$(EXEEXT) \ + net-yy-unix$(EXEEXT) netlink_inet_diag$(EXEEXT) \ + netlink_netlink_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldselect$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) \ + pause$(EXEEXT) pc$(EXEEXT) personality$(EXEEXT) pipe$(EXEEXT) \ + poll$(EXEEXT) ppoll$(EXEEXT) prctl-seccomp-filter-v$(EXEEXT) \ + prctl-seccomp-strict$(EXEEXT) pread64-pwrite64$(EXEEXT) \ + preadv$(EXEEXT) preadv-pwritev$(EXEEXT) \ + preadv2-pwritev2$(EXEEXT) pselect6$(EXEEXT) ptrace$(EXEEXT) \ + pwritev$(EXEEXT) read-write$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvmsg$(EXEEXT) remap_file_pages$(EXEEXT) \ + rename$(EXEEXT) renameat$(EXEEXT) renameat2$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setregid$(EXEEXT) setregid32$(EXEEXT) setresgid$(EXEEXT) \ + setresgid32$(EXEEXT) setresuid$(EXEEXT) setresuid32$(EXEEXT) \ + setreuid$(EXEEXT) setreuid32$(EXEEXT) setuid$(EXEEXT) \ + setuid32$(EXEEXT) shmxt$(EXEEXT) sigaction$(EXEEXT) \ sigaltstack$(EXEEXT) signalfd$(EXEEXT) sigreturn$(EXEEXT) \ - stack-fcall$(EXEEXT) stat$(EXEEXT) stat64$(EXEEXT) \ - statfs$(EXEEXT) sysinfo$(EXEEXT) time$(EXEEXT) \ - timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ - timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ - truncate$(EXEEXT) truncate64$(EXEEXT) uid$(EXEEXT) \ - uid16$(EXEEXT) uid32$(EXEEXT) uio$(EXEEXT) umount$(EXEEXT) \ - umount2$(EXEEXT) umovestr$(EXEEXT) umovestr2$(EXEEXT) \ - unix-pair-send-recv$(EXEEXT) userfaultfd$(EXEEXT) \ - utime$(EXEEXT) utimensat$(EXEEXT) wait$(EXEEXT) xattr$(EXEEXT) \ - xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ - xettimeofday$(EXEEXT) + sleep$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) time$(EXEEXT) timer_create$(EXEEXT) \ + timer_xettime$(EXEEXT) timerfd_xettime$(EXEEXT) times$(EXEEXT) \ + times-fail$(EXEEXT) truncate$(EXEEXT) truncate64$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umovestr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) userfaultfd$(EXEEXT) utime$(EXEEXT) \ + utimensat$(EXEEXT) utimes$(EXEEXT) vfork-f$(EXEEXT) \ + vhangup$(EXEEXT) vmsplice$(EXEEXT) wait$(EXEEXT) \ + xattr$(EXEEXT) xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ + xetpgid$(EXEEXT) xetpriority$(EXEEXT) xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) subdir = tests-m32 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/mpers.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -152,311 +214,1106 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) _newselect_SOURCES = _newselect.c _newselect_OBJECTS = _newselect.$(OBJEXT) _newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a adjtimex_SOURCES = adjtimex.c adjtimex_OBJECTS = adjtimex.$(OBJEXT) adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a aio_SOURCES = aio.c aio_OBJECTS = aio.$(OBJEXT) aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a bpf_SOURCES = bpf.c bpf_OBJECTS = bpf.$(OBJEXT) bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a caps_SOURCES = caps.c caps_OBJECTS = caps.$(OBJEXT) caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a clock_nanosleep_SOURCES = clock_nanosleep.c clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a clock_xettime_SOURCES = clock_xettime.c clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) -clock_xettime_DEPENDENCIES = +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a epoll_create1_SOURCES = epoll_create1.c epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a eventfd_SOURCES = eventfd.c eventfd_OBJECTS = eventfd.$(OBJEXT) eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a execve_SOURCES = execve.c execve_OBJECTS = execve.$(OBJEXT) execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a execveat_SOURCES = execveat.c execveat_OBJECTS = execveat.$(OBJEXT) execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a fanotify_mark_SOURCES = fanotify_mark.c fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a fcntl_SOURCES = fcntl.c fcntl_OBJECTS = fcntl.$(OBJEXT) fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a fcntl64_SOURCES = fcntl64.c fcntl64_OBJECTS = fcntl64.$(OBJEXT) fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a file_handle_SOURCES = file_handle.c file_handle_OBJECTS = file_handle.$(OBJEXT) file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a filter_unavailable_SOURCES = filter-unavailable.c filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) -filter_unavailable_DEPENDENCIES = +filter_unavailable_DEPENDENCIES = $(LDADD) +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a fstat_SOURCES = fstat.c fstat_OBJECTS = fstat.$(OBJEXT) fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a fstat64_SOURCES = fstat64.c fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a fstatat64_SOURCES = fstatat64.c fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a ftruncate_SOURCES = ftruncate.c ftruncate_OBJECTS = ftruncate.$(OBJEXT) ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a ftruncate64_SOURCES = ftruncate64.c ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a getdents_SOURCES = getdents.c getdents_OBJECTS = getdents.$(OBJEXT) getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a getdents64_SOURCES = getdents64.c getdents64_OBJECTS = getdents64.$(OBJEXT) getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a getrandom_SOURCES = getrandom.c getrandom_OBJECTS = getrandom.$(OBJEXT) getrandom_LDADD = $(LDADD) -inet_accept_connect_send_recv_SOURCES = \ - inet-accept-connect-send-recv.c -inet_accept_connect_send_recv_OBJECTS = \ - inet-accept-connect-send-recv.$(OBJEXT) -inet_accept_connect_send_recv_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a inet_cmsg_SOURCES = inet-cmsg.c inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a ioctl_SOURCES = ioctl.c ioctl_OBJECTS = ioctl.$(OBJEXT) ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a ip_mreq_SOURCES = ip_mreq.c ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a ipc_msg_SOURCES = ipc_msg.c ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a ipc_msgbuf_SOURCES = ipc_msgbuf.c ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a ipc_sem_SOURCES = ipc_sem.c ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a ipc_shm_SOURCES = ipc_shm.c ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a ksysent_SOURCES = ksysent.c ksysent_OBJECTS = ksysent.$(OBJEXT) ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a llseek_SOURCES = llseek.c llseek_OBJECTS = llseek.$(OBJEXT) llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a lseek_SOURCES = lseek.c lseek_OBJECTS = lseek.$(OBJEXT) lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a lstat_SOURCES = lstat.c lstat_OBJECTS = lstat.$(OBJEXT) lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a lstat64_SOURCES = lstat64.c lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a membarrier_SOURCES = membarrier.c membarrier_OBJECTS = membarrier.$(OBJEXT) membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a memfd_create_SOURCES = memfd_create.c memfd_create_OBJECTS = memfd_create.$(OBJEXT) memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a mlock2_SOURCES = mlock2.c mlock2_OBJECTS = mlock2.$(OBJEXT) mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a mmap_SOURCES = mmap.c mmap_OBJECTS = mmap.$(OBJEXT) mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a mmap64_SOURCES = mmap64.c mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a mmsg_SOURCES = mmsg.c mmsg_OBJECTS = mmsg.$(OBJEXT) mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a mq_SOURCES = mq.c mq_OBJECTS = mq.$(OBJEXT) -mq_DEPENDENCIES = +mq_DEPENDENCIES = $(LDADD) +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a nanosleep_SOURCES = nanosleep.c nanosleep_OBJECTS = nanosleep.$(OBJEXT) nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a net_accept_connect_SOURCES = net-accept-connect.c net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a netlink_inet_diag_SOURCES = netlink_inet_diag.c netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a netlink_unix_diag_SOURCES = netlink_unix_diag.c netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a newfstatat_SOURCES = newfstatat.c newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a oldselect_SOURCES = oldselect.c oldselect_OBJECTS = oldselect.$(OBJEXT) oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a pc_SOURCES = pc.c pc_OBJECTS = pc.$(OBJEXT) am__DEPENDENCIES_1 = -pc_DEPENDENCIES = $(am__DEPENDENCIES_1) +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a pipe_SOURCES = pipe.c pipe_OBJECTS = pipe.$(OBJEXT) pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a ppoll_SOURCES = ppoll.c ppoll_OBJECTS = ppoll.$(OBJEXT) ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a pselect6_SOURCES = pselect6.c pselect6_OBJECTS = pselect6.$(OBJEXT) pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a readdir_SOURCES = readdir.c readdir_OBJECTS = readdir.$(OBJEXT) readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a readlink_SOURCES = readlink.c readlink_OBJECTS = readlink.$(OBJEXT) readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a readlinkat_SOURCES = readlinkat.c readlinkat_OBJECTS = readlinkat.$(OBJEXT) readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a restart_syscall_SOURCES = restart_syscall.c restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a sched_xetattr_SOURCES = sched_xetattr.c sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a scm_rights_SOURCES = scm_rights.c scm_rights_OBJECTS = scm_rights.$(OBJEXT) scm_rights_LDADD = $(LDADD) -seccomp_SOURCES = seccomp.c -seccomp_OBJECTS = seccomp.$(OBJEXT) -seccomp_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a select_SOURCES = select.c select_OBJECTS = select.$(OBJEXT) select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a sendfile_SOURCES = sendfile.c sendfile_OBJECTS = sendfile.$(OBJEXT) sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a sendfile64_SOURCES = sendfile64.c sendfile64_OBJECTS = sendfile64.$(OBJEXT) sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a set_ptracer_any_SOURCES = set_ptracer_any.c set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a sigaction_SOURCES = sigaction.c sigaction_OBJECTS = sigaction.$(OBJEXT) sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a sigaltstack_SOURCES = sigaltstack.c sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a signalfd_SOURCES = signalfd.c signalfd_OBJECTS = signalfd.$(OBJEXT) signalfd_LDADD = $(LDADD) +signalfd_DEPENDENCIES = libtests.a sigreturn_SOURCES = sigreturn.c sigreturn_OBJECTS = sigreturn.$(OBJEXT) sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ stack-fcall-3.$(OBJEXT) stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a stat_SOURCES = stat.c stat_OBJECTS = stat.$(OBJEXT) stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a stat64_SOURCES = stat64.c stat64_OBJECTS = stat64-stat64.$(OBJEXT) stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a statfs_SOURCES = statfs.c statfs_OBJECTS = statfs-statfs.$(OBJEXT) statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a sysinfo_SOURCES = sysinfo.c sysinfo_OBJECTS = sysinfo.$(OBJEXT) sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a time_SOURCES = time.c time_OBJECTS = time.$(OBJEXT) time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a timer_create_SOURCES = timer_create.c timer_create_OBJECTS = timer_create.$(OBJEXT) timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a timer_xettime_SOURCES = timer_xettime.c timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a timerfd_xettime_SOURCES = timerfd_xettime.c timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a times_SOURCES = times.c times_OBJECTS = times.$(OBJEXT) -times_DEPENDENCIES = +times_DEPENDENCIES = $(LDADD) times_fail_SOURCES = times-fail.c times_fail_OBJECTS = times-fail.$(OBJEXT) times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a truncate_SOURCES = truncate.c truncate_OBJECTS = truncate.$(OBJEXT) truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a truncate64_SOURCES = truncate64.c truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) truncate64_LDADD = $(LDADD) -uid_SOURCES = uid.c -uid_OBJECTS = uid.$(OBJEXT) -uid_LDADD = $(LDADD) -uid16_SOURCES = uid16.c -uid16_OBJECTS = uid16.$(OBJEXT) -uid16_LDADD = $(LDADD) -uid32_SOURCES = uid32.c -uid32_OBJECTS = uid32.$(OBJEXT) -uid32_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a uio_SOURCES = uio.c uio_OBJECTS = uio-uio.$(OBJEXT) uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a umount_SOURCES = umount.c umount_OBJECTS = umount.$(OBJEXT) umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a umount2_SOURCES = umount2.c umount2_OBJECTS = umount2.$(OBJEXT) umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a umovestr_SOURCES = umovestr.c umovestr_OBJECTS = umovestr.$(OBJEXT) umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a umovestr2_SOURCES = umovestr2.c umovestr2_OBJECTS = umovestr2.$(OBJEXT) umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a unix_pair_send_recv_SOURCES = unix-pair-send-recv.c unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a userfaultfd_SOURCES = userfaultfd.c userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a utime_SOURCES = utime.c utime_OBJECTS = utime.$(OBJEXT) utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a utimensat_SOURCES = utimensat.c utimensat_OBJECTS = utimensat.$(OBJEXT) utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a wait_SOURCES = wait.c wait_OBJECTS = wait.$(OBJEXT) wait_LDADD = $(LDADD) +wait_DEPENDENCIES = libtests.a xattr_SOURCES = xattr.c xattr_OBJECTS = xattr.$(OBJEXT) xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a xet_robust_list_SOURCES = xet_robust_list.c xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a xetitimer_SOURCES = xetitimer.c xetitimer_OBJECTS = xetitimer.$(OBJEXT) xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a xettimeofday_SOURCES = xettimeofday.c xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -489,49 +1346,122 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c clock_nanosleep.c \ - clock_xettime.c epoll_create1.c eventfd.c execve.c execveat.c \ - fanotify_mark.c fcntl.c fcntl64.c file_handle.c \ - filter-unavailable.c fstat.c fstat64.c fstatat64.c ftruncate.c \ - ftruncate64.c getdents.c getdents64.c getrandom.c \ - inet-accept-connect-send-recv.c inet-cmsg.c ioctl.c ip_mreq.c \ - ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c ksysent.c llseek.c \ - lseek.c lstat.c lstat64.c membarrier.c memfd_create.c mlock2.c \ - mmap.c mmap64.c mmsg.c mq.c nanosleep.c net-accept-connect.c \ - netlink_inet_diag.c netlink_unix_diag.c newfstatat.c \ - oldselect.c pc.c pipe.c ppoll.c pselect6.c readdir.c \ - readlink.c readlinkat.c restart_syscall.c rt_sigqueueinfo.c \ - sched_xetattr.c scm_rights.c seccomp.c select.c sendfile.c \ - sendfile64.c set_ptracer_any.c sigaction.c sigaltstack.c \ - signalfd.c sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c \ - statfs.c sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c -DIST_SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c \ - clock_nanosleep.c clock_xettime.c epoll_create1.c eventfd.c \ - execve.c execveat.c fanotify_mark.c fcntl.c fcntl64.c \ - file_handle.c filter-unavailable.c fstat.c fstat64.c \ - fstatat64.c ftruncate.c ftruncate64.c getdents.c getdents64.c \ - getrandom.c inet-accept-connect-send-recv.c inet-cmsg.c \ - ioctl.c ip_mreq.c ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c \ - ksysent.c llseek.c lseek.c lstat.c lstat64.c membarrier.c \ - memfd_create.c mlock2.c mmap.c mmap64.c mmsg.c mq.c \ - nanosleep.c net-accept-connect.c netlink_inet_diag.c \ - netlink_unix_diag.c newfstatat.c oldselect.c pc.c pipe.c \ - ppoll.c pselect6.c readdir.c readlink.c readlinkat.c \ - restart_syscall.c rt_sigqueueinfo.c sched_xetattr.c \ - scm_rights.c seccomp.c select.c sendfile.c sendfile64.c \ - set_ptracer_any.c sigaction.c sigaltstack.c signalfd.c \ - sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ - sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c +SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -740,6 +1670,7 @@ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) @@ -773,6 +1704,11 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ @@ -785,12 +1721,15 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBOBJS = @LIBOBJS@ @@ -810,6 +1749,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -875,6 +1815,7 @@ top_srcdir = @top_srcdir@ OS = linux ARCH = @arch_m32@ +MPERS_NAME = m32 ARCH_MFLAGS = -m32 AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -887,102 +1828,279 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -991,77 +2109,111 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test - + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) @@ -1103,6 +2255,14 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) @@ -1110,6 +2270,14 @@ @rm -f _newselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) @rm -f adjtimex$(EXEEXT) $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) @@ -1118,14 +2286,58 @@ @rm -f aio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) @rm -f bpf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) @rm -f caps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) @rm -f clock_nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) @@ -1134,10 +2346,50 @@ @rm -f clock_xettime$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) @rm -f epoll_create1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) @rm -f eventfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) @@ -1146,14 +2398,50 @@ @rm -f execve$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) @rm -f execveat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) @rm -f fanotify_mark$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) @rm -f fcntl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) @@ -1162,14 +2450,30 @@ @rm -f fcntl64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) @rm -f file_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) @rm -f filter-unavailable$(EXEEXT) $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) @rm -f fstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) @@ -1182,6 +2486,18 @@ @rm -f fstatat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) @rm -f ftruncate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) @@ -1190,6 +2506,18 @@ @rm -f ftruncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) @rm -f getdents$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) @@ -1198,13 +2526,81 @@ @rm -f getdents64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) @rm -f getrandom$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) -inet-accept-connect-send-recv$(EXEEXT): $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_DEPENDENCIES) $(EXTRA_inet_accept_connect_send_recv_DEPENDENCIES) - @rm -f inet-accept-connect-send-recv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_LDADD) $(LIBS) +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) @rm -f inet-cmsg$(EXEEXT) @@ -1214,6 +2610,46 @@ @rm -f ioctl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) @rm -f ip_mreq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) @@ -1234,10 +2670,30 @@ @rm -f ipc_shm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) @rm -f ksysent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) @rm -f llseek$(EXEEXT) $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) @@ -1254,6 +2710,10 @@ @rm -f lstat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) @rm -f membarrier$(EXEEXT) $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) @@ -1262,10 +2722,42 @@ @rm -f memfd_create$(EXEEXT) $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) @rm -f mlock2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) @rm -f mmap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) @@ -1278,10 +2770,22 @@ @rm -f mmsg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) @rm -f mq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) @rm -f nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) @@ -1290,10 +2794,34 @@ @rm -f net-accept-connect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) @rm -f netlink_inet_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) @rm -f netlink_unix_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) @@ -1302,26 +2830,90 @@ @rm -f newfstatat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) @rm -f oldselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) @rm -f pc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) @rm -f pipe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) @rm -f ppoll$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) @rm -f pselect6$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) @rm -f readdir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) @@ -1334,30 +2926,118 @@ @rm -f readlinkat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) @rm -f restart_syscall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) @rm -f rt_sigqueueinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) @rm -f sched_xetattr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) @rm -f scm_rights$(EXEEXT) $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) -seccomp$(EXEEXT): $(seccomp_OBJECTS) $(seccomp_DEPENDENCIES) $(EXTRA_seccomp_DEPENDENCIES) - @rm -f seccomp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(seccomp_OBJECTS) $(seccomp_LDADD) $(LIBS) +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) @rm -f select$(EXEEXT) $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) @rm -f sendfile$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) @@ -1366,10 +3046,98 @@ @rm -f sendfile64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) @rm -f set_ptracer_any$(EXEEXT) $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) @rm -f sigaction$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) @@ -1386,6 +3154,14 @@ @rm -f sigreturn$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) @rm -f stack-fcall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) @@ -1402,10 +3178,46 @@ @rm -f statfs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) @rm -f sysinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) @rm -f time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) @@ -1438,22 +3250,14 @@ @rm -f truncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) -uid$(EXEEXT): $(uid_OBJECTS) $(uid_DEPENDENCIES) $(EXTRA_uid_DEPENDENCIES) - @rm -f uid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid_OBJECTS) $(uid_LDADD) $(LIBS) - -uid16$(EXEEXT): $(uid16_OBJECTS) $(uid16_DEPENDENCIES) $(EXTRA_uid16_DEPENDENCIES) - @rm -f uid16$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid16_OBJECTS) $(uid16_LDADD) $(LIBS) - -uid32$(EXEEXT): $(uid32_OBJECTS) $(uid32_DEPENDENCIES) $(EXTRA_uid32_DEPENDENCIES) - @rm -f uid32$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid32_OBJECTS) $(uid32_LDADD) $(LIBS) - uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) @rm -f uio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) @rm -f umount$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) @@ -1470,10 +3274,26 @@ @rm -f umovestr2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) @rm -f unix-pair-send-recv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) @rm -f userfaultfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) @@ -1486,6 +3306,22 @@ @rm -f utimensat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + wait$(EXEEXT): $(wait_OBJECTS) $(wait_DEPENDENCIES) $(EXTRA_wait_DEPENDENCIES) @rm -f wait$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wait_OBJECTS) $(wait_LDADD) $(LIBS) @@ -1502,6 +3338,14 @@ @rm -f xetitimer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) @rm -f xettimeofday$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) @@ -1513,75 +3357,241 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-accept-connect-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ @@ -1590,7 +3600,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ @@ -1599,22 +3618,30 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid16.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ .c.o: @@ -1631,6 +3658,174 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + fstat64-fstat64.o: fstat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po @@ -1715,6 +3910,62 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + stat64-stat64.o: stat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po @@ -1953,7 +4204,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all $(check_PROGRAMS) +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -2010,7 +4261,7 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am @@ -2054,7 +4305,8 @@ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -2124,24 +4376,23 @@ .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am -net-fd.log: net.log ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests-m32/mbind.c strace-4.12/tests-m32/mbind.c --- strace-4.11/tests-m32/mbind.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mbind.c 2016-05-16 23:48:05.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of mbind syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_mbind + +# include +# include + +int +main(void) +{ + const unsigned long len = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long mode = 3; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2; + const unsigned long flags = -1UL; + + long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); + printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n", + len, "MPOL_INTERLEAVE", nodemask, maxnode, + "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL", + (unsigned) flags & ~7, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mbind") + +#endif diff -Nru strace-4.11/tests-m32/mbind.test strace-4.12/tests-m32/mbind.test --- strace-4.11/tests-m32/mbind.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mbind.test 2016-04-29 18:21:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mbind syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/membarrier.c strace-4.12/tests-m32/membarrier.c --- strace-4.11/tests-m32/membarrier.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/membarrier.c 2016-04-21 18:16:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +25,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_membarrier + +# include +# include +# include +# include + int main(void) { -#ifdef __NR_membarrier - if (syscall(__NR_membarrier, 3, 255) != -1) - return 77; - printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + assert(syscall(__NR_membarrier, 3, 255) == -1); + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); if (errno != ENOSYS) { - if (syscall(__NR_membarrier, 0, 0) != 1) - return 1; /* the test needs to be updated? */ + /* the test needs to be updated? */ + assert(syscall(__NR_membarrier, 0, 0) == 1); puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" " = 0x1 (MEMBARRIER_CMD_SHARED)"); } puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_membarrier") + #endif -} diff -Nru strace-4.11/tests-m32/membarrier.test strace-4.12/tests-m32/membarrier.test --- strace-4.11/tests-m32/membarrier.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/membarrier.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check membarrier syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -emembarrier $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-m32/memfd_create.c strace-4.12/tests-m32/memfd_create.c --- strace-4.11/tests-m32/memfd_create.c 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests-m32/memfd_create.c 2016-01-04 23:41:27.000000000 +0000 @@ -1,7 +1,4 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include @@ -16,10 +13,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_memfd_create") #endif diff -Nru strace-4.11/tests-m32/migrate_pages.c strace-4.12/tests-m32/migrate_pages.c --- strace-4.11/tests-m32/migrate_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/migrate_pages.c 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Check decoding of migrate_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_migrate_pages + +# include +# include + +int +main(void) +{ + const long pid = (long) 0xfacefeedffffffff; + long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); + printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_migrate_pages") + +#endif diff -Nru strace-4.11/tests-m32/migrate_pages.test strace-4.12/tests-m32/migrate_pages.test --- strace-4.11/tests-m32/migrate_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/migrate_pages.test 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check migrate_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff -Nru strace-4.11/tests-m32/mincore.c strace-4.12/tests-m32/mincore.c --- strace-4.11/tests-m32/mincore.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mincore.c 2016-04-22 14:14:39.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define DEFAULT_STRLEN 32 + +static void +print_mincore(const unsigned int pages, void *const addr, + const size_t size, unsigned char *const vec) +{ + unsigned int i; + + if (mincore(addr, size, vec)) + perror_msg_and_skip("mincore"); + + printf("mincore(%p, %zu, [", addr, size); + for (i = 0; i < pages; ++i) { + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } + printf("%u", vec[i] & 1); + } + puts("]) = 0"); +} + +static void +test_mincore(const unsigned int pages) +{ + const size_t page_size = get_page_size(); + const size_t size = pages * page_size; + void *const addr = tail_alloc(size); + unsigned char *const vec = tail_alloc(pages); + + mincore(addr, size, NULL); + printf("mincore(%p, %zu, NULL) = -1 %s (%m)\n", + addr, size, errno2name()); + + print_mincore(pages, addr, size, vec); + if (size) + print_mincore(pages, addr, size - page_size + 1, vec); +} + +int main(void) +{ + test_mincore(1); + test_mincore(2); + test_mincore(DEFAULT_STRLEN); + test_mincore(DEFAULT_STRLEN + 1); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/mincore.test strace-4.12/tests-m32/mincore.test --- strace-4.11/tests-m32/mincore.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mincore.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mincore syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-m32/mkdirat.c strace-4.12/tests-m32/mkdirat.c --- strace-4.11/tests-m32/mkdirat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mkdirat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdirat + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdirat.sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_mkdirat, fd, sample, 0600); + printf("mkdirat(%d, \"%s\", 0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdirat") + +#endif diff -Nru strace-4.11/tests-m32/mkdirat.test strace-4.12/tests-m32/mkdirat.test --- strace-4.11/tests-m32/mkdirat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mkdirat.test 2016-04-06 06:18:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdirat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-m32/mkdir.c strace-4.12/tests-m32/mkdir.c --- strace-4.11/tests-m32/mkdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mkdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdir"; + + long rc = syscall(__NR_mkdir, sample, 0600); + printf("mkdir(\"%s\", 0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdir") + +#endif diff -Nru strace-4.11/tests-m32/mkdir.test strace-4.12/tests-m32/mkdir.test --- strace-4.11/tests-m32/mkdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mkdir.test 2016-04-21 17:34:38.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/mknodat.c strace-4.12/tests-m32/mknodat.c --- strace-4.11/tests-m32/mknodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mknodat.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,41 @@ +#include "tests.h" +#include + +#ifdef __NR_mknodat + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +int +main(void) +{ + static const char sample[] = "mknokat_sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + long rc = syscall(__NR_mknodat, fd, sample, S_IFREG|0600, 0); + printf("mknodat(%d, \"%s\", S_IFREG|0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + const unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknodat, fd, sample, S_IFCHR | 0400, dev); + printf("mknodat(%d, \"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknodat") + +#endif diff -Nru strace-4.11/tests-m32/mknodat.test strace-4.12/tests-m32/mknodat.test --- strace-4.11/tests-m32/mknodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mknodat.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknodat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/mknod.c strace-4.12/tests-m32/mknod.c --- strace-4.11/tests-m32/mknod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mknod.c 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,60 @@ +#include "tests.h" +#include + +#ifdef __NR_mknod + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +# define TMP_FILE "mknod" + +int +main(void) +{ + long rc = syscall(__NR_mknod, TMP_FILE, 0, 0xdeadbeef); + printf("mknod(\"%s\", 0) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, -1L, 0xdeadbeef); + printf("mknod(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, -1, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFREG|0600, 0); + printf("mknod(\"%s\", S_IFREG|0600) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFCHR | 0400, dev); + printf("mknod(\"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + const unsigned long mode = + ((unsigned long) 0xfacefeedffffffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0ded; + + rc = syscall(__NR_mknod, TMP_FILE, mode, dev); + printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#o" + ", makedev(%u, %u)) = %ld %s (%m)\n", + TMP_FILE, (unsigned) mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknod") + +#endif diff -Nru strace-4.11/tests-m32/mknod.test strace-4.12/tests-m32/mknod.test --- strace-4.11/tests-m32/mknod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mknod.test 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-m32/mlock2.c strace-4.12/tests-m32/mlock2.c --- strace-4.11/tests-m32/mlock2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/mlock2.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,28 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_mlock2 + +# include +# include + int main(void) { -#ifdef __NR_mlock2 - if (syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff) != -1) - return 77; - printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff); + printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe)" + " = %ld %s (%m)\n", rc, errno2name()); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_mlock2") + #endif -} diff -Nru strace-4.11/tests-m32/mlock2.test strace-4.12/tests-m32/mlock2.test --- strace-4.11/tests-m32/mlock2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/mlock2.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check mlock2 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e mlock2 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/mlockall.c strace-4.12/tests-m32/mlockall.c --- strace-4.11/tests-m32/mlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mlockall.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Check decoding of mlockall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("mlockall(0) = %d EINVAL (%m)\n", mlockall(0)); + + if (mlockall(MCL_CURRENT) == 0) + puts("mlockall(MCL_CURRENT) = 0"); + else + printf("mlockall(MCL_CURRENT) = -1 %s (%m)\n", errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/mlockall.test strace-4.12/tests-m32/mlockall.test --- strace-4.11/tests-m32/mlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mlockall.test 2016-04-09 23:34:18.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mlockall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-m32/mlock.c strace-4.12/tests-m32/mlock.c --- strace-4.11/tests-m32/mlock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mlock.c 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#if defined __NR_mlock && defined __NR_munlock + +# include +# include + +const int size = 1024; + +int +main(void) +{ + const char *addr = tail_alloc(size); + if (syscall(__NR_mlock, addr, size) == 0) { + printf("mlock(%p, %d) = 0\n", addr, size); + } else { + printf("mlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + if (syscall(__NR_munlock, addr, size) == 0) { + printf("munlock(%p, %d) = 0\n", addr, size); + } else { + printf("munlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_DEFINED("__NR_mlock && __NR_munlock") + +#endif diff -Nru strace-4.11/tests-m32/mlock.test strace-4.12/tests-m32/mlock.test --- strace-4.11/tests-m32/mlock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mlock.test 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock and munlock syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mlock,munlock -a20 diff -Nru strace-4.11/tests-m32/mmap.c strace-4.12/tests-m32/mmap.c --- strace-4.11/tests-m32/mmap.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/mmap.c 2016-02-12 02:35:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -36,10 +33,13 @@ #include int -main(void) +main(int ac, char **av) { - const intmax_t pagesize = sysconf(_SC_PAGESIZE); - const unsigned long length = pagesize * 3; + const char *const name = ac > 1 ? av[1] : "mmap"; + const intmax_t pagesize = get_page_size(); + const unsigned long length1 = pagesize * 6; + const unsigned long length2 = pagesize * 3; + const unsigned long length3 = pagesize * 2; const int fd = -1; off_t offset; void *addr, *p; @@ -51,23 +51,56 @@ offset = 0xdeadbeef000 & -pagesize; addr = (void *) (unsigned int) (0xfaced000 & -pagesize); #endif + const uintmax_t uoffset = + sizeof(offset) == sizeof(int) ? (uintmax_t) (unsigned int) offset + : (uintmax_t) offset; + + (void) close(0); + (void) close(0); + printf("%s(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EBADF (%m)\n", + name); + mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0); - p = mmap(addr, length, PROT_READ | PROT_WRITE, + p = mmap(addr, length1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, fd, offset); - if (p == MAP_FAILED || - mprotect(p, length, PROT_NONE) || - munmap(p, length)) - return 77; - - if (sizeof(offset) == sizeof(int)) - printf("mmap2?\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#x\\) = %p\n", - addr, length, fd, (unsigned int) offset, p); - else - printf("(mmap2?|old_mmap)\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#jx\\) = %p\n", - addr, length, fd, (uintmax_t) offset, p); - printf("mprotect\\(%p, %lu, PROT_NONE\\) += 0\n", p, length); - printf("munmap\\(%p, %lu\\) += 0\n", p, length); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap"); + printf("%s(%p, %lu, PROT_READ|PROT_WRITE, " + "MAP_PRIVATE|MAP_ANONYMOUS, %d, %#jx) = %p\n", + name, addr, length1, fd, uoffset, p); + + if (msync(p, length1, MS_SYNC)) + perror_msg_and_fail("msync"); + printf("msync(%p, %lu, MS_SYNC) = 0\n", p, length1); + + if (mprotect(p, length1, PROT_NONE)) + perror_msg_and_fail("mprotect"); + printf("mprotect(%p, %lu, PROT_NONE) = 0\n", p, length1); + + addr = mremap(p, length1, length2, 0); + if (MAP_FAILED == addr) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, 0) = %p\n", p, length1, length2, addr); + + p = mremap(addr, length2, length3, MREMAP_MAYMOVE | MREMAP_FIXED, + addr + length2); + if (MAP_FAILED == p) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, MREMAP_MAYMOVE|MREMAP_FIXED" + ", %p) = %p\n", addr, length2, length3, addr + length2, p); + + if (madvise(p, length3, MADV_NORMAL)) + perror_msg_and_fail("madvise"); + printf("madvise(%p, %lu, MADV_NORMAL) = 0\n", p, length3); + + if (munmap(p, length3)) + perror_msg_and_fail("munmap"); + printf("munmap(%p, %lu) = 0\n", p, length3); + + if (mlockall(MCL_FUTURE)) + perror_msg_and_fail("mlockall"); + puts("mlockall(MCL_FUTURE) = 0"); + + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-m32/mmap.test strace-4.12/tests-m32/mmap.test --- strace-4.11/tests-m32/mmap.test 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/tests-m32/mmap.test 2016-03-30 00:13:56.000000000 +0000 @@ -1,20 +1,58 @@ #!/bin/sh - -# Check mmap/mprotect/munmap syscalls decoding. +# +# Check mmap/mmap2, madvise, mlockall, mprotect, mremap, msync, and munmap +# syscalls decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . "${srcdir=.}/init.sh" -syscall=mprotect,munmap +check_prog grep +check_prog sed +run_prog > /dev/null + +syscall= for n in mmap mmap2; do $STRACE -e$n -h > /dev/null && syscall=$syscall,$n done +run_strace -e$syscall $args > /dev/null -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -e$syscall $args > "$OUT" -match_grep "$LOG" "$OUT" - -rm -f "$OUT" +if grep '^mmap(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap +elif grep '^mmap2(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap2 +else + dump_log_and_fail_with "mmap/mmap2 not found in $STRACE $args output" +fi + +syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap + +run_prog "./$NAME" $mmap > /dev/null +run_strace -a20 -e$syscall $args > "$EXP" +sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" -exit 0 +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/mmsg.c strace-4.12/tests-m32/mmsg.c --- strace-4.11/tests-m32/mmsg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/mmsg.c 2016-01-20 17:36:41.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2014 Masatake YAMATO - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,81 +26,218 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" +#include "tests.h" +# include + +#if (defined __NR_sendmmsg || defined HAVE_SENDMMSG) \ + && (defined __NR_recvmmsg || defined HAVE_RECVMMSG) + +# include +# include +# include +# include +# include + +# ifndef HAVE_STRUCT_MMSGHDR +struct mmsghdr { + struct msghdr msg_hdr; + unsigned msg_len; +}; +# endif + +static int +send_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags) +{ + int rc; +#ifdef __NR_sendmmsg + rc = syscall(__NR_sendmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("sendmmsg(%d, %p, %u, MSG_DONTROUTE|MSG_NOSIGNAL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_SENDMMSG + rc = sendmmsg(fd, vec, vlen, flags); +#endif + return rc; +} + +static int +recv_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags, + struct timespec *timeout) +{ + int rc; +#ifdef __NR_recvmmsg + rc = syscall(__NR_recvmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags, timeout); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("recvmmsg(%d, %p, %u, MSG_DONTWAIT, NULL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_RECVMMSG + rc = recvmmsg(fd, vec, vlen, flags, timeout); #endif -#include -#include -#include -#include -#include + return rc; +} int main(void) { -#if defined(HAVE_SENDMMSG) && defined(HAVE_STRUCT_MMSGHDR) - const int R = 0, W = 1; - int fd; - int sv[2]; - char one[] = "one"; - char two[] = "two"; - char three[] = "three"; + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); - struct iovec iov[] = { + const struct iovec w0_iov_[] = { { - .iov_base = one, - .iov_len = sizeof(one) - 1 - }, { - .iov_base = two, - .iov_len = sizeof(two) - 1 + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) }, { - .iov_base = three, - .iov_len = sizeof(three) - 1 + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + } + }; + struct iovec *w0_iov = tail_memdup(w0_iov_, sizeof(w0_iov_)); + + const struct iovec w1_iov_[] = { + { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) } }; + struct iovec *w1_iov = tail_memdup(w1_iov_, sizeof(w1_iov_)); - struct mmsghdr mmh[] = { + const struct mmsghdr w_mmh_[] = { { .msg_hdr = { - .msg_iov = iov + 0, - .msg_iovlen = 2, + .msg_iov = w0_iov, + .msg_iovlen = ARRAY_SIZE(w0_iov_), } }, { .msg_hdr = { - .msg_iov = iov + 2, - .msg_iovlen = 1, + .msg_iov = w1_iov, + .msg_iovlen = ARRAY_SIZE(w1_iov_), } } }; -#define n_mmh (sizeof(mmh)/sizeof(mmh[0])) - - /* - * Following open/dup2/close calls make the output of strace - * more predictable, so we can just compare the output and - * expected output (mmsg.expected) for testing purposes. - */ - while ((fd = open("/dev/null", O_RDWR)) < 3) - assert(fd >= 0); - (void) close(3); - - assert(socketpair(AF_UNIX, SOCK_DGRAM, 0, sv) == 0); - - assert(dup2(sv[W], W) == W); - assert(close(sv[W]) == 0); - assert(dup2(sv[R], R) == R); - assert(close(sv[R]) == 0); + void *w_mmh = tail_memdup(w_mmh_, sizeof(w_mmh_)); + const unsigned int n_w_mmh = ARRAY_SIZE(w_mmh_); - int r = sendmmsg(W, mmh, n_mmh, 0); + int r = send_mmsg(1, w_mmh, n_w_mmh, MSG_DONTROUTE | MSG_NOSIGNAL); if (r < 0 && errno == ENOSYS) - return 77; - assert((size_t)r == n_mmh); - assert(close(W) == 0); + perror_msg_and_skip("sendmmsg"); + assert(r == (int) n_w_mmh); + assert(close(1) == 0); + tprintf("sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}" + ", {\"%s\", %u}], msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTROUTE|MSG_NOSIGNAL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w0_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + LENGTH_OF(w0_c) + LENGTH_OF(w1_c), + ARRAY_SIZE(w1_iov_), w2_c, LENGTH_OF(w2_c), LENGTH_OF(w2_c), + n_w_mmh, r, + ARRAY_SIZE(w0_iov_), LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + ARRAY_SIZE(w1_iov_), LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r0_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = r_len + } + }; + struct iovec *r1_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); - assert(recvmmsg(R, mmh, n_mmh, 0, NULL) == n_mmh); - assert(close(R) == 0); + const struct mmsghdr r_mmh_[] = { + { + .msg_hdr = { + .msg_iov = r0_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = r1_iov, + .msg_iovlen = ARRAY_SIZE(r1_iov_), + } + } + }; + void *r_mmh = tail_memdup(r_mmh_, sizeof(r_mmh_)); + const unsigned int n_r_mmh = ARRAY_SIZE(r_mmh_); + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + assert(recv_mmsg(0, r_mmh, n_r_mmh, MSG_DONTWAIT, NULL) == (int) n_r_mmh); + assert(close(0) == 0); + tprintf("recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}, {\"\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTWAIT, NULL) = %d (left NULL)\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, LENGTH_OF(r0_c), + ARRAY_SIZE(r1_iov_), r1_c, r_len, r_len, LENGTH_OF(r1_c), + n_r_mmh, r, + ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), r0_d, r0_c, + ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), r1_d, r1_c); + + tprintf("+++ exited with 0 +++\n"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("(__NR_sendmmsg || HAVE_SENDMMSG) && (__NR_recvmmsg || HAVE_RECVMMSG)") + #endif -} diff -Nru strace-4.11/tests-m32/mmsg.expected strace-4.12/tests-m32/mmsg.expected --- strace-4.11/tests-m32/mmsg.expected 2014-11-11 15:45:26.000000000 +0000 +++ strace-4.12/tests-m32/mmsg.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0) = 2 - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0, NULL) = 2 (left NULL) - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -+++ exited with 0 +++ diff -Nru strace-4.11/tests-m32/mmsg.test strace-4.12/tests-m32/mmsg.test --- strace-4.11/tests-m32/mmsg.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-m32/mmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check how iovecs in struct mmsghdr are decoded. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 $args -match_diff - -exit 0 +run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 diff -Nru strace-4.11/tests-m32/mount.c strace-4.12/tests-m32/mount.c --- strace-4.11/tests-m32/mount.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mount.c 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of mount syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#ifndef MS_MGC_VAL +# define MS_MGC_VAL 0xC0ED0000 +#endif + +#ifndef MS_RELATIME +# define MS_RELATIME (1ul << 21) +#endif + +#define str_ro_nosuid_nodev_noexec "MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC" + +int +main(void) +{ + static const char source[] = "mount_source"; + static const char target[] = "mount_target"; + static const char fstype[] = "mount_fstype"; + static const char data[] = "mount_data"; + + int rc = mount(source, target, fstype, 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_RELATIME | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + str_ro_nosuid_nodev_noexec "|MS_RELATIME", + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_MGC_VAL", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + "MS_MGC_VAL|" str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_REMOUNT, data); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_REMOUNT", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_BIND, data); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", + source, target, fstype, "MS_BIND", data, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/mount.test strace-4.12/tests-m32/mount.test --- strace-4.11/tests-m32/mount.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/mount.test 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mount syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/move_pages.c strace-4.12/tests-m32/move_pages.c --- strace-4.11/tests-m32/move_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/move_pages.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,251 @@ +/* + * Check decoding of move_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_move_pages + +# include +# include +# include + +# define MAX_STRLEN 3 + +static void +print_page_array(const void **const pages, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", pages ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", pages); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", pages + i); + break; + } + const void *const addr = pages[i]; + if (addr) + printf("%p", addr); + else + printf("NULL"); + } + printf("]"); +} + +static void +print_node_array(const int *const nodes, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", nodes ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", nodes); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", nodes + i); + break; + } + printf("%d", nodes[i]); + } + printf("]"); +} + +static void +print_status_array(const int *const status, const unsigned long count) +{ + if (!count) { + printf("%s", status ? "[]" : "NULL"); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + if (status[i] >= 0) { + printf("%d", status[i]); + } else { + errno = -status[i]; + printf("%s", errno2name()); + } + } + printf("]"); +} + +static void +print_stat_pages(const unsigned long pid, const unsigned long count, + const void **const pages, int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000002; + + long rc = syscall(__NR_move_pages, + pid, count, pages, NULL, status, flags); + if (rc) { + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + if (count) + printf("%p", status); + else + printf("[]"); + errno = saved_errno; + printf(", MPOL_MF_MOVE) = %ld %s (%m)\n", + rc, errno2name()); + } else { + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + print_status_array(status, count); + printf(", MPOL_MF_MOVE) = 0\n"); + } +} + +static void +print_move_pages(const unsigned long pid, + unsigned long count, + const unsigned int offset, + const void **const pages, + int *const nodes, + int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000004; + count += offset; + + long rc = syscall(__NR_move_pages, + pid, count, pages, nodes, status, flags); + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, offset); + printf(", "); + print_node_array(nodes, count, offset); + printf(", "); + if (count) + printf("%p", status); + else + printf("[]"); + printf(", MPOL_MF_MOVE_ALL) = "); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +int +main(void) +{ + const unsigned long pid = + (unsigned long) 0xfacefeed00000000 | getpid(); + unsigned long count = 1; + const unsigned page_size = get_page_size(); + const void *const page = tail_alloc(page_size); + const void *const efault = page + page_size; + const void **pages = tail_alloc(sizeof(*pages)); + int *nodes = tail_alloc(sizeof(*nodes)); + int *status = tail_alloc(sizeof(*status)); + + print_stat_pages(pid, 0, pages, status); + print_move_pages(pid, 0, 0, pages, nodes, status); + print_move_pages(pid, 0, 1, pages + 1, nodes + 1, status + 1); + + *pages = page; + print_stat_pages(pid, count, pages, status); + *nodes = 0xdeadbee1; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = efault; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee2; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = nodes; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee3; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = status; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee4; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_move_pages") + +#endif diff -Nru strace-4.11/tests-m32/move_pages.test strace-4.12/tests-m32/move_pages.test --- strace-4.11/tests-m32/move_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/move_pages.test 2016-04-29 18:21:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of move_pages syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 diff -Nru strace-4.11/tests-m32/mq.c strace-4.12/tests-m32/mq.c --- strace-4.11/tests-m32/mq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/mq.c 2016-01-06 11:52:43.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,37 +26,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_MQUEUE_H -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include int main (void) { struct mq_attr attr; (void) close(0); - if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0) || - mq_getattr(0, &attr) || - mq_setattr(0, &attr, 0) || - mq_unlink("/strace-mq.test")) - return 77; + if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0)) + perror_msg_and_skip("mq_open"); + if (mq_getattr(0, &attr)) + perror_msg_and_skip("mq_getattr"); + if (mq_setattr(0, &attr, 0)) + perror_msg_and_skip("mq_setattr"); + if (mq_unlink("/strace-mq.test")) + perror_msg_and_skip("mq_unlink"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_MQUEUE_H") #endif diff -Nru strace-4.11/tests-m32/munlockall.c strace-4.12/tests-m32/munlockall.c --- strace-4.11/tests-m32/munlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/munlockall.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("munlockall() = %d\n", munlockall()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/munlockall.test strace-4.12/tests-m32/munlockall.test --- strace-4.11/tests-m32/munlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/munlockall.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check munlockall syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests-m32/nanosleep.c strace-4.12/tests-m32/nanosleep.c --- strace-4.11/tests-m32/nanosleep.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-m32/nanosleep.c 2016-01-06 09:56:09.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -54,32 +56,28 @@ const struct itimerval itv = { .it_value.tv_usec = 111111 }; if (nanosleep(&req.ts, NULL)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!nanosleep(NULL, &rem.ts)) - return 77; - printf("nanosleep(NULL, %p) = -1 EFAULT (Bad address)\n", &rem.ts); + assert(nanosleep(NULL, &rem.ts) == -1); + printf("nanosleep(NULL, %p) = -1 EFAULT (%m)\n", &rem.ts); if (nanosleep(&req.ts, &rem.ts)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 1000000000; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; - printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -88,8 +86,7 @@ (intmax_t) itv.it_value.tv_usec); req.ts.tv_nsec = 999999999; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; + assert(nanosleep(&req.ts, &rem.ts) == -1); printf("nanosleep({%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, diff -Nru strace-4.11/tests-m32/nanosleep.test strace-4.12/tests-m32/nanosleep.test --- strace-4.11/tests-m32/nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check nanosleep syscall decoding. +# Check nanosleep and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=nanosleep,setitimer -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=nanosleep,setitimer diff -Nru strace-4.11/tests-m32/net-accept-connect.c strace-4.12/tests-m32/net-accept-connect.c --- strace-4.11/tests-m32/net-accept-connect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/net-accept-connect.c 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Dmitry V. Levin + * Copyright (c) 2013-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -61,9 +62,12 @@ close(0); close(1); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 0); - assert(bind(0, (struct sockaddr *) &addr, len) == 0); - assert(listen(0, 5) == 0); + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); memset(&addr, 0, sizeof addr); assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); @@ -71,7 +75,8 @@ len = sizeof(addr); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(accept(0, (struct sockaddr *) &addr, &len) == 1); @@ -88,7 +93,7 @@ assert(sigprocmask(SIG_BLOCK, &set, NULL) == 0); assert(signal(SIGUSR1, handler) != SIG_ERR); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 1); + assert(socket(AF_LOCAL, SOCK_STREAM, 0) == 1); assert(close(0) == 0); assert(connect(1, (struct sockaddr *) &addr, len) == 0); assert(sigprocmask(SIG_UNBLOCK, &set, NULL) == 0); diff -Nru strace-4.11/tests-m32/net.expected strace-4.12/tests-m32/net.expected --- strace-4.11/tests-m32/net.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-m32/net.expected 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, \[19\]\) += 0 diff -Nru strace-4.11/tests-m32/net-fd.expected strace-4.12/tests-m32/net-fd.expected --- strace-4.11/tests-m32/net-fd.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-m32/net-fd.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, \[22\]\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +accept\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 diff -Nru strace-4.11/tests-m32/net-fd.test strace-4.12/tests-m32/net-fd.test --- strace-4.11/tests-m32/net-fd.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-m32/net-fd.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh - -# Check how network syscalls are traced when decoding socket descriptors - -. "${srcdir=.}/init.sh" - -# strace -y is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -run_prog ./net-accept-connect net-fd-local-stream -# using -y to test socket descriptors 'paths' decoding -run_strace_merge -y -enetwork $args -match_grep - -exit 0 diff -Nru strace-4.11/tests-m32/net-icmp_filter.c strace-4.12/tests-m32/net-icmp_filter.c --- strace-4.11/tests-m32/net-icmp_filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-icmp_filter.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of ICMP_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0) = -1 %s (%m)\n", + errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0) = -1 %s (%m)\n", + errno2name()); + + socklen_t *const plen = tail_alloc(sizeof(*plen)); + void *const efault = plen + 1; + struct icmp_filter *const f = tail_alloc(sizeof(*f)); + + getsockopt(-1, SOL_RAW, ICMP_FILTER, f, plen); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %p) = -1 %s (%m)\n", + f, plen, errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %u) = -1 %s (%m)\n", + efault, (unsigned) sizeof(*f), errno2name()); + + f->data = ~( + 1< + * This file is part of inet-yy strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" +#include #include #include #include @@ -33,7 +36,7 @@ #include #include -static int +static void send_query(const int fd, const int family, const int proto) { struct sockaddr_nl nladdr = { @@ -59,28 +62,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -88,12 +96,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct inet_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } int main(void) @@ -108,12 +129,16 @@ close(0); close(1); - if (socket(PF_INET, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5) || - socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) - return 77; - - return (send_query(1, AF_INET, IPPROTO_TCP) && - check_responses(1)) ? 0 : 77; + if (socket(AF_INET, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_INET"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1, AF_INET, IPPROTO_TCP); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests-m32/netlink_netlink_diag.c strace-4.12/tests-m32/netlink_netlink_diag.c --- strace-4.11/tests-m32/netlink_netlink_diag.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/netlink_netlink_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct netlink_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + close(0); + close(1); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) + perror_msg_and_skip("socket AF_NETLINK"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff -Nru strace-4.11/tests-m32/netlink_unix_diag.c strace-4.12/tests-m32/netlink_unix_diag.c --- strace-4.11/tests-m32/netlink_unix_diag.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/netlink_unix_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include #include #include #include @@ -40,8 +44,8 @@ # define NETLINK_SOCK_DIAG NETLINK_INET_DIAG #endif -static int -send_query(const int fd, const int family, const int proto) +static void +send_query(const int fd) { struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK @@ -53,11 +57,10 @@ .nlh = { .nlmsg_len = sizeof(req), .nlmsg_type = SOCK_DIAG_BY_FAMILY, - .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP }, .udr = { - .sdiag_family = family, - .sdiag_protocol = proto, + .sdiag_family = AF_UNIX, .udiag_states = -1, .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER } @@ -67,28 +70,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -96,12 +104,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct unix_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } #define SUN_PATH "netlink_unix_diag_socket" @@ -117,16 +138,19 @@ close(1); (void) unlink(SUN_PATH); - if (socket(PF_LOCAL, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5)) - return 77; + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_LOCAL"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); assert(unlink(SUN_PATH) == 0); if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) - return 77; + perror_msg_and_skip("socket AF_NETLINK"); - return (send_query(1, AF_UNIX, 0) && - check_responses(1)) ? 0 : 77; + send_query(1); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests-m32/net-y-unix.c strace-4.12/tests-m32/net-y-unix.c --- strace-4.11/tests-m32/net-y-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-y-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,230 @@ +/* + * This file is part of net-y-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d\n", + listen_fd, listen_inode, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + listen_fd, listen_inode, av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d\n", + listen_fd, listen_inode, sun_path1, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(connect_fd, accept_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, sun_path1, (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/net-y-unix.test strace-4.12/tests-m32/net-y-unix.test --- strace-4.11/tests-m32/net-y-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-y-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of network syscalls in -y mode. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a20 -y -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/net-yy-accept.awk strace-4.12/tests-m32/net-yy-accept.awk --- strace-4.11/tests-m32/net-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 9 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_bind = "^bind\\(0, \\{sa_family=AF_INET, sin_port=htons\\(0\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 { - if (match($0, r_getsockname, a) && a[1] == a[2]) { - port_l = a[1] - r_accept = "^accept\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 1" r_localhost ":(" r_port ")\\]>$" - r_close0 = "^close\\(0) += 0$" - next - } -} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a) && a[1] == a[2]) { - port_r = a[1] - r_recv = "^recv\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL\\) += 4$" - r_recvfrom = "^recvfrom\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL, NULL, NULL\\) += 4$" - r_close1 = "^close\\(1" r_localhost ":" port_r "\\]>) += 0$" - next - } -} - -NR == 6 {if (r_close0 != "" && match($0, r_close0)) next} - -NR == 7 {if (r_recv != "" && (match($0, r_recv) || match($0, r_recvfrom))) next} - -NR == 8 {if (r_close1 != "" && match($0, r_close1)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-m32/net-yy-connect.awk strace-4.12/tests-m32/net-yy-connect.awk --- strace-4.11/tests-m32/net-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 5 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_connect = "^connect\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i ") += 0$" - next - } -} - -NR == 2 { - if (r_connect != "" && match($0, r_connect, a)) { - port_r = a[1] - r_send = "^send\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE\\) += 4$" - r_sendto = "^sendto\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE, NULL, 0\\) += 4$" - next - } -} - -NR == 3 { - if (r_send != "" && (match($0, r_send, a) || match($0, r_sendto, a))) { - port_l = a[1] - r_close = "^close\\(0" r_localhost ":" port_r "\\]>\\) += 0$" - next - } -} - -NR == 4 {if (r_close != "" && match($0, r_close)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-m32/net-yy-inet.c strace-4.12/tests-m32/net-yy-inet.c --- strace-4.11/tests-m32/net-yy-inet.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-inet.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * This file is part of net-yy-inet strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + const struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int listen_fd = socket(AF_INET, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + const unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + listen_fd, listen_inode); + + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_INET, sin_port=htons(0)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + listen_fd, listen_inode, (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + const unsigned int listen_port = + ntohs(((struct sockaddr_in *) listen_sa) -> sin_port); + printf("getsockname(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = 0\n", + listen_fd, listen_port, listen_port, (unsigned) *len); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_TCP, TCP_MAXSEG, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_TCP, TCP_MAXSEG" + ", [%u], [%u]) = 0\n", + listen_fd, listen_port, *optval, (unsigned) *len); + + const int connect_fd = socket(AF_INET, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + const unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + connect_fd, connect_inode); + + *len = sizeof(addr); + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + connect_fd, connect_inode, listen_port, (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + const int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + const unsigned int connect_port = + ntohs(((struct sockaddr_in *) accept_sa) -> sin_port); + printf("accept(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = %d127.0.0.1:%u]>\n", + listen_fd, listen_port, connect_port, (unsigned) *len, + accept_fd, listen_port, connect_port); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(accept_fd, accept_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + accept_fd, listen_port, connect_port, connect_port, + (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + connect_fd, connect_port, listen_port, listen_port, + (unsigned) *len); + + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_TCP, TCP_MAXSEG, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d127.0.0.1:%u]>" + ", SOL_TCP, TCP_MAXSEG, [%u], %u) = 0\n", + connect_fd, connect_port, listen_port, *optval, + (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, + MSG_DONTROUTE | MSG_DONTWAIT, NULL, 0) == sizeof(text) - 1); + printf("sendto(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_DONTROUTE|MSG_DONTWAIT, NULL, 0) = %u\n", + connect_fd, connect_port, listen_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + connect_fd, connect_port, listen_port); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_WAITALL, + NULL, NULL) == sizeof(text) - 1); + printf("recvfrom(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_WAITALL, NULL, NULL) = %u\n", + accept_fd, listen_port, connect_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + accept_fd, listen_port, connect_port); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_port); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/net-yy-inet.test strace-4.12/tests-m32/net-yy-inet.test --- strace-4.11/tests-m32/net-yy-inet.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-inet.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of ip:port pairs associated with socket descriptors +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_inet_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/net-yy-netlink.c strace-4.12/tests-m32/net-yy-netlink.c --- strace-4.11/tests-m32/net-yy-netlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-netlink.c 2016-05-23 10:26:46.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +int +main(void) +{ + unsigned magic = 1234; + struct sockaddr_nl addr = { + .nl_family = AF_NETLINK, + .nl_pid = 1234 + }; + struct sockaddr *const sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + if (fd < 0) + perror_msg_and_skip("socket"); + const unsigned long inode = inode_of_sockfd(fd); + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = " + "%d\n", fd, inode); + + if (bind(fd, sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, %u) = 0\n", + fd, inode, magic, (unsigned) *len); + + if (getsockname(fd, sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, [%u]) = 0\n", + fd, magic, magic, (unsigned) *len); + + if (close(fd)) + perror_msg_and_fail("close"); + printf("close(%d) = 0\n", fd, magic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/net-yy-netlink.test strace-4.12/tests-m32/net-yy-netlink.test --- strace-4.11/tests-m32/net-yy-netlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-netlink.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of protocol:portid pairs associated with socket +# descriptors +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# Copyright (c) 2016 Fabien Siron +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_netlink_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/net-yy.test strace-4.12/tests-m32/net-yy.test --- strace-4.11/tests-m32/net-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/net-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -#!/bin/sh -# -# Check decoding of ip:port pairs associated with socket descriptors -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_inet_diag -run_prog ./inet-accept-connect-send-recv -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/net-yy-connect.awk "$STRACE $args connect output mismatch" -match_awk "$LOG-accept" "$srcdir"/net-yy-accept.awk "$STRACE $args accept output mismatch" - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests-m32/net-yy-unix.c strace-4.12/tests-m32/net-yy-unix.c --- strace-4.11/tests-m32/net-yy-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,227 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", + listen_fd, listen_inode, av[1]); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, av[1], *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu]>) = 0\n", + connect_fd, connect_inode, accept_inode); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], sun_path1, (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu,@\"%s\"]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, sun_path1, av[1], (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu,@\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, sun_path1, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu,@\"%s\"]>) = 0\n", + connect_fd, connect_inode, accept_inode, sun_path1); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode, av[1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/net-yy-unix.test strace-4.12/tests-m32/net-yy-unix.test --- strace-4.11/tests-m32/net-yy-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/net-yy-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of address information (inode[->peer][,path]) +# associated with unix domain socket descriptors. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_unix_diag + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/newfstatat.c strace-4.12/tests-m32/newfstatat.c --- strace-4.11/tests-m32/newfstatat.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-m32/newfstatat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_newfstatat -# define TEST_SYSCALL_NAME newfstatat -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_newfstatat +# define TEST_SYSCALL_STR "newfstatat" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_newfstatat") + +#endif diff -Nru strace-4.11/tests-m32/_newselect.c strace-4.12/tests-m32/_newselect.c --- strace-4.11/tests-m32/_newselect.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-m32/_newselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR__newselect -# define TEST_SYSCALL_NAME _newselect -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR__newselect +# define TEST_SYSCALL_STR "_newselect" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR__newselect") + +#endif diff -Nru strace-4.11/tests-m32/nsyscalls.c strace-4.12/tests-m32/nsyscalls.c --- strace-4.11/tests-m32/nsyscalls.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/nsyscalls.c 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of out-of-range syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "syscall.h" + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +#include + +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) != 0 +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif + +static const unsigned long nr = ARRAY_SIZE(syscallent) | SYSCALL_BIT; + +int +main(void) +{ + static const unsigned long a[] = { + (unsigned long) 0xface0fedbadc0ded, + (unsigned long) 0xface1fedbadc1ded, + (unsigned long) 0xface2fedbadc2ded, + (unsigned long) 0xface3fedbadc3ded, + (unsigned long) 0xface4fedbadc4ded, + (unsigned long) 0xface5fedbadc5ded + }; + + long rc = syscall(nr, a[0], a[1], a[2], a[3], a[4], a[5]); +#ifdef LINUX_MIPSO32 + printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld ENOSYS (%m)\n", nr, + a[0], a[1], a[2], a[3], a[4], a[5], rc); +#else + printf("syscall_%lu(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld (errno %d)\n", nr & (~SYSCALL_BIT), + a[0], a[1], a[2], a[3], a[4], a[5], rc, errno); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/nsyscalls.test strace-4.12/tests-m32/nsyscalls.test --- strace-4.11/tests-m32/nsyscalls.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/nsyscalls.test 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of out-of-range syscalls. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + mips) syscall=syscall ;; + *) syscall=none ;; +esac + +run_strace_match_diff -e trace=$syscall diff -Nru strace-4.11/tests-m32/old_mmap.c strace-4.12/tests-m32/old_mmap.c --- strace-4.11/tests-m32/old_mmap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/old_mmap.c 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * Check decoding of "old mmap" edition of mmap syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +/* + * On s390x, this is the mmap syscall used by glibc, so, + * from one side, it's already covered by another test, and, from another side, + * it would require additional efforts to filter out mmap calls made by glibc. + */ + +#if defined __NR_mmap && \ +( defined __arm__ \ + || defined __i386__ \ + || defined __m68k__ \ + || (defined __s390__ && !defined __s390x__) \ +) + +# include +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_mmap, 0); + printf("mmap(NULL) = %ld %s (%m)\n", rc, errno2name()); + + const unsigned int args1_c[6] = { + 0xdeadbeef, /* addr */ + 0xfacefeed, /* len */ + PROT_READ|PROT_EXEC, /* prot */ + MAP_FILE|MAP_FIXED, /* flags */ + -2U, /* fd */ + 0xbadc0ded /* offset */ + }; + const unsigned int page_size = get_page_size(); + const unsigned int args2_c[6] = { + 0, + page_size, + PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1U, + 0xfaced000 & -page_size + }; + void *args = tail_memdup(args1_c, sizeof(args1_c)); + + rc = syscall(__NR_mmap, args); + printf("mmap(%#x, %u, PROT_READ|PROT_EXEC, MAP_FILE|MAP_FIXED" + ", %d, %#x) = %ld %s (%m)\n", + args1_c[0], args1_c[1], args1_c[4], args1_c[5], + rc, errno2name()); + + memcpy(args, args2_c, sizeof(args2_c)); + rc = syscall(__NR_mmap, args); + printf("mmap(NULL, %u, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS" + ", %d, %#x) = %#lx\n", + args2_c[1], args2_c[4], args2_c[5], rc); + + void *addr = (void *) rc; + if (mprotect(addr, page_size, PROT_NONE)) + perror_msg_and_fail("mprotect(%p, %u, PROT_NONE)", + addr, page_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__ || __m68k__" + " || (__s390__ && !__s390x__))") + +#endif diff -Nru strace-4.11/tests-m32/old_mmap.test strace-4.12/tests-m32/old_mmap.test --- strace-4.11/tests-m32/old_mmap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/old_mmap.test 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of "old mmap" edition of mmap syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=mmap diff -Nru strace-4.11/tests-m32/oldselect.c strace-4.12/tests-m32/oldselect.c --- strace-4.11/tests-m32/oldselect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/oldselect.c 2016-01-05 22:53:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include #if defined __NR_select && defined __NR__newselect \ && __NR_select != __NR__newselect \ && !defined SPARC +# include +# include + int main(void) { @@ -51,22 +49,18 @@ (void) close(0); (void) close(1); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); FD_SET(0, &w); FD_SET(1, &r); if (syscall(__NR_select, args)) - return 77; + perror_msg_and_skip("select"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_select && __NR__newselect") #endif diff -Nru strace-4.11/tests-m32/openat.c strace-4.12/tests-m32/openat.c --- strace-4.11/tests-m32/openat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/openat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016 Katerina Koukiou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_openat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "openat.sample"; + int fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); + if (fd == -1) { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = -1 %s (%m)\n", sample, errno2name()); + } else { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d\n", sample, fd); + close(fd); + if (unlink(sample) == -1) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_openat, -100, sample, O_RDONLY); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_openat") + +#endif diff -Nru strace-4.11/tests-m32/openat.test strace-4.12/tests-m32/openat.test --- strace-4.11/tests-m32/openat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/openat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check openat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -P $NAME.sample diff -Nru strace-4.11/tests-m32/open.c strace-4.12/tests-m32/open.c --- strace-4.11/tests-m32/open.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/open.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_open + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "open.sample"; + int fd = syscall(__NR_open, sample, O_RDONLY|O_CREAT, 0400); + + if (fd < 0) { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } else { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400) = %d\n", + sample, fd); + close(fd); + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_open, sample, O_RDONLY); + printf("open(\"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + + fd = syscall(__NR_open, sample, O_WRONLY|O_NONBLOCK|0x80000000); + printf("open(\"%s\", O_WRONLY|O_NONBLOCK|0x80000000)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_open") + +#endif diff -Nru strace-4.11/tests-m32/open.test strace-4.12/tests-m32/open.test --- strace-4.11/tests-m32/open.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/open.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check open syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -P $NAME.sample diff -Nru strace-4.11/tests-m32/opipe.test strace-4.12/tests-m32/opipe.test --- strace-4.11/tests-m32/opipe.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/opipe.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +# Check how -o '|pipe' works. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog grep chdir $srcdir/umovestr.expected > "$EXP" +run_prog ./umovestr + +> "$LOG" || fail_ "failed to write $LOG" +$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || + dump_log_and_fail_with "$STRACE $args failed" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/overflowuid.c strace-4.12/tests-m32/overflowuid.c --- strace-4.11/tests-m32/overflowuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/overflowuid.c 2016-04-18 01:10:41.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static void +check_overflow_id(const int id, const char *overflowid) +{ + int fd = open(overflowid, O_RDONLY); + if (fd < 0) { + if (ENOENT == errno) + return; + perror_msg_and_fail("open: %s", overflowid); + } + + /* we trust the kernel */ + char buf[sizeof(int)*3]; + int n = read(fd, buf, sizeof(buf) - 1); + if (n > 0) { + buf[n] = '\0'; + n = atoi(buf); + if (id == n) + error_msg_and_skip("%d matches %s", id, overflowid); + } + + close(fd); +} + +void +check_overflowuid(const int uid) +{ + check_overflow_id(uid, "/proc/sys/kernel/overflowuid"); +} + +void +check_overflowgid(const int gid) +{ + check_overflow_id(gid, "/proc/sys/kernel/overflowgid"); +} diff -Nru strace-4.11/tests-m32/pause.c strace-4.12/tests-m32/pause.c --- strace-4.11/tests-m32/pause.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pause.c 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check decoding of pause syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pause + +# include +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + pause(); + printf("pause() = ? ERESTARTNOHAND (To be restarted if no handler)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pause") + +#endif diff -Nru strace-4.11/tests-m32/pause.test strace-4.12/tests-m32/pause.test --- strace-4.11/tests-m32/pause.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pause.test 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pause syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 -esignal=none diff -Nru strace-4.11/tests-m32/pc.c strace-4.12/tests-m32/pc.c --- strace-4.11/tests-m32/pc.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/pc.c 2016-01-06 11:33:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" +#include #include #include #include @@ -37,27 +36,25 @@ int main(void) { - const unsigned long pagesize = sysconf(_SC_PAGESIZE); + const unsigned long pagesize = get_page_size(); #ifdef __s390__ /* * The si_addr field is unreliable: * https://marc.info/?l=linux-s390&m=142515870124248&w=2 */ - return 77; + error_msg_and_skip("s390: si_addr is unreliable"); #endif /* write instruction pointer length to the log */ - if (write(-1, NULL, 2 * sizeof(void *)) >= 0) - return 77; + assert(write(-1, NULL, 2 * sizeof(void *)) < 0); /* just a noticeable line in the log */ - if (munmap(&main, 0) >= 0) - return 77; + assert(munmap(&main, 0) < 0); int pid = fork(); if (pid < 0) - return 77; + perror_msg_and_fail("fork"); if (!pid) { const unsigned long mask = ~(pagesize - 1); @@ -83,14 +80,13 @@ /* SIGSEGV is expected */ (void) munmap((void *) addr, size); (void) munmap((void *) addr, size); - return 77; + error_msg_and_skip("SIGSEGV did not happen"); } int status; - if (wait(&status) != pid || - !WIFSIGNALED(status) || - WTERMSIG(status) != SIGSEGV) - return 77; + assert(wait(&status) == pid); + assert(WIFSIGNALED(status)); + assert(WTERMSIG(status) == SIGSEGV); /* dump process map for debug purposes */ close(0); diff -Nru strace-4.11/tests-m32/personality.c strace-4.12/tests-m32/personality.c --- strace-4.11/tests-m32/personality.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/personality.c 2015-12-26 02:10:46.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int main(void) +{ + const unsigned int good_type = PER_BSD; + const char *good_type_str = "PER_BSD"; + + const unsigned int bad_type = 0x1f; + const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/"; + + const unsigned int good_flags = + SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS; + const char *good_flags_str = + "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS"; + + const unsigned int bad_flags = 0x10000; + const char *bad_flags_str = "0x10000"; + + const unsigned int saved_pers = personality(0xffffffff); + printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers); + + /* PER_LINUX */ + personality(PER_LINUX); + printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers); + + personality(0xffffffff); + puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)"); + + personality(good_flags); + printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n", + good_flags_str); + + personality(bad_flags); + printf("personality\\(PER_LINUX\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + bad_flags_str, good_flags, good_flags_str); + + personality(good_flags | bad_flags); + printf("personality\\(PER_LINUX\\|%s\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + good_flags_str, bad_flags_str, bad_flags, bad_flags_str); + + /* another valid type */ + personality(good_type); + printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", + good_type_str, good_flags | bad_flags, + good_flags_str, bad_flags_str); + + personality(good_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + good_type_str, good_flags_str, good_type, good_type_str); + + personality(good_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, bad_flags_str, good_type | good_flags, + good_type_str, good_flags_str); + + personality(good_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, good_flags_str, bad_flags_str, + good_type | bad_flags, + good_type_str, bad_flags_str); + + /* invalid type */ + personality(bad_type); + printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type_str, good_type | good_flags | bad_flags, + good_type_str, good_flags_str, bad_flags_str); + + personality(bad_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + bad_type_str, good_flags_str, bad_type, bad_type_str); + + personality(bad_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, bad_flags_str, bad_type | good_flags, + bad_type_str, good_flags_str); + + personality(bad_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, good_flags_str, bad_flags_str, + bad_type | bad_flags, bad_type_str, bad_flags_str); + + personality(saved_pers); + printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type | good_flags | bad_flags, + bad_type_str, good_flags_str, bad_flags_str); + + return 0; +} diff -Nru strace-4.11/tests-m32/personality.test strace-4.12/tests-m32/personality.test --- strace-4.11/tests-m32/personality.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/personality.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check personality syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a20 -epersonality $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff -Nru strace-4.11/tests-m32/pipe.c strace-4.12/tests-m32/pipe.c --- strace-4.11/tests-m32/pipe.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/pipe.c 2016-01-06 11:38:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" + +#ifdef HAVE_PIPE2 -#include -#include -#include +# include +# include +# include int main(void) @@ -39,16 +39,19 @@ (void) close(0); (void) close(1); int fds[2]; - if (pipe(fds) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe(fds)) + perror_msg_and_fail("pipe"); -#ifdef HAVE_PIPE2 (void) close(0); (void) close(1); - if (pipe2(fds, O_NONBLOCK) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe2(fds, O_NONBLOCK)) + perror_msg_and_skip("pipe2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PIPE2") + #endif -} diff -Nru strace-4.11/tests-m32/poll.c strace-4.12/tests-m32/poll.c --- strace-4.11/tests-m32/poll.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/poll.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,259 @@ +/* + * This file is part of poll strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_poll + +# include +# include +# include +# include +# include +# include + +#define PRINT_EVENT(flag, member) \ + if (member & flag) { \ + if (member != pfd->member) \ + tprintf("|"); \ + tprintf(#flag); \ + member &= ~flag; \ + } + +static void +print_pollfd_entering(const struct pollfd *const pfd) +{ + tprintf("{fd=%d", pfd->fd); + if (pfd->fd >= 0) { + tprintf(", events="); + short events = pfd->events; + + if (pfd->events) { + PRINT_EVENT(POLLIN, events) + PRINT_EVENT(POLLPRI, events) + PRINT_EVENT(POLLOUT, events) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, events) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, events) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, events) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, events) +#endif + PRINT_EVENT(POLLERR, events) + PRINT_EVENT(POLLHUP, events) + PRINT_EVENT(POLLNVAL, events) + } else + tprintf("0"); + } + tprintf("}"); +} + +static void +print_pollfd_array_entering(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int valid, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int i; + for (i = 0; i < size; ++i) { + if (i) + tprintf(", "); + if (i >= valid) { + tprintf("%p", &pfd[i]); + break; + } + if (i >= abbrev) { + tprintf("..."); + break; + } + print_pollfd_entering(&pfd[i]); + } + tprintf("]"); +} + +static void +print_pollfd_exiting(const struct pollfd *const pfd, + unsigned int *const seen, + const unsigned int abbrev) +{ + if (!pfd->revents || pfd->fd < 0 || *seen > abbrev) + return; + + if (*seen) + tprintf(", "); + ++(*seen); + + if (*seen > abbrev) { + tprintf("..."); + return; + } + tprintf("{fd=%d, revents=", pfd->fd); + short revents = pfd->revents; + + PRINT_EVENT(POLLIN, revents) + PRINT_EVENT(POLLPRI, revents) + PRINT_EVENT(POLLOUT, revents) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, revents) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, revents) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, revents) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, revents) +#endif + PRINT_EVENT(POLLERR, revents) + PRINT_EVENT(POLLHUP, revents) + PRINT_EVENT(POLLNVAL, revents) + tprintf("}"); +} + +static void +print_pollfd_array_exiting(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int seen = 0; + unsigned int i; + for (i = 0; i < size; ++i) + print_pollfd_exiting(&pfd[i], &seen, abbrev); + tprintf("]"); +} + +int +main(int ac, char **av) +{ + tprintf("%s", ""); + + assert(syscall(__NR_poll, NULL, 42, 0) == -1); + if (ENOSYS == errno) + perror_msg_and_skip("poll"); + tprintf("poll(NULL, 42, 0) = -1 EFAULT (%m)\n"); + + int fds[2]; + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + const unsigned int abbrev = (ac > 1) ? atoi(av[1]) : -1; + const struct pollfd pfds0[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = fds[0], .events = POLLIN | POLLPRI }, + { .fd = fds[1], .events = POLLOUT }, + { .fd = 2, .events = POLLOUT | POLLWRBAND } + }; + struct pollfd *const tail_fds0 = tail_memdup(pfds0, sizeof(pfds0)); + const int timeout = 42; + int rc = syscall(__NR_poll, tail_fds0, 0, timeout); + assert(rc == 0); + + tprintf("poll([], 0, %d) = %d (Timeout)\n", timeout, rc); + + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 3); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[0].fd = -1; + tail_fds0[2].fd = -3; + tail_fds0[4].events = 0; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 2); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[1].fd = -2; + tail_fds0[4].fd = -5; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 1); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + struct pollfd pfds1[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + struct pollfd *const tail_fds1 = tail_memdup(pfds1, sizeof(pfds1)); + rc = syscall(__NR_poll, tail_fds1, ARRAY_SIZE(pfds1), timeout); + assert(rc == 0); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds1, ARRAY_SIZE(pfds1), + ARRAY_SIZE(pfds1), abbrev); + tprintf(", %u, %d) = %d (Timeout)\n", ARRAY_SIZE(pfds1), timeout, rc); + + const void *const efault = tail_fds0 + ARRAY_SIZE(pfds0); + rc = syscall(__NR_poll, efault, 1, 0); + assert(rc == -1); + tprintf("poll(%p, 1, 0) = -1 EFAULT (%m)\n", efault); + + const unsigned int valid = 1; + const void *const epfds = tail_fds0 + ARRAY_SIZE(pfds0) - valid; + rc = syscall(__NR_poll, epfds, valid + 1, 0); + assert(rc == -1); + tprintf("poll("); + print_pollfd_array_entering(epfds, valid + 1, valid, abbrev); + errno = EFAULT; + tprintf(", %u, 0) = -1 EFAULT (%m)\n", valid + 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_poll") + +#endif diff -Nru strace-4.11/tests-m32/poll.test strace-4.12/tests-m32/poll.test --- strace-4.11/tests-m32/poll.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/poll.test 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check poll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -vepoll $args > "$OUT" +match_diff "$LOG" "$OUT" + +for abbrev in 0 1 2 3 4 5; do + run_prog "./$NAME" $abbrev > /dev/null + run_strace -a16 -epoll -s$abbrev $args > "$OUT" + match_diff "$LOG" "$OUT" +done + +rm -f "$OUT" diff -Nru strace-4.11/tests-m32/ppoll.c strace-4.12/tests-m32/ppoll.c --- strace-4.11/tests-m32/ppoll.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/ppoll.c 2016-01-06 11:44:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include -static int +static void test1(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 42, .tv_nsec = 999999999 }; struct pollfd fds[] = { { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, @@ -45,35 +42,41 @@ { .fd = 4, .events = POLLOUT } }; + sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 2 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 2); } -static int +static void test2(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 0, .tv_nsec = 999 }; struct pollfd fds[] = { { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } }; + sigset_t mask; sigfillset(&mask); sigdelset(&mask, SIGHUP); sigdelset(&mask, SIGKILL); sigdelset(&mask, SIGSTOP); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 0 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 0); } int main(void) { - int rc; int fds[2]; (void) close(0); @@ -81,14 +84,11 @@ (void) close(3); (void) close(4); if (pipe(fds) || pipe(fds)) - return 77; - - - if ((rc = test1())) - return rc; + perror_msg_and_fail("pipe"); - if ((rc = test2())) - return rc; + test1(); + test2(); - return ppoll(NULL, 42, NULL, NULL) < 0 ? 0 : 77; + assert(ppoll(NULL, 42, NULL, NULL) < 0); + return 0; } diff -Nru strace-4.11/tests-m32/ppoll.expected strace-4.12/tests-m32/ppoll.expected --- strace-4.11/tests-m32/ppoll.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests-m32/ppoll.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \.\.\.\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests-m32/ppoll.test strace-4.12/tests-m32/ppoll.test --- strace-4.11/tests-m32/ppoll.test 2015-07-30 22:03:07.000000000 +0000 +++ strace-4.12/tests-m32/ppoll.test 2016-03-30 00:13:56.000000000 +0000 @@ -5,9 +5,9 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -s2 -e ppoll $args +run_strace -a30 -s2 -e ppoll $args match_grep -run_strace -v -s2 -e ppoll $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +run_strace -a30 -v -s2 -e ppoll $args +match_grep "$LOG" "$srcdir/$NAME-v.expected" exit 0 diff -Nru strace-4.11/tests-m32/ppoll-v.expected strace-4.12/tests-m32/ppoll-v.expected --- strace-4.11/tests-m32/ppoll-v.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests-m32/ppoll-v.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests-m32/prctl-seccomp-filter-v.c strace-4.12/tests-m32/prctl-seccomp-filter-v.c --- strace-4.11/tests-m32/prctl-seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/prctl-seccomp-filter-v.c 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined HAVE_PRCTL \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined PR_SET_SECCOMP \ + && defined SECCOMP_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +static const struct sock_fprog prog = { + .len = ARRAY_SIZE(filter), + .filter = (struct sock_filter *) filter, +}; + +int +main(void) +{ + int fds[2]; + + puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); + + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", + prog.len); + + printf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + printf("BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"); + + puts("]}) = 0"); + puts("+++ exited with 0 +++"); + + fflush(stdout); + close(0); + close(1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) + perror_msg_and_skip("PR_SET_SECCOMP"); + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_NO_NEW_PRIVS && PR_SET_SECCOMP" + " && SECCOMP_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests-m32/prctl-seccomp-filter-v.test strace-4.12/tests-m32/prctl-seccomp-filter-v.test --- strace-4.11/tests-m32/prctl-seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/prctl-seccomp-filter-v.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -v -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/prctl-seccomp-strict.c strace-4.12/tests-m32/prctl-seccomp-strict.c --- strace-4.11/tests-m32/prctl-seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/prctl-seccomp-strict.c 2016-05-16 23:50:59.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + + int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3); + printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)" + " = %d %s (%m)\n", -1L, rc, errno2name()); + fflush(stdout); + + rc = prctl(PR_SET_SECCOMP, 1); + if (rc) { + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)" + " = %d %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_SECCOMP && __NR_exit") + +#endif diff -Nru strace-4.11/tests-m32/prctl-seccomp-strict.test strace-4.12/tests-m32/prctl-seccomp-strict.test --- strace-4.11/tests-m32/prctl-seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/prctl-seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +check_prog grep +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eprctl "$@" > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-m32/pread64-pwrite64.c strace-4.12/tests-m32/pread64-pwrite64.c --- strace-4.11/tests-m32/pread64-pwrite64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pread64-pwrite64.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * Check decoding of pread64 and pwrite64 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + const off_t offset = 0xdefaceddeadbeefLL + len; + long rc = pread(0, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pread64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pread64", 0); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = pwrite(1, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pwrite64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pwrite64", 1); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "pread64-pwrite64-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + char *nil = tail_alloc(1); + *nil = '\0'; + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = pwrite(1, w, 0, 0); + if (rc) + perror_msg_and_fail("pwrite64: expected 0, returned %ld", rc); + tprintf("pwrite64(1, \"\", 0, 0) = 0\n"); + + rc = pwrite(1, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("pwrite64(1, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pwrite(1, nil, 1, -3); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1, returned %ld", rc); + tprintf("pwrite64(1, \"\\0\", 1, -3) = -1 EINVAL (%m)\n"); + + rc = pwrite(1, w, w_len, 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwrite64: expected %u, returned %ld", + w_len, rc); + tprintf("pwrite64(1, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = pread(0, r0, 0, 0); + if (rc) + perror_msg_and_fail("pread64: expected 0, returned %ld", rc); + tprintf("pread64(0, \"\", 0, 0) = 0\n"); + + rc = pread(0, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pread(0, efault, 2, -7); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 2, -7) = -1 EINVAL (%m)\n", efault); + + rc = pread(0, r0, r0_len, 0); + if (rc != (int) r0_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r0_len, rc); + tprintf("pread64(0, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = pread(0, r1, w_len, r0_len); + if (rc != (int) r1_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r1_len, rc); + tprintf("pread64(0, \"%s\", %u, %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, r0_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-m32/pread64-pwrite64.test strace-4.12/tests-m32/pread64-pwrite64.test --- strace-4.11/tests-m32/pread64-pwrite64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pread64-pwrite64.test 2016-04-02 18:27:44.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of pread64 and pwrite64 syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=pread64-pwrite64-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests-m32/preadv2-pwritev2.c strace-4.12/tests-m32/preadv2-pwritev2.c --- strace-4.11/tests-m32/preadv2-pwritev2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv2-pwritev2.c 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,211 @@ +/* + * Check decoding of preadv2 and pwritev2 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_preadv2 && defined __NR_pwritev2 + +# include +# include +# include +# include +# include + +static int +pr(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L); +} + +static int +pw(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L); +} + +static void +dumpio(void) +{ + static char tmp[] = "preadv2-pwritev2-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pw(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc); + tprintf("pwritev2(1, [], 0, 0, 0) = 0\n"); + + rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev2(1, [{\"%s\", %u}, %p], 2, 0, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev2: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev2(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv2: expected %u, returned %ld", + r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv2: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}, {\"\", %u}], %u, %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); +} + +int +main(void) +{ + const unsigned long vlen = (unsigned long) 0xfac1fed2dad3bef4; + const unsigned long long pos = 0xfac5fed6dad7bef8; + const unsigned long pos_l = (unsigned long) pos; + const unsigned long pos_h = (sizeof(long) == sizeof(long long)) ? + (unsigned long) 0xbadc0deddeadbeef : 0xfac5fed6UL; + int test_dumpio = 1; + + tprintf("%s", ""); + + syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + if (test_dumpio) + dumpio(); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2") + +#endif diff -Nru strace-4.11/tests-m32/preadv2-pwritev2.test strace-4.12/tests-m32/preadv2-pwritev2.test --- strace-4.11/tests-m32/preadv2-pwritev2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv2-pwritev2.test 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv2 and pwritev2 syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -eread=0 -ewrite=1 -e trace=preadv2,pwritev2 diff -Nru strace-4.11/tests-m32/preadv.c strace-4.12/tests-m32/preadv.c --- strace-4.11/tests-m32/preadv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv.c 2016-05-07 23:32:29.000000000 +0000 @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PREADV + +# include +# include +# include +# include + +# define LEN 8 + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) + printf("\\%d", (int) buf[i]); + printf("\", %u}", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt) +{ + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char *buf = tail_alloc(LEN); + struct iovec *iov = tail_alloc(sizeof(*iov)); + iov->iov_base = buf; + iov->iov_len = LEN; + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (preadv(0, iov, 1, offset) != LEN) + perror_msg_and_fail("preadv"); + printf("preadv(0, "); + print_iovec(iov, 1); + printf(", 1, %lld) = %u\n", (long long) offset, LEN); + + if (preadv(0, iov, 1, -1) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, %p, 1, -1) = -1 EINVAL (%m)\n", iov); + + if (preadv(0, NULL, 1, -2) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, NULL, 1, -2) = -1 EINVAL (%m)\n"); + + if (preadv(0, iov, 0, -3) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [], 0, -3) = -1 EINVAL (%m)\n"); + + static const char tmp[] = "preadv-tmpfile"; + int fd = open(tmp, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd < 0) + perror_msg_and_fail("open"); + if (unlink(tmp)) + perror_msg_and_fail("unlink"); + + static const char w[] = "0123456789abcde"; + if (write(fd, w, LENGTH_OF(w)) != LENGTH_OF(w)) + perror_msg_and_fail("write"); + + static const char r0_c[] = "01234567"; + static const char r1_c[] = "89abcde"; + + const unsigned int r_len = (LENGTH_OF(w) + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + long rc; + + rc = preadv(fd, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + printf("preadv(%d, [{\"%s\", %u}], %u, 0) = %u\n", + fd, r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(LENGTH_OF(w)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = LENGTH_OF(w) + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) LENGTH_OF(w) - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) LENGTH_OF(w) - r_len, rc); + printf("preadv(%d, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n", + fd, r1_c, r_len, LENGTH_OF(w), ARRAY_SIZE(r1_iov_), + r_len, LENGTH_OF(w) - r_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV") + +#endif diff -Nru strace-4.11/tests-m32/preadv-pwritev.c strace-4.12/tests-m32/preadv-pwritev.c --- strace-4.11/tests-m32/preadv-pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv-pwritev.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Check decoding of preadv and pwritev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined HAVE_PREADV && defined HAVE_PWRITEV + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "preadv-pwritev-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + rc = pwritev(1, efault, 42, 0); + tprintf("pwritev(1, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = preadv(0, efault, 42, 0); + tprintf("preadv(0, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pwritev(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev: expected 0, returned %ld", rc); + tprintf("pwritev(1, [], 0, 0) = 0\n"); + + rc = pwritev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev(1, [{\"%s\", %u}, %p], 2, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pwritev(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests-m32/preadv-pwritev.test strace-4.12/tests-m32/preadv-pwritev.test --- strace-4.11/tests-m32/preadv-pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv-pwritev.test 2016-03-31 00:01:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv and pwritev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev diff -Nru strace-4.11/tests-m32/preadv.test strace-4.12/tests-m32/preadv.test --- strace-4.11/tests-m32/preadv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/preadv.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check preadv syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/printflags.c strace-4.12/tests-m32/printflags.c --- strace-4.11/tests-m32/printflags.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/printflags.c 2016-04-26 00:13:47.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printflags(const struct xlat *xlat, unsigned long long flags, + const char *const dflt) +{ + if (flags == 0 && xlat->val == 0 && xlat->str) { + fputs(xlat->str, stdout); + return 1; + } + + int n; + char sep = 0; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + if (sep) + putc(sep, stdout); + else + sep = '|'; + fputs(xlat->str, stdout); + flags &= ~xlat->val; + n++; + } + } + + if (n) { + if (flags) { + if (sep) + putc(sep, stdout); + printf("%#llx", flags); + n++; + } + } else { + if (flags) { + printf("%#llx", flags); + if (dflt) + printf(" /* %s */", dflt); + } else { + if (dflt) + putc('0', stdout); + } + } + + return n; +} diff -Nru strace-4.11/tests-m32/print_quoted_string.c strace-4.12/tests-m32/print_quoted_string.c --- strace-4.11/tests-m32/print_quoted_string.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/print_quoted_string.c 2016-05-10 22:12:01.000000000 +0000 @@ -0,0 +1,75 @@ +#include "tests.h" + +#include +#include +#include + +/* + * Based on string_quote() from util.c. + * Assumes instr is NUL-terminated. + */ + +void +print_quoted_string(const char *instr) +{ + print_quoted_memory(instr, strlen(instr)); +} + +void +print_quoted_memory(const char *instr, const size_t len) +{ + const unsigned char *str = (const unsigned char*) instr; + size_t i; + + for (i = 0; i < len; ++i) { + const int c = str[i]; + switch (c) { + case '\"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + case '\v': + printf("\\v"); + break; + default: + if (c >= ' ' && c <= 0x7e) + putchar(c); + else { + putchar('\\'); + + char c1 = '0' + (c & 0x7); + char c2 = '0' + ((c >> 3) & 0x7); + char c3 = '0' + (c >> 6); + + if (*str >= '0' && *str <= '9') { + /* Print \octal */ + putchar(c3); + putchar(c2); + } else { + /* Print \[[o]o]o */ + if (c3 != '0') + putchar(c3); + if (c3 != '0' || c2 != '0') + putchar(c2); + } + putchar(c1); + } + break; + } + } + +} diff -Nru strace-4.11/tests-m32/printxval.c strace-4.12/tests-m32/printxval.c --- strace-4.11/tests-m32/printxval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/printxval.c 2016-04-27 20:31:34.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printxval(const struct xlat *xlat, unsigned long long val, + const char *const dflt) +{ + for (; xlat->str; xlat++) { + if (xlat->val == val) { + fputs(xlat->str, stdout); + return 1; + } + } + + printf("%#llx", val); + if (dflt) + printf(" /* %s */", dflt); + return 0; +} diff -Nru strace-4.11/tests-m32/pselect6.c strace-4.12/tests-m32/pselect6.c --- strace-4.11/tests-m32/pselect6.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/pselect6.c 2016-04-18 01:10:44.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,9 @@ /* * Based on test by Dr. David Alan Gilbert */ + +#include "tests.h" +#include #include #include #include @@ -68,7 +71,7 @@ sigaddset(&mask, SIGCHLD); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple pselect. @@ -79,8 +82,10 @@ FD_SET(fds[1], set[1]); FD_SET(1, set[2]); FD_SET(2, set[2]); - if (pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL) != 1) - return 77; + int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL); + if (rc < 0) + perror_msg_and_skip("pselect"); + assert(rc == 1); printf("pselect6(%d, [%d %d], [%d %d], [1 2], NULL, {NULL, %u}) " "= 1 (out [%d])\n", fds[1] + 1, fds[0], fds[1], @@ -94,8 +99,7 @@ FD_SET(2, set[1]); FD_SET(fds[0], set[1]); FD_SET(fds[1], set[1]); - if (syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) != 3) - return 77; + assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); printf("pselect6(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld}, NULL)" " = 3 (out [1 2 %d], left {%lld, %lld})\n", fds[1] + 1, fds[0], fds[1], @@ -109,10 +113,9 @@ */ FD_ZERO(set[0]); FD_SET(fds[1],set[0]); - if (pselect(-1, NULL, set[0], NULL, NULL, &mask) != -1) - return 77; + assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " - "= -1 EINVAL (Invalid argument)\n", set[0], NSIG / 8); + "= -1 EINVAL (%m)\n", set[0], NSIG / 8); /* * Another variant, with nfds exceeding FD_SETSIZE limit. @@ -122,24 +125,21 @@ FD_ZERO(set[1]); tm.ts.tv_sec = 0; tm.ts.tv_nsec = 123; - if (pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) != 0) - return 77; + assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); printf("pselect6(%d, [%d], [], NULL, {0, 123}, {[HUP CHLD], %u}) " "= 0 (Timeout)\n", FD_SETSIZE + 1, fds[0], NSIG / 8); /* * See how timeouts are decoded. */ - if (sigaction(SIGALRM, &act, NULL) != 0) - return 77; - if (setitimer(ITIMER_REAL, &itv, NULL) != 0) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(setitimer(ITIMER_REAL, &itv, NULL) == 0); tm.ts.tv_nsec = 222222222; - if (pselect(0, NULL, NULL, NULL, &tm.ts, &mask) != -1) - return 77; - puts("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], 8})" - " = ? ERESTARTNOHAND (To be restarted if no handler)"); + assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); + printf("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], %u})" + " = ? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG / 8); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); puts("+++ exited with 0 +++"); @@ -148,10 +148,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_pselect6") #endif diff -Nru strace-4.11/tests-m32/pselect6.test strace-4.12/tests-m32/pselect6.test --- strace-4.11/tests-m32/pselect6.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/pselect6.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check pselect6 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e pselect6 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/ptrace.c strace-4.12/tests-m32/ptrace.c --- strace-4.11/tests-m32/ptrace.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ptrace.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,477 @@ +/* + * Check decoding of ptrace syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include +# include +# include "ptrace.h" +# include + +static long +do_ptrace(unsigned long request, unsigned long pid, + unsigned long addr, unsigned long data) +{ + return syscall(__NR_ptrace, request, pid, addr, data); +} + +static void +test_peeksiginfo(unsigned long pid, const unsigned long bad_request) +{ + long rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, 0, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, NULL, %#lx)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, rc, errno2name()); + + struct { + unsigned long long off; + unsigned int flags, nr; + } *const psi = tail_alloc(sizeof(*psi)); + + psi->off = 0xdeadbeeffacefeed; + psi->flags = 1; + psi->nr = 42; + + rc = do_ptrace(PTRACE_PEEKSIGINFO, + pid, (unsigned long) psi, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=PTRACE_PEEKSIGINFO_SHARED, nr=%u}, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, bad_request, rc, errno2name()); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGALRM); + + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + raise(SIGUSR2); + raise(SIGALRM); + + if (do_ptrace(PTRACE_TRACEME, 0, 0, 0)) + perror_msg_and_fail("child: PTRACE_TRACEME"); + + raise(SIGSTOP); + _exit(0); + } + + const unsigned int nsigs = 4; + const uid_t uid = geteuid(); + siginfo_t *sigs = tail_alloc(sizeof(*sigs) * nsigs); + + psi->off = 0; + psi->flags = 0; + psi->nr = nsigs; + + for (;;) { + int status, tracee, saved; + + errno = 0; + tracee = wait(&status); + if (tracee <= 0) { + if (errno == EINTR) + continue; + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("wait"); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_fail("unexpected exit status %u", + WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) + error_msg_and_fail("unexpected signal %u", + WTERMSIG(status)); + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill(pid, SIGKILL); + error_msg_and_fail("unexpected wait status %x", + status); + } + + rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, + (unsigned long) psi, (unsigned long) sigs); + if (rc < 0) { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}, %p) = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, sigs, + rc, errno2name()); + } else { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}" + ", [{si_signo=SIGUSR1, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGUSR2, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGALRM, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + "]) = %ld\n", + (unsigned) pid, psi->off, psi->nr, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + rc); + } + + if (do_ptrace(PTRACE_CONT, pid, 0, 0)) { + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("ptrace"); + } + printf("ptrace(PTRACE_CONT, %ld, NULL, SIG_0) = 0\n", pid); + } +} + +int +main(void) +{ + const unsigned long bad_request = + (unsigned long) 0xdeadbeeffffffeed; + const unsigned long bad_data = + (unsigned long) 0xdeadcafefffff00d; + const unsigned long pid = + (unsigned long) 0xdefaced00000000 | (unsigned) getpid(); + + unsigned int sigset_size; + + for (sigset_size = 1024 / 8; sigset_size; sigset_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, + SIG_SETMASK, NULL, NULL, sigset_size)) + break; + } + if (!sigset_size) + perror_msg_and_fail("rt_sigprocmask"); + + void *const k_set = tail_alloc(sigset_size); + siginfo_t *const sip = tail_alloc(sizeof(*sip)); + + long rc = do_ptrace(bad_request, pid, 0, 0); + printf("ptrace(%#lx /* PTRACE_??? */, %u, NULL, NULL) = %ld %s (%m)\n", + bad_request, (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_PEEKDATA, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKTEXT, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKUSER, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_POKEUSER, pid, bad_request, bad_data); + printf("ptrace(PTRACE_POKEUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + rc = do_ptrace(PTRACE_ATTACH, pid, 0, 0); + printf("ptrace(PTRACE_ATTACH, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_INTERRUPT, pid, 0, 0); + printf("ptrace(PTRACE_INTERRUPT, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_KILL, pid, 0, 0); + printf("ptrace(PTRACE_KILL, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_LISTEN, pid, 0, 0); + printf("ptrace(PTRACE_LISTEN, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + sigset_t libc_set; + sigemptyset(&libc_set); + sigaddset(&libc_set, SIGUSR1); + memcpy(k_set, &libc_set, sigset_size); + + rc = do_ptrace(PTRACE_SETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_SETSIGMASK, %u, %u, [USR1])" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_GETSIGMASK, %u, %u, %p)" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, k_set, rc, errno2name()); + + rc = do_ptrace(PTRACE_SECCOMP_GET_FILTER, pid, 42, 0); + printf("ptrace(PTRACE_SECCOMP_GET_FILTER, %u, 42, NULL)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETEVENTMSG, pid, bad_request, bad_data); + printf("ptrace(PTRACE_GETEVENTMSG, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGIO; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_band = -2; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGIO" + ", si_code=POLL_IN, si_errno=ENOENT, si_band=-2})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGTRAP; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_pid = 2; + sip->si_uid = 3; + sip->si_ptr = (void *) bad_request; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGTRAP" + ", si_code=TRAP_BRKPT, si_errno=ENOENT, si_pid=2, si_uid=3" + ", si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_int, sip->si_ptr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGILL; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGILL" + ", si_code=ILL_ILLOPC, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGFPE; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGFPE" + ", si_code=FPE_INTDIV, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGBUS; + sip->si_code = 1; + sip->si_errno = -2; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGBUS" + ", si_code=BUS_ADRALN, si_errno=%d, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_addr, + rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGPROF; + sip->si_code = 0xbadc0ded; + sip->si_errno = -2; + sip->si_pid = 0; + sip->si_uid = 3; + sip->si_ptr = 0; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGPROF" + ", si_code=%#x, si_errno=%d, si_pid=0, si_uid=3})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_code, sip->si_errno, + rc, errno2name()); + +#ifdef HAVE_SIGINFO_T_SI_SYSCALL + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGSYS; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_call_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + sip->si_syscall = -1U; + sip->si_arch = AUDIT_ARCH_X86_64; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" + ", si_syscall=__NR_syscall_%u, si_arch=AUDIT_ARCH_X86_64})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, + rc, errno2name()); +#endif + +#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGHUP; + sip->si_code = SI_TIMER; + sip->si_errno = ENOENT; + sip->si_timerid = 0xdeadbeef; + sip->si_overrun = -1; + sip->si_ptr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGHUP" + ", si_code=SI_TIMER, si_errno=ENOENT, si_timerid=%#x" + ", si_overrun=%d, si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_timerid, sip->si_overrun, + sip->si_int, sip->si_ptr, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_GETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_GETSIGINFO, %u, %#lx, %p)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, sip, rc, errno2name()); + + rc = do_ptrace(PTRACE_CONT, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_CONT, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_DETACH, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_DETACH, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SYSCALL, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSCALL, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + +#ifdef PTRACE_SINGLESTEP + rc = do_ptrace(PTRACE_SINGLESTEP, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SINGLESTEP, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SINGLEBLOCK + rc = do_ptrace(PTRACE_SINGLEBLOCK, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SINGLEBLOCK, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SYSEMU + rc = do_ptrace(PTRACE_SYSEMU, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SYSEMU, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + rc = do_ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSEMU_SINGLESTEP, %u, NULL, SIGUSR1)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_SETOPTIONS, + pid, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE); + printf("ptrace(PTRACE_SETOPTIONS, %u, NULL" + ", PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SEIZE, + pid, bad_request, PTRACE_O_TRACESYSGOOD); + printf("ptrace(PTRACE_SEIZE, %u, %#lx" + ", PTRACE_O_TRACESYSGOOD) = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_SETREGSET, pid, 1, bad_request); + printf("ptrace(PTRACE_SETREGSET, %u, NT_PRSTATUS, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETREGSET, pid, 3, bad_request); + printf("ptrace(PTRACE_GETREGSET, %u, NT_PRPSINFO, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + test_peeksiginfo(pid, bad_request); + + rc = do_ptrace(PTRACE_TRACEME, 0, 0, 0); + if (rc) + printf("ptrace(PTRACE_TRACEME) = %ld %s (%m)\n", + rc, errno2name()); + else + printf("ptrace(PTRACE_TRACEME) = 0\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests-m32/ptrace.test strace-4.12/tests-m32/ptrace.test --- strace-4.11/tests-m32/ptrace.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/ptrace.test 2016-05-13 05:18:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ptrace syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e signal=none diff -Nru strace-4.11/tests-m32/pwritev.c strace-4.12/tests-m32/pwritev.c --- strace-4.11/tests-m32/pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pwritev.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PWRITEV + +# include +# include +# include +# include + +# define LEN 8 +# define LIM (LEN - 1) + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) { + if (i < LIM) + printf("\\%d", (int) buf[i]); + } + printf("\"%s, %u}", + i > LIM ? "..." : "", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt, unsigned int size) +{ + if (!size) { + printf("%p", iov); + return; + } + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + if (i == size) { + printf("%p", &iov[i]); + break; + } + if (i == LIM) { + fputs("...", stdout); + break; + } + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + (void) close(0); + if (open("/dev/null", O_WRONLY)) + perror_msg_and_fail("open"); + + char *buf = tail_alloc(LEN); + unsigned i; + for (i = 0; i < LEN; ++i) + buf[i] = i; + + struct iovec *iov = tail_alloc(sizeof(*iov) * LEN); + for (i = 0; i < LEN; ++i) { + buf[i] = i; + iov[i].iov_base = &buf[i]; + iov[i].iov_len = LEN - i; + } + + const off_t offset = 0xdefaceddeadbeefLL; + long rc; + int written = 0; + for (i = 0; i < LEN; ++i) { + written += iov[i].iov_len; + if (pwritev(0, iov, i + 1, offset + i) != written) + perror_msg_and_fail("pwritev"); + fputs("pwritev(0, ", stdout); + print_iovec(iov, i + 1, LEN); + printf(", %u, %lld) = %d\n", + i + 1, (long long) offset + i, written); + } + + for (i = 0; i <= LEN; ++i) { + unsigned int n = LEN + 1 - i; + fputs("pwritev(0, ", stdout); + print_iovec(iov + i, n, LEN - i); + rc = pwritev(0, iov + i, n, offset + LEN + i); + printf(", %u, %lld) = %ld %s (%m)\n", + n, (long long) offset + LEN + i, rc, errno2name()); + } + + iov->iov_base = iov + LEN * 2; + rc = pwritev(0, iov, 1, -1); + printf("pwritev(0, [{%p, %d}], 1, -1) = %ld %s (%m)\n", + iov->iov_base, LEN, rc, errno2name()); + + iov += LEN; + rc = pwritev(0, iov, 42, -2); + printf("pwritev(0, %p, 42, -2) = %ld %s (%m)\n", + iov, rc, errno2name()); + + rc = pwritev(0, NULL, 1, -3); + printf("pwritev(0, NULL, 1, -3) = %ld %s (%m)\n", + rc, errno2name()); + + rc = pwritev(0, iov, 0, -4); + printf("pwritev(0, [], 0, -4) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests-m32/pwritev.test strace-4.12/tests-m32/pwritev.test --- strace-4.11/tests-m32/pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/pwritev.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pwritev syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -s7 diff -Nru strace-4.11/tests-m32/readdir.c strace-4.12/tests-m32/readdir.c --- strace-4.11/tests-m32/readdir.c 2015-11-19 22:57:42.000000000 +0000 +++ strace-4.12/tests-m32/readdir.c 2016-01-06 12:03:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,21 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_readdir -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -82,7 +79,7 @@ assert(!open(".", O_RDONLY | O_DIRECTORY)); while ((rc = syscall(__NR_readdir, 0, &e, 1))) { if (rc < 0) - return 77; + perror_msg_and_skip("readdir"); e.d_name[e.d_reclen] = '\0'; printf("readdir(0, {d_ino=%lu, d_off=%lu, d_reclen=%u" ", d_name=\"%s\"}) = %d\n", @@ -100,10 +97,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_readdir") #endif diff -Nru strace-4.11/tests-m32/readdir.test strace-4.12/tests-m32/readdir.test --- strace-4.11/tests-m32/readdir.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/readdir.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a16 -ereaddir $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-m32/readlinkat.c strace-4.12/tests-m32/readlinkat.c --- strace-4.11/tests-m32/readlinkat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/readlinkat.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlinkat + +# include +# include + +# define PREFIX "test.readlinkat" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlinkat - static const char fname[] = "readlinkat.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlinkat, -100, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlinkat, -100, fname, buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlinkat, -100, fname, buf, size); + if (rc < 0) { + perror("readlinkat"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlinkat(AT_FDCWD, \""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests-m32/readlinkat.test strace-4.12/tests-m32/readlinkat.test --- strace-4.11/tests-m32/readlinkat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/readlinkat.test 2016-02-04 03:36:25.000000000 +0000 @@ -2,20 +2,4 @@ # Check readlinkat syscall decoding. -. "${srcdir=.}/init.sh" - -syscall=readlinkat -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +. "${srcdir=.}/readlink.test" diff -Nru strace-4.11/tests-m32/readlink.c strace-4.12/tests-m32/readlink.c --- strace-4.11/tests-m32/readlink.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/readlink.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlink + +# include +# include + +# define PREFIX "test.readlink" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlink - static const char fname[] = "readlink.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlink, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlink, fname, buf, size); + printf("readlink(\"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlink, fname, buf, size); + if (rc < 0) { + perror("readlink"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlink(\"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlink(\""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests-m32/readlink.test strace-4.12/tests-m32/readlink.test --- strace-4.11/tests-m32/readlink.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/readlink.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,19 +3,4 @@ # Check readlink syscall decoding. . "${srcdir=.}/init.sh" - -syscall=readlink -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +run_strace_match_diff -xx diff -Nru strace-4.11/tests-m32/readv.c strace-4.12/tests-m32/readv.c --- strace-4.11/tests-m32/readv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/readv.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,156 @@ +/* + * Check decoding of readv and writev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + long rc; + + rc = writev(1, efault, 42); + tprintf("writev(1, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = readv(0, efault, 42); + tprintf("readv(0, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + tprintf("writev(1, [], 0) = %ld\n", + (long) writev(1, w_iov, 0)); + + rc = writev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(1, [{\"%s\", %u}, %p], 2) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + assert(writev(1, w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(1); + tprintf("writev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(0, [{\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - r_len); + tprintf("readv(0, [{\"%s\", %u}, {\"\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-m32/readv.test strace-4.12/tests-m32/readv.test --- strace-4.11/tests-m32/readv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/readv.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of readv and writev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 -eread=0 -ewrite=1 -e trace=readv,writev diff -Nru strace-4.11/tests-m32/read-write.c strace-4.12/tests-m32/read-write.c --- strace-4.11/tests-m32/read-write.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/read-write.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Check decoding and dumping of read and write syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + long rc = read(0, buf, len); + if (rc != (int) len) + perror_msg_and_fail("read: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "read", 0); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = write(1, buf, len); + if (rc != (int) len) + perror_msg_and_fail("write: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "write", 1); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "read-write-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = write(1, w, 0); + if (rc) + perror_msg_and_fail("write: expected 0, returned %ld", rc); + tprintf("write(1, \"\", 0) = 0\n"); + + rc = write(1, efault, 1); + if (rc != -1) + perror_msg_and_fail("write: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = write(1, w, w_len); + if (rc != (int) w_len) + perror_msg_and_fail("write: expected %u, returned %ld", + w_len, rc); + tprintf("write(1, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = read(0, r0, 0); + if (rc) + perror_msg_and_fail("read: expected 0, returned %ld", rc); + tprintf("read(0, \"\", 0) = 0\n"); + + rc = read(0, efault, 1); + if (rc != -1) + perror_msg_and_fail("read: expected -1, returned %ld", rc); + tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = read(0, r0, r0_len); + if (rc != (int) r0_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r0_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = read(0, r1, w_len); + if (rc != (int) r1_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r1_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-m32/read-write.test strace-4.12/tests-m32/read-write.test --- strace-4.11/tests-m32/read-write.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/read-write.test 2016-04-03 16:37:43.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of read and write syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=read-write-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a15 -eread=0 -ewrite=1 -e trace=read,write \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests-m32/reboot.c strace-4.12/tests-m32/reboot.c --- strace-4.11/tests-m32/reboot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/reboot.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_reboot + +# include +# include +# include + +# define INVALID_MAGIC 319887762 +# define INVALID_CMD 0x01234568 + +int +main(void) +{ + static const char buf[] = "reboot"; + long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); + printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", + INVALID_MAGIC, buf, rc, errno2name()); + + rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + LINUX_REBOOT_MAGIC2, INVALID_CMD); + printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," + " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", + INVALID_CMD, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_reboot") + +#endif diff -Nru strace-4.11/tests-m32/reboot.test strace-4.12/tests-m32/reboot.test --- strace-4.11/tests-m32/reboot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/reboot.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check reboot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/recvmsg.c strace-4.12/tests-m32/recvmsg.c --- strace-4.11/tests-m32/recvmsg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/recvmsg.c 2016-01-20 17:35:27.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Check decoding of recvmsg and sendmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + const struct msghdr w_mh_ = { + .msg_iov = w_iov, + .msg_iovlen = ARRAY_SIZE(w_iov_) + }; + const struct msghdr *w_mh = tail_memdup(&w_mh_, sizeof(w_mh_)); + + assert(sendmsg(1, w_mh, 0) == (int) w_len); + close(1); + tprintf("sendmsg(1, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"%s\", %u}, {\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), w2_c, LENGTH_OF(w2_c), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, LENGTH_OF(w1_c), w1_d, w1_c, + LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + const struct msghdr r_mh_ = { + .msg_iov = r_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_) + }; + struct msghdr *r_mh = tail_memdup(&r_mh_, sizeof(r_mh_)); + + assert(recvmsg(0, r_mh, 0) == (int) r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}], msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + r_mh->msg_iov = r_iov; + r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); + + assert(recvmsg(0, r_mh, 0) == (int) w_len - r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"\", %u}], msg_controllen=0" + ", msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r1_iov_), r1_c, r_len, w_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-m32/recvmsg.test strace-4.12/tests-m32/recvmsg.test --- strace-4.11/tests-m32/recvmsg.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/recvmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of recvmsg and sendmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg diff -Nru strace-4.11/tests-m32/redirect.test strace-4.12/tests-m32/redirect.test --- strace-4.11/tests-m32/redirect.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/redirect.test 2016-02-14 00:59:42.000000000 +0000 @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Ensure that strace does not retain stdin and stdout descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep +check_prog yes + +> "$LOG" + +( + $SLEEP_A_BIT & + yes + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) | $STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard input" +fi + +$STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" | +( + $SLEEP_A_BIT & + cat > /dev/null + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard output" +fi diff -Nru strace-4.11/tests-m32/remap_file_pages.c strace-4.12/tests-m32/remap_file_pages.c --- strace-4.11/tests-m32/remap_file_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/remap_file_pages.c 2016-05-16 23:47:34.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of remap_file_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_remap_file_pages + +# include +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00d; + const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; + + long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); + printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", + addr, size, "PROT_READ|PROT_WRITE|PROT_EXEC", pgoff, + "MAP_PRIVATE|MAP_ANONYMOUS", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_remap_file_pages") + +#endif diff -Nru strace-4.11/tests-m32/remap_file_pages.test strace-4.12/tests-m32/remap_file_pages.test --- strace-4.11/tests-m32/remap_file_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/remap_file_pages.test 2016-04-27 16:04:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check remap_file_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/renameat2.c strace-4.12/tests-m32/renameat2.c --- strace-4.11/tests-m32/renameat2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/renameat2.c 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Check decoding of renameat2 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_renameat2 + +# include +# include + +int +main(void) +{ + static const char oldpath[] = "renameat2_oldpath"; + static const char newpath[] = "renameat2_newpath"; + const unsigned long olddirfd = + (unsigned long) 0xfacefeedffffffff; + const unsigned long newdirfd = + (unsigned long) 0xfacefeed00000000 | -100U; + + long rc = syscall(__NR_renameat2, + olddirfd, oldpath, newdirfd, newpath, 1); + printf("renameat2(%d, \"%s\", AT_FDCWD, \"%s\", RENAME_NOREPLACE)" + " = %ld %s (%m)\n", + (int) olddirfd, oldpath, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat2") + +#endif diff -Nru strace-4.11/tests-m32/renameat2.test strace-4.12/tests-m32/renameat2.test --- strace-4.11/tests-m32/renameat2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/renameat2.test 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/renameat.c strace-4.12/tests-m32/renameat.c --- strace-4.11/tests-m32/renameat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/renameat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#ifdef __NR_renameat + +# include +# include + +# define OLD_FILE "renameat_old" +# define NEW_FILE "renameat_new" + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); + printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", + (int) fd_old, OLD_FILE, (int) fd_new, NEW_FILE, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat") + +#endif diff -Nru strace-4.11/tests-m32/renameat.test strace-4.12/tests-m32/renameat.test --- strace-4.11/tests-m32/renameat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/renameat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/rename.c strace-4.12/tests-m32/rename.c --- strace-4.11/tests-m32/rename.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rename.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_rename + +# include +# include + +# define OLD_FILE "rename_old" +# define NEW_FILE "rename_new" + +int +main(void) +{ + long rc = syscall(__NR_rename, OLD_FILE, NEW_FILE); + printf("rename(\"%s\", \"%s\") = %ld %s (%m)\n", + OLD_FILE, NEW_FILE, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rename") + +#endif diff -Nru strace-4.11/tests-m32/rename.test strace-4.12/tests-m32/rename.test --- strace-4.11/tests-m32/rename.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rename.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rename syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests-m32/restart_syscall.c strace-4.12/tests-m32/restart_syscall.c --- strace-4.11/tests-m32/restart_syscall.c 2015-12-13 01:12:55.000000000 +0000 +++ strace-4.12/tests-m32/restart_syscall.c 2016-01-05 23:14:25.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -43,21 +41,19 @@ * x32 is broken from the beginning: * https://lkml.org/lkml/2015/11/30/790 */ - return 77; + error_msg_and_skip("x32 is broken"); #else const sigset_t set = {}; const struct sigaction act = { .sa_handler = SIG_IGN }; const struct itimerval itv = { .it_value.tv_usec = 111111 }; struct timespec req = { .tv_nsec = 222222222 }, rem; - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); if (nanosleep(&req, &rem)) - return 0; + perror_msg_and_fail("nanosleep"); printf("nanosleep\\(\\{%jd, %jd\\}, \\{%jd, %jd\\}\\)" " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", diff -Nru strace-4.11/tests-m32/restart_syscall.test strace-4.12/tests-m32/restart_syscall.test --- strace-4.11/tests-m32/restart_syscall.test 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-m32/restart_syscall.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" syscalls=nanosleep,restart_syscall run_strace -a20 -e trace=$syscalls $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests-m32/rmdir.c strace-4.12/tests-m32/rmdir.c --- strace-4.11/tests-m32/rmdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rmdir.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_rmdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "rmdir_sample"; + long rc = syscall(__NR_rmdir, sample); + printf("rmdir(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rmdir") + +#endif diff -Nru strace-4.11/tests-m32/rmdir.test strace-4.12/tests-m32/rmdir.test --- strace-4.11/tests-m32/rmdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rmdir.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rmdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-m32/rt_sigpending.c strace-4.12/tests-m32/rt_sigpending.c --- strace-4.11/tests-m32/rt_sigpending.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigpending.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * This file is part of rt_sigpending strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigpending + +# include +# include +# include +# include +# include + +static long +k_sigpending(void *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigpending, set, size); +} + +static void +iterate(const char *const text, unsigned int size, void *set) +{ + for (;;) { + if (k_sigpending(set, size)) { + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + set, size); + break; + } + if (size) { +#if WORDS_BIGENDIAN + if (size < sizeof(long)) + tprintf("rt_sigpending(%s, %u) = 0\n", + "[]", size); + else +#endif + tprintf("rt_sigpending(%s, %u) = 0\n", + text, size); + } else { + tprintf("rt_sigpending(%p, %u) = 0\n", set, size); + break; + } + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + sigemptyset(libc_set); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + memset(k_set, 0, big_size); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + if (!k_sigpending(k_set, set_size)) + break; + tprintf("rt_sigpending(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigpending"); + tprintf("rt_sigpending(%s, %u) = 0\n", "[]", set_size); + + iterate("[]", set_size >> 1, k_set + (set_size >> 1)); + + void *const efault = k_set + (set_size >> 1); + assert(k_sigpending(efault, set_size) == -1); + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + efault, set_size); + + sigaddset(libc_set, SIGHUP); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGHUP); + + iterate("[HUP]", set_size, k_set); + + sigaddset(libc_set, SIGINT); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGINT); + + iterate("[HUP INT]", set_size, k_set); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigpending") + +#endif diff -Nru strace-4.11/tests-m32/rt_sigpending.test strace-4.12/tests-m32/rt_sigpending.test --- strace-4.11/tests-m32/rt_sigpending.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigpending.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigpending syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests-m32/rt_sigprocmask.c strace-4.12/tests-m32/rt_sigprocmask.c --- strace-4.11/tests-m32/rt_sigprocmask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigprocmask.c 2016-02-19 01:44:33.000000000 +0000 @@ -0,0 +1,174 @@ +/* + * This file is part of rt_sigprocmask strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include + +static long +k_sigprocmask(const unsigned long how, void *const new_set, + void *const old_set, const unsigned long size) +{ + return syscall(__NR_rt_sigprocmask, how, new_set, old_set, size); +} + +static void +iterate(const char *const text, void *set, void *old, unsigned int size) +{ + for (;;) { + if (k_sigprocmask(SIG_UNBLOCK, set, old, size)) { + if (size < sizeof(long)) + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %p, %p, %u) = -1 EINVAL (%m)\n", + set, old, size); + else + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %s, %p, %u) = -1 EINVAL (%m)\n", + text, old, size); + } else { + tprintf("rt_sigprocmask(SIG_UNBLOCK, %s, [], %u)" + " = 0\n", text, size); + } + if (!size) + break; + size >>= 1; + set += size; + old += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!k_sigprocmask(SIG_SETMASK, NULL, NULL, set_size)) + break; + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u)" + " = -1 EINVAL (%m)\n", set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u) = 0\n", + set_size); + + void *const k_set = tail_alloc(set_size); + void *const old_set = tail_alloc(set_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + memset(k_set, 0, set_size); + if (k_sigprocmask(SIG_SETMASK, k_set, NULL, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, [], NULL, %u) = 0\n", set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set - set_size, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[], [], %u) = 0\n", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set - set_size, + old_set, set_size << 1) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, %p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, old_set, set_size << 1); + + iterate("~[]", k_set - set_size, old_set, set_size >> 1); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, [HUP], [], %u) = 0\n", set_size); + + memset(libc_set, -1, sizeof(sigset_t)); + sigdelset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP], [HUP], %u) = 0\n", + set_size); + + sigdelset(libc_set, SIGKILL); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP KILL], [HUP], %u) = 0\n", + set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + sigaddset(libc_set, SIGINT); + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, %s, [HUP], %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + if (k_sigprocmask(SIG_SETMASK, NULL, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, %s, %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set + (set_size >> 1), NULL, + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, NULL, %u) = -1 EFAULT (%m)\n", + k_set + (set_size >> 1), set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set, old_set + (set_size >> 1), + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %s, %p, %u) = -1 EFAULT (%m)\n", + "[HUP INT QUIT ALRM TERM]", + old_set + (set_size >> 1), set_size); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests-m32/rt_sigprocmask.test strace-4.12/tests-m32/rt_sigprocmask.test --- strace-4.11/tests-m32/rt_sigprocmask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigprocmask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigprocmask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/rt_sigqueueinfo.c strace-4.12/tests-m32/rt_sigqueueinfo.c --- strace-4.11/tests-m32/rt_sigqueueinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigqueueinfo.c 2016-01-06 00:14:36.000000000 +0000 @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -40,10 +42,9 @@ }; pid_t pid = getpid(); - if (sigaction(SIGUSR1, &sa, NULL) == -1) - return 77; - if (sigqueue(pid, SIGUSR1, value) == -1) - return 77; + assert(sigaction(SIGUSR1, &sa, NULL) == 0); + if (sigqueue(pid, SIGUSR1, value)) + perror_msg_and_skip("sigqueue"); printf("rt_sigqueueinfo(%u, SIGUSR1, {si_signo=SIGUSR1, " "si_code=SI_QUEUE, si_pid=%u, si_uid=%u, " "si_value={int=%d, ptr=%p}}) = 0\n", diff -Nru strace-4.11/tests-m32/rt_sigqueueinfo.test strace-4.12/tests-m32/rt_sigqueueinfo.test --- strace-4.11/tests-m32/rt_sigqueueinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of rt_sigqueueinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ert_sigqueueinfo -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-m32/rt_sigsuspend.c strace-4.12/tests-m32/rt_sigsuspend.c --- strace-4.11/tests-m32/rt_sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigsuspend.c 2016-04-20 04:35:25.000000000 +0000 @@ -0,0 +1,165 @@ +/* + * This file is part of rt_sigsuspend strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigsuspend + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigsuspend(const sigset_t *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigsuspend, set, size); +} + +static void +iterate(const char *const text, const int sig, + const void *const set, unsigned int size) +{ + const void *mask; + + for (mask = set;; size >>= 1, mask += size) { + raise(sig); + assert(k_sigsuspend(mask, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigsuspend(%s, %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", + text, size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigsuspend(%p, %u)" + " = -1 EINVAL (%m)\n", + mask, size); + else + tprintf("rt_sigsuspend(%s, %u)" + " = -1 EINVAL (%m)\n", + set == mask ? text : "~[]", size); + } + if (!size) + break; + } +} + +static void +handler(int signo) +{ +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR1); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct sigaction sa = { + .sa_handler = handler + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + raise(SIGUSR1); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigsuspend(k_set, set_size) == -1); + if (EINTR == errno) + break; + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigsuspend"); + tprintf("rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR2); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP INT USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + memset(libc_set, -1, sizeof(*libc_set)); + sigdelset(libc_set, SIGUSR1); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend(~[USR1], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + assert(k_sigsuspend(k_set - set_size, set_size << 1) == -1); + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, set_size << 1); + + iterate("~[USR1]", SIGUSR1, k_set, set_size >> 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigsuspend") + +#endif diff -Nru strace-4.11/tests-m32/rt_sigsuspend.test strace-4.12/tests-m32/rt_sigsuspend.test --- strace-4.11/tests-m32/rt_sigsuspend.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigsuspend.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigsuspend syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -esignal=none diff -Nru strace-4.11/tests-m32/rt_sigtimedwait.c strace-4.12/tests-m32/rt_sigtimedwait.c --- strace-4.11/tests-m32/rt_sigtimedwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigtimedwait.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,182 @@ +/* + * This file is part of rt_sigtimedwait strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigtimedwait + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigtimedwait(const sigset_t *const set, siginfo_t *const info, + const struct timespec *const timeout, const unsigned long size) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, size); +} + +static void +iterate(const char *const text, const void *set, + const struct timespec *const timeout, unsigned int size) +{ + for (;;) { + assert(k_sigtimedwait(set, NULL, timeout, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", text, + (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, + size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + else + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + text, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + } + if (!size) + break; + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + struct timespec *const timeout = tail_alloc(sizeof(*timeout)); + timeout->tv_sec = 0; + timeout->tv_nsec = 42; + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); + if (EAGAIN == errno) + break; + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}, %u)" + " = -1 EINVAL (%m)\n", + k_set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigtimedwait"); + tprintf("rt_sigtimedwait([], NULL, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP INT], %p, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(%s, %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + "[HUP INT QUIT ALRM TERM]", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + memset(k_set - set_size, -1, set_size); + assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(~[], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + assert(k_sigtimedwait(k_set - set_size, info, NULL, set_size << 1) == -1); + tprintf("rt_sigtimedwait(%p, %p, NULL, %u) = -1 EINVAL (%m)\n", + k_set - set_size, info, set_size << 1); + + iterate("~[]", k_set - set_size, timeout, set_size >> 1); + + timeout->tv_sec = 1; + raise(SIGALRM); + assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" + ", si_pid=%d, si_uid=%d}, {%jd, %jd}, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size, SIGALRM, "SIGALRM"); + + raise(SIGALRM); + assert(k_sigtimedwait(k_set, NULL, NULL, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, NULL, NULL, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", set_size, SIGALRM, "SIGALRM"); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigtimedwait") + +#endif diff -Nru strace-4.11/tests-m32/rt_sigtimedwait.test strace-4.12/tests-m32/rt_sigtimedwait.test --- strace-4.11/tests-m32/rt_sigtimedwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_sigtimedwait.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigtimedwait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff -Nru strace-4.11/tests-m32/rt_tgsigqueueinfo.c strace-4.12/tests-m32/rt_tgsigqueueinfo.c --- strace-4.11/tests-m32/rt_tgsigqueueinfo.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_tgsigqueueinfo.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * This file is part of rt_tgsigqueueinfo strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_tgsigqueueinfo + +# include +# include +# include +# include +# include + +static long +k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info) +{ + return syscall(__NR_rt_tgsigqueueinfo, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | sig, + info); +} + +int +main (void) +{ + const struct sigaction sa = { + .sa_handler = SIG_IGN + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->si_signo = SIGUSR1; + info->si_errno = ENOENT; + info->si_code = SI_QUEUE; + info->si_pid = getpid(); + info->si_uid = getuid(); + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed; + + if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) + perror_msg_and_fail("rt_tgsigqueueinfo"); + + printf("rt_tgsigqueueinfo(%u, %u, %s, {si_signo=%s" + ", si_code=SI_QUEUE, si_errno=ENOENT, si_pid=%u" + ", si_uid=%u, si_value={int=%d, ptr=%p}}) = 0\n", + info->si_pid, info->si_pid, "SIGUSR1", "SIGUSR1", + info->si_pid, info->si_uid, info->si_value.sival_int, + info->si_value.sival_ptr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_tgsigqueueinfo") + +#endif diff -Nru strace-4.11/tests-m32/rt_tgsigqueueinfo.test strace-4.12/tests-m32/rt_tgsigqueueinfo.test --- strace-4.11/tests-m32/rt_tgsigqueueinfo.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/rt_tgsigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_tgsigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-m32/sched_get_priority_mxx.c strace-4.12/tests-m32/sched_get_priority_mxx.c --- strace-4.11/tests-m32/sched_get_priority_mxx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_get_priority_mxx.c 2016-03-10 09:12:23.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined(__NR_sched_get_priority_min) \ + && defined(__NR_sched_get_priority_max) + +# include +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_sched_get_priority_min, SCHED_FIFO); + printf("sched_get_priority_min(SCHED_FIFO) = %d\n", rc); + + rc = syscall(__NR_sched_get_priority_max, SCHED_RR); + printf("sched_get_priority_max(SCHED_RR) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_get_priority_min" + " && defined __NR_sched_get_priority_max"); + +#endif diff -Nru strace-4.11/tests-m32/sched_get_priority_mxx.test strace-4.12/tests-m32/sched_get_priority_mxx.test --- strace-4.11/tests-m32/sched_get_priority_mxx.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_get_priority_mxx.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_get_priority_min and sched_get_priority_max syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max diff -Nru strace-4.11/tests-m32/sched_rr_get_interval.c strace-4.12/tests-m32/sched_rr_get_interval.c --- strace-4.11/tests-m32/sched_rr_get_interval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_rr_get_interval.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_rr_get_interval + +# include +# include +# include + +int +main(void) +{ + struct timespec *const tp = tail_alloc(sizeof(struct timespec)); + long rc = syscall(__NR_sched_rr_get_interval, -1, tp); + printf("sched_rr_get_interval(-1, %p) = %ld %s (%m)\n", + tp, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") + +#endif diff -Nru strace-4.11/tests-m32/sched_rr_get_interval.test strace-4.12/tests-m32/sched_rr_get_interval.test --- strace-4.11/tests-m32/sched_rr_get_interval.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_rr_get_interval.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_rr_get_interval syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests-m32/sched_xetaffinity.c strace-4.12/tests-m32/sched_xetaffinity.c --- strace-4.11/tests-m32/sched_xetaffinity.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetaffinity.c 2016-02-08 18:18:51.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * This file is part of sched_xetaffinity strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_sched_getaffinity && defined __NR_sched_setaffinity \ + && defined CPU_ISSET_S && defined CPU_ZERO_S && defined CPU_SET_S + +# include +# include +# include +# include + +static int +getaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_getaffinity, pid, size, set); +} + +static int +setaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_setaffinity, pid, size, set); +} + +int +main(void) +{ + unsigned int cpuset_size = 1; + const pid_t pid = getpid(); + + while (cpuset_size) { + assert(getaffinity(pid, cpuset_size, NULL) == -1); + if (EFAULT == errno) + break; + if (EINVAL != errno) + perror_msg_and_skip("sched_getaffinity"); + printf("sched_getaffinity(%d, %u, NULL) = -1 EINVAL (%m)\n", + pid, cpuset_size); + cpuset_size <<= 1; + } + assert(cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = -1 EFAULT (%m)\n", + pid, cpuset_size); + + cpu_set_t *cpuset = tail_alloc(cpuset_size); + assert(getaffinity(pid, cpuset_size, cpuset + 1) == -1); + printf("sched_getaffinity(%d, %u, %p) = -1 EFAULT (%m)\n", + pid, cpuset_size, cpuset + 1); + + assert(getaffinity(pid, cpuset_size, cpuset) == (int) cpuset_size); + printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); + const char *sep; + unsigned int i, cpu; + for (i = 0, cpu = 0, sep = ""; i < cpuset_size * 8; ++i) { + if (CPU_ISSET_S(i, cpuset_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + cpu = i; + } + } + printf("]) = %u\n", cpuset_size); + + CPU_ZERO_S(cpuset_size, cpuset); + CPU_SET_S(cpu, cpuset_size, cpuset); + if (setaffinity(pid, cpuset_size, cpuset)) + perror_msg_and_skip("sched_setaffinity"); + printf("sched_setaffinity(%d, %u, [%u]) = 0\n", + pid, cpuset_size, cpu); + + const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; + cpuset = tail_alloc(big_size); + const int ret_size = getaffinity(pid, big_size, cpuset); + assert(ret_size >= (int) cpuset_size && ret_size <= (int) big_size); + printf("sched_getaffinity(%d, %u, [", pid, big_size); + for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + } + } + printf("]) = %d\n", ret_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getaffinity && __NR_sched_setaffinity" + " && CPU_ISSET_S && CPU_ZERO_S && CPU_SET_S") + +#endif diff -Nru strace-4.11/tests-m32/sched_xetaffinity.test strace-4.12/tests-m32/sched_xetaffinity.test --- strace-4.11/tests-m32/sched_xetaffinity.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetaffinity.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getaffinity and sched_setaffinity syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity diff -Nru strace-4.11/tests-m32/sched_xetattr.c strace-4.12/tests-m32/sched_xetattr.c --- strace-4.11/tests-m32/sched_xetattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetattr.c 2016-01-06 11:25:47.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_sched_getattr && defined __NR_sched_setattr +# include +# include +# include + int main(void) { @@ -54,7 +52,7 @@ } sched; if (syscall(__NR_sched_getattr, 0, &sched, sizeof(sched), 0)) - return 77; + perror_msg_and_skip("sched_getattr"); printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 256, 0\\) += 0\n", sched.attr.size, @@ -67,7 +65,7 @@ sched.attr.sched_flags |= 1; if (syscall(__NR_sched_setattr, 0, &sched, 0)) - return 77; + perror_msg_and_skip("sched_setattr"); printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", sched.attr.size, @@ -83,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sched_getattr && __NR_sched_setattr") #endif diff -Nru strace-4.11/tests-m32/sched_xetattr.test strace-4.12/tests-m32/sched_xetattr.test --- strace-4.11/tests-m32/sched_xetattr.test 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetattr.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e sched_getattr,sched_setattr $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-m32/sched_xetparam.c strace-4.12/tests-m32/sched_xetparam.c --- strace-4.11/tests-m32/sched_xetparam.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetparam.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,33 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getparam && defined __NR_sched_setparam + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = + tail_alloc(sizeof(struct sched_param)); + + long rc = syscall(__NR_sched_getparam, 0, param); + printf("sched_getparam(0, [%d]) = %ld\n", + param->sched_priority, rc); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setparam, 0, param); + printf("sched_setparam(0, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam") + +#endif diff -Nru strace-4.11/tests-m32/sched_xetparam.test strace-4.12/tests-m32/sched_xetparam.test --- strace-4.11/tests-m32/sched_xetparam.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetparam.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getparam and sched_setparam syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam diff -Nru strace-4.11/tests-m32/sched_xetscheduler.c strace-4.12/tests-m32/sched_xetscheduler.c --- strace-4.11/tests-m32/sched_xetscheduler.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetscheduler.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,62 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getscheduler && defined __NR_sched_setscheduler + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = tail_alloc(sizeof(struct sched_param)); + long rc = syscall(__NR_sched_getscheduler, 0); + const char *scheduler; + switch (rc) { + case SCHED_FIFO: + scheduler = "SCHED_FIFO"; + break; + case SCHED_RR: + scheduler = "SCHED_RR"; + break; +# ifdef SCHED_BATCH + case SCHED_BATCH: + scheduler = "SCHED_BATCH"; + break; +# endif +# ifdef SCHED_IDLE + case SCHED_IDLE: + scheduler = "SCHED_IDLE"; + break; +# endif +# ifdef SCHED_ISO + case SCHED_ISO: + scheduler = "SCHED_ISO"; + break; +# endif +# ifdef SCHED_DEADLINE + case SCHED_DEADLINE: + scheduler = "SCHED_DEADLINE"; + break; +# endif + default: + scheduler = "SCHED_OTHER"; + } + printf("sched_getscheduler(0) = %ld (%s)\n", + rc, scheduler); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param); + printf("sched_setscheduler(0, SCHED_FIFO, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getscheduler && __NR_sched_setscheduler") + +#endif diff -Nru strace-4.11/tests-m32/sched_xetscheduler.test strace-4.12/tests-m32/sched_xetscheduler.test --- strace-4.11/tests-m32/sched_xetscheduler.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_xetscheduler.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getscheduler and sched_setscheduler syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler diff -Nru strace-4.11/tests-m32/sched_yield.c strace-4.12/tests-m32/sched_yield.c --- strace-4.11/tests-m32/sched_yield.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_yield.c 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_yield + +# include +# include + +int +main(void) +{ + printf("sched_yield() = %ld\n", syscall(__NR_sched_yield)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_yield") + +#endif diff -Nru strace-4.11/tests-m32/sched_yield.test strace-4.12/tests-m32/sched_yield.test --- strace-4.11/tests-m32/sched_yield.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sched_yield.test 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_yield syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-m32/scm_rights.c strace-4.12/tests-m32/scm_rights.c --- strace-4.11/tests-m32/scm_rights.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/scm_rights.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,86 +25,81 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include +#include #include +#include #include -#include -#include #include -#include int main(int ac, const char **av) { - int i; - int data = 0; - struct iovec iov = { - .iov_base = &data, - .iov_len = sizeof(iov) - }; + assert(ac > 0); + int fds[ac]; - while ((i = open("/dev/null", O_RDWR)) < 3) + static const char sample[] = + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + const unsigned int data_size = sizeof(sample) - 1; + void *data = tail_alloc(data_size); + memcpy(data, sample, data_size); + + struct iovec *iov = tail_alloc(sizeof(struct iovec)); + iov->iov_base = data; + iov->iov_len = data_size; + + struct msghdr *mh = tail_alloc(sizeof(struct msghdr)); + memset(mh, 0, sizeof(*mh)); + mh->msg_iov = iov; + mh->msg_iovlen = 1; + + int i; + while ((i = open("/dev/null", O_RDWR)) <= ac + 2) assert(i >= 0); - (void) close(3); + while (i > 2) + assert(close(i--) == 0); + assert(close(0) == 0); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); int one = 1; - assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0); + if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one))) + perror_msg_and_skip("setsockopt"); - pid_t pid = fork(); - assert(pid >= 0); + assert((fds[0] = open("/dev/null", O_RDWR)) == 4); + for (i = 1; i < ac; ++i) + assert((fds[i] = open(av[i], O_RDONLY)) == i + 4); + + unsigned int cmsg_size = CMSG_SPACE(sizeof(fds)); + struct cmsghdr *cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); + memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(sendmsg(sv[1], mh, 0) == (int) data_size); + + assert(close(sv[1]) == 0); + assert(open("/dev/null", O_RDWR) == sv[1]); + + for (i = 0; i < ac; ++i) { + assert(close(fds[i]) == 0); + fds[i] = 0; + } - if (pid) { - assert(close(sv[0]) == 0); - assert(dup2(sv[1], 1) == 1); - assert(close(sv[1]) == 0); - - int fds[ac]; - assert((fds[0] = open("/dev/null", O_RDWR)) == 3); - for (i = 1; i < ac; ++i) - assert((fds[i] = open(av[i], O_RDONLY)) == i + 3); - - union { - struct cmsghdr cmsg; - char buf[CMSG_LEN(sizeof(fds))]; - } control; - - control.cmsg.cmsg_level = SOL_SOCKET; - control.cmsg.cmsg_type = SCM_RIGHTS; - control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds)); - memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds)); - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = &control, - .msg_controllen = sizeof(control) - }; - - assert(sendmsg(1, &mh, 0) == sizeof(iov)); - assert(close(1) == 0); - - int status; - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - } else { - assert(close(sv[1]) == 0); - assert(dup2(sv[0], 0) == 0); - assert(close(sv[0]) == 0); - - struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)]; - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = control, - .msg_controllen = sizeof(control) - }; + cmsg_size += CMSG_SPACE(sizeof(struct ucred)); + cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; - assert(recvmsg(0, &mh, 0) == sizeof(iov)); - assert(close(0) == 0); - } + assert(recvmsg(0, mh, 0) == (int) data_size); + assert(close(0) == 0); return 0; } diff -Nru strace-4.11/tests-m32/scm_rights-fd.test strace-4.12/tests-m32/scm_rights-fd.test --- strace-4.11/tests-m32/scm_rights-fd.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/scm_rights-fd.test 2016-03-23 19:13:13.000000000 +0000 @@ -49,18 +49,27 @@ framework_skip_ 'failed to create a file' run_prog ./scm_rights /dev/zero -run_strace_merge -y -x -enetwork $args "$file" +run_strace -y -x -enetwork $args "$file" +hex='[[:xdigit:]]' n='[1-9][0-9]*' -msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n" -rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3, 4, 5]*/(A\\n){127}Z>\]\}' -creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}' -prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +' +sample="$(for i in $(seq 1 15); do printf '\\\\xf%x' $i; done)" +socket='' + +path6='(/.*/(A\\n){127}Z|\\x2f(\\x'"$hex$hex"')*\\x2f(\\x41\\x0a){127}\\x5a)' +rights_data='\[4, 5, 6<'"$path6"'>\]' +iov='\[\{"'"$sample"'", 15\}\]' +ids='\{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}' + +msg='\{msg_name\(0\)=NULL, msg_iov\(1\)='"$iov"', msg_controllen='"$n" +rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, '"$rights_data"'\}' +creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, '"$ids"'\}' + EXPECTED="$LOG.expected" cat > "$EXPECTED" << __EOF__ -${prefix}sendmsg\\(1, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n -${prefix}recvmsg\\(0, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n +sendmsg\\(3$socket, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15 +recvmsg\\(0$socket, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15 __EOF__ match_grep "$LOG" "$EXPECTED" diff -Nru strace-4.11/tests-m32/seccomp.c strace-4.12/tests-m32/seccomp.c --- strace-4.11/tests-m32/seccomp.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/seccomp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_PRCTL -# include -#endif -#ifdef HAVE_LINUX_SECCOMP_H -# include -#endif -#ifdef HAVE_LINUX_FILTER_H -# include -#endif - -#if defined HAVE_PRCTL \ - && defined PR_SET_NO_NEW_PRIVS \ - && defined PR_SET_SECCOMP \ - && defined SECCOMP_MODE_FILTER \ - && defined SECCOMP_RET_ERRNO \ - && defined BPF_JUMP \ - && defined BPF_STMT - -#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW) - -#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | (SECCOMP_RET_DATA & (err))) - -#define SOCK_FILTER_KILL_PROCESS \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL) - -#define PRINT_ALLOW_SYSCALL(nr) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), ", \ - __NR_ ## nr) - -#define PRINT_DENY_SYSCALL(nr, err) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | %#x), ", \ - __NR_ ## nr, err) - -static const struct sock_filter filter[] = { - /* load syscall number */ - BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)), - - /* allow syscalls */ - SOCK_FILTER_ALLOW_SYSCALL(close), - SOCK_FILTER_ALLOW_SYSCALL(exit), - SOCK_FILTER_ALLOW_SYSCALL(exit_group), - - /* deny syscalls */ - SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), - SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), - - /* kill process */ - SOCK_FILTER_KILL_PROCESS -}; - -static const struct sock_fprog prog = { - .len = sizeof(filter) / sizeof(filter[0]), - .filter = (struct sock_filter *) filter, -}; - -int -main(void) -{ - int fds[2]; - - puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); - - printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ["); - - printf("BPF_STMT(BPF_LD | BPF_W | BPF_ABS, %#x), ", - (unsigned) offsetof(struct seccomp_data, nr)); - - PRINT_ALLOW_SYSCALL(close); - PRINT_ALLOW_SYSCALL(exit); - PRINT_ALLOW_SYSCALL(exit_group); - - PRINT_DENY_SYSCALL(sync, EBUSY), - PRINT_DENY_SYSCALL(setsid, EPERM), - - printf("BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL)"); - - puts("]) = 0"); - puts("+++ exited with 0 +++"); - - fflush(stdout); - close(0); - close(1); - - if (pipe(fds) || - prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) || - prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) || - close(0) || close(1)) - _exit(77); - - _exit(0); -} - -#else - -int main(void) { return 77; } - -#endif diff -Nru strace-4.11/tests-m32/seccomp-filter.c strace-4.12/tests-m32/seccomp-filter.c --- strace-4.11/tests-m32/seccomp-filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-filter.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp && defined SECCOMP_SET_MODE_FILTER + +# define N 7 + +int +main(void) +{ + struct sock_filter *const filter = tail_alloc(sizeof(*filter) * N); + const void *const efault = tail_alloc(1); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + long rc; + + prog->filter = filter; + prog->len = N; + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=%p})" + " = %ld %s (%m)\n", "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", + prog->len, prog->filter, rc, errno2name()); + + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -2L, efault); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, %p) = %ld %s (%m)\n", + "0xfffffffe /* SECCOMP_FILTER_FLAG_??? */", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && SECCOMP_SET_MODE_FILTER") + +#endif diff -Nru strace-4.11/tests-m32/seccomp-filter.test strace-4.12/tests-m32/seccomp-filter.test --- strace-4.11/tests-m32/seccomp-filter.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-filter.test 2016-04-12 00:20:03.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=seccomp diff -Nru strace-4.11/tests-m32/seccomp-filter-v.c strace-4.12/tests-m32/seccomp-filter-v.c --- strace-4.11/tests-m32/seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-filter-v.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined SECCOMP_SET_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter_c[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +int +main(void) +{ + tprintf("%s", ""); + + static const char kill_stmt_txt[] = + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"; + struct sock_filter *const filter = + tail_memdup(filter_c, sizeof(filter_c)); + struct sock_filter *const big_filter = + tail_alloc(sizeof(*big_filter) * (BPF_MAXINSNS + 1)); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + + prog->filter = filter + ARRAY_SIZE(filter_c); + prog->len = 1; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=1, filter=%p})" + " = -1 EFAULT (%m)\n", prog->filter); + + prog->filter = filter + ARRAY_SIZE(filter_c) - 1; + prog->len = 3; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u" + ", filter=[%s, %p]}) = -1 EFAULT (%m)\n", + prog->len, kill_stmt_txt, filter + ARRAY_SIZE(filter_c)); + + prog->len = 0; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=0, filter=[]})" + " = -1 EINVAL (%m)\n"); + + unsigned int i; + for (i = 0; i <= BPF_MAXINSNS; ++i) { + const struct sock_filter stmt = + BPF_STMT(BPF_CLASS(i), i << 16); + big_filter[i] = stmt; + } + + prog->filter = big_filter; + prog->len = BPF_MAXINSNS + 1; + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=[", + "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", prog->len); + for (i = 0; i < BPF_MAXINSNS; ++i) { + if (i) + tprintf(", "); + switch(BPF_CLASS(i)) { + case BPF_LD: + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_LDX: + tprintf("BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_ST: + tprintf("BPF_STMT(BPF_ST, %#x)", i << 16); + break; + case BPF_STX: + tprintf("BPF_STMT(BPF_STX, %#x)", i << 16); + break; + case BPF_ALU: + tprintf("BPF_STMT(BPF_ALU|BPF_K|BPF_ADD, %#x)", i << 16); + break; + case BPF_JMP: + tprintf("BPF_STMT(BPF_JMP|BPF_K|BPF_JA, %#x)", i << 16); + break; + case BPF_RET: + tprintf("BPF_STMT(BPF_RET|BPF_K, %#x" + " /* SECCOMP_RET_??? */)", i << 16); + break; + case BPF_MISC: + tprintf("BPF_STMT(BPF_MISC|BPF_TAX, %#x)", i << 16); + break; + } + } + tprintf(", ...]})"); + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + tprintf(" = -1 EINVAL (%m)\n"); + + prog->filter = filter; + prog->len = ARRAY_SIZE(filter_c); + + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u, filter=[", + prog->len); + + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + tprintf("%s]}) = 0\n+++ exited with 0 +++\n", kill_stmt_txt); + + if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog)) + perror_msg_and_skip("SECCOMP_SET_MODE_FILTER"); + + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && PR_SET_NO_NEW_PRIVS" + " && SECCOMP_SET_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests-m32/seccomp-filter-v.test strace-4.12/tests-m32/seccomp-filter-v.test --- strace-4.11/tests-m32/seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-filter-v.test 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=seccomp diff -Nru strace-4.11/tests-m32/seccomp-strict.c strace-4.12/tests-m32/seccomp-strict.c --- strace-4.11/tests-m32/seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-strict.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_seccomp && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + long rc; + + rc = syscall(__NR_seccomp, -1L, -1L, addr); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#lx)" + " = %ld %s (%m)\n", -1, -1, addr, rc, errno2name()); + fflush(stdout); + + rc = syscall(__NR_seccomp, 0, 0, 0); + if (rc) { + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL)" + " = %ld %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && __NR_exit") + +#endif diff -Nru strace-4.11/tests-m32/seccomp-strict.test strace-4.12/tests-m32/seccomp-strict.test --- strace-4.11/tests-m32/seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eseccomp "$@" > "$EXP" +match_diff "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests-m32/seccomp.test strace-4.12/tests-m32/seccomp.test --- strace-4.11/tests-m32/seccomp.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/seccomp.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh - -# Check how SECCOMP_MODE_FILTER is decoded. - -. "${srcdir=.}/init.sh" - -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -veprctl $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 diff -Nru strace-4.11/tests-m32/select.c strace-4.12/tests-m32/select.c --- strace-4.11/tests-m32/select.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-m32/select.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #if defined __NR_select && !defined __NR__newselect -# define TEST_SYSCALL_NAME select -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR_select +# define TEST_SYSCALL_STR "select" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && !__NR__newselect") + +#endif diff -Nru strace-4.11/tests-m32/select.test strace-4.12/tests-m32/select.test --- strace-4.11/tests-m32/select.test 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-m32/select.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check select syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -syscall=${ME_%.test} -OUT="$LOG.out" -run_strace -a36 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-m32/semop.c strace-4.12/tests-m32/semop.c --- strace-4.11/tests-m32/semop.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/semop.c 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,54 @@ +#include "tests.h" +#include +#include +#include +#include +#include +#include + +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + id = -1; +} + +int +main(void) +{ + id = semget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + atexit(cleanup); + + union semun sem_union = { .val = 0 }; + if (semctl(id, 0, SETVAL, sem_union) == -1) + perror_msg_and_skip("semctl"); + + struct sembuf *const sem_b = tail_alloc(sizeof(*sem_b)); + sem_b->sem_num = 0; + sem_b->sem_op = 1; + sem_b->sem_flg = SEM_UNDO; + + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, 1"); + printf("semop(%d, [{0, 1, SEM_UNDO}], 1) = 0\n", id); + + sem_b->sem_op = -1; + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, -1"); + printf("semop(%d, [{0, -1, SEM_UNDO}], 1) = 0\n", id); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/semop.test strace-4.12/tests-m32/semop.test --- strace-4.11/tests-m32/semop.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/semop.test 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check semop syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests-m32/sendfile64.c strace-4.12/tests-m32/sendfile64.c --- strace-4.11/tests-m32/sendfile64.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests-m32/sendfile64.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,80 +25,72 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile64 +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile64, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile64, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile64"); + printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile64, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint64_t *p_off = tail_alloc(sizeof(uint64_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile64, 0, 1, p, page_len) == -1); + printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile64(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint64_t *p_off = p + page_len - sizeof(uint64_t); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) + == (long) alen); printf("sendfile64(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile64(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, @@ -106,17 +98,13 @@ (unsigned long) blen); *p_off = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); printf("sendfile64(%d, %d, [14627392582579060461], 1)" - " = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off = 0xfacefeed; - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; - printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", sv[1], reg_in); puts("+++ exited with 0 +++"); return 0; @@ -124,10 +112,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile64") #endif diff -Nru strace-4.11/tests-m32/sendfile64.test strace-4.12/tests-m32/sendfile64.test --- strace-4.11/tests-m32/sendfile64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/sendfile64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile64 syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a29 diff -Nru strace-4.11/tests-m32/sendfile.c strace-4.12/tests-m32/sendfile.c --- strace-4.11/tests-m32/sendfile.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests-m32/sendfile.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,106 +25,97 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile"); + printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint32_t *p_off = tail_alloc(sizeof(uint32_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile, 0, 1, p, page_len) == -1); + printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint32_t *p_off = p + page_len - sizeof(uint32_t); + p = p_off; if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) != (long) alen) { - printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (Bad address)\n", + printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (%m)\n", sv[1], reg_in, (unsigned long) p_off, (unsigned long) alen); --p_off; - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) - != (long) alen) - return 77; + *p_off = 0; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) + == (long) alen); } printf("sendfile(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, (unsigned long) stb.st_size + 1, (unsigned long) blen); - if (p_off == p + page_len - sizeof(uint64_t)) { + if (p_off != p) { uint64_t *p_off64 = (uint64_t *) p_off; *p_off64 = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1)) - return 77; - printf("sendfile(%d, %d, [14627392582579060461], 1) = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); + printf("sendfile(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off64 = 0xdefaced; } else { *p_off = 0xdefaced; } - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, 1) == 0); printf("sendfile(%d, %d, [233811181], 1) = 0\n", sv[1], reg_in); @@ -134,10 +125,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile") #endif diff -Nru strace-4.11/tests-m32/sendfile.test strace-4.12/tests-m32/sendfile.test --- strace-4.11/tests-m32/sendfile.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/sendfile.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-m32/setdomainname.c strace-4.12/tests-m32/setdomainname.c --- strace-4.11/tests-m32/setdomainname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setdomainname.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_setdomainname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_setdomainname, 0, 63); + printf("setdomainname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setdomainname") + +#endif diff -Nru strace-4.11/tests-m32/setdomainname.test strace-4.12/tests-m32/setdomainname.test --- strace-4.11/tests-m32/setdomainname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setdomainname.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setdomainname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-m32/setfsgid32.c strace-4.12/tests-m32/setfsgid32.c --- strace-4.11/tests-m32/setfsgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid32 + +# define SYSCALL_NR __NR_setfsgid32 +# define SYSCALL_NAME "setfsgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid32") + +#endif diff -Nru strace-4.11/tests-m32/setfsgid32.test strace-4.12/tests-m32/setfsgid32.test --- strace-4.11/tests-m32/setfsgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-m32/setfsgid.c strace-4.12/tests-m32/setfsgid.c --- strace-4.11/tests-m32/setfsgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid + +# define SYSCALL_NR __NR_setfsgid +# define SYSCALL_NAME "setfsgid" + +# if defined __NR_setfsgid32 && __NR_setfsgid != __NR_setfsgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid") + +#endif diff -Nru strace-4.11/tests-m32/setfsgid.test strace-4.12/tests-m32/setfsgid.test --- strace-4.11/tests-m32/setfsgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-m32/setfsugid.c strace-4.12/tests-m32/setfsugid.c --- strace-4.11/tests-m32/setfsugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsugid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Check decoding of setfsuid/setfsgid/setfsuid32/setfsgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int +main(void) +{ + unsigned int ugid = GETUGID; + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L, + 0xc0deffffU, + 0xfacefeedU, + (long) 0xfacefeeddeadbeefULL + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + unsigned int rc; + + rc = syscall(SYSCALL_NR, tests[i]); + printf("%s(%u) = %u\n", SYSCALL_NAME, num, rc); + + rc = syscall(SYSCALL_NR, ugid); + printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/setfsuid32.c strace-4.12/tests-m32/setfsuid32.c --- strace-4.11/tests-m32/setfsuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid32 + +# define SYSCALL_NR __NR_setfsuid32 +# define SYSCALL_NAME "setfsuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid32") + +#endif diff -Nru strace-4.11/tests-m32/setfsuid32.test strace-4.12/tests-m32/setfsuid32.test --- strace-4.11/tests-m32/setfsuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-m32/setfsuid.c strace-4.12/tests-m32/setfsuid.c --- strace-4.11/tests-m32/setfsuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid + +# define SYSCALL_NR __NR_setfsuid +# define SYSCALL_NAME "setfsuid" + +# if defined __NR_setfsuid32 && __NR_setfsuid != __NR_setfsuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid") + +#endif diff -Nru strace-4.11/tests-m32/setfsuid.test strace-4.12/tests-m32/setfsuid.test --- strace-4.11/tests-m32/setfsuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setfsuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-m32/setgid32.c strace-4.12/tests-m32/setgid32.c --- strace-4.11/tests-m32/setgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid32 + +# define SYSCALL_NR __NR_setgid32 +# define SYSCALL_NAME "setgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid32") + +#endif diff -Nru strace-4.11/tests-m32/setgid32.test strace-4.12/tests-m32/setgid32.test --- strace-4.11/tests-m32/setgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-m32/setgid.c strace-4.12/tests-m32/setgid.c --- strace-4.11/tests-m32/setgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid + +# define SYSCALL_NR __NR_setgid +# define SYSCALL_NAME "setgid" + +# if defined __NR_setgid32 && __NR_setgid != __NR_setgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid") + +#endif diff -Nru strace-4.11/tests-m32/setgid.test strace-4.12/tests-m32/setgid.test --- strace-4.11/tests-m32/setgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/setgroups32.c strace-4.12/tests-m32/setgroups32.c --- strace-4.11/tests-m32/setgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_setgroups32 + +# include "setgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups32") + +#endif diff -Nru strace-4.11/tests-m32/setgroups32.test strace-4.12/tests-m32/setgroups32.test --- strace-4.11/tests-m32/setgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a19 diff -Nru strace-4.11/tests-m32/setgroups.c strace-4.12/tests-m32/setgroups.c --- strace-4.11/tests-m32/setgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of setgroups/setgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_setgroups32 + +# define SYSCALL_NR __NR_setgroups32 +# define SYSCALL_NAME "setgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_setgroups + +# define SYSCALL_NR __NR_setgroups +# define SYSCALL_NAME "setgroups" +# if defined __NR_setgroups32 && __NR_setgroups != __NR_setgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +int +main(void) +{ + /* check how the first argument is decoded */ + if (syscall(SYSCALL_NR, 0, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + syscall(SYSCALL_NR, 1, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, (long) 0xffffffff00000001ULL, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + /* check how the second argument is decoded */ + const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * 2); + GID_TYPE *const g3 = tail_alloc(sizeof(*g3) * 3); + + if (syscall(SYSCALL_NR, 0, g1 + 1)) + printf("%s(0, []) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, []) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, 1, g1)) + printf("%s(1, [%u]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, errno2name()); + else + printf("%s(1, [%u]) = 0\n", + SYSCALL_NAME, (unsigned) *g1); + + syscall(SYSCALL_NR, 1, g1 + 1); + printf("%s(1, %p) = -1 %s (%m)\n", + SYSCALL_NAME, g1 + 1, errno2name()); + + syscall(SYSCALL_NR, 1, -1L); + printf("%s(1, %#lx) = -1 %s (%m)\n", SYSCALL_NAME, -1L, errno2name()); + + syscall(SYSCALL_NR, 2, g1); + printf("%s(2, [%u, %p]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, g1 + 1, errno2name()); + + g2[0] = -2; + g2[1] = -3; + if (syscall(SYSCALL_NR, 2, g2)) + printf("%s(2, [%u, %u]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], errno2name()); + else + printf("%s(2, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1]); + + syscall(SYSCALL_NR, 3, g2); + printf("%s(3, [%u, %u, %p]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], g2 + 2, errno2name()); + + g3[0] = 0; + g3[1] = 1; + if (syscall(SYSCALL_NR, 3, g3)) + printf("%s(3, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + else + printf("%s(3, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1]); + + syscall(SYSCALL_NR, 4, g3); + printf("%s(4, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + + long rc = sysconf(_SC_NGROUPS_MAX); + const unsigned ngroups_max = rc; + + if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { + syscall(SYSCALL_NR, ngroups_max, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + const unsigned long size = + (unsigned long) 0xffffffff00000000ULL | ngroups_max; + syscall(SYSCALL_NR, size, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + syscall(SYSCALL_NR, ngroups_max + 1, g3); + printf("%s(%u, %p) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max + 1, g3, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups") + +#endif diff -Nru strace-4.11/tests-m32/setgroups.test strace-4.12/tests-m32/setgroups.test --- strace-4.11/tests-m32/setgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a17 diff -Nru strace-4.11/tests-m32/sethostname.c strace-4.12/tests-m32/sethostname.c --- strace-4.11/tests-m32/sethostname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sethostname.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_sethostname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_sethostname, 0, 63); + printf("sethostname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sethostname") + +#endif diff -Nru strace-4.11/tests-m32/sethostname.test strace-4.12/tests-m32/sethostname.test --- strace-4.11/tests-m32/sethostname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sethostname.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sethostname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-m32/set_mempolicy.c strace-4.12/tests-m32/set_mempolicy.c --- strace-4.11/tests-m32/set_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/set_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,152 @@ +/* + * Check decoding of set_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_set_mempolicy + +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(const unsigned long maxnode, unsigned int offset) +{ + unsigned int nlongs = NLONGS(maxnode); + if (nlongs <= offset) + nlongs = 0; + else + nlongs -= offset; + const unsigned int size = nlongs * sizeof(long); + unsigned long *const nodemask = + tail_alloc(size ? size : (offset ? 1 : 0)); + memset(nodemask, 0, size); + + long rc = syscall(__NR_set_mempolicy, 0, nodemask, maxnode); + int saved_errno = errno; + + fputs("set_mempolicy(MPOL_DEFAULT, ", stdout); + + if (nlongs) { + putc('[', stdout); + unsigned int i; + for (i = 0; i < nlongs + offset; ++i) { + if (i) + fputs(", ", stdout); + if (i < nlongs) { + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(long) * 2 + 2, + nodemask[i]); + } else { + printf("%p", nodemask + i); + break; + } + } + putc(']', stdout); + } else { + if (maxnode) + printf("%p", nodemask); + else + printf("[]"); + } + + printf(", %lu) = ", maxnode); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +static void +test_offset(const unsigned int offset) +{ + unsigned long maxnode = get_page_size() * 8; + + print_nodes(maxnode, offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + + maxnode = sizeof(long) * 8; + print_nodes(0, offset); + print_nodes(1, offset); + print_nodes(2, offset); + print_nodes(maxnode - 1, offset); + print_nodes(maxnode , offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + print_nodes(maxnode * 2 - 1, offset); + print_nodes(maxnode * 2 , offset); + print_nodes(maxnode * 2 + 1, offset); + print_nodes(maxnode * 2 + 2, offset); + print_nodes(maxnode * 3 - 1, offset); + print_nodes(maxnode * 3 , offset); + print_nodes(maxnode * 3 + 1, offset); + print_nodes(maxnode * 3 + 2, offset); + print_nodes(maxnode * 4 + 2, offset); +} + +int +main(void) +{ + if (syscall(__NR_set_mempolicy, 0, 0, 0)) + perror_msg_and_skip("set_mempolicy"); + puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); + + const unsigned long *nodemask = (void *) 0xfacefeedfffffffe; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); + printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %ld %s (%m)\n", + nodemask, maxnode, rc, errno2name()); + + test_offset(0); + test_offset(1); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_set_mempolicy") + +#endif diff -Nru strace-4.11/tests-m32/set_mempolicy.test strace-4.12/tests-m32/set_mempolicy.test --- strace-4.11/tests-m32/set_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/set_mempolicy.test 2016-05-07 23:37:52.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check set_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a35 diff -Nru strace-4.11/tests-m32/set_ptracer_any.c strace-4.12/tests-m32/set_ptracer_any.c --- strace-4.11/tests-m32/set_ptracer_any.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/set_ptracer_any.c 2016-01-05 23:17:11.000000000 +0000 @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include #ifdef HAVE_PRCTL diff -Nru strace-4.11/tests-m32/setregid32.c strace-4.12/tests-m32/setregid32.c --- strace-4.11/tests-m32/setregid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setregid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid32 + +# define SYSCALL_NR __NR_setregid32 +# define SYSCALL_NAME "setregid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid32") + +#endif diff -Nru strace-4.11/tests-m32/setregid32.test strace-4.12/tests-m32/setregid32.test --- strace-4.11/tests-m32/setregid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setregid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-m32/setregid.c strace-4.12/tests-m32/setregid.c --- strace-4.11/tests-m32/setregid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setregid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid + +# define SYSCALL_NR __NR_setregid +# define SYSCALL_NAME "setregid" + +# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid") + +#endif diff -Nru strace-4.11/tests-m32/setregid.test strace-4.12/tests-m32/setregid.test --- strace-4.11/tests-m32/setregid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setregid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests-m32/setresgid32.c strace-4.12/tests-m32/setresgid32.c --- strace-4.11/tests-m32/setresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid32 + +# define SYSCALL_NR __NR_setresgid32 +# define SYSCALL_NAME "setresgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid32") + +#endif diff -Nru strace-4.11/tests-m32/setresgid32.test strace-4.12/tests-m32/setresgid32.test --- strace-4.11/tests-m32/setresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/setresgid.c strace-4.12/tests-m32/setresgid.c --- strace-4.11/tests-m32/setresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid + +# define SYSCALL_NR __NR_setresgid +# define SYSCALL_NAME "setresgid" + +# if defined __NR_setresgid32 && __NR_setresgid != __NR_setresgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid") + +#endif diff -Nru strace-4.11/tests-m32/setresgid.test strace-4.12/tests-m32/setresgid.test --- strace-4.11/tests-m32/setresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-m32/setresugid.c strace-4.12/tests-m32/setresugid.c --- strace-4.11/tests-m32/setresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Check decoding of setresuid/setresgid/setresuid32/setresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define TRIPLE(val) \ + { val, ugid, ugid }, { ugid, val, ugid }, { ugid, ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e, s; + } tests[] = { + { ugid, ugid, ugid }, + TRIPLE((unsigned long) 0xffffffff00000000ULL | ugid), + TRIPLE(-1U), + TRIPLE(-1L), + TRIPLE(0xffff0000U | ugid), + TRIPLE(0xffff), + TRIPLE(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + const unsigned int sn = ugid2int(tests[i].s); + + if (!num_matches_id(rn, ugid) || + !num_matches_id(en, ugid) || + !num_matches_id(sn, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e, tests[i].s)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx, %#lx)", + SYSCALL_NAME, + tests[i].r, tests[i].e, tests[i].s); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(", "); + print_int(sn); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/setresuid32.c strace-4.12/tests-m32/setresuid32.c --- strace-4.11/tests-m32/setresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid32 + +# define SYSCALL_NR __NR_setresuid32 +# define SYSCALL_NAME "setresuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid32") + +#endif diff -Nru strace-4.11/tests-m32/setresuid32.test strace-4.12/tests-m32/setresuid32.test --- strace-4.11/tests-m32/setresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/setresuid.c strace-4.12/tests-m32/setresuid.c --- strace-4.11/tests-m32/setresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid + +# define SYSCALL_NR __NR_setresuid +# define SYSCALL_NAME "setresuid" + +# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid") + +#endif diff -Nru strace-4.11/tests-m32/setresuid.test strace-4.12/tests-m32/setresuid.test --- strace-4.11/tests-m32/setresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setresuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-m32/setreugid.c strace-4.12/tests-m32/setreugid.c --- strace-4.11/tests-m32/setreugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setreugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Check decoding of setreuid/setregid/setreuid32/setregid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define PAIR(val) { val, ugid }, { ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e; + } tests[] = { + { ugid, ugid }, + PAIR((unsigned long) 0xffffffff00000000ULL | ugid), + PAIR(-1U), + PAIR(-1L), + PAIR(0xffff0000U | ugid), + PAIR(0xffff), + PAIR(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + + if (!num_matches_id(rn, ugid) || !num_matches_id(en, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx)", SYSCALL_NAME, + tests[i].r, tests[i].e); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/setreuid32.c strace-4.12/tests-m32/setreuid32.c --- strace-4.11/tests-m32/setreuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setreuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid32 + +# define SYSCALL_NR __NR_setreuid32 +# define SYSCALL_NAME "setreuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid32") + +#endif diff -Nru strace-4.11/tests-m32/setreuid32.test strace-4.12/tests-m32/setreuid32.test --- strace-4.11/tests-m32/setreuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setreuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-m32/setreuid.c strace-4.12/tests-m32/setreuid.c --- strace-4.11/tests-m32/setreuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setreuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid + +# define SYSCALL_NR __NR_setreuid +# define SYSCALL_NAME "setreuid" + +# if defined __NR_setreuid32 && __NR_setreuid != __NR_setreuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid") + +#endif diff -Nru strace-4.11/tests-m32/setreuid.test strace-4.12/tests-m32/setreuid.test --- strace-4.11/tests-m32/setreuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setreuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests-m32/setugid.c strace-4.12/tests-m32/setugid.c --- strace-4.11/tests-m32/setugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setugid.c 2016-04-21 22:05:56.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Check decoding of setuid/setgid/setuid32/setgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = ugid2int(tests[i]); + long expected; + + if (num == ugid) + expected = 0; + else if (num == -1U) + expected = -1; + else + continue; + + const long rc = syscall(SYSCALL_NR, tests[i]); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(%u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid); + break; + } + perror_msg_and_fail("%s(%#lx) != %ld", + SYSCALL_NAME, tests[i], expected); + } + + printf("%s(", SYSCALL_NAME); + if (num == -1U) + printf("-1"); + else + printf("%u", num); + errno = saved_errno; + if (expected) + printf(") = -1 %s (%m)\n", errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/setuid32.c strace-4.12/tests-m32/setuid32.c --- strace-4.11/tests-m32/setuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid32 + +# define SYSCALL_NR __NR_setuid32 +# define SYSCALL_NAME "setuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid32") + +#endif diff -Nru strace-4.11/tests-m32/setuid32.test strace-4.12/tests-m32/setuid32.test --- strace-4.11/tests-m32/setuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-m32/setuid.c strace-4.12/tests-m32/setuid.c --- strace-4.11/tests-m32/setuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid + +# define SYSCALL_NR __NR_setuid +# define SYSCALL_NAME "setuid" + +# if defined __NR_setuid32 && __NR_setuid != __NR_setuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid") + +#endif diff -Nru strace-4.11/tests-m32/setuid.test strace-4.12/tests-m32/setuid.test --- strace-4.11/tests-m32/setuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/setuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/shmxt.c strace-4.12/tests-m32/shmxt.c --- strace-4.11/tests-m32/shmxt.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/shmxt.c 2016-04-25 01:54:05.000000000 +0000 @@ -0,0 +1,53 @@ +#include "tests.h" +#include +#include +#include + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + id = -1; +} + +#ifdef __alpha__ +# define SHMAT "osf_shmat" +#else +# define SHMAT "shmat" +#endif + +int +main(void) +{ + id = shmget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + atexit(cleanup); + + shmat(id, NULL, SHM_REMAP); + printf("%s(%d, NULL, SHM_REMAP) = -1 %s (%m)\n", + SHMAT, id, errno2name()); + + void *shmaddr = shmat(id, NULL, SHM_RDONLY); + if (shmaddr == (void *)(-1)) + perror_msg_and_skip("shmat SHM_RDONLY"); + printf("%s(%d, NULL, SHM_RDONLY) = %p\n", SHMAT, id, shmaddr); + + if (shmdt(shmaddr)) + perror_msg_and_skip("shmdt"); + printf("shmdt(%p) = 0\n", shmaddr); + + ++shmaddr; + void *shmaddr2 = shmat(id, shmaddr, SHM_RND); + if (shmaddr2 == (void *)(-1)) + printf("%s(%d, %p, SHM_RND) = -1 %s (%m)\n", + SHMAT, id, shmaddr, errno2name()); + else + printf("%s(%d, %p, SHM_RND) = %p\n", + SHMAT, id, shmaddr, shmaddr2); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/shmxt.test strace-4.12/tests-m32/shmxt.test --- strace-4.11/tests-m32/shmxt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/shmxt.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check shmat and shmdt syscalls decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) shmat=osf_shmat ;; + *) shmat=shmat ;; +esac + +run_strace_match_diff -e trace=$shmat,shmdt -a11 diff -Nru strace-4.11/tests-m32/sigaltstack.c strace-4.12/tests-m32/sigaltstack.c --- strace-4.11/tests-m32/sigaltstack.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/tests-m32/sigaltstack.c 2016-01-05 23:37:01.000000000 +0000 @@ -1,3 +1,4 @@ +#include "tests.h" #include int @@ -8,5 +9,7 @@ .ss_flags = SS_DISABLE, .ss_size = 0xdeadbeef }; - return sigaltstack(&ss, (stack_t *) 0) ? 77 : 0; + if (sigaltstack(&ss, (stack_t *) 0)) + perror_msg_and_skip("sigaltstack"); + return 0; } diff -Nru strace-4.11/tests-m32/signalfd.c strace-4.12/tests-m32/signalfd.c --- strace-4.11/tests-m32/signalfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/signalfd.c 2016-01-06 11:35:23.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,30 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include -#include -#ifdef HAVE_SYS_SIGNALFD_H + +#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC + +# include +# include # include -#endif int main(void) { -#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); (void) close(0); - return signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("signalfd"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_SYS_SIGNALFD_H && HAVE_SIGNALFD && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-m32/sigreturn.c strace-4.12/tests-m32/sigreturn.c --- strace-4.11/tests-m32/sigreturn.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/sigreturn.c 2016-01-10 22:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include @@ -47,9 +45,9 @@ sigemptyset(&set); sigaddset(&set, SIGUSR2); sigaddset(&set, SIGCHLD); - sigaddset(&set, RT_0 + 2); sigaddset(&set, RT_0 + 3); sigaddset(&set, RT_0 + 4); + sigaddset(&set, RT_0 + 5); sigaddset(&set, RT_0 + 26); sigaddset(&set, RT_0 + 27); sigprocmask(SIG_SETMASK, &set, NULL); diff -Nru strace-4.11/tests-m32/sigreturn.test strace-4.12/tests-m32/sigreturn.test --- strace-4.11/tests-m32/sigreturn.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/sigreturn.test 2016-01-10 22:48:51.000000000 +0000 @@ -2,7 +2,7 @@ # # Check rt_sigprocmask and sigreturn/rt_sigreturn decoding. # -# Copyright (c) 2015 Dmitry V. Levin +# Copyright (c) 2015-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ run_prog run_strace -esignal $args -mask='\[(USR2 CHLD|CHLD USR2) RT_2 RT_3 RT_4 RT_26 RT_27\]' +mask='\[(USR2 CHLD|CHLD USR2) RT_3 RT_4 RT_5 RT_26 RT_27\]' rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0' osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)' EXPECTED="$LOG.expected" diff -Nru strace-4.11/tests-m32/sleep.c strace-4.12/tests-m32/sleep.c --- strace-4.11/tests-m32/sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sleep.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * A simple nanosleep based sleep(1) replacement. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + struct timespec ts = { atoi(av[1]), 0 }; + + if (nanosleep(&ts, NULL)) + perror_msg_and_fail("nanosleep"); + + return 0; +} diff -Nru strace-4.11/tests-m32/splice.c strace-4.12/tests-m32/splice.c --- strace-4.11/tests-m32/splice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/splice.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of splice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_splice + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_splice") + +#endif diff -Nru strace-4.11/tests-m32/splice.test strace-4.12/tests-m32/splice.test --- strace-4.11/tests-m32/splice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/splice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check splice syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/stat64.c strace-4.12/tests-m32/stat64.c --- strace-4.11/tests-m32/stat64.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests-m32/stat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat64 -# define TEST_SYSCALL_NAME stat64 + +# define TEST_SYSCALL_NR __NR_stat64 +# define TEST_SYSCALL_STR "stat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat64") + +#endif diff -Nru strace-4.11/tests-m32/stat.c strace-4.12/tests-m32/stat.c --- strace-4.11/tests-m32/stat.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests-m32/stat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat -# define TEST_SYSCALL_NAME stat + +# define TEST_SYSCALL_NR __NR_stat +# define TEST_SYSCALL_STR "stat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat") + +#endif diff -Nru strace-4.11/tests-m32/statfs64.c strace-4.12/tests-m32/statfs64.c --- strace-4.11/tests-m32/statfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/statfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs64 + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs64 +# define SYSCALL_NAME "statfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs64") + +#endif diff -Nru strace-4.11/tests-m32/statfs64.test strace-4.12/tests-m32/statfs64.test --- strace-4.11/tests-m32/statfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/statfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check statfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-m32/statfs.c strace-4.12/tests-m32/statfs.c --- strace-4.11/tests-m32/statfs.c 2014-09-22 00:31:06.000000000 +0000 +++ strace-4.12/tests-m32/statfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -1,13 +1,43 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs +# define SYSCALL_NAME "statfs" +# include "xstatfs.c" -int -main(void) -{ - struct statfs stb; - assert(statfs("/proc/self/status", &stb) == 0); - return 0; -} +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs") + +#endif diff -Nru strace-4.11/tests-m32/statfs.expected strace-4.12/tests-m32/statfs.expected --- strace-4.11/tests-m32/statfs.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-m32/statfs.expected 2016-04-25 10:30:03.000000000 +0000 @@ -1 +1 @@ -statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type="PROC_SUPER_MAGIC", f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=[0-9]+)?\}\) += 0 +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff -Nru strace-4.11/tests-m32/statfs.test strace-4.12/tests-m32/statfs.test --- strace-4.11/tests-m32/statfs.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-m32/statfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -1,15 +1,11 @@ #!/bin/sh -# Check how statfs/statfs64 syscalls are traced. +# Check statfs syscall decoding. . "${srcdir=.}/init.sh" # this test probes /proc/self/status [ -f /proc/self/status ] || - framework_skip_ '/proc/self/status is not available' + framework_skip_ '/proc/self/status is not available' -run_prog -run_strace -efile $args -match_grep - -exit 0 +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-m32/statx.sh strace-4.12/tests-m32/statx.sh --- strace-4.11/tests-m32/statx.sh 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-m32/statx.sh 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check decoding of stat family syscalls. . "${srcdir=.}/init.sh" - -syscall=${ME_%.test} -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ve$syscall -P$syscall.sample $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -v -P $NAME.sample diff -Nru strace-4.11/tests-m32/strace-ff.expected strace-4.12/tests-m32/strace-ff.expected --- strace-4.11/tests-m32/strace-ff.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-ff.expected 2016-05-09 23:21:30.000000000 +0000 @@ -0,0 +1,2 @@ +exit_group(0) = ? ++++ exited with 0 +++ diff -Nru strace-4.11/tests-m32/strace-ff.test strace-4.12/tests-m32/strace-ff.test --- strace-4.11/tests-m32/strace-ff.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-ff.test 2016-05-10 09:51:04.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -ff option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +./set_ptracer_any ./sleep 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +rm -f "$LOG".* +run_strace -a14 -eexit_group -ff -p $tracee_pid + +# check that output matches +match_diff "$LOG.$tracee_pid" + +# check that no other output files have been created +set -- "$LOG".* +[ "$LOG.$tracee_pid" = "$*" ] || + fail_ "too many output files: $*" + +rm -f "$OUT" "$LOG.$tracee_pid" diff -Nru strace-4.11/tests-m32/strace-k.test strace-4.12/tests-m32/strace-k.test --- strace-4.11/tests-m32/strace-k.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/strace-k.test 2016-01-01 23:09:02.000000000 +0000 @@ -3,7 +3,7 @@ # Ensure that strace -k works. # # Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,9 +30,6 @@ . "${srcdir=.}/init.sh" -$STRACE -h | grep '^[[:space:]]*-k[[:space:]]' > /dev/null || - skip_ 'strace -k is not available' - # strace -k is implemented using /proc/$pid/maps [ -f /proc/self/maps ] || framework_skip_ '/proc/self/maps is not available' diff -Nru strace-4.11/tests-m32/strace-r.expected strace-4.12/tests-m32/strace-r.expected --- strace-4.11/tests-m32/strace-r.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-r.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1,2 @@ +[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 +[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ diff -Nru strace-4.11/tests-m32/strace-r.test strace-4.12/tests-m32/strace-r.test --- strace-4.11/tests-m32/strace-r.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-r.test 2016-03-24 01:27:03.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -r option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -r -eexecve ./sleep 1 +match_grep diff -Nru strace-4.11/tests-m32/strace-S.test strace-4.12/tests-m32/strace-S.test --- strace-4.11/tests-m32/strace-S.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-S.test 2016-05-10 00:39:17.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -S option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date > /dev/null + +test_c() +{ + local sortby sortopts sedexpr + sortby="$1"; shift + sortopts="$1"; shift + sedexpr="$1"; shift + + run_strace -c -S "$sortby" date > /dev/null + sed -ne "$sedexpr" < "$LOG" > "$OUT" + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" + LC_ALL=C sort -c $sortopts "$OUT" || + fail_ "$STRACE $args output not sorted properly" +} + +c='[[:space:]]\+\([^[:space:]]\+\)' +test_c calls '-n -r' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'[[:space:]].*/\4/p' +test_c name '' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'\([[:space:]]\+[0-9]\+\)\?'"$c"'$/\6/p' + +rm -f "$OUT" diff -Nru strace-4.11/tests-m32/strace-T.expected strace-4.12/tests-m32/strace-T.expected --- strace-4.11/tests-m32/strace-T.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-T.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1 @@ +nanosleep\(\{1, 0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff -Nru strace-4.11/tests-m32/strace-t.test strace-4.12/tests-m32/strace-t.test --- strace-4.11/tests-m32/strace-t.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-t.test 2016-03-24 00:59:32.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -t option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -t -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-m32/strace-T.test strace-4.12/tests-m32/strace-T.test --- strace-4.11/tests-m32/strace-T.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-T.test 2016-03-24 00:31:23.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -T option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -T -enanosleep ./sleep 1 +match_grep diff -Nru strace-4.11/tests-m32/strace-tt.test strace-4.12/tests-m32/strace-tt.test --- strace-4.11/tests-m32/strace-tt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-tt.test 2016-03-24 01:03:31.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -tt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -tt -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-m32/strace-ttt.test strace-4.12/tests-m32/strace-ttt.test --- strace-4.11/tests-m32/strace-ttt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-ttt.test 2016-03-24 01:10:02.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -ttt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > /dev/null +run_prog ./sleep 0 + +t0="$(date +%s)" +run_strace -ttt -eexecve $args +t1="$(date +%s)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-m32/strace-V.test strace-4.12/tests-m32/strace-V.test --- strace-4.11/tests-m32/strace-V.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/strace-V.test 2016-05-09 23:19:37.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check -V option. + +. "${srcdir=.}/init.sh" + +run_strace -V > "$LOG" + +getval() +{ + sed -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h +} + +printf "%s -- version %s\n" "$(getval PACKAGE_NAME)" "$(getval VERSION)" > "$EXP" + +match_diff "$EXP" "$LOG" +rm -f "$EXP" diff -Nru strace-4.11/tests-m32/struct_flock.c strace-4.12/tests-m32/struct_flock.c --- strace-4.11/tests-m32/struct_flock.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-m32/struct_flock.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -35,25 +34,31 @@ #define FILE_LEN 4096 #define EINVAL_STR "-1 EINVAL (Invalid argument)" -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg - -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define TEST_FLOCK_EINVAL(cmd) test_flock_einval(cmd, #cmd) +#ifdef HAVE_TYPEOF +# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len) +#else +# define TYPEOF_FLOCK_OFF_T off_t +#endif + +static long +invoke_test_syscall(const unsigned int cmd, void *const p) +{ + const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd; + + return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); +} + static void test_flock_einval(const int cmd, const char *name) { struct_kernel_flock fl = { .l_type = F_RDLCK, - .l_start = (off_t) 0xdefaced1facefeed, - .l_len = (off_t) 0xdefaced2cafef00d + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -69,29 +74,34 @@ .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + long rc = invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK, &fl); + invoke_test_syscall(F_GETLK, &fl); printf("%s(0, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); } -static int +static void create_sample(void) { char fname[] = TEST_SYSCALL_STR "_XXXXXX"; (void) close(0); - return mkstemp(fname) || unlink(fname) || ftruncate(0, FILE_LEN) ? 77 : 0; + if (mkstemp(fname)) + perror_msg_and_fail("mkstemp: %s", fname); + if (unlink(fname)) + perror_msg_and_fail("unlink: %s", fname); + if (ftruncate(0, FILE_LEN)) + perror_msg_and_fail("ftruncate"); } diff -Nru strace-4.11/tests-m32/swap.c strace-4.12/tests-m32/swap.c --- strace-4.11/tests-m32/swap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/swap.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,51 @@ +#include "tests.h" +#include + +#if defined __NR_swapon && defined __NR_swapoff + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "swap.sample"; + long rc; + + rc = syscall(__NR_swapon, sample, 0); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, -1L); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, + "SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE" + "|SWAP_FLAG_DISCARD_PAGES|0xfff80000|32767", + rc, errno2name()); + + rc = syscall(__NR_swapoff, sample); + printf("swapoff(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_swapon && __NR_swapoff") + +#endif diff -Nru strace-4.11/tests-m32/swap.test strace-4.12/tests-m32/swap.test --- strace-4.11/tests-m32/swap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/swap.test 2016-04-06 06:18:50.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check swapon and swapoff syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=swapon,swapoff diff -Nru strace-4.11/tests-m32/symlinkat.c strace-4.12/tests-m32/symlinkat.c --- strace-4.11/tests-m32/symlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/symlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include + +#ifdef __NR_symlinkat + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + static const char oldpath[] = "symlink_old"; + static const char newpath[] = "symlink_new"; + + long rc = syscall(__NR_symlinkat, oldpath, fd, newpath); + printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n", + oldpath, (int) fd, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlinkat") + +#endif diff -Nru strace-4.11/tests-m32/symlinkat.test strace-4.12/tests-m32/symlinkat.test --- strace-4.11/tests-m32/symlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/symlinkat.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/symlink.c strace-4.12/tests-m32/symlink.c --- strace-4.11/tests-m32/symlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/symlink.c 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_symlink + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "symlink_new"; + static const char sample_2[] = "symlink"; + + long rc = syscall(__NR_symlink, sample_1, sample_2); + printf("symlink(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlink") + +#endif diff -Nru strace-4.11/tests-m32/symlink.test strace-4.12/tests-m32/symlink.test --- strace-4.11/tests-m32/symlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/symlink.test 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 diff -Nru strace-4.11/tests-m32/sync.c strace-4.12/tests-m32/sync.c --- strace-4.11/tests-m32/sync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync.c 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sync + +# include +# include + +int +main(void) +{ + printf("sync() = %ld\n", syscall(__NR_sync)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sync") + +#endif diff -Nru strace-4.11/tests-m32/sync_file_range2.c strace-4.12/tests-m32/sync_file_range2.c --- strace-4.11/tests-m32/sync_file_range2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync_file_range2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range2 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range2 + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8, %lld, %lld) = %d %s (%m)\n", + "sync_file_range2", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range2") + +#endif diff -Nru strace-4.11/tests-m32/sync_file_range2.test strace-4.12/tests-m32/sync_file_range2.test --- strace-4.11/tests-m32/sync_file_range2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync_file_range2.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/sync_file_range.c strace-4.12/tests-m32/sync_file_range.c --- strace-4.11/tests-m32/sync_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, %lld, %lld, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8) = %d %s (%m)\n", + "sync_file_range", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range") + +#endif diff -Nru strace-4.11/tests-m32/sync_file_range.test strace-4.12/tests-m32/sync_file_range.test --- strace-4.11/tests-m32/sync_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync_file_range.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/sync.test strace-4.12/tests-m32/sync.test --- strace-4.11/tests-m32/sync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/sync.test 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a7 diff -Nru strace-4.11/tests-m32/sysinfo.c strace-4.12/tests-m32/sysinfo.c --- strace-4.11/tests-m32/sysinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/sysinfo.c 2016-02-08 18:17:28.000000000 +0000 @@ -1,5 +1,8 @@ /* + * This file is part of sysinfo strace test. + * * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +28,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include int -main (void) +main(void) { - struct sysinfo si; - if (sysinfo(&si) == -1) - return 77; + sysinfo(NULL); + printf("sysinfo(NULL) = -1 EFAULT (%m)\n"); + + struct sysinfo * const si = tail_alloc(sizeof(*si)); + + if (sysinfo(si)) + perror_msg_and_skip("sysinfo"); printf("sysinfo({uptime=%llu" ", loads=[%llu, %llu, %llu]" ", totalram=%llu" @@ -46,22 +54,23 @@ ", totalhigh=%llu" ", freehigh=%llu" ", mem_unit=%u" - "}) = 0\n", - (unsigned long long) si.uptime - , (unsigned long long) si.loads[0] - , (unsigned long long) si.loads[1] - , (unsigned long long) si.loads[2] - , (unsigned long long) si.totalram - , (unsigned long long) si.freeram - , (unsigned long long) si.sharedram - , (unsigned long long) si.bufferram - , (unsigned long long) si.totalswap - , (unsigned long long) si.freeswap - , (unsigned) si.procs - , (unsigned long long) si.totalhigh - , (unsigned long long) si.freehigh - , si.mem_unit + "}) = 0\n" + , (unsigned long long) si->uptime + , (unsigned long long) si->loads[0] + , (unsigned long long) si->loads[1] + , (unsigned long long) si->loads[2] + , (unsigned long long) si->totalram + , (unsigned long long) si->freeram + , (unsigned long long) si->sharedram + , (unsigned long long) si->bufferram + , (unsigned long long) si->totalswap + , (unsigned long long) si->freeswap + , (unsigned) si->procs + , (unsigned long long) si->totalhigh + , (unsigned long long) si->freehigh + , si->mem_unit ); + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-m32/sysinfo.test strace-4.12/tests-m32/sysinfo.test --- strace-4.11/tests-m32/sysinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/sysinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of sysinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -esysinfo $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-m32/syslog.c strace-4.12/tests-m32/syslog.c --- strace-4.11/tests-m32/syslog.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/syslog.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_syslog + +# include +# include + +# define SYSLOG_ACTION_READ 2 + +int +main(void) +{ + const long addr = (long) 0xfacefeeddeadbeef; + int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); + printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", + addr, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_syslog") + +#endif diff -Nru strace-4.11/tests-m32/syslog.test strace-4.12/tests-m32/syslog.test --- strace-4.11/tests-m32/syslog.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/syslog.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check syslog syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-m32/tail_alloc.c strace-4.12/tests-m32/tail_alloc.c --- strace-4.11/tests-m32/tail_alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/tail_alloc.c 2016-05-22 22:21:48.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +void * +tail_alloc(const size_t size) +{ + const size_t page_size = get_page_size(); + const size_t len = (size + page_size - 1) & -page_size; + const size_t alloc_size = len + 6 * page_size; + + void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap(%zu)", alloc_size); + + void *start_work = p + 3 * page_size; + void *tail_guard = start_work + len; + + if (munmap(p, page_size) || + munmap(p + 2 * page_size, page_size) || + munmap(tail_guard, page_size) || + munmap(tail_guard + 2 * page_size, page_size)) + perror_msg_and_fail("munmap"); + + memset(start_work, 0xff, len); + return tail_guard - size; +} + +void * +tail_memdup(const void *p, const size_t size) +{ + void *dest = tail_alloc(size); + memcpy(dest, p, size); + return dest; +} diff -Nru strace-4.11/tests-m32/tee.c strace-4.12/tests-m32/tee.c --- strace-4.11/tests-m32/tee.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/tee.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of tee strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_tee + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_tee, fd_in, fd_out, len, flags); + printf("tee(%d, %d, %zu, %s) = %ld %s (%m)\n", + (int) fd_in, (int) fd_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_tee") + +#endif diff -Nru strace-4.11/tests-m32/tee.test strace-4.12/tests-m32/tee.test --- strace-4.11/tests-m32/tee.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/tee.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check tee syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-m32/tests.h strace-4.12/tests-m32/tests.h --- strace-4.11/tests-m32/tests.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/tests.h 2016-05-22 22:54:23.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TESTS_H_ +# define TESTS_H_ + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# include +# include "gcc_compat.h" + +/* Cached sysconf(_SC_PAGESIZE). */ +size_t get_page_size(void); + +/* Print message and strerror(errno) to stderr, then exit(1). */ +void perror_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(1). */ +void error_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(77). */ +void error_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message and strerror(errno) to stderr, then exit(77). */ +void perror_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; + +/* + * Allocate memory that ends on the page boundary. + * Pages allocated by this call are preceeded by an unmapped page + * and followed also by an unmapped page. + */ +void *tail_alloc(const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); +/* Allocate memory using tail_alloc, then memcpy. */ +void *tail_memdup(const void *, const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); + +/* Close stdin, move stdout to a non-standard descriptor, and print. */ +void tprintf(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)); + +/* Make a hexdump copy of C string */ +const char *hexdump_strdup(const char *); + +/* Make a hexdump copy of memory */ +const char *hexdump_memdup(const char *, size_t); + +/* Make a hexquoted copy of a string */ +const char *hexquote_strndup(const char *, size_t); + +/* Return inode number of socket descriptor. */ +unsigned long inode_of_sockfd(int); + +/* Print string in a quoted form. */ +void print_quoted_string(const char *); + +/* Print memory in a quoted form. */ +void print_quoted_memory(const char *, size_t); + +/* Check whether given uid matches kernel overflowuid. */ +void check_overflowuid(const int); + +/* Check whether given gid matches kernel overflowgid. */ +void check_overflowgid(const int); + +/* Translate errno to its name. */ +const char *errno2name(void); + +struct xlat; + +/* Print flags in symbolic form according to xlat table. */ +int printflags(const struct xlat *, const unsigned long long, const char *); + +/* Print constant in symbolic form according to xlat table. */ +int printxval(const struct xlat *, const unsigned long long, const char *); + +# define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) +# define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) + +# define SKIP_MAIN_UNDEFINED(arg) \ + int main(void) { error_msg_and_skip("undefined: %s", arg); } + +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +# if SIZEOF_LONG == 4 +# define PRI__64 "ll" +# elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +# else +# define PRI__64 "ll" +# endif + +# define PRI__d64 PRI__64"d" +# define PRI__u64 PRI__64"u" +# define PRI__x64 PRI__64"x" + +#endif diff -Nru strace-4.11/tests-m32/time.c strace-4.12/tests-m32/time.c --- strace-4.11/tests-m32/time.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/time.c 2016-02-08 18:27:17.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of time strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +27,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_time +# include +# include +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; + time_t *p = tail_alloc(sizeof(time_t)); - time_t *p_t = p + page_len - sizeof(time_t); - time_t t = syscall(__NR_time, p_t); + time_t t = syscall(__NR_time, NULL); + if ((time_t) -1 == t) + perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); - if ((time_t) -1 == t || t != *p_t) - return 77; - - printf("time([%jd]) = %jd\n", (intmax_t) t, (intmax_t) t); + t = syscall(__NR_time, p); + printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_time") #endif diff -Nru strace-4.11/tests-m32/timer_create.c strace-4.12/tests-m32/timer_create.c --- strace-4.11/tests-m32/timer_create.c 2015-09-17 13:22:57.000000000 +0000 +++ strace-4.12/tests-m32/timer_create.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_create strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,45 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_timer_create +# include +# include +# include +# include +# include "sigevent.h" + int main(void) { + syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + int tid[4] = {}; - struct sigevent sev = { - .sigev_notify = SIGEV_NONE, + struct_sigevent sev = { + .sigev_notify = 0xdefaced, .sigev_signo = 0xfacefeed, - .sigev_value.sival_ptr = - (void *) (unsigned long) 0xdeadbeefbadc0ded + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded }; + syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}" + ", NULL) = -1 %s (%m)\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, sev.sigev_notify, + errno2name()); + + sev.sigev_notify = SIGEV_NONE; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" - ", sigev_signo=%u, sigev_notify=SIGEV_NONE}" - ", [%d]) = 0\n", + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, sev.sigev_signo, tid[0]); @@ -60,55 +73,43 @@ sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGALRM; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, tid[1]); sev.sigev_notify = SIGEV_THREAD; - sev.sigev_notify_function = - (void *) (unsigned long) 0xdeadbeefbadc0ded; - sev.sigev_notify_attributes = - (void *) (unsigned long) 0xcafef00dfacefeed; + sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded; + sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" - ", sigev_notify_function=%p, sigev_notify_attributes=%p}" + ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_function, - sev.sigev_notify_attributes, + sev.sigev_un.sigev_thread.function, + sev.sigev_un.sigev_thread.attribute, tid[2]); -#ifndef sigev_notify_thread_id -# if defined HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD -# define sigev_notify_thread_id _sigev_un._pad[0] -# elif defined HAVE_STRUCT_SIGEVENT___PAD -# define sigev_notify_thread_id __pad[0] -# endif -#endif /* !sigev_notify_thread_id */ - -#ifdef sigev_notify_thread_id -# ifndef SIGEV_THREAD_ID -# define SIGEV_THREAD_ID 4 -# endif +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif sev.sigev_notify = SIGEV_THREAD_ID; - sev.sigev_notify_thread_id = getpid(); + sev.sigev_un.tid = getpid(); if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID" ", sigev_notify_thread_id=%d}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_thread_id, + sev.sigev_un.tid, tid[3]); -#endif /* sigev_notify_thread_id */ puts("+++ exited with 0 +++"); return 0; @@ -116,10 +117,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create") #endif diff -Nru strace-4.11/tests-m32/timer_create.test strace-4.12/tests-m32/timer_create.test --- strace-4.11/tests-m32/timer_create.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/timer_create.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check timer_create syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e timer_create $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/timerfd_xettime.c strace-4.12/tests-m32/timerfd_xettime.c --- strace-4.11/tests-m32/timerfd_xettime.c 2015-09-17 23:23:41.000000000 +0000 +++ strace-4.12/tests-m32/timerfd_xettime.c 2016-01-06 09:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #include #if defined __NR_timerfd_create \ @@ -41,12 +34,17 @@ && defined __NR_timerfd_settime \ && defined O_CLOEXEC +# include +# include +# include +# include + int main(void) { (void) close(0); if (syscall(__NR_timerfd_create, CLOCK_MONOTONIC, O_CLOEXEC | O_NONBLOCK)) - return 77; + perror_msg_and_skip("timerfd_create"); puts("timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 0"); struct { @@ -63,7 +61,7 @@ }; if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timerfd_settime"); printf("timerfd_settime(0, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -78,7 +76,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timerfd_gettime, 0, &old.its)) - return 77; + perror_msg_and_skip("timerfd_gettime"); printf("timerfd_gettime(0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -93,10 +91,7 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timerfd_create && __NR_timerfd_gettime" + " && __NR_timerfd_settime && O_CLOEXEC") #endif diff -Nru strace-4.11/tests-m32/timerfd_xettime.test strace-4.12/tests-m32/timerfd_xettime.test --- strace-4.11/tests-m32/timerfd_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/timerfd_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timerfd_create,timerfd_settime,timerfd_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime diff -Nru strace-4.11/tests-m32/timer_xettime.c strace-4.12/tests-m32/timer_xettime.c --- strace-4.11/tests-m32/timer_xettime.c 2015-09-17 23:22:43.000000000 +0000 +++ strace-4.12/tests-m32/timer_xettime.c 2016-02-08 18:28:36.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_xettime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +27,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #if defined __NR_timer_create \ && defined __NR_timer_gettime \ && defined __NR_timer_settime +# include +# include +# include +# include +# include + int main(void) { + syscall(__NR_timer_settime, 0xdefaced, TIMER_ABSTIME, NULL, NULL); + printf("timer_settime(%d, TIMER_ABSTIME, NULL, NULL)" + " = -1 EINVAL (%m)\n", 0xdefaced); + int tid; struct sigevent sev = { .sigev_notify = SIGEV_NONE }; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid)) - return 77; + perror_msg_and_skip("timer_create"); printf("timer_create(CLOCK_MONOTONIC, {sigev_signo=0" ", sigev_notify=SIGEV_NONE}, [%d]) = 0\n", tid); @@ -65,7 +69,7 @@ }; if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timer_settime"); printf("timer_settime(%d, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -81,7 +85,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timer_gettime, tid, &old.its)) - return 77; + perror_msg_and_skip("timer_gettime"); printf("timer_gettime(%d" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -97,10 +101,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create && __NR_timer_gettime && __NR_timer_settime") #endif diff -Nru strace-4.11/tests-m32/timer_xettime.test strace-4.12/tests-m32/timer_xettime.test --- strace-4.11/tests-m32/timer_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/timer_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check timer_settime and timer_gettime syscalls decoding. +# Check timer_create, timer_settime, and timer_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timer_create,timer_settime,timer_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime diff -Nru strace-4.11/tests-m32/times.c strace-4.12/tests-m32/times.c --- strace-4.11/tests-m32/times.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/times.c 2016-01-12 05:06:10.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Eugene Syromyatnikov - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,10 +32,7 @@ * get some non-zero values returned by times(2). */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -55,13 +52,12 @@ main (void) { struct timespec ts; - volatile int dummy; + volatile int dummy = 0; int i; pid_t pid = fork(); - if (pid < 0) - return 77; + perror_msg_and_fail("fork"); const long cputime_limit = pid ? PARENT_CPUTIME_LIMIT_NSEC : CHILD_CPUTIME_LIMIT_NSEC; @@ -108,7 +104,7 @@ long res = syscall(__NR_times, &tbuf); if (-1L == res) - return 77; + perror_msg_and_skip("times"); else llres = (unsigned long) res; #elif defined __NR_times && defined __x86_64__ && defined __ILP32__ @@ -123,7 +119,7 @@ clock_t res = times(&tbuf); if ((clock_t) -1 == res) - return 77; + perror_msg_and_skip("times"); if (sizeof(res) < sizeof(unsigned long long)) llres = (unsigned long) res; else diff -Nru strace-4.11/tests-m32/times-fail.c strace-4.12/tests-m32/times-fail.c --- strace-4.11/tests-m32/times-fail.c 2015-08-28 08:46:24.000000000 +0000 +++ strace-4.12/tests-m32/times-fail.c 2016-01-04 23:43:09.000000000 +0000 @@ -1,7 +1,5 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -9,9 +7,8 @@ int main (void) { - if (syscall(__NR_times, 0x42) != -1) - return 77; - puts("times(0x42) = -1 EFAULT (Bad address)"); + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests-m32/times-fail.test strace-4.12/tests-m32/times-fail.test --- strace-4.11/tests-m32/times-fail.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/times-fail.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of failing times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a12 -etimes $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a12 -e trace=times diff -Nru strace-4.11/tests-m32/times.test strace-4.12/tests-m32/times.test --- strace-4.11/tests-m32/times.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/times.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etimes -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-m32/time.test strace-4.12/tests-m32/time.test --- strace-4.11/tests-m32/time.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/time.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check time syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a10 -etime $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/tprintf.c strace-4.12/tests-m32/tprintf.c --- strace-4.11/tests-m32/tprintf.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/tprintf.c 2016-01-20 15:17:28.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * Close stdin, move stdout to a non-standard descriptor, and print. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static ssize_t +write_retry(int fd, const void *buf, size_t count) +{ + ssize_t rc; + + do { + errno = 0; + rc = write(fd, buf, count); + } while (rc == -1 && EINTR == errno); + + if (rc <= 0) + perror_msg_and_fail("write"); + + return rc; +} + +static void +write_loop(int fd, const char *buf, size_t count) +{ + ssize_t offset = 0; + + while (count > 0) { + ssize_t block = write_retry(fd, &buf[offset], count); + + offset += block; + count -= (size_t) block; + } +} + +void +tprintf(const char *fmt, ...) +{ + static int initialized; + if (!initialized) { + assert(dup2(1, 3) == 3); + assert(close(1) == 0); + (void) close(0); + initialized = 1; + } + + va_list p; + va_start(p, fmt); + + static char buf[65536]; + int len = vsnprintf(buf, sizeof(buf), fmt, p); + if (len < 0) + perror_msg_and_fail("vsnprintf"); + assert((unsigned) len < sizeof(buf)); + + write_loop(3, buf, len); + + va_end(p); +} diff -Nru strace-4.11/tests-m32/truncate64.c strace-4.12/tests-m32/truncate64.c --- strace-4.11/tests-m32/truncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/truncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate64 -#include -#include -#include +# include +# include int main(void) @@ -43,13 +39,10 @@ static const char fname[] = "truncate64\nfilename"; static const char qname[] = "truncate64\\nfilename"; const off_t len = 0xdefaceddeadbeef; - int rc = truncate(fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate64(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + int rc = truncate(fname, len); + printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -57,10 +50,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate64") #endif diff -Nru strace-4.11/tests-m32/truncate64.test strace-4.12/tests-m32/truncate64.test --- strace-4.11/tests-m32/truncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests-m32/truncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/truncate.c strace-4.12/tests-m32/truncate.c --- strace-4.11/tests-m32/truncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/truncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +25,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) @@ -45,18 +40,15 @@ static const char fname[] = "truncate\nfilename"; static const char qname[] = "truncate\\nfilename"; const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = truncate(fname, len); else rc = syscall(__NR_truncate, fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + printf("truncate(\"%s\", %llu) = %ld %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -64,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate") #endif diff -Nru strace-4.11/tests-m32/truncate.test strace-4.12/tests-m32/truncate.test --- strace-4.11/tests-m32/truncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests-m32/truncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-m32/uid16.c strace-4.12/tests-m32/uid16.c --- strace-4.11/tests-m32/uid16.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/uid16.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) \ - \ - && defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) \ - \ - && __NR_getuid != __NR_getuid32 \ - && __NR_setuid != __NR_setuid32 \ - && __NR_getresuid != __NR_getresuid32 \ - && __NR_setreuid != __NR_setreuid32 \ - && __NR_setresuid != __NR_setresuid32 \ - && __NR_fchown != __NR_fchown32 \ - && __NR_getgroups != __NR_getgroups32 \ - /**/ - int uid; - int size; - int *list = 0; - - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, 0xffff) == 0); - assert(syscall(__NR_setresuid, uid, -1, 0xffff) == 0); - assert(syscall(__NR_fchown, 1, -1, 0xffff) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-m32/uid16.test strace-4.12/tests-m32/uid16.test --- strace-4.11/tests-m32/uid16.test 2014-12-16 01:07:12.000000000 +0000 +++ strace-4.12/tests-m32/uid16.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid16_t decoding. - -uid_t_size=16 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests-m32/uid32.c strace-4.12/tests-m32/uid32.c --- strace-4.11/tests-m32/uid32.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/uid32.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) - int r, e, s; - int size; - int *list = 0; - - r = syscall(__NR_getuid32); - assert(syscall(__NR_setuid32, r) == 0); - assert(syscall(__NR_getresuid32, &r, &e, &s) == 0); - assert(syscall(__NR_setreuid32, -1, -1L) == 0); - assert(syscall(__NR_setresuid32, r, -1, -1L) == 0); - assert(syscall(__NR_fchown32, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups32, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups32, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-m32/uid32.test strace-4.12/tests-m32/uid32.test --- strace-4.11/tests-m32/uid32.test 2014-12-14 03:54:04.000000000 +0000 +++ strace-4.12/tests-m32/uid32.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid32 decoding. - -uid_syscall_suffix=32 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests-m32/uid.awk strace-4.12/tests-m32/uid.awk --- strace-4.11/tests-m32/uid.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/uid.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - r_uint = "(0|[1-9][0-9]*)" - regexp = "^getx?uid" suffix "\\(\\)[[:space:]]+= " r_uint "$" - expected = "getuid" - fail = 0 -} - -regexp == "" { - fail = 1 - next -} - -{ - if (match($0, regexp, a)) { - if (expected == "getuid") { - uid = a[1] - expected = "setuid" - regexp = "^setuid" suffix "\\(" uid "\\)[[:space:]]+= 0$" - } else if (expected == "setuid") { - expected = "getresuid" - regexp = "^getresuid" suffix "\\(\\[" uid "\\], \\[" uid "\\], \\[" uid "\\]\\)[[:space:]]+= 0$" - } else if (expected == "getresuid") { - expected = "setreuid" - regexp = "^setreuid" suffix "\\(-1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setreuid") { - expected = "setresuid" - regexp = "^setresuid" suffix "\\(" uid ", -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setresuid") { - expected = "fchown" - regexp = "^fchown" suffix "\\(1, -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "fchown") { - expected = "1st getgroups" - regexp = "^getgroups" suffix "\\(0, NULL\\)[[:space:]]+= " r_uint "$" - } else if (expected == "1st getgroups") { - ngroups = a[1] - if (ngroups == "0") - list="" - else if (ngroups == "1") - list=r_uint - else - list=r_uint "(, " r_uint "){" (ngroups - 1) "}" - expected = "2nd getgroups" - regexp = "^getgroups" suffix "\\(" ngroups ", \\[" list "\\]\\)[[:space:]]+= " ngroups "$" - } else if (expected == "2nd getgroups") { - expected = "the last line" - regexp = "^\\+\\+\\+ exited with 0 \\+\\+\\+$" - } else if (expected == "the last line") { - expected = "nothing" - regexp = "" - } - } -} - -END { - if (fail) { - print "Unexpected output after exit" - exit 1 - } - if (regexp == "") - exit 0 - print "error: " expected " doesn't match" - exit 1 -} diff -Nru strace-4.11/tests-m32/uid.c strace-4.12/tests-m32/uid.c --- strace-4.11/tests-m32/uid.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/uid.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if (defined __NR_getuid || defined __NR_getxuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) - int uid; - int size; - int *list = 0; - -#ifndef __NR_getuid -# define __NR_getuid __NR_getxuid -#endif - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - (void) close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, -1L) == 0); - assert(syscall(__NR_setresuid, uid, -1, -1L) == 0); - assert(syscall(__NR_fchown, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-m32/uid.test strace-4.12/tests-m32/uid.test --- strace-4.11/tests-m32/uid.test 2015-07-16 22:13:56.000000000 +0000 +++ strace-4.12/tests-m32/uid.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/sh - -# Check uid decoding. - -. "${srcdir=.}/init.sh" - -s="${uid_syscall_suffix-}" -w="${uid_t_size-}" - -run_prog ./uid$s$w - -syscalls= -for n in "getuid$s" "getxuid$s"; do - if $STRACE -e "$n" -h > /dev/null; then - syscalls="$n" - break - fi -done -test -n "$syscalls" || - fail_ "neither getuid$s nor getxuid$s is supported on this architecture" - -syscalls="$syscalls,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s" -run_strace -e trace="$syscalls" $args - -AWK=gawk -match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s" - -exit 0 diff -Nru strace-4.11/tests-m32/uio.c strace-4.12/tests-m32/uio.c --- strace-4.11/tests-m32/uio.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/uio.c 2016-01-06 11:31:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include +#include "tests.h" + +#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) + +# include +# include +# include +# include int main(void) { -#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) const off_t offset = 0xdefaceddeadbeefLL; char buf[4]; struct iovec iov = { buf, sizeof buf }; @@ -53,7 +53,10 @@ assert(!close(0)); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + #endif -} diff -Nru strace-4.11/tests-m32/umask.c strace-4.12/tests-m32/umask.c --- strace-4.11/tests-m32/umask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/umask.c 2016-03-01 08:55:37.000000000 +0000 @@ -0,0 +1,12 @@ +#include +#include + +int +main(void) +{ + mode_t rc = umask(044); + printf("umask(%#o) = %#o\n", 044, rc); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/umask.test strace-4.12/tests-m32/umask.test --- strace-4.11/tests-m32/umask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/umask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check umask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests-m32/umount2.c strace-4.12/tests-m32/umount2.c --- strace-4.11/tests-m32/umount2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/umount2.c 2016-01-06 00:05:41.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -42,14 +43,13 @@ main(void) { static const char sample[] = "umount2.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); (void) syscall(__NR_umount2, sample, 31); printf("%s(\"%s\", MNT_FORCE|MNT_DETACH|MNT_EXPIRE|UMOUNT_NOFOLLOW|0x10)" " = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, sample); - (void) rmdir(sample); + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-m32/umount2.test strace-4.12/tests-m32/umount2.test --- strace-4.11/tests-m32/umount2.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests-m32/umount2.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha|ia64) syscall=umount ;; *) syscall=umount2 ;; esac -OUT="$LOG.out" -run_strace -s7 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -s7 -e trace=$syscall diff -Nru strace-4.11/tests-m32/umount.c strace-4.12/tests-m32/umount.c --- strace-4.11/tests-m32/umount.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/umount.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +25,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include -#include #include #include #include +#include #ifdef __NR_oldumount # define TEST_SYSCALL_STR "oldumount" @@ -41,31 +41,28 @@ # endif #endif +#ifdef __NR_oldumount + int main(void) { -#ifdef __NR_oldumount static const char sample[] = "umount.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } - (void) syscall(__NR_oldumount, sample); - printf("%s(\"%s\") = -1 ", TEST_SYSCALL_STR, sample); - switch (errno) { - case ENOSYS: - printf("ENOSYS (%m)\n"); - break; - case EPERM: - printf("EPERM (%m)\n"); - break; - default: - printf("EINVAL (%m)\n"); - } - (void) rmdir(sample); + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + + long rc = syscall(__NR_oldumount, sample); + printf("%s(\"%s\") = %ld %s (%m)\n", + TEST_SYSCALL_STR, sample, rc, errno2name()); + + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_oldumount") + #endif -} diff -Nru strace-4.11/tests-m32/umount.test strace-4.12/tests-m32/umount.test --- strace-4.11/tests-m32/umount.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests-m32/umount.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha) syscall=oldumount ;; *) syscall=umount ;; esac -OUT="$LOG.out" -run_strace -a24 -s6 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -s6 -e trace=$syscall diff -Nru strace-4.11/tests-m32/umovestr2.c strace-4.12/tests-m32/umovestr2.c --- strace-4.11/tests-m32/umovestr2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/umovestr2.c 2016-01-05 23:24:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,33 +25,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - const size_t work_len = page_len * 2; - const size_t tail_len = work_len - 1; - - void *p = mmap(NULL, page_len * 3, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + work_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, work_len); - char *addr = p + work_len - tail_len; - memset(addr, '0', tail_len - 1); + const size_t page_len = get_page_size(); + const size_t tail_len = page_len * 2 - 1; + const size_t str_len = tail_len - 1; + + char *addr = tail_alloc(tail_len); + memset(addr, '0', str_len); + addr[str_len] = '\0'; char *argv[] = { NULL }; char *envp[] = { addr, NULL }; execve("", argv, envp); - printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (No such file or directory)\n", - (int) tail_len - 1, 0); + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (%m)\n", + (int) str_len, 0); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests-m32/umovestr2.test strace-4.12/tests-m32/umovestr2.test --- strace-4.11/tests-m32/umovestr2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/umovestr2.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,9 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" -EXP="$LOG.exp" - run_prog > /dev/null run_strace -veexecve -s262144 $args > "$EXP" check_prog sed diff -Nru strace-4.11/tests-m32/umovestr3.c strace-4.12/tests-m32/umovestr3.c --- strace-4.11/tests-m32/umovestr3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/umovestr3.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const unsigned int size = PATH_MAX - 1; + const char *p = tail_alloc(size); + const char *const efault = p + size; + + for (; p <= efault; ++p) { + int rc = chdir(p); + printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/umovestr3.test strace-4.12/tests-m32/umovestr3.test --- strace-4.11/tests-m32/umovestr3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/umovestr3.test 2016-04-27 01:32:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# yet another umovestr short read test + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 -e trace=chdir diff -Nru strace-4.11/tests-m32/umovestr.c strace-4.12/tests-m32/umovestr.c --- strace-4.11/tests-m32/umovestr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/umovestr.c 2016-01-05 23:24:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const size_t tail_len = 257; - - if (tail_len >= page_len) - return 77; - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, page_len); - char *addr = p + page_len - tail_len; + char *addr = tail_alloc(tail_len); memset(addr, '/', tail_len - 1); + addr[tail_len - 1] = '\0'; if (chdir(addr)) - return 77; - + perror_msg_and_skip("chdir"); return 0; } diff -Nru strace-4.11/tests-m32/uname.c strace-4.12/tests-m32/uname.c --- strace-4.11/tests-m32/uname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/uname.c 2016-03-28 23:25:30.000000000 +0000 @@ -0,0 +1,44 @@ +#include "tests.h" +#include + +#ifdef __NR_uname + +# include +# include +# include + +int main(int ac, char **av) +{ + int abbrev = ac > 1; + struct utsname *const uname = tail_alloc(sizeof(struct utsname)); + int rc = syscall(__NR_uname, uname); + printf("uname({sysname=\""); + print_quoted_string(uname->sysname); + printf("\", nodename=\""); + print_quoted_string(uname->nodename); + if (abbrev) { + printf("\", ..."); + } else { + printf("\", release=\""); + print_quoted_string(uname->release); + printf("\", version=\""); + print_quoted_string(uname->version); + printf("\", machine=\""); + print_quoted_string(uname->machine); +# ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + printf("\", domainname=\""); + print_quoted_string(uname->domainname); +# endif + printf("\""); + } + printf("}) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_uname") + +#endif diff -Nru strace-4.11/tests-m32/uname.test strace-4.12/tests-m32/uname.test --- strace-4.11/tests-m32/uname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/uname.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check uname syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq + +run_prog > /dev/null +run_strace -v -euname $args > "$EXP" +uniq < "$LOG" > "$OUT" + +run_prog "./$NAME" abbrev > /dev/null +run_strace -euname $args >> "$EXP" +uniq < "$LOG" >> "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests-m32/unix-pair-send-recv.c strace-4.12/tests-m32/unix-pair-send-recv.c --- strace-4.11/tests-m32/unix-pair-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/unix-pair-send-recv.c 2016-01-05 23:02:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -54,12 +55,12 @@ (void) close(1); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); - assert(sv[0] == 0); - assert(sv[1] == 1); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(close(1) == 0); diff -Nru strace-4.11/tests-m32/unix-yy-accept.awk strace-4.12/tests-m32/unix-yy-accept.awk --- strace-4.11/tests-m32/unix-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/unix-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 8 - fail = 0 - - addrlen = length(addr) + 3 - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode_listen = a[2] - r_bind = "^bind\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, \\[" addrlen "\\]\\) += 0$" - r_accept = "^accept\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), NULL\\}, \\[2\\]\\) += 1(" r_i "),\"" addr "\"\\]>" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 {if (r_getsockname != "" && match($0, r_getsockname)) next} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a)) { - inode_accepted = a[2] - inode_peer = a[3] - r_close_listen = "^close\\(0\\) += 0$" - r_close_accepted = "^close\\(1\\) += 0$" - next - } -} - -NR == 6 {if (r_close_listen != "" && match($0, r_close_listen)) next} -NR == 7 {if (r_close_accepted != "" && match($0, r_close_accepted)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-m32/unix-yy-connect.awk strace-4.12/tests-m32/unix-yy-connect.awk --- strace-4.11/tests-m32/unix-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/unix-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 6 - fail = 0 - addrlen = length(addr) + 3 - - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 1$" - r_close_listen = "^close\\(0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[2] - r_connect = "^connect\\(1, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - next - } -} - -NR == 2 {if (match($0, r_close_listen)) next} - -NR == 3 { - if (r_connect != "" && match($0, r_connect)) { - r_close_connected = "^close\\(1" r_i "\\]>\\) += 0$" - next - } -} - -NR == 4 && /^--- SIGUSR1 / {next} - -NR == 5 { - if (inode != "" && r_close_connected != "" && match($0, r_close_connected, a) && a[1] == inode) { - next - } -} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-m32/unix-yy.test strace-4.12/tests-m32/unix-yy.test --- strace-4.11/tests-m32/unix-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/unix-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -#!/bin/sh -# -# Check decoding of address information (inode[->peer][,path]) -# associated with unix domain socket descriptors. -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_unix_diag -addr=unix-yy-local-stream -run_prog ./net-accept-connect $addr -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/unix-yy-connect.awk "$STRACE $args connect output mismatch" -v addr=$addr -match_awk "$LOG-accept" "$srcdir"/unix-yy-accept.awk "$STRACE $args accept output mismatch" -v addr=$addr - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests-m32/unlinkat.c strace-4.12/tests-m32/unlinkat.c --- strace-4.11/tests-m32/unlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/unlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_unlinkat + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlinkat_sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_unlinkat, fd, sample, 0); + printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlinkat") + +#endif diff -Nru strace-4.11/tests-m32/unlinkat.test strace-4.12/tests-m32/unlinkat.test --- strace-4.11/tests-m32/unlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/unlinkat.test 2016-04-06 06:18:49.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests-m32/unlink.c strace-4.12/tests-m32/unlink.c --- strace-4.11/tests-m32/unlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/unlink.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_unlink + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlink_sample"; + + long rc = syscall(__NR_unlink, sample); + printf("unlink(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlink") + +#endif diff -Nru strace-4.11/tests-m32/unlink.test strace-4.12/tests-m32/unlink.test --- strace-4.11/tests-m32/unlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/unlink.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-m32/userfaultfd.c strace-4.12/tests-m32/userfaultfd.c --- strace-4.11/tests-m32/userfaultfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/userfaultfd.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" #include -#include -#include #include +#if defined __NR_userfaultfd && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_userfaultfd && defined O_CLOEXEC - if (syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC) != -1) - return 77; - printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC); + printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = %ld %s (%m)\n", + rc, errno2name()); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-m32/userfaultfd.test strace-4.12/tests-m32/userfaultfd.test --- strace-4.11/tests-m32/userfaultfd.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/userfaultfd.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check userfaultfd syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a38 -euserfaultfd $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a38 diff -Nru strace-4.11/tests-m32/utime.c strace-4.12/tests-m32/utime.c --- strace-4.11/tests-m32/utime.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/utime.c 2016-02-08 18:18:05.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +27,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include #include static void -print_tm(struct tm *p) +print_tm(const struct tm * const p) { printf("%02d/%02d/%02d-%02d:%02d:%02d", p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, @@ -41,16 +45,23 @@ int main(void) { - time_t t = time(NULL); - struct utimbuf u = { .actime = t, .modtime = t }; - struct tm *p = localtime(&t); + utime("", NULL); + printf("utime(\"\", NULL) = -1 ENOENT (%m)\n"); + + const time_t t = time(NULL); + const struct tm * const p = localtime(&t); + const struct utimbuf u = { .actime = t, .modtime = t }; + const struct utimbuf const *tail_u = tail_memdup(&u, sizeof(u)); printf("utime(\"utime\\nfilename\", ["); print_tm(p); printf(", "); print_tm(p); - puts("]) = -1 ENOENT (No such file or directory)"); + printf("]) = -1 ENOENT "); + assert(utime("utime\nfilename", tail_u) == -1); + if (ENOENT != errno) + perror_msg_and_skip("utime"); + printf("(%m)\n"); puts("+++ exited with 0 +++"); - - return utime("utime\nfilename", &u) == -1 && errno == ENOENT ? 0 : 77; + return 0; } diff -Nru strace-4.11/tests-m32/utimensat.c strace-4.12/tests-m32/utimensat.c --- strace-4.11/tests-m32/utimensat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/utimensat.c 2016-02-08 18:27:59.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utimensat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +27,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" +#include +#include #include +#include #include #include #include @@ -48,47 +49,52 @@ int main(void) { + static const char fname[] = "utimensat\nfilename"; + + assert(utimensat(AT_FDCWD, fname, NULL, 0) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + + #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", " + printf(PREFIX "NULL, 0) = -1 ENOENT (%m)\n"); + struct timeval tv; struct timespec ts[2]; if (gettimeofday(&tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); ts[0].tv_sec = tv.tv_sec; ts[0].tv_nsec = tv.tv_usec; ts[1].tv_sec = tv.tv_sec - 1; ts[1].tv_nsec = tv.tv_usec + 1; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; - #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", [" - - printf(PREFIX); + printf(PREFIX "["); print_ts(&ts[0]); printf(", "); print_ts(&ts[1]); - puts("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); + printf("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT "); + + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf("(%m)\n"); ts[0].tv_nsec = UTIME_NOW; ts[1].tv_nsec = UTIME_OMIT; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf(PREFIX "[UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW)" + " = -1 ENOENT (%m)\n"); - printf(PREFIX); - puts("UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); puts("+++ exited with 0 +++"); - return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_UTIMENSAT && AT_FDCWD && AT_SYMLINK_NOFOLLOW" + " && UTIME_NOW && UTIME_OMIT") #endif diff -Nru strace-4.11/tests-m32/utimensat.test strace-4.12/tests-m32/utimensat.test --- strace-4.11/tests-m32/utimensat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/utimensat.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e utimensat $args > "$OUT" check_prog grep diff -Nru strace-4.11/tests-m32/utimes.c strace-4.12/tests-m32/utimes.c --- strace-4.11/tests-m32/utimes.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/utimes.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Check decoding of utimes syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utimes + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "utimes_sample"; + + long rc = syscall(__NR_utimes, sample, 0); + printf("utimes(\"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, %p) = %ld %s (%m)\n", + ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_utimes, "", ts); + printf("utimes(\"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utimes") + +#endif diff -Nru strace-4.11/tests-m32/utimes.test strace-4.12/tests-m32/utimes.test --- strace-4.11/tests-m32/utimes.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/utimes.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check utimes syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-m32/utime.test strace-4.12/tests-m32/utime.test --- strace-4.11/tests-m32/utime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/utime.test 2016-03-30 00:13:37.000000000 +0000 @@ -7,9 +7,8 @@ $STRACE -e utime -h > /dev/null || skip_ 'utime syscall is not supported on this architecture' -OUT="$LOG.out" run_prog > /dev/null -run_strace -e utime $args > "$OUT" +run_strace -a 16 -e utime $args > "$OUT" check_prog grep LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || { diff -Nru strace-4.11/tests-m32/vfork-f.c strace-4.12/tests-m32/vfork-f.c --- strace-4.11/tests-m32/vfork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vfork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "vfork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) { + if (read(0, &ac, sizeof(int))) + return 2; + return logit("exec"); + } + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(child_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + int parent_wait_fds[2]; + if (pipe(parent_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(parent_wait_fds[0], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + if (fcntl(parent_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + char *const args[] = { av[0], (char *) "", NULL }; + pid_t pid = vfork(); + + if (pid < 0) + perror_msg_and_fail("vfork"); + + if (!pid) { + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + close(parent_wait_fds[1]); + + if (read(parent_wait_fds[0], &parent_wait_fds[1], sizeof(int))) + perror_msg_and_fail("read"); + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + pid, prefix, + ppid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests-m32/vfork-f.test strace-4.12/tests-m32/vfork-f.test --- strace-4.11/tests-m32/vfork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vfork-f.test 2015-12-30 23:08:32.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check how strace -f follows vfork syscall. + +. "${srcdir=.}/fork-f.test" diff -Nru strace-4.11/tests-m32/vhangup.c strace-4.12/tests-m32/vhangup.c --- strace-4.11/tests-m32/vhangup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vhangup.c 2016-05-24 20:12:25.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_vhangup + +# include +# include + +int +main(void) +{ + if (setsid() == -1) + perror_msg_and_skip("setsid"); + + long rc = syscall(__NR_vhangup); + printf("vhangup() = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vhangup") + +#endif diff -Nru strace-4.11/tests-m32/vhangup.test strace-4.12/tests-m32/vhangup.test --- strace-4.11/tests-m32/vhangup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vhangup.test 2016-05-24 20:09:16.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check vhangup syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-m32/vmsplice.c strace-4.12/tests-m32/vmsplice.c --- strace-4.11/tests-m32/vmsplice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vmsplice.c 2016-02-14 00:36:38.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * This file is part of vmsplice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_vmsplice + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *iov = tail_memdup(iov_, sizeof(iov_)); + const unsigned int len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + tprintf("vmsplice(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, %s) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_), + "SPLICE_F_NONBLOCK", len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const long rc = syscall(__NR_vmsplice, 1, iov, ARRAY_SIZE(iov_), 2); + if (rc < 0) + perror_msg_and_skip("vmsplice"); + assert(rc == (int) len); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vmsplice") + +#endif diff -Nru strace-4.11/tests-m32/vmsplice.test strace-4.12/tests-m32/vmsplice.test --- strace-4.11/tests-m32/vmsplice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/vmsplice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of vmsplice syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -ewrite=1 diff -Nru strace-4.11/tests-m32/wait.c strace-4.12/tests-m32/wait.c --- strace-4.11/tests-m32/wait.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/wait.c 2016-01-06 11:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -46,10 +43,13 @@ (void) close(0); (void) close(1); - assert(!pipe(fds) && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { char c; (void) close(1); @@ -67,16 +67,20 @@ assert(WIFEXITED(s) && WEXITSTATUS(s) == 42); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { (void) raise(SIGUSR1); - return 77; + return 1; } assert(wait4(pid, &s, __WALL, NULL) == pid); assert(WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { raise(SIGSTOP); return 0; diff -Nru strace-4.11/tests-m32/xattr.c strace-4.12/tests-m32/xattr.c --- strace-4.11/tests-m32/xattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/xattr.c 2016-05-22 22:29:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,30 +25,124 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_SYS_XATTR_H + +# include +# include # include +# ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +# endif + int main(void) { -#define NAME "strace.test" -#define VALUE "foo\0bar" - if (!removexattr(".", NAME) || - !setxattr(".", NAME, VALUE, sizeof(VALUE), XATTR_CREATE)) - return 77; + static const char name[] = "strace.test"; + static const char c_value[] = "foo\0bar"; + static const char q_value[] = "foo\\0bar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + char *const efault = tail_alloc(1) + 1; + const char *const value = tail_memdup(c_value, sizeof(c_value) - 1); + char *const big = tail_alloc(XATTR_SIZE_MAX + 1); + + assert(fsetxattr(-1, 0, 0, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, NULL, 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, 0, z_value, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, \"\", 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, name, big, XATTR_SIZE_MAX + 1, XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value), XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value) - 1, XATTR_CREATE|XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_CREATE|XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(setxattr(".", name, z_value, sizeof(c_value), XATTR_CREATE) == -1); + printf("setxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(lsetxattr(".", name, value, sizeof(c_value) - 1, XATTR_CREATE) == -1); + printf("lsetxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(fgetxattr(-1, name, efault, 4) == -1); + printf("fgetxattr(-1, \"%s\", %p, 4) = -1 %s (%m)\n", + name, efault, errno2name()); + + assert(getxattr(".", name, big, XATTR_SIZE_MAX + 1) == -1); + printf("getxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(lgetxattr(".", name, big + 1, XATTR_SIZE_MAX) == -1); + printf("lgetxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big + 1, XATTR_SIZE_MAX, errno2name()); + + assert(flistxattr(-1, efault, 4) == -1); + printf("flistxattr(-1, %p, 4) = -1 %s (%m)\n", + efault, errno2name()); + + assert(llistxattr("", efault + 1, 4) == -1); + printf("llistxattr(\"\", %p, 4) = -1 %s (%m)\n", + efault + 1, errno2name()); + + ssize_t rc = listxattr(".", big, 0); + if (rc < 0) + printf("listxattr(\".\", %p, 0) = -1 %s (%m)\n", + big, errno2name()); + else + printf("listxattr(\".\", %p, 0) = %ld\n", + big, (long) rc); + + rc = listxattr(".", big, XATTR_SIZE_MAX + 1); + if (rc < 0) + printf("listxattr(\".\", %p, %u) = -1 %s (%m)\n", + big, XATTR_SIZE_MAX + 1, errno2name()); + else { + printf("listxattr(\".\", \""); + print_quoted_memory(big, rc); + printf("\", %u) = %ld\n", XATTR_SIZE_MAX + 1, (long) rc); + } + + assert(fremovexattr(-1, name) == -1); + printf("fremovexattr(-1, \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(removexattr(".", name) == -1); + printf("removexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(lremovexattr(".", name) == -1); + printf("lremovexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") #endif diff -Nru strace-4.11/tests-m32/xattr.expected strace-4.12/tests-m32/xattr.expected --- strace-4.11/tests-m32/xattr.expected 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests-m32/xattr.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -removexattr\("\.", "strace\.test"\) += -1 .* -setxattr\("\.", "strace\.test", "foo\\0bar", 8, XATTR_CREATE\) += -1 .* diff -Nru strace-4.11/tests-m32/xattr.test strace-4.12/tests-m32/xattr.test --- strace-4.11/tests-m32/xattr.test 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests-m32/xattr.test 2016-05-10 22:25:23.000000000 +0000 @@ -4,8 +4,9 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace -e removexattr,setxattr $args -match_grep +syscalls= +for n in getxattr setxattr listxattr removexattr; do + syscalls="$syscalls,${n},f${n},l${n}" +done -exit 0 +run_strace_match_diff -a22 -e trace=$syscalls diff -Nru strace-4.11/tests-m32/xchownx.c strace-4.12/tests-m32/xchownx.c --- strace-4.11/tests-m32/xchownx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xchownx.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of chown/chown32/lchown/lchown32/fchown/fchown32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#ifdef UGID_TYPE_IS_SHORT +# define UGID_TYPE short +# define GETEUID syscall(__NR_geteuid) +# define GETEGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUID(arg) check_overflowuid(arg) +# define CHECK_OVERFLOWGID(arg) check_overflowgid(arg) +#else +# define UGID_TYPE int +# define GETEUID geteuid() +# define GETEGID getegid() +# define CHECK_OVERFLOWUID(arg) +# define CHECK_OVERFLOWGID(arg) +#endif + +#define UNLINK_SAMPLE \ + if (unlink(sample)) perror_msg_and_fail("unlink") +#define CLOSE_SAMPLE \ + if (close(fd)) perror_msg_and_fail("close") + +#ifdef ACCESS_BY_DESCRIPTOR +# define SYSCALL_ARG1 fd +# define FMT_ARG1 "%d" +# define EOK_CMD CLOSE_SAMPLE +# define CLEANUP_CMD UNLINK_SAMPLE +#else +# define SYSCALL_ARG1 sample +# define FMT_ARG1 "\"%s\"" +# define EOK_CMD UNLINK_SAMPLE +# define CLEANUP_CMD CLOSE_SAMPLE +#endif + +static int +ugid2int(const unsigned UGID_TYPE id) +{ + if ((unsigned UGID_TYPE) -1U == id) + return -1; + else + return id; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf(", -1"); + else + printf(", %u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int id) +{ + return num == id || num == -1U; +} + +#define PAIR(val) { val, gid }, { uid, val } + +int +main(void) +{ + static const char sample[] = SYSCALL_NAME "_sample"; + + unsigned int uid = GETEUID; + CHECK_OVERFLOWUID(uid); + unsigned int gid = GETEGID; + CHECK_OVERFLOWUID(gid); + + const struct { + const long uid, gid; + } tests[] = { + { uid, gid }, + { (unsigned long) 0xffffffff00000000ULL | uid, gid }, + { uid, (unsigned long) 0xffffffff00000000ULL | gid }, + PAIR(-1U), + PAIR(-1L), + { 0xffff0000U | uid, gid }, + { uid, 0xffff0000U | gid }, + PAIR(0xffff), + PAIR(0xc0deffffU), + PAIR(0xfacefeedU), + PAIR((long) 0xfacefeeddeadbeefULL) + }; + + int fd = open(sample, O_RDONLY | O_CREAT, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + CLEANUP_CMD; + + unsigned int i; + long expected = 0; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int unum = ugid2int(tests[i].uid); + const unsigned int gnum = ugid2int(tests[i].gid); + + if (num_matches_id(unum, uid) && + num_matches_id(gnum, gid)) { + if (expected) + continue; + } else { + if (!expected) { + expected = -1; + EOK_CMD; + } + } + + const long rc = syscall(SYSCALL_NR, SYSCALL_ARG1, + tests[i].uid, tests[i].gid); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(" FMT_ARG1 ", %u, %u)" + " = -1 ENOSYS (%m)\n", + SYSCALL_NAME, SYSCALL_ARG1, uid, gid); + break; + } + perror_msg_and_fail("%s(" FMT_ARG1 + ", %#lx, %#lx) != %ld", + SYSCALL_NAME, SYSCALL_ARG1, + tests[i].uid, tests[i].gid, + expected); + } + + printf("%s(" FMT_ARG1, SYSCALL_NAME, SYSCALL_ARG1); + print_int(unum); + print_int(gnum); + errno = saved_errno; + if (expected) + printf(") = %ld %s (%m)\n", expected, errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/xetitimer.c strace-4.12/tests-m32/xetitimer.c --- strace-4.11/tests-m32/xetitimer.c 2015-09-19 01:04:27.000000000 +0000 +++ strace-4.12/tests-m32/xetitimer.c 2016-01-04 23:38:19.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,7 +47,7 @@ }; if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -61,7 +62,7 @@ (intmax_t) old.itv.it_value.tv_usec); if (getitimer(ITIMER_REAL, &old.itv)) - return 77; + perror_msg_and_skip("getitimer"); printf("getitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", diff -Nru strace-4.11/tests-m32/xetitimer.test strace-4.12/tests-m32/xetitimer.test --- strace-4.11/tests-m32/xetitimer.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/xetitimer.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check setitimer and getitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=setitimer,getitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=setitimer,getitimer diff -Nru strace-4.11/tests-m32/xetpgid.c strace-4.12/tests-m32/xetpgid.c --- strace-4.11/tests-m32/xetpgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xetpgid.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of xetpgid strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getpgid && defined __NR_setpgid + +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpgid, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpgid(%d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpgid, + (unsigned long) 0xffffffff00000000, + (unsigned long) 0xffffffff00000000 | pid); + printf("setpgid(0, %d) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgid && __NR_setpgid") + +#endif diff -Nru strace-4.11/tests-m32/xetpgid.test strace-4.12/tests-m32/xetpgid.test --- strace-4.11/tests-m32/xetpgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xetpgid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgid and setpgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=getpgid,setpgid diff -Nru strace-4.11/tests-m32/xetpriority.c strace-4.12/tests-m32/xetpriority.c --- strace-4.11/tests-m32/xetpriority.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xetpriority.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,35 @@ +#include "tests.h" +#include + +#if defined __NR_getpriority && defined __NR_setpriority + +# include +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000); + if (rc) + printf("setpriority(PRIO_PROCESS, %d, 0) = %ld %s (%m)\n", + pid, rc, errno2name()); + else + printf("setpriority(PRIO_PROCESS, %d, 0) = 0\n", pid); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpriority && _NR_setpriority") + +#endif diff -Nru strace-4.11/tests-m32/xetpriority.test strace-4.12/tests-m32/xetpriority.test --- strace-4.11/tests-m32/xetpriority.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xetpriority.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpriority and setpriority syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 -e trace=getpriority,setpriority diff -Nru strace-4.11/tests-m32/xet_robust_list.c strace-4.12/tests-m32/xet_robust_list.c --- strace-4.11/tests-m32/xet_robust_list.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-m32/xet_robust_list.c 2016-01-05 23:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,46 +25,35 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_get_robust_list && defined __NR_set_robust_list +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const pid_t pid = getpid(); const long long_pid = (unsigned long) (0xdeadbeef00000000LL | pid); - - void *p = mmap(NULL, page_len * 4, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || - mprotect(p + page_len, page_len, PROT_NONE) || - mprotect(p + page_len * 3, page_len, PROT_NONE)) - return 77; - - void **p_head = p + page_len - sizeof(void *); - size_t *p_len = p + page_len * 3 - sizeof(size_t); + void **p_head = tail_alloc(sizeof(void *)); + size_t *p_len = tail_alloc(sizeof(size_t)); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); - if (syscall(__NR_set_robust_list, p, *p_len)) - return 77; - printf("set_robust_list(%#lx, %lu) = 0\n", - (unsigned long) p, (unsigned long) *p_len); + void *head = tail_alloc(*p_len); + if (syscall(__NR_set_robust_list, head, *p_len)) + perror_msg_and_skip("set_robust_list"); + printf("set_robust_list(%p, %lu) = 0\n", + head, (unsigned long) *p_len); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); @@ -74,10 +63,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_get_robust_list && __NR_set_robust_list") #endif diff -Nru strace-4.11/tests-m32/xet_robust_list.test strace-4.12/tests-m32/xet_robust_list.test --- strace-4.11/tests-m32/xet_robust_list.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/xet_robust_list.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check get_robust_list and set_robust_list syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eget_robust_list,set_robust_list $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list diff -Nru strace-4.11/tests-m32/xettimeofday.c strace-4.12/tests-m32/xettimeofday.c --- strace-4.11/tests-m32/xettimeofday.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests-m32/xettimeofday.c 2016-01-09 13:06:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -45,12 +47,12 @@ }; if (syscall(__NR_gettimeofday, &t.tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}, NULL) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, @@ -58,11 +60,10 @@ t.tv.tv_sec = -1; t.tv.tv_usec = 1000000000; - if (!settimeofday(&t.tv, &t.tz)) - return 77; + assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); printf("settimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, t.tz.tz_minuteswest, t.tz.tz_dsttime); diff -Nru strace-4.11/tests-m32/xettimeofday.test strace-4.12/tests-m32/xettimeofday.test --- strace-4.11/tests-m32/xettimeofday.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-m32/xettimeofday.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check gettimeofday and settimeofday syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=gettimeofday,settimeofday -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday diff -Nru strace-4.11/tests-m32/xselect.c strace-4.12/tests-m32/xselect.c --- strace-4.11/tests-m32/xselect.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/xselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,19 +29,10 @@ * Based on test by Dr. David Alan Gilbert */ -#ifdef TEST_SYSCALL_NAME - -# include -# include -# include - -# define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -# define nrify(arg) nrify_(arg) -# define nrify_(arg) __NR_ ## arg - -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg +#include +#include +#include +#include static fd_set set[0x1000000 / sizeof(fd_set)]; @@ -57,7 +48,7 @@ }, tm = tm_in; if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple select. @@ -65,8 +56,10 @@ FD_ZERO(set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL) != 1) - return 77; + int rc = syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + assert(rc == 1); printf("%s(%d, [%d %d], [%d %d], [%d %d], NULL) = 1 ()\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], fds[0], fds[1], fds[0], fds[1]); @@ -78,8 +71,7 @@ FD_SET(2, set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) != 3) - return 77; + assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); printf("%s(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld})" " = 3 (out [1 2 %d], left {%lld, %lld})\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], @@ -93,8 +85,7 @@ */ FD_ZERO(set); FD_SET(fds[1],set); - if (syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) != -1) - return 77; + assert(syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) == -1); printf("%s(-1, NULL, %p, NULL, NULL) = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, set); @@ -105,21 +96,10 @@ FD_SET(fds[0],set); tm.tv.tv_sec = 0; tm.tv.tv_usec = 123; - if (syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv)) - return 77; + assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); printf("%s(%d, [%d], [], NULL, {0, 123}) = 0 (Timeout)\n", TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); puts("+++ exited with 0 +++"); return 0; } - -#else - -int -main(void) -{ - return 77; -} - -#endif diff -Nru strace-4.11/tests-m32/xstatfs64.c strace-4.12/tests-m32/xstatfs64.c --- strace-4.11/tests-m32/xstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), size, ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", %u, ", SYSCALL_NAME, \ + SYSCALL_ARG(file, desc), (unsigned) size) + +#define STRUCT_STATFS struct statfs64 +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif +#define CHECK_ODD_SIZE + +#include "xstatfsx.c" diff -Nru strace-4.11/tests-m32/xstatfs.c strace-4.12/tests-m32/xstatfs.c --- strace-4.11/tests-m32/xstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", ", SYSCALL_NAME, SYSCALL_ARG(file, desc)) + +#define STRUCT_STATFS struct statfs +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif + +#include "xstatfsx.c" diff -Nru strace-4.11/tests-m32/xstatfsx.c strace-4.12/tests-m32/xstatfsx.c --- strace-4.11/tests-m32/xstatfsx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-m32/xstatfsx.c 2016-05-05 21:20:58.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include "xlat.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +#define PRINT_NUM(arg) \ + if (sizeof(b->arg) == sizeof(int)) \ + printf(", %s=%u", #arg, (unsigned int) b->arg); \ + else if (sizeof(b->arg) == sizeof(long)) \ + printf(", %s=%lu", #arg, (unsigned long) b->arg); \ + else \ + printf(", %s=%llu", #arg, (unsigned long long) b->arg) + +static void +print_statfs_type(const char *const prefix, const unsigned int magic) +{ + fputs(prefix, stdout); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(fsmagic); ++i) + if (magic == fsmagic[i].val) { + fputs(fsmagic[i].str, stdout); + return; + } + printf("%#x", magic); +} + +static void +print_statfs(const char *const sample, const char *magic_str) +{ + int fd = open(sample, O_RDONLY); + if (fd < 0) + perror_msg_and_fail("open: %s", sample); + + STRUCT_STATFS *const b = tail_alloc(sizeof(*b)); + long rc = SYSCALL_INVOKE(sample, fd, b, sizeof(*b)); + if (rc) + perror_msg_and_skip(SYSCALL_NAME); + + PRINT_SYSCALL_HEADER(sample, fd, sizeof(*b)); + if (magic_str) + printf("{f_type=%s", magic_str); + else + print_statfs_type("{f_type=", b->f_type); + PRINT_NUM(f_bsize); + PRINT_NUM(f_blocks); + PRINT_NUM(f_bfree); + PRINT_NUM(f_bavail); + PRINT_NUM(f_files); + PRINT_NUM(f_ffree); +#ifdef PRINT_F_FSID + printf(", f_fsid={%u, %u}", + (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); +#endif + PRINT_NUM(f_namelen); +#ifdef PRINT_F_FRSIZE + PRINT_NUM(f_frsize); +#endif +#ifdef PRINT_F_FLAGS + if (b->f_flags & ST_VALID) { + printf(", f_flags="); + printflags(statfs_flags, b->f_flags, "ST_???"); + } +#endif + printf("}) = 0\n"); +} + +int +main(void) +{ + print_statfs("/proc/self/status", "PROC_SUPER_MAGIC"); + + print_statfs(".", NULL); + + long rc = SYSCALL_INVOKE("", -1, 0, sizeof(STRUCT_STATFS)); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS)); + printf("NULL) = %ld %s (%m)\n", rc, errno2name()); + +#ifdef CHECK_ODD_SIZE + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); + printf("%#lx) = %ld %s (%m)\n", addr, rc, errno2name()); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-m32/xstatx.c strace-4.12/tests-m32/xstatx.c --- strace-4.11/tests-m32/xstatx.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-m32/xstatx.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined TEST_SYSCALL_NAME \ - && defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +#if defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +# ifndef TEST_SYSCALL_STR +# error TEST_SYSCALL_STR must be defined +# endif # ifndef TEST_SYSCALL_INVOKE # error TEST_SYSCALL_INVOKE must be defined # endif @@ -38,7 +40,6 @@ # error PRINT_SYSCALL_FOOTER must be defined # endif -# include # include # include # include @@ -131,6 +132,7 @@ # ifndef STRUCT_STAT # define STRUCT_STAT struct stat +# define STRUCT_STAT_STR "struct stat" # endif # ifndef SAMPLE_SIZE # define SAMPLE_SIZE 43147718418 @@ -228,11 +230,6 @@ return 0; } -# define stringify_(arg) #arg -# define stringify(arg) stringify_(arg) -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define STRUCT_STAT_STR stringify(STRUCT_STAT) - int main(void) { @@ -314,10 +311,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_FTRUNCATE && HAVE_FUTIMENS") #endif diff -Nru strace-4.11/tests-mx32/access.c strace-4.12/tests-mx32/access.c --- strace-4.11/tests-mx32/access.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/access.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#ifdef __NR_access + +# include +# include + +int +main(void) +{ + static const char sample[] = "access_sample"; + + long rc = syscall(__NR_access, sample, F_OK); + printf("access(\"%s\", F_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK); + printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_access") + +#endif diff -Nru strace-4.11/tests-mx32/access.test strace-4.12/tests-mx32/access.test --- strace-4.11/tests-mx32/access.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/access.test 2016-04-21 17:37:43.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check access syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eaccess -a30 $args > "$EXP" + +# Filter out access() calls made by libc. +grep -F access_sample < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/acct.c strace-4.12/tests-mx32/acct.c --- strace-4.11/tests-mx32/acct.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/acct.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_acct + +# include +# include + +int +main(void) +{ + const char sample[] = "acct_sample"; + + long rc = syscall(__NR_acct, sample); + printf("acct(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__acct") + +#endif diff -Nru strace-4.11/tests-mx32/acct.test strace-4.12/tests-mx32/acct.test --- strace-4.11/tests-mx32/acct.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/acct.test 2016-04-21 20:20:42.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check acct syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests-mx32/adjtimex.c strace-4.12/tests-mx32/adjtimex.c --- strace-4.11/tests-mx32/adjtimex.c 2015-09-17 13:26:22.000000000 +0000 +++ strace-4.12/tests-mx32/adjtimex.c 2016-02-08 18:16:27.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of adjtimex strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +27,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include +#include #include int main(void) { - struct timex tx = {}; - int state = adjtimex(&tx); + adjtimex(NULL); + printf("adjtimex\\(NULL\\) = -1 EFAULT \\(%m\\)\n"); + + struct timex * const tx = tail_alloc(sizeof(*tx)); + memset(tx, 0, sizeof(*tx)); + int state = adjtimex(tx); if (state < 0) - return 77; + perror_msg_and_skip("adjtimex"); printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" ", esterror=%jd, status=%s, constant=%jd, precision=%jd" @@ -51,27 +55,27 @@ ", tai=%d" #endif "\\}\\) = %d \\(TIME_[A-Z]+\\)\n", - (intmax_t) tx.offset, - (intmax_t) tx.freq, - (intmax_t) tx.maxerror, - (intmax_t) tx.esterror, - tx.status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", - (intmax_t) tx.constant, - (intmax_t) tx.precision, - (intmax_t) tx.tolerance, - (intmax_t) tx.time.tv_sec, - (intmax_t) tx.time.tv_usec, - (intmax_t) tx.tick, - (intmax_t) tx.ppsfreq, - (intmax_t) tx.jitter, - tx.shift, - (intmax_t) tx.stabil, - (intmax_t) tx.jitcnt, - (intmax_t) tx.calcnt, - (intmax_t) tx.errcnt, - (intmax_t) tx.stbcnt, + (intmax_t) tx->offset, + (intmax_t) tx->freq, + (intmax_t) tx->maxerror, + (intmax_t) tx->esterror, + tx->status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", + (intmax_t) tx->constant, + (intmax_t) tx->precision, + (intmax_t) tx->tolerance, + (intmax_t) tx->time.tv_sec, + (intmax_t) tx->time.tv_usec, + (intmax_t) tx->tick, + (intmax_t) tx->ppsfreq, + (intmax_t) tx->jitter, + tx->shift, + (intmax_t) tx->stabil, + (intmax_t) tx->jitcnt, + (intmax_t) tx->calcnt, + (intmax_t) tx->errcnt, + (intmax_t) tx->stbcnt, #ifdef HAVE_STRUCT_TIMEX_TAI - tx.tai, + tx->tai, #endif state); diff -Nru strace-4.11/tests-mx32/adjtimex.test strace-4.12/tests-mx32/adjtimex.test --- strace-4.11/tests-mx32/adjtimex.test 2015-09-17 13:25:53.000000000 +0000 +++ strace-4.12/tests-mx32/adjtimex.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,8 +5,7 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -e adjtimex $args > "$OUT" +run_strace -a 15 -e adjtimex $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/aio.c strace-4.12/tests-mx32/aio.c --- strace-4.11/tests-mx32/aio.c 2015-12-16 02:00:01.000000000 +0000 +++ strace-4.12/tests-mx32/aio.c 2016-05-07 22:40:06.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include +#include #include #include #include #include -#include #include #if defined __NR_io_setup \ @@ -45,139 +41,154 @@ && defined __NR_io_destroy # include -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - int main(void) { - static char data0[4096]; - static char data1[8192]; + const unsigned int sizeof_data0 = 4096; + const unsigned int sizeof_data1 = 8192; + void *data0 = tail_alloc(sizeof_data0); + void *data1 = tail_alloc(sizeof_data1); - const struct iocb cb[] = { + const struct iocb proto_cb[] = { { .aio_data = 0xfeedface11111111, .aio_reqprio = 11, .aio_buf = (unsigned long) data0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = sizeof(data0) + .aio_nbytes = sizeof_data0 }, { .aio_data = 0xfeedface22222222, .aio_reqprio = 22, .aio_buf = (unsigned long) data1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = sizeof(data1) + .aio_nbytes = sizeof_data1 } }; - const struct iovec iov0[] = { + const struct iocb *cb = tail_memdup(proto_cb, sizeof(proto_cb)); + + const struct iovec proto_iov0[] = { { .iov_base = data0, - .iov_len = sizeof(data0) / 4 + .iov_len = sizeof_data0 / 4 }, { - .iov_base = data0 + sizeof(data0) / 4, - .iov_len = sizeof(data0) / 4 * 3 + .iov_base = data0 + sizeof_data0 / 4, + .iov_len = sizeof_data0 / 4 * 3 }, }; - const struct iovec iov1[] = { + const struct iovec *iov0 = tail_memdup(proto_iov0, sizeof(proto_iov0)); + + const struct iovec proto_iov1[] = { { .iov_base = data1, - .iov_len = sizeof(data1) / 4 + .iov_len = sizeof_data1 / 4 }, { - .iov_base = data1 + sizeof(data1) / 4, - .iov_len = sizeof(data1) / 4 * 3 + .iov_base = data1 + sizeof_data1 / 4, + .iov_len = sizeof_data1 / 4 * 3 }, }; - const struct iocb cbv[] = { + const struct iovec *iov1 = tail_memdup(proto_iov1, sizeof(proto_iov1)); + + const struct iocb proto_cbv[] = { { .aio_data = 0xfeed11111111face, .aio_lio_opcode = 7, .aio_reqprio = 111, - .aio_buf = (unsigned long) &iov0, + .aio_buf = (unsigned long) iov0, .aio_offset = 0xdeface1facefeed, - .aio_nbytes = ARRAY_SIZE(iov0) + .aio_nbytes = ARRAY_SIZE(proto_iov0) }, { .aio_data = 0xfeed22222222face, .aio_lio_opcode = 7, .aio_reqprio = 222, - .aio_buf = (unsigned long) &iov1, + .aio_buf = (unsigned long) iov1, .aio_offset = 0xdeface2cafef00d, - .aio_nbytes = ARRAY_SIZE(iov1) + .aio_nbytes = ARRAY_SIZE(proto_iov1) } }; - struct iocb cbc = { + const struct iocb *cbv = tail_memdup(proto_cbv, sizeof(proto_cbv)); + + const struct iocb proto_cbc = { .aio_data = 0xdeadbeefbadc0ded, .aio_reqprio = 99, .aio_fildes = -42 }; + const struct iocb *cbc = tail_memdup(&proto_cbc, sizeof(proto_cbc)); - const long cbs[ARRAY_SIZE(cb) + 2] = { - (long) &cb[0], (long) &cb[1], - 0xdeadbeef, 0xbadc0ded + const long proto_cbs[] = { + (long) &cb[0], (long) &cb[1] }; - const long cbvs[ARRAY_SIZE(cb) + 2] = { + const long *cbs = tail_memdup(proto_cbs, sizeof(proto_cbs)); + + const long proto_cbvs[] = { (long) &cbv[0], (long) &cbv[1], - 0xdeadbeef, 0xbadc0ded }; + const long *cbvs = tail_memdup(proto_cbvs, sizeof(proto_cbvs)); + + unsigned long *ctx = tail_alloc(sizeof(unsigned long)); + *ctx = 0; - unsigned long ctx = 0; - const unsigned int nr = ARRAY_SIZE(cb); + const unsigned int nr = ARRAY_SIZE(proto_cb); const unsigned long lnr = (unsigned long) (0xdeadbeef00000000ULL | nr); - struct io_event ev[nr]; - const struct timespec ts = { .tv_nsec = 123456789 }; + const struct io_event *ev = tail_alloc(nr * sizeof(struct io_event)); + const struct timespec proto_ts = { .tv_nsec = 123456789 }; + const struct timespec *ts = tail_memdup(&proto_ts, sizeof(proto_ts)); (void) close(0); if (open("/dev/zero", O_RDONLY)) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); - if (syscall(__NR_io_setup, lnr, &ctx)) - return 77; - printf("io_setup(%u, [%lu]) = 0\n", nr, ctx); + if (syscall(__NR_io_setup, lnr, ctx)) + perror_msg_and_skip("io_setup"); + printf("io_setup(%u, [%lu]) = 0\n", nr, *ctx); + + assert(syscall(__NR_io_submit, *ctx, -1L, cbs) == -1); + printf("io_submit(%lu, -1, %p) = -1 %s (%m)\n", + *ctx, cbs, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, pread, reqprio=11, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}, " "{data=%#llx, pread, reqprio=22, fildes=0, " "buf=%p, nbytes=%u, offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cb[0].aio_data, data0, - (unsigned int) sizeof(data0), (long long) cb[0].aio_offset, + sizeof_data0, (long long) cb[0].aio_offset, (unsigned long long) cb[1].aio_data, data1, - (unsigned int) sizeof(data1), (long long) cb[1].aio_offset, + sizeof_data1, (long long) cb[1].aio_offset, nr); - assert(syscall(__NR_io_getevents, ctx, nr, nr + 1, ev, &ts) == (long) nr); + assert(syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts) == (long) nr); printf("io_getevents(%lu, %u, %u, [" "{data=%#llx, obj=%p, res=%u, res2=0}, " "{data=%#llx, obj=%p, res=%u, res2=0}" "], {0, 123456789}) = %u\n", - ctx, nr, nr + 1, - (unsigned long long) cb[0].aio_data, &cb[0], - (unsigned int) sizeof(data0), - (unsigned long long) cb[1].aio_data, &cb[1], - (unsigned int) sizeof(data1), + *ctx, nr, nr + 1, + (unsigned long long) cb[0].aio_data, &cb[0], sizeof_data0, + (unsigned long long) cb[1].aio_data, &cb[1], sizeof_data1, nr); - assert(syscall(__NR_io_cancel, ctx, &cbc, ev) == -1 && EINVAL == errno); + assert(syscall(__NR_io_cancel, *ctx, cbc, ev) == -1); printf("io_cancel(%lu, {data=%#llx, pread, reqprio=99, fildes=-42}, %p) " - "= -1 EINVAL (Invalid argument)\n", - ctx, (unsigned long long) cbc.aio_data, ev); + "= -1 %s (%m)\n", + *ctx, (unsigned long long) cbc->aio_data, ev, errno2name()); - if (syscall(__NR_io_submit, ctx, nr, cbvs) != (long) nr) - return 77; + if (syscall(__NR_io_submit, *ctx, nr, cbvs) != (long) nr) + perror_msg_and_skip("io_submit"); printf("io_submit(%lu, %u, [" "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}, " "{data=%#llx, preadv, reqprio=%hd, fildes=0, " "iovec=[{%p, %u}, {%p, %u}], offset=%lld}" "]) = %u\n", - ctx, nr, + *ctx, nr, (unsigned long long) cbv[0].aio_data, cbv[0].aio_reqprio, iov0[0].iov_base, (unsigned int) iov0[0].iov_len, iov0[1].iov_base, (unsigned int) iov0[1].iov_len, @@ -188,8 +199,8 @@ (long long) cbv[1].aio_offset, nr); - assert(syscall(__NR_io_destroy, ctx) == 0); - printf("io_destroy(%lu) = 0\n", ctx); + assert(syscall(__NR_io_destroy, *ctx) == 0); + printf("io_destroy(%lu) = 0\n", *ctx); puts("+++ exited with 0 +++"); return 0; @@ -197,10 +208,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_io_*") #endif diff -Nru strace-4.11/tests-mx32/aio.test strace-4.12/tests-mx32/aio.test --- strace-4.11/tests-mx32/aio.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/aio.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,11 +4,5 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null -OUT="$LOG.out" syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy -run_strace -a14 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 -e trace=$syscalls diff -Nru strace-4.11/tests-mx32/alarm.c strace-4.12/tests-mx32/alarm.c --- strace-4.11/tests-mx32/alarm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/alarm.c 2016-02-14 22:30:27.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * This file is part of alarm strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_alarm + +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a); + printf("alarm(%u) = %d\n", 42, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_alarm") + +#endif diff -Nru strace-4.11/tests-mx32/alarm.test strace-4.12/tests-mx32/alarm.test --- strace-4.11/tests-mx32/alarm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/alarm.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check alarm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/attach-f-p.c strace-4.12/tests-mx32/attach-f-p.c --- strace-4.11/tests-mx32/attach-f-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/attach-f-p.c 2016-05-24 12:14:33.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 3 + +typedef union { + void *ptr; + pid_t pid; +} retval_t; + +typedef struct { + sigset_t set; + unsigned int no; +} thread_arg_t; + +static const char text_parent[] = "attach-f-p.test parent"; +static const char *child[N] = { + "attach-f-p.test child 0", + "attach-f-p.test child 1", + "attach-f-p.test child 2" +}; +static const int sigs[N] = { SIGALRM, SIGUSR1, SIGUSR2 }; +static const struct itimerspec its[N] = { + { .it_value.tv_sec = 1 }, + { .it_value.tv_sec = 2 }, + { .it_value.tv_sec = 3 } +}; +static thread_arg_t args[N] = { + { .no = 0 }, + { .no = 1 }, + { .no = 2 } +}; + +static void * +thread(void *a) +{ + thread_arg_t *arg = a; + int signo; + errno = sigwait(&arg->set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + assert(chdir(child[arg->no]) == -1); + retval_t retval = { .pid = syscall(__NR_gettid) }; + return retval.ptr; +} + +int +main(void) +{ + static timer_t timerid[N]; + pthread_t t[N]; + unsigned int i; + + for (i = 0; i < N; ++i) { + sigemptyset(&args[i].set); + sigaddset(&args[i].set, sigs[i]); + + errno = pthread_sigmask(SIG_BLOCK, &args[i].set, NULL); + if (errno) + perror_msg_and_fail("pthread_sigmask"); + } + + for (i = 0; i < N; ++i) { + struct sigevent sev = { + .sigev_notify = SIGEV_SIGNAL, + .sigev_signo = sigs[i] + }; + if (timer_create(CLOCK_MONOTONIC, &sev, &timerid[i])) + perror_msg_and_skip("timer_create"); + + if (timer_settime(timerid[i], 0, &its[i], NULL)) + perror_msg_and_fail("timer_settime"); + + errno = pthread_create(&t[i], NULL, thread, (void *) &args[i]); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + if (write(3, "\n", 1) != 1) + perror_msg_and_fail("write"); + + for (i = 0; i < N; ++i) { + retval_t retval; + errno = pthread_join(t[i], &retval.ptr); + if (errno) + perror_msg_and_fail("pthread_join"); + errno = ENOENT; + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", + retval.pid, child[i], retval.pid); + } + + /* sleep a bit more to late the tracer catch up */ + if (timer_settime(timerid[0], 0, &its[0], NULL)) + perror_msg_and_fail("timer_settime"); + int signo; + errno = sigwait(&args[0].set, &signo); + if (errno) + perror_msg_and_fail("sigwait"); + + pid_t pid = getpid(); + assert(chdir(text_parent) == -1); + + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text_parent, pid); + + return 0; +} diff -Nru strace-4.11/tests-mx32/attach-f-p.test strace-4.12/tests-mx32/attach-f-p.test --- strace-4.11/tests-mx32/attach-f-p.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/attach-f-p.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check that -f -p attaches to threads properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -f -p is implemented using /proc/$pid/task/ +[ -d /proc/self/task/ ] || + framework_skip_ '/proc/self/task/ is not available' +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-f-p > /dev/null 3>&1 + +./set_ptracer_any sh -c "exec ./attach-f-p > $EXP 3> $OUT" > /dev/null & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a32 -f -echdir -esignal=none -p $tracee_pid +match_diff "$LOG" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/attach-p-cmd-cmd.c strace-4.12/tests-mx32/attach-p-cmd-cmd.c --- strace-4.11/tests-mx32/attach-p-cmd-cmd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/attach-p-cmd-cmd.c 2016-05-23 16:39:23.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + static const char text[] = "attach-p-cmd.test cmd"; + pid_t pid = getpid(); + assert(chdir(text) == -1); + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text, pid); + return 0; +} diff -Nru strace-4.11/tests-mx32/attach-p-cmd-p.c strace-4.12/tests-mx32/attach-p-cmd-p.c --- strace-4.11/tests-mx32/attach-p-cmd-p.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/attach-p-cmd-p.c 2016-01-22 19:37:11.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ + _exit(!chdir("attach-p-cmd.test -p")); +} + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_sec = atoi(av[1]) }; + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + + for (;;); + + return 0; +} diff -Nru strace-4.11/tests-mx32/attach-p-cmd.test strace-4.12/tests-mx32/attach-p-cmd.test --- strace-4.11/tests-mx32/attach-p-cmd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/attach-p-cmd.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check that simultaneous use of -p option and tracing of a command works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-p-cmd-cmd > /dev/null +run_prog ./attach-p-cmd-p 1 > /dev/null + +./set_ptracer_any ./attach-p-cmd-p 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" +{ +printf '%-5d --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---\n' $tracee_pid +printf '%-5d chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory)\n' $tracee_pid +printf '%-5d +++ exited with 0 +++\n' $tracee_pid +} >> "$OUT" + +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/bpf.c strace-4.12/tests-mx32/bpf.c --- strace-4.11/tests-mx32/bpf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/bpf.c 2016-01-06 11:29:16.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -83,39 +80,39 @@ main(void) { if (!map_create()) - return 77; + perror_msg_and_skip("BPF_MAP_CREATE"); printf("bpf\\(BPF_MAP_CREATE, " "\\{map_type=BPF_MAP_TYPE_UNSPEC, key_size=4, value_size=8, max_entries=256\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_LOOKUP_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_LOOKUP_ELEM"); printf("bpf\\(BPF_MAP_LOOKUP_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_UPDATE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_UPDATE_ELEM"); printf("bpf\\(BPF_MAP_UPDATE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef, value=0xbadc0ded, flags=BPF_ANY\\}, " "%u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_DELETE_ELEM)) - return 77; + perror_msg_and_skip("BPF_MAP_DELETE_ELEM"); printf("bpf\\(BPF_MAP_DELETE_ELEM, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!map_any(BPF_MAP_GET_NEXT_KEY)) - return 77; + perror_msg_and_skip("BPF_MAP_GET_NEXT_KEY"); printf("bpf\\(BPF_MAP_GET_NEXT_KEY, " "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", (unsigned) sizeof(union bpf_attr)); if (!prog_load()) - return 77; + perror_msg_and_skip("BPF_PROG_LOAD"); printf("bpf\\(BPF_PROG_LOAD, " "\\{prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p, " "license=\"GPL\", log_level=42, log_size=4096, log_buf=%p, " @@ -127,10 +124,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_bpf") #endif diff -Nru strace-4.11/tests-mx32/bpf.test strace-4.12/tests-mx32/bpf.test --- strace-4.11/tests-mx32/bpf.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/bpf.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -ebpf $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/brk.c strace-4.12/tests-mx32/brk.c --- strace-4.11/tests-mx32/brk.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/brk.c 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_brk + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_brk, NULL); + printf("brk\\(NULL\\) = %#lx\n", rc); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_brk") + +#endif diff -Nru strace-4.11/tests-mx32/brk.test strace-4.12/tests-mx32/brk.test --- strace-4.11/tests-mx32/brk.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/brk.test 2016-05-17 10:53:03.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +# Check brk syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a10 -ebrk $args > "$EXP" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests-mx32/btrfs.c strace-4.12/tests-mx32/btrfs.c --- strace-4.11/tests-mx32/btrfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/btrfs.c 2016-05-28 00:37:02.000000000 +0000 @@ -0,0 +1,1920 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_tree_objectids.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_NAME_LEN +# define BTRFS_NAME_LEN 255 +#endif + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +static const char *btrfs_test_root; +static int btrfs_test_dir_fd; +static bool verbose = false; +static bool write_ok = false; + +const unsigned char uuid_reference[BTRFS_UUID_SIZE] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, +}; + +const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210"; + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + + +static const char * +maybe_print_uint64max(uint64_t val) +{ + if (val == UINT64_MAX) + return " /* UINT64_MAX */"; + return ""; +} + +/* takes highest valid flag bit */ +static uint64_t +max_flags_plus_one(int bit) +{ + int i; + uint64_t val = 0; + if (bit == -1) + return 1; + for (i = 0; i <= bit + 1 && i < 64; i++) + val |= (1ULL << i); + return val; +} + +/* + * Consumes no arguments, returns nothing: + * + * - BTRFS_IOC_TRANS_START + * - BTRFS_IOC_TRANS_END + */ +static void +btrfs_test_trans_ioctls(void) +{ + ioctl(-1, BTRFS_IOC_TRANS_START, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_START) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TRANS_END, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_END) = -1 EBADF (%m)\n"); +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SYNC + * + * Consumes argument, returns nothing + * - BTRFS_IOC_WAIT_SYNC + */ +static void +btrfs_test_sync_ioctls(void) +{ + uint64_t u64val = 0xdeadbeefbadc0ded; + + ioctl(-1, BTRFS_IOC_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, &u64val); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, [%" PRIu64 + "]) = -1 EBADF (%m)\n", u64val); + + /* + * The live test of BTRFS_IOC_SYNC happens as a part of the test + * for BTRFS_IOC_LOGICAL_INO + */ +} + +static void +btrfs_print_qgroup_inherit(struct btrfs_qgroup_inherit *inherit) +{ + printf("{flags="); + printflags(btrfs_qgroup_inherit_flags, inherit->flags, + "BTRFS_QGROUP_INHERIT_???"); + printf(", num_qgroups=%" PRI__u64 + ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64", lim={flags=", + inherit->num_qgroups, inherit->num_ref_copies, + inherit->num_excl_copies); + printflags(btrfs_qgroup_limit_flags, + inherit->lim.flags, + "BTRFS_QGROUP_LIMIT_???"); + printf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 + "}, qgroups=", + inherit->lim.max_rfer, inherit->lim.max_excl, + inherit->lim.rsv_rfer, inherit->lim.rsv_excl); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < inherit->num_qgroups; i++) { + if (i > 0) + printf(", "); + printf("%" PRI__u64, inherit->qgroups[i]); + } + printf("]"); + } else + printf("..."); + printf("}"); +} + + +static void +btrfs_print_vol_args_v2(struct btrfs_ioctl_vol_args_v2 *args, int print_qgroups) +{ + printf("{fd=%d, flags=", (int) args->fd); + printflags(btrfs_snap_flags_v2, args->flags, "BTRFS_SUBVOL_???"); + + if (args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + printf(", size=%" PRI__u64 ", qgroup_inherit=", args->size); + if (args->qgroup_inherit && print_qgroups) + btrfs_print_qgroup_inherit(args->qgroup_inherit); + else if (args->qgroup_inherit) + printf("%p", args->qgroup_inherit); + else + printf("NULL"); + } + printf(", name=\"%s\"}", args->name); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SNAP_CREATE + * - BTRFS_IOC_SUBVOL_CREATE + * - BTRFS_IOC_SNAP_DESTROY + * - BTRFS_IOC_DEFAULT_SUBVOL + * + * Consumes argument, returns u64: + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + +static void +btrfs_test_subvol_ioctls(void) +{ + const char *subvol_name = "subvol-name"; + char *long_subvol_name; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed; + uint64_t u64val = 0xdeadbeefbadc0ded; + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { + .fd = 2, + .flags = max_flags_plus_one(2), + }; + + long_subvol_name = malloc(BTRFS_PATH_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("malloc failed"); + memset(long_subvol_name, 'f', BTRFS_PATH_NAME_MAX); + long_subvol_name[BTRFS_PATH_NAME_MAX - 1] = '\0'; + + strcpy(vol_args.name, subvol_name); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + strncpy(vol_args.name, long_subvol_name, BTRFS_PATH_NAME_MAX); + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + long_subvol_name = realloc(long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("realloc failed"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + vol_args_v2.qgroup_inherit = bad_pointer; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + const unsigned int n_qgroups = 8; + unsigned int i; + struct btrfs_qgroup_inherit *inherit; + vol_args_v2.size = + sizeof(*inherit) + n_qgroups * sizeof(inherit->qgroups[0]); + inherit = tail_alloc(vol_args_v2.size); + + inherit->flags = 0x3; + inherit->num_ref_copies = 0; + inherit->num_excl_copies = 0; + inherit->num_qgroups = n_qgroups; + for (i = 0; i < n_qgroups; i++) + inherit->qgroups[i] = 1ULL << i; + inherit->lim.flags = 0x7f; + inherit->lim.max_rfer = u64val; + inherit->lim.max_excl = u64val; + inherit->lim.rsv_rfer = u64val; + inherit->lim.rsv_excl = u64val; + vol_args_v2.qgroup_inherit = inherit; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, &u64val); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, [%" + PRIu64 "]) = -1 EBADF (%m)\n", u64val); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, "); + printflags(btrfs_snap_flags_v2, vol_args_v2.flags, + "BTRFS_SUBVOL_???"); + ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, &vol_args_v2.flags); + printf(") = -1 EBADF (%m)\n"); + + if (write_ok) { + struct btrfs_ioctl_vol_args_v2 args_passed; + /* + * Returns transid if flags & BTRFS_SUBVOL_CREATE_ASYNC + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + int subvolfd; + + strncpy(vol_args_v2.name, subvol_name, + sizeof(vol_args_v2.name)); + vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; + vol_args_v2.size = 0; + vol_args_v2.qgroup_inherit = NULL; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SUBVOL_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SUBVOL_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + subvolfd = openat(btrfs_test_dir_fd, subvol_name, + O_RDONLY|O_DIRECTORY); + if (subvolfd < 0) + perror_msg_and_fail("openat(%s) failed", subvol_name); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_NAME_LEN); + vol_args_v2.fd = subvolfd; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SNAP_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&args_passed, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + /* This only works when mounted w/ -ouser_subvol_rm_allowed */ + strncpy(vol_args.name, long_subvol_name, 255); + vol_args.name[255] = 0; + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%.*s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, 255, long_subvol_name); + + strcpy(vol_args.name, subvol_name); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, subvol_name); + + close(subvolfd); + } + free(long_subvol_name); +} + +static void +btrfs_print_balance_args(struct btrfs_balance_args *args) +{ + printf("{profiles="); + printflags(btrfs_space_info_flags, args->profiles, + "BTRFS_BLOCK_GROUP_???"); + printf(", usage=%"PRI__u64 "%s, devid=%"PRI__u64 "%s, pstart=%"PRI__u64 + "%s, pend=%"PRI__u64 "%s, vstart=%"PRI__u64 "%s, vend=%"PRI__u64 + "%s, target=%"PRI__u64 "%s, flags=", + args->usage, maybe_print_uint64max(args->usage), + args->devid, maybe_print_uint64max(args->devid), + args->pstart, maybe_print_uint64max(args->pstart), + args->pend, maybe_print_uint64max(args->pend), + args->vstart, maybe_print_uint64max(args->vstart), + args->vend, maybe_print_uint64max(args->vend), + args->target, maybe_print_uint64max(args->target)); + printflags(btrfs_balance_args, args->flags, "BTRFS_BALANCE_ARGS_???"); + printf("}"); +} + +/* + * Accepts argument, returns nothing + * - BTRFS_IOC_BALANCE + * - BTRFS_IOC_BALANCE_CTL + * + * Accepts argument, returns argument + * - BTRFS_IOC_BALANCE_V2 + */ +static void +btrfs_test_balance_ioctls(void) +{ + struct btrfs_ioctl_balance_args args = { + .flags = 0x3f, + .data = { + .profiles = 0x7, + .flags = 0x7, + .devid = 1, + .pend = -1ULL, + .vend = -1ULL, + }, + + .meta = { + .profiles = 0x38, + .flags = 0x38, + .devid = 1, + }, + + .sys = { + .profiles = 0x1c0 | (1ULL << 48), + .flags = 0x4c0, + .devid = 1, + }, + }; + struct btrfs_ioctl_vol_args vol_args = {}; + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_PAUSE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 2); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_CANCEL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_balance_args */ + ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, {flags="); + printflags(btrfs_balance_flags, args.flags, "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(-1, BTRFS_IOC_BALANCE_V2, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + args.flags = BTRFS_BALANCE_DATA | BTRFS_BALANCE_METADATA | + BTRFS_BALANCE_SYSTEM; + args.data.flags = 0; + args.data.profiles = 0; + args.meta.flags = 0; + args.meta.profiles = 0; + args.sys.flags = 0; + args.sys.profiles = 0; + printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=", + btrfs_test_dir_fd); + + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_BALANCE_V2, &args); + printf("} => {flags="); + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", state="); + printflags(btrfs_balance_state, args.state, + "BTRFS_BALANCE_STATE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + printf("}) = 0\n"); + } +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_RESIZE + * + * Requires /dev/btrfs-control, consumes argument, returns nothing: + * - BTRFS_IOC_SCAN_DEV + * - BTRFS_IOC_DEVICES_READY + * + */ +static void +btrfs_test_device_ioctls(void) +{ + const char *devid = "1"; + const char *devname = "/dev/sda1"; + struct btrfs_ioctl_vol_args args = { + .fd = 2, + }; + + ioctl(-1, BTRFS_IOC_RESIZE, NULL); + printf("ioctl(-1, BTRFS_IOC_RESIZE, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devid); + ioctl(-1, BTRFS_IOC_RESIZE, &args); + printf("ioctl(-1, BTRFS_IOC_RESIZE, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devname); + ioctl(-1, BTRFS_IOC_SCAN_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_ADD_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_ADD_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_RM_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_RM_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_CLONE + * - BTRFS_IOC_CLONE_RANGE + */ +static void +btrfs_test_clone_ioctls(void) +{ + int clone_fd = 4; + struct btrfs_ioctl_clone_range_args args = { + .src_fd = clone_fd, + .src_offset = 4096, + .src_length = 16384, + .dest_offset = 128 * 1024, + }; + + ioctl(-1, BTRFS_IOC_CLONE, clone_fd); + printf("ioctl(-1, BTRFS_IOC_CLONE or FICLONE, %x) = -1 EBADF (%m)\n", + clone_fd); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, &args); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "{src_fd=%d, src_offset=%" PRI__u64 ", src_length=%" PRI__u64 + ", dest_offset=%" PRI__u64 "}) = -1 EBADF (%m)\n", + (int) args.src_fd, args.src_offset, args.src_length, + args.dest_offset); +} + +#define BTRFS_COMPRESS_TYPES 2 +#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1) + +static void +btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args) +{ + printf("{start=%" PRIu64", len=%" PRIu64 "%s, flags=", + args->start, args->len, maybe_print_uint64max(args->len)); + + printflags(btrfs_defrag_flags, args->flags, "BTRFS_DEFRAG_RANGE_???"); + printf(", extent_thresh=%u, compress_type=", args->extent_thresh); + printxval(btrfs_compress_types, args->compress_type, + "BTRFS_COMPRESS_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_DEFRAG + * - BTRFS_DEFRAG_RANGE + */ +static void +btrfs_test_defrag_ioctls(void) +{ + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_defrag_range_args args = { + .start = 0, + .len = -1ULL, + .flags = max_flags_plus_one(1), + .extent_thresh = 128 * 1024, + .compress_type = 2, /* BTRFS_COMPRESS_LZO */ + }; + + /* + * These are documented as using vol_args but don't + * actually consume it. + */ + ioctl(-1, BTRFS_IOC_DEFRAG, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFRAG, &vol_args); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_defrag_range_args */ + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.compress_type = BTRFS_INVALID_COMPRESS; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.len--; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); +} + +static const char * +xlookup(const struct xlat *xlat, const uint64_t val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + printf("%" PRIu64, objectid); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + printf("%u", type); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_search_key(struct btrfs_ioctl_search_key *key) +{ + printf("key={tree_id="); + btrfs_print_objectid(key->tree_id); + if (verbose || key->min_objectid != 256) { + printf(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + if (verbose || key->max_objectid != -256ULL) { + printf(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + if (key->min_offset) + printf(", min_offset=%" PRI__u64 "%s", + key->min_offset, maybe_print_uint64max(key->min_offset)); + if (key->max_offset) + printf(", max_offset=%" PRI__u64 "%s", + key->max_offset, maybe_print_uint64max(key->max_offset)); + if (key->min_transid) + printf(", min_transid=%" PRI__u64"%s", key->min_transid, + maybe_print_uint64max(key->min_transid)); + if (key->max_transid) + printf(", max_transid=%" PRI__u64"%s", key->max_transid, + maybe_print_uint64max(key->max_transid)); + printf(", min_type="); + btrfs_print_key_type(key->min_type); + printf(", max_type="); + btrfs_print_key_type(key->max_type); + printf(", nr_items=%u}", key->nr_items); +} + +static void +btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, + void *buf, uint64_t buf_size) +{ + if (verbose) { + uint64_t i; + uint64_t off = 0; + printf("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header *sh; + sh = (typeof(sh))(buf + off); + if (i) + printf(", "); + printf("{transid=%" PRI__u64 ", objectid=", + sh->transid); + btrfs_print_objectid(sh->objectid); + printf(", offset=%" PRI__u64 ", type=", sh->offset); + btrfs_print_key_type(sh->type); + printf(", len=%u}", sh->len); + off += sizeof(*sh) + sh->len; + } + printf("]"); + } else + printf("..."); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_TREE_SEARCH + * - BTRFS_IOC_TREE_SEARCH_V2 + */ +static void +btrfs_test_search_ioctls(void) +{ + struct btrfs_ioctl_search_key key_reference = { + .tree_id = 5, + .min_objectid = 256, + .max_objectid = -1ULL, + .min_offset = 0, + .max_offset = -1ULL, + .min_transid = 0, + .max_transid = -1ULL, + .min_type = 0, + .max_type = -1U, + .nr_items = 10, + }; + struct btrfs_ioctl_search_args search_args; + struct btrfs_ioctl_search_args_v2 search_args_v2 = { + .buf_size = 4096, + }; + + ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL) = -1 EBADF (%m)\n"); + + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_objectid = 6; + key_reference.max_objectid = 7; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_offset++; + key_reference.max_offset--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_transid++; + key_reference.max_transid--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_type = 1; + key_reference.max_type = 12; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + if (btrfs_test_root) { + struct btrfs_ioctl_search_args_v2 *args; + int bufsize = 4096; + + key_reference.tree_id = 5; + key_reference.min_type = 1; + key_reference.max_type = 1; + key_reference.min_objectid = 256; + key_reference.max_objectid = 357; + key_reference.min_offset = 0; + key_reference.max_offset = -1ULL; + + search_args.key = key_reference; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&search_args.key); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("} => {key={nr_items=%u}, buf=", + search_args.key.nr_items); + btrfs_print_tree_search_buf(&search_args.key, search_args.buf, + sizeof(search_args.buf)); + printf("}) = 0\n"); + + args = malloc(sizeof(*args) + bufsize); + if (!args) + perror_msg_and_fail("malloc failed"); + + args->key = key_reference; + args->buf_size = bufsize; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&key_reference); + printf(", buf_size=%" PRIu64 "}", (uint64_t) args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {key={nr_items=%u}, buf_size=%" PRIu64 ", buf=", + args->key.nr_items, (uint64_t)args->buf_size); + btrfs_print_tree_search_buf(&args->key, args->buf, + args->buf_size); + printf("}) = 0\n"); + + args->key = key_reference; + args->buf_size = sizeof(struct btrfs_ioctl_search_header); + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&args->key); + printf(", buf_size=%" PRIu64 "}", (uint64_t)args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {buf_size=%" PRIu64 "}) = -1 EOVERFLOW (%m)\n", + (uint64_t)args->buf_size); + free(args); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_LOOKUP + */ +static void +btrfs_test_ino_lookup_ioctl(void) +{ + struct btrfs_ioctl_ino_lookup_args args = { + .treeid = 5, + .objectid = 256, + }; + + ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, {treeid="); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(-1, BTRFS_IOC_INO_LOOKUP, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_INO_LOOKUP, {treeid=", + btrfs_test_dir_fd); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_LOOKUP, &args); + printf("} => {name=\"%s\"}) = 0\n", args.name); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SPACE_INFO + */ +static void +btrfs_test_space_info_ioctl(void) +{ + struct btrfs_ioctl_space_args args = {}; + + ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SPACE_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}) = -1 EBADF (%m)\n", + args.space_slots); + + if (btrfs_test_root) { + struct btrfs_ioctl_space_args args_passed; + struct btrfs_ioctl_space_args *argsp; + args_passed = args; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, args_passed.space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, &args_passed); + printf(" => {total_spaces=%" PRI__u64 "}) = 0\n", + args_passed.total_spaces); + + argsp = malloc(sizeof(args) + + args_passed.total_spaces * sizeof(args.spaces[0])); + if (!argsp) + perror_msg_and_fail("malloc failed"); + + *argsp = args; + argsp->space_slots = args_passed.total_spaces; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, argsp->space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, argsp); + printf(" => {total_spaces=%" PRI__u64 ", spaces=", + argsp->total_spaces); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < argsp->total_spaces; i++) { + struct btrfs_ioctl_space_info *info; + info = &argsp->spaces[i]; + if (i) + printf(", "); + printf("{flags="); + printflags(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + printf(", total_bytes=%" PRI__u64 + ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + } + + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + free(argsp); + } +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SCRUB_CANCEL + * Consumes argument, returns argument: + - * BTRFS_IOC_SCRUB + - * BTRFS_IOC_SCRUB_PROGRESS + */ +static void +btrfs_test_scrub_ioctls(void) +{ + struct btrfs_ioctl_scrub_args args = { + .devid = 1, + .start = 0, + .end = -1ULL, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_SCRUB, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_CANCEL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SCRUB, {devid=%" PRI__u64 ", start=%" + PRI__u64 "%s, end=%" PRI__u64"%s, flags=", + args.devid, args.start, maybe_print_uint64max(args.start), + args.end, maybe_print_uint64max(args.end)); + printflags(btrfs_scrub_flags, args.flags, "BTRFS_SCRUB_???"); + ioctl(-1, BTRFS_IOC_SCRUB, &args); + printf("}) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, " + "{devid=%" PRI__u64 "}) = -1 EBADF (%m)\n", args.devid); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_INFO + */ +static void +btrfs_test_dev_info_ioctl(void) +{ + struct btrfs_ioctl_dev_info_args args = { + .devid = 1, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_DEV_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, " + "{devid=%" PRI__u64", uuid=%s}) = -1 EBADF (%m)\n", + args.devid, uuid_reference_string); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_PATHS + * - BTRFS_IOC_LOGICAL_INO + */ +static void +btrfs_test_ino_path_ioctls(void) +{ + char buf[16384]; + struct btrfs_ioctl_ino_path_args args = { + .inum = 256, + .size = sizeof(buf), + .fspath = (unsigned long)buf, + }; + + ioctl(-1, BTRFS_IOC_INO_PATHS, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_INO_PATHS, &args); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64 "}) = -1 EBADF (%m)\n", + args.inum, args.size, args.fspath); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64 + "}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath); + +#ifdef HAVE_LINUX_FIEMAP_H + if (btrfs_test_root) { + int size; + struct stat si; + int ret; + struct btrfs_data_container *data = (void *)buf; + struct fiemap *fiemap; + int fd; + + ret = fstat(btrfs_test_dir_fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + args.inum = si.st_ino; + printf("ioctl(%d, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64"}", + btrfs_test_dir_fd, args.inum, args.size, + args.fspath); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_PATHS, &args); + printf(" => {fspath={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[\"strace-test\"]"); + } else + printf("..."); + printf("}}) = 0\n"); + + fd = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd < 0) + perror_msg_and_fail("openat(file1) failed"); + + ret = fstat(fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + if (write(fd, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd"); + + /* + * Force delalloc so we can actually + * search for the extent. + */ + fsync(fd); + ioctl(fd, BTRFS_IOC_SYNC, NULL); + printf("ioctl(%d, BTRFS_IOC_SYNC) = 0\n", fd); + + size = sizeof(*fiemap) + 2 * sizeof(fiemap->fm_extents[0]); + fiemap = malloc(size); + if (!fiemap) + perror_msg_and_fail("malloc failed"); + memset(fiemap, 0, size); + + fiemap->fm_length = sizeof(buf); + fiemap->fm_extent_count = 2; + + /* This is also a live test for FIEMAP */ + printf("ioctl(%d, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + fd, fiemap->fm_start, fiemap->fm_length); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u}", fiemap->fm_extent_count); + ioctl(fd, FS_IOC_FIEMAP, fiemap); + printf(" => {fm_flags="); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_mapped_extents=%u, fm_extents=", + fiemap->fm_mapped_extents); + if (verbose) { + printf("["); + unsigned int i; + for (i = 0; i < fiemap->fm_mapped_extents; i++) { + struct fiemap_extent *fe; + fe = &fiemap->fm_extents[i]; + if (i) + printf(", "); + printf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 + ", ", + fe->fe_logical, fe->fe_physical, + fe->fe_length); + printflags(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + printf("}"); + } + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + + args.inum = fiemap->fm_extents[0].fe_physical; + printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64"}", + fd, args.inum, args.size, args.fspath); + ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args); + printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[{inum=%llu, offset=0, root=5}]", + (unsigned long long) si.st_ino); + } else + printf("..."); + printf("}}) = 0\n"); + close(fd); + free(fiemap); + } +#endif /* HAVE_LINUX_FIEMAP_H */ +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SET_RECEIVED_SUBVOL + */ +static void +btrfs_test_set_received_subvol_ioctl(void) +{ + struct btrfs_ioctl_received_subvol_args args = { + .stransid = 0x12345, + .stime = { + .sec = 1463193386, + .nsec = 12345, + }, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, &args); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "{uuid=%s, stransid=%" PRI__u64", stime=%" PRI__u64 + ".%u, flags=0}) = -1 EBADF (%m)\n", + uuid_reference_string, args.stransid, args.stime.sec, + args.stime.nsec); +} + +/* + * Consumes argument, returns nothing (output is via send_fd) + * - BTRFS_IOC_SEND + */ +static void +btrfs_test_send_ioctl(void) +{ + uint64_t u64_array[2] = { 256, 257 }; + struct btrfs_ioctl_send_args args = { + .send_fd = 4, + .parent_root = 257, + .flags = max_flags_plus_one(2), + }; + + ioctl(-1, BTRFS_IOC_SEND, NULL); + printf("ioctl(-1, BTRFS_IOC_SEND, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) + printf("NULL"); + else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); + + args.clone_sources_count = 2; + args.clone_sources = (__u64 *)u64_array; + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) { + printf("["); + btrfs_print_objectid(u64_array[0]); + printf(", "); + btrfs_print_objectid(u64_array[1]); + printf("]"); + } else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_CTL + */ +static void +btrfs_test_quota_ctl_ioctl(void) +{ + struct btrfs_ioctl_quota_ctl_args args = { + .cmd = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_ENABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 2; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_DISABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 3; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_RESCAN__NOTUSED}) = -1 EBADF (%m)\n"); + + args.cmd = 4; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "0x4 /* BTRFS_QUOTA_CTL_??? */}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_ASSIGN + */ +static void +btrfs_test_qgroup_assign_ioctl(void) +{ + struct btrfs_ioctl_qgroup_assign_args args = { + .assign = 1, + .src = 257, + .dst = 258, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, " + "{assign=%" PRI__u64", src=%" PRI__u64", dst=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.assign, args.src, args.dst); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_CREATE + */ +static void +btrfs_test_qgroup_create_ioctl(void) +{ + struct btrfs_ioctl_qgroup_create_args args = { + .create = 1, + .qgroupid = 257, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, " + "{create=%" PRI__u64", qgroupid=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.create, args.qgroupid); +} + +/* + * Consumes nothing, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN_WAIT + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN + */ +static void +btrfs_test_quota_rescan_ioctl(void) +{ + struct btrfs_ioctl_quota_rescan_args args = { + .progress = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, " + "{flags=0}) = -1 EBADF (%m)\n"); + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT) = -1 EBADF (%m)\n"); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FSLABEL + * + * Consumes no argument, returns argument: + * - BTRFS_IOC_GET_FS_LABEL + */ +static void +btrfs_test_label_ioctls(void) +{ + char label[BTRFS_LABEL_SIZE] = "btrfs-label"; + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, \"%s\") = -1 EBADF (%m)\n", + label); + + if (write_ok) { + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_SET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_GET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_GET_DEV_STATS + */ +static void +btrfs_test_get_dev_stats_ioctl(void) +{ + struct btrfs_ioctl_get_dev_stats args = { + .devid = 1, + .nr_items = 5, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL); + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + unsigned int i; + args.flags = BTRFS_DEV_STATS_RESET; + printf("ioctl(%d, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + btrfs_test_dir_fd, args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_DEV_STATS, &args); + printf("} => {nr_items=%" PRI__u64 ", flags=", + args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + printf(", ["); + for (i = 0; i < args.nr_items; i++) { + const char *name = xlookup(btrfs_dev_stats_values, i); + if (i) + printf(", "); + if (name) + printf("/* %s */ ", name); + printf("%" PRI__u64, args.values[i]); + } + printf("]}) = 0\n"); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_REPLACE + * + * Test environment for this is more difficult; It's better to do it by hand. + */ +static void +btrfs_test_dev_replace_ioctl(void) +{ + struct btrfs_ioctl_dev_replace_args args = { + .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, + .start = { + .srcdevid = 1, + }, + }; + strcpy((char *)args.start.srcdev_name, "/dev/sda1"); + strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); + + /* struct btrfs_ioctl_dev_replace_args */ + ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_START, start={srcdevid=%" + PRI__u64", cont_reading_from_srcdev_mode=%" PRI__u64 + ", srcdev_name=\"%s\", tgtdev_name=\"%s\"}}) = -1 EBADF (%m)\n", + args.start.srcdevid, + args.start.cont_reading_from_srcdev_mode, + (char *)args.start.srcdev_name, + (char *)args.start.tgtdev_name); + + args.cmd = 1; + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS}) = -1 EBADF (%m)\n"); +} + +static void +btrfs_test_extent_same_ioctl(void) +{ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + struct file_dedupe_range args = { + .src_offset = 1024, + .src_length = 10240, + }; + struct file_dedupe_range *argsp; + + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, NULL); + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=[]", + (uint64_t)args.src_offset, + (uint64_t)args.src_length, args.dest_count); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, &args); + printf("}) = -1 EBADF (%m)\n"); + + argsp = malloc(sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + if (!argsp) + perror_msg_and_fail("malloc failed"); + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + *argsp = args; + argsp->dest_count = 3; + argsp->info[0].dest_fd = 2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = 2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = 2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=", + (int64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + printf("]"); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + int fd1, fd2; + char buf[16384]; + + memset(buf, 0, sizeof(buf)); + + fd1 = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd1 < 0) + perror_msg_and_fail("open file1 failed"); + + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDWR|O_CREAT, 0600); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + + close(fd2); + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDONLY); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + argsp->src_offset = 0; + argsp->src_length = 4096; + argsp->dest_count = 3; + argsp->info[0].dest_fd = fd2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = fd2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = fd2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(%d, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 ", src_length=%" PRIu64 + ", dest_count=%hu, info=", fd1, + (uint64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 + ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + + ioctl(fd1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("]} => {info="); + printf("[{bytes_deduped=%" PRIu64 ", status=%d}, " + "{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[0].bytes_deduped, + argsp->info[0].status, + (uint64_t)argsp->info[1].bytes_deduped, + argsp->info[1].status); + if (verbose) + printf(", {bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[2].bytes_deduped, + argsp->info[2].status); + else + printf(", ..."); + printf("]}) = 0\n"); + close(fd1); + close(fd2); + unlinkat(btrfs_test_dir_fd, "file1", 0); + unlinkat(btrfs_test_dir_fd, "file2", 0); + close(fd1); + close(fd2); + } + free(argsp); +#endif /* BTRFS_IOC_FILE_EXTENT_SAME */ +} + +static void +btrfs_print_features(struct btrfs_ioctl_feature_flags *flags) +{ + printf("{compat_flags="); + printflags(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + printf(", compat_ro_flags="); + printflags(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + printf(", incompat_flags="); + printflags(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FEATURES + * + * Consumes nothing, returns argument: + * - BTRFS_IOC_GET_FEATURES + * - BTRFS_IOC_GET_SUPPORTED_FEATURES + */ +static void +btrfs_test_features_ioctls(void) +{ + struct btrfs_ioctl_feature_flags args[2] = { + { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, + }; + struct btrfs_ioctl_feature_flags supported_features[3]; + + ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, ["); + btrfs_print_features(&args[0]); + printf(", "); + btrfs_print_features(&args[1]); + ioctl(-1, BTRFS_IOC_SET_FEATURES, &args); + printf("]) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_GET_FEATURES, ", + btrfs_test_dir_fd); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FEATURES, + &supported_features); + btrfs_print_features(&supported_features[0]); + printf(") = 0\n"); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_SUPPORTED_FEATURES, + &supported_features); + printf("ioctl(%d, BTRFS_IOC_GET_SUPPORTED_FEATURES, ", + btrfs_test_dir_fd); + printf("[ /* supported */ "); + btrfs_print_features(&supported_features[0]); + printf(", /* safe to set */ "); + btrfs_print_features(&supported_features[1]); + printf(", /* safe to clear */ "); + btrfs_print_features(&supported_features[2]); + printf("]) = 0\n"); + } +} + +static void +btrfs_test_read_ioctls(void) +{ + static const struct xlat btrfs_read_cmd[] = { + XLAT(BTRFS_IOC_BALANCE_PROGRESS), + XLAT(BTRFS_IOC_FS_INFO), + XLAT(BTRFS_IOC_GET_FEATURES), + XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), + XLAT(BTRFS_IOC_QGROUP_LIMIT), + XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS), + XLAT(BTRFS_IOC_START_SYNC), + XLAT(BTRFS_IOC_SUBVOL_GETFLAGS), + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(btrfs_read_cmd); ++i) { + ioctl(-1, (unsigned long) btrfs_read_cmd[i].val, 0); + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", btrfs_read_cmd[i].str); + } +} + +int +main(int argc, char *argv[]) +{ + + int opt; + int ret; + const char *path; + + while ((opt = getopt(argc, argv, "wv")) != -1) { + switch (opt) { + case 'v': + /* + * These tests are incomplete, especially when + * printing arrays of objects are involved. + */ + verbose = true; + break; + case 'w': + write_ok = true; + break; + default: + error_msg_and_fail("usage: btrfs [-v] [-w] [path]"); + } + } + + /* + * This will enable optional tests that require a valid file descriptor + */ + if (optind < argc) { + int rootfd; + struct statfs sfi; + path = argv[optind]; + + ret = statfs(path, &sfi); + if (ret) + perror_msg_and_fail("statfs(%s) failed", path); + + if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC) + error_msg_and_fail("%s is not a btrfs file system", + path); + + btrfs_test_root = path; + rootfd = open(path, O_RDONLY|O_DIRECTORY); + if (rootfd < 0) + perror_msg_and_fail("open(%s) failed", path); + + ret = mkdirat(rootfd, "strace-test", 0755); + if (ret < 0 && errno != EEXIST) + perror_msg_and_fail("mkdirat(strace-test) failed"); + + btrfs_test_dir_fd = openat(rootfd, "strace-test", + O_RDONLY|O_DIRECTORY); + if (btrfs_test_dir_fd < 0) + perror_msg_and_fail("openat(strace-test) failed"); + close(rootfd); + } else + write_ok = false; + + if (btrfs_test_root) { + fprintf(stderr, "Testing live ioctls on %s (%s)\n", + btrfs_test_root, write_ok ? "read/write" : "read only"); + } + + btrfs_test_read_ioctls(); + btrfs_test_trans_ioctls(); + btrfs_test_sync_ioctls(); + btrfs_test_subvol_ioctls(); + btrfs_test_balance_ioctls(); + btrfs_test_device_ioctls(); + btrfs_test_clone_ioctls(); + btrfs_test_defrag_ioctls(); + btrfs_test_search_ioctls(); + btrfs_test_ino_lookup_ioctl(); + btrfs_test_space_info_ioctl(); + btrfs_test_scrub_ioctls(); + btrfs_test_dev_info_ioctl(); + btrfs_test_ino_path_ioctls(); + btrfs_test_set_received_subvol_ioctl(); + btrfs_test_send_ioctl(); + btrfs_test_quota_ctl_ioctl(); + btrfs_test_qgroup_assign_ioctl(); + btrfs_test_qgroup_create_ioctl(); + btrfs_test_quota_rescan_ioctl(); + btrfs_test_label_ioctls(); + btrfs_test_get_dev_stats_ioctl(); + btrfs_test_dev_replace_ioctl(); + btrfs_test_extent_same_ioctl(); + btrfs_test_features_ioctls(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BTRFS_H") + +#endif diff -Nru strace-4.11/tests-mx32/btrfs.test strace-4.12/tests-mx32/btrfs.test --- strace-4.11/tests-mx32/btrfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/btrfs.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic btrfs ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/btrfs-v.test strace-4.12/tests-mx32/btrfs-v.test --- strace-4.11/tests-mx32/btrfs-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/btrfs-v.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl + +. "${srcdir=.}/init.sh" + +run_prog ./btrfs -v > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-mx32/btrfs-vw.test strace-4.12/tests-mx32/btrfs-vw.test --- strace-4.11/tests-mx32/btrfs-vw.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/btrfs-vw.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-mx32/btrfs-w.test strace-4.12/tests-mx32/btrfs-w.test --- strace-4.11/tests-mx32/btrfs-w.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/btrfs-w.test 2016-05-27 08:54:32.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-w" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff -Nru strace-4.11/tests-mx32/caps.awk strace-4.12/tests-mx32/caps.awk --- strace-4.11/tests-mx32/caps.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/caps.awk 2016-05-05 22:20:40.000000000 +0000 @@ -1,6 +1,8 @@ #!/bin/gawk # -# Copyright (c) 2014-2015 Dmitry V. Levin +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,13 +28,19 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BEGIN { - cap = "(0|CAP_[A-Z_]+(\\|CAP_[A-Z_]+)*|CAP_[A-Z_]+(\\|CAP_[A-Z_]+){37}\\|0xffffffc0)" - r[1] = "^capget\\(\\{_LINUX_CAPABILITY_VERSION_3, 0\\}, \\{" cap ", " cap ", " cap "\\}\\) = 0$" - capset_data = "{CAP_DAC_OVERRIDE|CAP_WAKE_ALARM, CAP_DAC_READ_SEARCH|CAP_BLOCK_SUSPEND, 0}" - s[2] = "capset({_LINUX_CAPABILITY_VERSION_3, 0}, " capset_data ") = -1 EPERM (Operation not permitted)" - s[3] = "+++ exited with 0 +++" + cap = "(0|1< + * This file is part of caps strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include extern int capget(int *, int *); extern int capset(int *, const int *); @@ -33,14 +37,26 @@ int main(void) { - int unused[6]; const int data[] = { 2, 4, 0, 8, 16, 0 }; const int v3 = 0x20080522; - int head[] = { v3, 0 }; - if (capget(head, unused) || head[0] != v3 || - capset(head, data) == 0 || errno != EPERM) - return 77; + int * const head = tail_alloc(sizeof(int) * 2); + head[0] = v3; + head[1] = 0; + int * const tail_data = tail_alloc(sizeof(data)); + + capget(NULL, NULL); + capget(head + 2, tail_data); + capget(head, tail_data + ARRAY_SIZE(data)); + + if (capget(head, tail_data)) + perror_msg_and_skip("capget"); + if (head[0] != v3) + error_msg_and_skip("capget: v3 expected"); + + memcpy(tail_data, data, sizeof(data)); + if (capset(head, data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); return 0; } diff -Nru strace-4.11/tests-mx32/caps.test strace-4.12/tests-mx32/caps.test --- strace-4.11/tests-mx32/caps.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-mx32/caps.test 2016-02-08 18:21:10.000000000 +0000 @@ -5,7 +5,7 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -e trace=capget,capset $args +run_strace -a 19 -e trace=capget,capset $args match_awk exit 0 diff -Nru strace-4.11/tests-mx32/chmod.c strace-4.12/tests-mx32/chmod.c --- strace-4.11/tests-mx32/chmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chmod.c 2016-03-07 23:13:28.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2016 Anchit Jain + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_chmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "chmod_test_file"; + + if (open(fname, O_CREAT|O_RDONLY, 0400) == -1) + perror_msg_and_fail("open"); + + int chmod_res = syscall(__NR_chmod, fname, 0600); + + if (chmod_res == 0) { + printf("chmod(\"%s\", 0600) = 0\n", fname); + } else { + if (errno == ENOSYS) { + printf("chmod(\"%s\", 0600) = -1 ENOSYS (%m)\n", fname); + } else { + perror_msg_and_fail("chmod"); + } + } + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (chmod_res == 0) { + if (syscall(__NR_chmod, fname, 0600) != -1) + perror_msg_and_fail("chmod"); + + printf("chmod(\"%s\", 0600) = -1 ENOENT (%m)\n", fname); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chmod") + +#endif diff -Nru strace-4.11/tests-mx32/chmod.test strace-4.12/tests-mx32/chmod.test --- strace-4.11/tests-mx32/chmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-mx32/chown32.c strace-4.12/tests-mx32/chown32.c --- strace-4.11/tests-mx32/chown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chown32.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_chown32 + +# define SYSCALL_NR __NR_chown32 +# define SYSCALL_NAME "chown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown32") + +#endif diff -Nru strace-4.11/tests-mx32/chown32.test strace-4.12/tests-mx32/chown32.test --- strace-4.11/tests-mx32/chown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chown32.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests-mx32/chown.c strace-4.12/tests-mx32/chown.c --- strace-4.11/tests-mx32/chown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_chown + +# define SYSCALL_NR __NR_chown +# define SYSCALL_NAME "chown" + +# if defined __NR_chown32 && __NR_chown != __NR_chown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown") + +#endif diff -Nru strace-4.11/tests-mx32/chown.test strace-4.12/tests-mx32/chown.test --- strace-4.11/tests-mx32/chown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 diff -Nru strace-4.11/tests-mx32/chroot.c strace-4.12/tests-mx32/chroot.c --- strace-4.11/tests-mx32/chroot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chroot.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_chroot + +# include +# include + +int +main(void) +{ + static const char sample[] = "chroot.sample"; + + long rc = syscall(__NR_chroot, sample); + printf("chroot(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chroot") + +#endif diff -Nru strace-4.11/tests-mx32/chroot.test strace-4.12/tests-mx32/chroot.test --- strace-4.11/tests-mx32/chroot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/chroot.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chroot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-mx32/clock_adjtime.c strace-4.12/tests-mx32/clock_adjtime.c --- strace-4.11/tests-mx32/clock_adjtime.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/clock_adjtime.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of clock_adjtime strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_clock_adjtime + +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_clock_adjtime, CLOCK_MONOTONIC, NULL); + printf("clock_adjtime(CLOCK_MONOTONIC, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + void *efault = tail_alloc(1); + + rc = syscall(__NR_clock_adjtime, CLOCK_REALTIME, efault); + printf("clock_adjtime(CLOCK_REALTIME, %p) = %ld %s (%m)\n", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_adjtime") + +#endif diff -Nru strace-4.11/tests-mx32/clock_adjtime.test strace-4.12/tests-mx32/clock_adjtime.test --- strace-4.11/tests-mx32/clock_adjtime.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/clock_adjtime.test 2016-04-22 01:13:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_adjtime syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff -Nru strace-4.11/tests-mx32/clock_nanosleep.c strace-4.12/tests-mx32/clock_nanosleep.c --- strace-4.11/tests-mx32/clock_nanosleep.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests-mx32/clock_nanosleep.c 2016-01-06 09:46:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -63,34 +61,32 @@ }; if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, NULL)) - return 77; + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, NULL, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + NULL, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, NULL, %p)" - " = -1 EFAULT (Bad address)\n", &rem.ts); + " = -1 EFAULT (%m)\n", &rem.ts); - if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == 0); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 999999999 + 1; - if (!syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_MONOTONIC, 0" - ", {%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + ", {%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -99,25 +95,23 @@ (intmax_t) itv.it_value.tv_usec); --req.ts.tv_nsec; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, 0, {%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); - if (syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts)) - return 77; + assert(syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts) == 0); printf("clock_gettime(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); ++req.ts.tv_sec; rem.ts.tv_sec = 0xc0de4; rem.ts.tv_nsec = 0xc0de5; - if (!syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, - &req.ts, &rem.ts)) - return 77; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, + &req.ts, &rem.ts) == -1); printf("clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {%jd, %jd}, %p)" " = ? ERESTARTNOHAND (To be restarted if no handler)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); diff -Nru strace-4.11/tests-mx32/clock_nanosleep.test strace-4.12/tests-mx32/clock_nanosleep.test --- strace-4.11/tests-mx32/clock_nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/clock_nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check clock_nanosleep syscall decoding. +# Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_nanosleep,clock_gettime,setitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer diff -Nru strace-4.11/tests-mx32/clock_xettime.c strace-4.12/tests-mx32/clock_xettime.c --- strace-4.11/tests-mx32/clock_xettime.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-mx32/clock_xettime.c 2016-01-06 09:48:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,13 +47,13 @@ }; if (syscall(__NR_clock_getres, CLOCK_REALTIME, &t.ts)) - return 77; + perror_msg_and_skip("clock_getres CLOCK_REALTIME"); printf("clock_getres(CLOCK_REALTIME, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); if (syscall(__NR_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &t.ts)) - return 77; + perror_msg_and_skip("clock_gettime CLOCK_PROCESS_CPUTIME_ID"); printf("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {%jd, %jd}) = 0\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -60,9 +61,10 @@ t.ts.tv_sec = 0xdeface1; t.ts.tv_nsec = 0xdeface2; if (!syscall(__NR_clock_settime, CLOCK_THREAD_CPUTIME_ID, &t.ts)) - return 77; + error_msg_and_skip("clock_settime CLOCK_THREAD_CPUTIME_ID:" + " EINVAL expected"); printf("clock_settime(CLOCK_THREAD_CPUTIME_ID, {%jd, %jd})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.ts.tv_sec, (intmax_t) t.ts.tv_nsec); @@ -72,10 +74,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_clock_getres && __NR_clock_gettime && __NR_clock_settime") #endif diff -Nru strace-4.11/tests-mx32/clock_xettime.test strace-4.12/tests-mx32/clock_xettime.test --- strace-4.11/tests-mx32/clock_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/clock_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check clock_getres, clock_gettime, and clock_settime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=clock_getres,clock_gettime,clock_settime -run_strace -a36 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime diff -Nru strace-4.11/tests-mx32/copy_file_range.c strace-4.12/tests-mx32/copy_file_range.c --- strace-4.11/tests-mx32/copy_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/copy_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of copy_file_range strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_copy_file_range + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 0; + + long rc = syscall(__NR_copy_file_range, + fd_in, off_in, fd_out, off_out, len, flags); + printf("copy_file_range(%d, [%lld], %d, [%lld], %zu, %u)" + " = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, flags, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_copy_file_range") + +#endif diff -Nru strace-4.11/tests-mx32/copy_file_range.test strace-4.12/tests-mx32/copy_file_range.test --- strace-4.11/tests-mx32/copy_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/copy_file_range.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check copy_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/count-f.c strace-4.12/tests-mx32/count-f.c --- strace-4.11/tests-mx32/count-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/count-f.c 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * This file is part of count-f strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#define N 32 +#define P 8 +#define T 4 + +static void * +thread(void *arg) +{ + unsigned int i; + + assert(chdir(".") == 0); + for (i = 0; i < N; ++i) { + assert(chdir("") == -1); + assert(chdir(".") == 0); + } + + return NULL; +} + +static int +process(void) +{ + unsigned int i; + pthread_t t[T]; + + for (i = 0; i < T; ++i) { + errno = pthread_create(&t[i], NULL, thread, NULL); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + for (i = 0; i < T; ++i) { + void *retval; + errno = pthread_join(t[i], &retval); + if (errno) + perror_msg_and_fail("pthread_join"); + } + + return 0; +} + +int +main(void) +{ + unsigned int i; + pid_t p[P]; + + for (i = 0; i < P; ++i) { + p[i] = fork(); + if (p[i] < 0) + perror_msg_and_fail("fork"); + if (!p[i]) + return process(); + } + for (i = 0; i < P; ++i) { + int s; + + assert(waitpid(p[i], &s, 0) == p[i]); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + + return 0; +} diff -Nru strace-4.11/tests-mx32/count-f.expected strace-4.12/tests-mx32/count-f.expected --- strace-4.11/tests-mx32/count-f.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/count-f.expected 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1 @@ +[ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir diff -Nru strace-4.11/tests-mx32/count-f.test strace-4.12/tests-mx32/count-f.test --- strace-4.11/tests-mx32/count-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/count-f.test 2016-03-12 23:52:52.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check whether -c counts through forks and clones properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -q -f -c $args +match_grep + +exit 0 diff -Nru strace-4.11/tests-mx32/count.test strace-4.12/tests-mx32/count.test --- strace-4.11/tests-mx32/count.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/count.test 2016-05-08 00:00:18.000000000 +0000 @@ -2,7 +2,7 @@ # # Check whether -c and -w options work. # -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,14 +29,14 @@ . "${srcdir=.}/init.sh" +run_prog ./sleep 0 check_prog grep -check_prog sleep grep_log() { local pattern="$1"; shift - run_strace "$@" + run_strace "$@" ./sleep 1 grep nanosleep "$LOG" > /dev/null || framework_skip_ 'sleep does not use nanosleep' @@ -48,9 +48,9 @@ } } -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c sleep 1 -grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep sleep 1 -grep_log ' *[^ ]+ +(1\.0|0\.99)[^n]*nanosleep' -cw sleep 1 -grep_log '100\.00 +(1\.0|0\.99)[^n]*nanosleep' -cw -enanosleep sleep 1 +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep +grep_log ' *[^ ]+ +(1\.[01]|0\.99)[^n]*nanosleep' -cw +grep_log '100\.00 +(1\.[01]|0\.99)[^n]*nanosleep' -cw -enanosleep exit 0 diff -Nru strace-4.11/tests-mx32/creat.c strace-4.12/tests-mx32/creat.c --- strace-4.11/tests-mx32/creat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/creat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_creat + +# include +# include + +# define TMP_FILE "creat" + +int +main(void) +{ + long rc = syscall(__NR_creat, TMP_FILE, 0400); + printf("creat(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, 0400, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_creat") + +#endif diff -Nru strace-4.11/tests-mx32/creat.test strace-4.12/tests-mx32/creat.test --- strace-4.11/tests-mx32/creat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/creat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check creat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/dup2.c strace-4.12/tests-mx32/dup2.c --- strace-4.11/tests-mx32/dup2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_dup2 + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup2, fd_old, fd_new); + printf("dup2(%d, %d) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup2") + +#endif diff -Nru strace-4.11/tests-mx32/dup2.test strace-4.12/tests-mx32/dup2.test --- strace-4.11/tests-mx32/dup2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup2.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests-mx32/dup3.c strace-4.12/tests-mx32/dup3.c --- strace-4.11/tests-mx32/dup3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup3.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include +#include + +#if defined __NR_dup3 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup3 && && O_CLOEXEC") + +#endif diff -Nru strace-4.11/tests-mx32/dup3.test strace-4.12/tests-mx32/dup3.test --- strace-4.11/tests-mx32/dup3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup3.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup3 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-mx32/dup.c strace-4.12/tests-mx32/dup.c --- strace-4.11/tests-mx32/dup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = dup(-1); + printf("dup(-1) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/dup.test strace-4.12/tests-mx32/dup.test --- strace-4.11/tests-mx32/dup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/dup.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-mx32/epoll_create1.c strace-4.12/tests-mx32/epoll_create1.c --- strace-4.11/tests-mx32/epoll_create1.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_create1.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include #include +#if defined __NR_epoll_create1 && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_epoll_create1 && defined O_CLOEXEC - (void) close(0); - if (syscall(__NR_epoll_create1, O_CLOEXEC)) - return 77; - return syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK) >= 0; + long rc = syscall(__NR_epoll_create1, O_CLOEXEC); + if (rc == -1) { + printf("epoll_create1(EPOLL_CLOEXEC) = -1 %s (%m)\n", + errno2name()); + } else { + printf("epoll_create1(EPOLL_CLOEXEC) = %ld\n", rc); + } + + rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK); + printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %ld %s (%m)\n", + O_NONBLOCK, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-mx32/epoll_create1.expected strace-4.12/tests-mx32/epoll_create1.expected --- strace-4.11/tests-mx32/epoll_create1.expected 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_create1.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -epoll_create1\(EPOLL_CLOEXEC\) += 0 -epoll_create1\(EPOLL_CLOEXEC\|0x[[:xdigit:]]+\) += -1 EINVAL .* diff -Nru strace-4.11/tests-mx32/epoll_create1.test strace-4.12/tests-mx32/epoll_create1.test --- strace-4.11/tests-mx32/epoll_create1.test 2015-08-02 00:10:48.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_create1.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check epoll_create1 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e epoll_create1 $args -match_grep - -exit 0 +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-mx32/epoll_create.c strace-4.12/tests-mx32/epoll_create.c --- strace-4.11/tests-mx32/epoll_create.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_create.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_create + +# include +# include + +int +main(void) +{ + const long int size = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_epoll_create, size); + printf("epoll_create(%d) = %ld %s (%m)\n", + (int) size, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_creat") + +#endif diff -Nru strace-4.11/tests-mx32/epoll_create.test strace-4.12/tests-mx32/epoll_create.test --- strace-4.11/tests-mx32/epoll_create.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_create.test 2016-04-08 07:59:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-mx32/epoll_ctl.c strace-4.12/tests-mx32/epoll_ctl.c --- strace-4.11/tests-mx32/epoll_ctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_ctl.c 2016-05-16 21:47:09.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_ctl + +# include +# include +# include +# include + +static long +invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) +{ + op |= (unsigned long) 0xffffffff00000000; + return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); +} + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + ev->events = EPOLLIN; + + long rc = invoke_syscall(-1U, EPOLL_CTL_ADD, -2U, ev); + printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); + + rc = invoke_syscall(-3U, EPOLL_CTL_DEL, -4U, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", + ev, rc, errno2name()); + + rc = invoke_syscall(-1UL, EPOLL_CTL_MOD, -16UL, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_ctl") + +#endif diff -Nru strace-4.11/tests-mx32/epoll_ctl.test strace-4.12/tests-mx32/epoll_ctl.test --- strace-4.11/tests-mx32/epoll_ctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_ctl.test 2016-04-08 07:59:15.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_ctl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/epoll_pwait.c strace-4.12/tests-mx32/epoll_pwait.c --- strace-4.11/tests-mx32/epoll_pwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_pwait.c 2016-05-10 01:37:46.000000000 +0000 @@ -0,0 +1,32 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_pwait + +# include +# include +# include +# include + +# include "kernel_types.h" + +int +main(void) +{ + sigset_t set[2]; + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, + set, (kernel_ulong_t) sizeof(set)); + printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n", + ev, set, (unsigned) sizeof(set), rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_pwait") + +#endif diff -Nru strace-4.11/tests-mx32/epoll_pwait.test strace-4.12/tests-mx32/epoll_pwait.test --- strace-4.11/tests-mx32/epoll_pwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_pwait.test 2016-05-09 22:12:57.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of epoll_pwait syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/epoll_wait.c strace-4.12/tests-mx32/epoll_wait.c --- strace-4.11/tests-mx32/epoll_wait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_wait.c 2016-05-09 21:46:17.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_wait + +# include +# include +# include + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2); + printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n", + ev, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_wait") + +#endif diff -Nru strace-4.11/tests-mx32/epoll_wait.test strace-4.12/tests-mx32/epoll_wait.test --- strace-4.11/tests-mx32/epoll_wait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/epoll_wait.test 2016-04-08 07:59:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_wait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 diff -Nru strace-4.11/tests-mx32/errno2name.c strace-4.12/tests-mx32/errno2name.c --- strace-4.11/tests-mx32/errno2name.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/errno2name.c 2016-04-21 01:08:55.000000000 +0000 @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +errno2name(void) +{ + switch (errno) { + /* names taken from linux/errnoent.h */ +#ifdef E2BIG + CASE(E2BIG); +#endif +#ifdef EACCES + CASE(EACCES); +#endif +#ifdef EADDRINUSE + CASE(EADDRINUSE); +#endif +#ifdef EADDRNOTAVAIL + CASE(EADDRNOTAVAIL); +#endif +#ifdef EADV + CASE(EADV); +#endif +#ifdef EAFNOSUPPORT + CASE(EAFNOSUPPORT); +#endif +#ifdef EAGAIN + CASE(EAGAIN); +#endif +#ifdef EALREADY + CASE(EALREADY); +#endif +#ifdef EBADCOOKIE + CASE(EBADCOOKIE); +#endif +#ifdef EBADE + CASE(EBADE); +#endif +#ifdef EBADF + CASE(EBADF); +#endif +#ifdef EBADFD + CASE(EBADFD); +#endif +#ifdef EBADHANDLE + CASE(EBADHANDLE); +#endif +#ifdef EBADMSG + CASE(EBADMSG); +#endif +#ifdef EBADR + CASE(EBADR); +#endif +#ifdef EBADRQC + CASE(EBADRQC); +#endif +#ifdef EBADSLT + CASE(EBADSLT); +#endif +#ifdef EBADTYPE + CASE(EBADTYPE); +#endif +#ifdef EBFONT + CASE(EBFONT); +#endif +#ifdef EBUSY + CASE(EBUSY); +#endif +#ifdef ECANCELED + CASE(ECANCELED); +#endif +#ifdef ECHILD + CASE(ECHILD); +#endif +#ifdef ECHRNG + CASE(ECHRNG); +#endif +#ifdef ECOMM + CASE(ECOMM); +#endif +#ifdef ECONNABORTED + CASE(ECONNABORTED); +#endif +#ifdef ECONNREFUSED + CASE(ECONNREFUSED); +#endif +#ifdef ECONNRESET + CASE(ECONNRESET); +#endif +#ifdef EDEADLK + CASE(EDEADLK); +#endif +#ifdef EDESTADDRREQ + CASE(EDESTADDRREQ); +#endif +#ifdef EDOM + CASE(EDOM); +#endif +#ifdef EDOTDOT + CASE(EDOTDOT); +#endif +#ifdef EDQUOT + CASE(EDQUOT); +#endif +#ifdef EEXIST + CASE(EEXIST); +#endif +#ifdef EFAULT + CASE(EFAULT); +#endif +#ifdef EFBIG + CASE(EFBIG); +#endif +#ifdef EHOSTDOWN + CASE(EHOSTDOWN); +#endif +#ifdef EHOSTUNREACH + CASE(EHOSTUNREACH); +#endif +#ifdef EHWPOISON + CASE(EHWPOISON); +#endif +#ifdef EIDRM + CASE(EIDRM); +#endif +#ifdef EILSEQ + CASE(EILSEQ); +#endif +#ifdef EINPROGRESS + CASE(EINPROGRESS); +#endif +#ifdef EINTR + CASE(EINTR); +#endif +#ifdef EINVAL + CASE(EINVAL); +#endif +#ifdef EIO + CASE(EIO); +#endif +#ifdef EIOCBQUEUED + CASE(EIOCBQUEUED); +#endif +#ifdef EISCONN + CASE(EISCONN); +#endif +#ifdef EISDIR + CASE(EISDIR); +#endif +#ifdef EISNAM + CASE(EISNAM); +#endif +#ifdef EJUKEBOX + CASE(EJUKEBOX); +#endif +#ifdef EKEYEXPIRED + CASE(EKEYEXPIRED); +#endif +#ifdef EKEYREJECTED + CASE(EKEYREJECTED); +#endif +#ifdef EKEYREVOKED + CASE(EKEYREVOKED); +#endif +#ifdef EL2HLT + CASE(EL2HLT); +#endif +#ifdef EL2NSYNC + CASE(EL2NSYNC); +#endif +#ifdef EL3HLT + CASE(EL3HLT); +#endif +#ifdef EL3RST + CASE(EL3RST); +#endif +#ifdef ELIBACC + CASE(ELIBACC); +#endif +#ifdef ELIBBAD + CASE(ELIBBAD); +#endif +#ifdef ELIBEXEC + CASE(ELIBEXEC); +#endif +#ifdef ELIBMAX + CASE(ELIBMAX); +#endif +#ifdef ELIBSCN + CASE(ELIBSCN); +#endif +#ifdef ELNRNG + CASE(ELNRNG); +#endif +#ifdef ELOOP + CASE(ELOOP); +#endif +#ifdef EMEDIUMTYPE + CASE(EMEDIUMTYPE); +#endif +#ifdef EMFILE + CASE(EMFILE); +#endif +#ifdef EMLINK + CASE(EMLINK); +#endif +#ifdef EMSGSIZE + CASE(EMSGSIZE); +#endif +#ifdef EMULTIHOP + CASE(EMULTIHOP); +#endif +#ifdef ENAMETOOLONG + CASE(ENAMETOOLONG); +#endif +#ifdef ENAVAIL + CASE(ENAVAIL); +#endif +#ifdef ENETDOWN + CASE(ENETDOWN); +#endif +#ifdef ENETRESET + CASE(ENETRESET); +#endif +#ifdef ENETUNREACH + CASE(ENETUNREACH); +#endif +#ifdef ENFILE + CASE(ENFILE); +#endif +#ifdef ENOANO + CASE(ENOANO); +#endif +#ifdef ENOBUFS + CASE(ENOBUFS); +#endif +#ifdef ENOCSI + CASE(ENOCSI); +#endif +#ifdef ENODATA + CASE(ENODATA); +#endif +#ifdef ENODEV + CASE(ENODEV); +#endif +#ifdef ENOENT + CASE(ENOENT); +#endif +#ifdef ENOEXEC + CASE(ENOEXEC); +#endif +#ifdef ENOIOCTLCMD + CASE(ENOIOCTLCMD); +#endif +#ifdef ENOKEY + CASE(ENOKEY); +#endif +#ifdef ENOLCK + CASE(ENOLCK); +#endif +#ifdef ENOLINK + CASE(ENOLINK); +#endif +#ifdef ENOMEDIUM + CASE(ENOMEDIUM); +#endif +#ifdef ENOMEM + CASE(ENOMEM); +#endif +#ifdef ENOMSG + CASE(ENOMSG); +#endif +#ifdef ENONET + CASE(ENONET); +#endif +#ifdef ENOPKG + CASE(ENOPKG); +#endif +#ifdef ENOPROTOOPT + CASE(ENOPROTOOPT); +#endif +#ifdef ENOSPC + CASE(ENOSPC); +#endif +#ifdef ENOSR + CASE(ENOSR); +#endif +#ifdef ENOSTR + CASE(ENOSTR); +#endif +#ifdef ENOSYS + CASE(ENOSYS); +#endif +#ifdef ENOTBLK + CASE(ENOTBLK); +#endif +#ifdef ENOTCONN + CASE(ENOTCONN); +#endif +#ifdef ENOTDIR + CASE(ENOTDIR); +#endif +#ifdef ENOTEMPTY + CASE(ENOTEMPTY); +#endif +#ifdef ENOTNAM + CASE(ENOTNAM); +#endif +#ifdef ENOTRECOVERABLE + CASE(ENOTRECOVERABLE); +#endif +#ifdef ENOTSOCK + CASE(ENOTSOCK); +#endif +#ifdef ENOTSUPP + CASE(ENOTSUPP); +#endif +#ifdef ENOTSYNC + CASE(ENOTSYNC); +#endif +#ifdef ENOTTY + CASE(ENOTTY); +#endif +#ifdef ENOTUNIQ + CASE(ENOTUNIQ); +#endif +#ifdef ENXIO + CASE(ENXIO); +#endif +#ifdef EOPENSTALE + CASE(EOPENSTALE); +#endif +#ifdef EOPNOTSUPP + CASE(EOPNOTSUPP); +#endif +#ifdef EOVERFLOW + CASE(EOVERFLOW); +#endif +#ifdef EOWNERDEAD + CASE(EOWNERDEAD); +#endif +#ifdef EPERM + CASE(EPERM); +#endif +#ifdef EPFNOSUPPORT + CASE(EPFNOSUPPORT); +#endif +#ifdef EPIPE + CASE(EPIPE); +#endif +#ifdef EPROBE_DEFER + CASE(EPROBE_DEFER); +#endif +#ifdef EPROTO + CASE(EPROTO); +#endif +#ifdef EPROTONOSUPPORT + CASE(EPROTONOSUPPORT); +#endif +#ifdef EPROTOTYPE + CASE(EPROTOTYPE); +#endif +#ifdef ERANGE + CASE(ERANGE); +#endif +#ifdef EREMCHG + CASE(EREMCHG); +#endif +#ifdef EREMOTE + CASE(EREMOTE); +#endif +#ifdef EREMOTEIO + CASE(EREMOTEIO); +#endif +#ifdef ERESTART + CASE(ERESTART); +#endif +#ifdef ERESTARTNOHAND + CASE(ERESTARTNOHAND); +#endif +#ifdef ERESTARTNOINTR + CASE(ERESTARTNOINTR); +#endif +#ifdef ERESTARTSYS + CASE(ERESTARTSYS); +#endif +#ifdef ERESTART_RESTARTBLOCK + CASE(ERESTART_RESTARTBLOCK); +#endif +#ifdef ERFKILL + CASE(ERFKILL); +#endif +#ifdef EROFS + CASE(EROFS); +#endif +#ifdef ESERVERFAULT + CASE(ESERVERFAULT); +#endif +#ifdef ESHUTDOWN + CASE(ESHUTDOWN); +#endif +#ifdef ESOCKTNOSUPPORT + CASE(ESOCKTNOSUPPORT); +#endif +#ifdef ESPIPE + CASE(ESPIPE); +#endif +#ifdef ESRCH + CASE(ESRCH); +#endif +#ifdef ESRMNT + CASE(ESRMNT); +#endif +#ifdef ESTALE + CASE(ESTALE); +#endif +#ifdef ESTRPIPE + CASE(ESTRPIPE); +#endif +#ifdef ETIME + CASE(ETIME); +#endif +#ifdef ETIMEDOUT + CASE(ETIMEDOUT); +#endif +#ifdef ETOOMANYREFS + CASE(ETOOMANYREFS); +#endif +#ifdef ETOOSMALL + CASE(ETOOSMALL); +#endif +#ifdef ETXTBSY + CASE(ETXTBSY); +#endif +#ifdef EUCLEAN + CASE(EUCLEAN); +#endif +#ifdef EUNATCH + CASE(EUNATCH); +#endif +#ifdef EUSERS + CASE(EUSERS); +#endif +#ifdef EXDEV + CASE(EXDEV); +#endif +#ifdef EXFULL + CASE(EXFULL); +#endif + default: perror_msg_and_fail("unknown errno %d", errno); + } +} diff -Nru strace-4.11/tests-mx32/error_msg.c strace-4.12/tests-mx32/error_msg.c --- strace-4.11/tests-mx32/error_msg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/error_msg.c 2016-01-21 23:46:43.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +void +perror_msg_and_fail(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_fail(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_skip(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(77); +} + +void +perror_msg_and_skip(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(77); +} diff -Nru strace-4.11/tests-mx32/eventfd.c strace-4.12/tests-mx32/eventfd.c --- strace-4.11/tests-mx32/eventfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/eventfd.c 2016-01-05 23:12:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include +#if defined __NR_eventfd2 && defined O_CLOEXEC + int main(void) { -#if defined __NR_eventfd2 && defined O_CLOEXEC (void) close(0); - return syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("eventfd2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-mx32/execveat.c strace-4.12/tests-mx32/execveat.c --- strace-4.11/tests-mx32/execveat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/execveat.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execveat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,160 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #ifdef __NR_execveat -#define FILENAME "execveat\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +# define FILENAME "test.execveat\nfilename" +# define Q_FILENAME "test.execveat\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - syscall(__NR_execveat, -100, FILENAME, argv, envp, 0x1100); + const char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + const char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], envp[2], envp[3], envp[4], +#endif + errno2name()); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[0], q_envp[1], +#endif + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVEAT + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[2], +#ifdef VERBOSE_EXECVEAT + q_envp[1], +#endif + errno2name()); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", []" +#ifdef VERBOSE_EXECVEAT + ", []" +#else + ", [/* 0 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, errno2name()); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + syscall(__NR_execveat, -100, FILENAME, a, b, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVEAT + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, a + 1, b + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVEAT + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, NULL, efault, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", NULL, %p" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + syscall(__NR_execveat, -100, FILENAME, efault, NULL, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", %p, NULL" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_execveat") #endif diff -Nru strace-4.11/tests-mx32/execveat.expected strace-4.12/tests-mx32/execveat.expected --- strace-4.11/tests-mx32/execveat.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execveat.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \[/\* 2 vars \*/\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests-mx32/execveat.test strace-4.12/tests-mx32/execveat.test --- strace-4.11/tests-mx32/execveat.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execveat.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check execveat syscall decoding. . "${srcdir=.}/init.sh" - -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/execveat-v.c strace-4.12/tests-mx32/execveat-v.c --- strace-4.11/tests-mx32/execveat-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/execveat-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execveat-v strace test. */ +#define VERBOSE_EXECVEAT +#include "execveat.c" diff -Nru strace-4.11/tests-mx32/execveat-v.expected strace-4.12/tests-mx32/execveat-v.expected --- strace-4.11/tests-mx32/execveat-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execveat-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execveat\(AT_FDCWD, "execveat\\nfilename", \["execveat\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\], AT_SYMLINK_NOFOLLOW\|AT_EMPTY_PATH\) += -1 .* diff -Nru strace-4.11/tests-mx32/execveat-v.test strace-4.12/tests-mx32/execveat-v.test --- strace-4.11/tests-mx32/execveat-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/execveat-v.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of execveat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=execveat diff -Nru strace-4.11/tests-mx32/execve.c strace-4.12/tests-mx32/execve.c --- strace-4.11/tests-mx32/execve.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/execve.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of execve strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +27,145 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include -#define FILENAME "execve\nfilename" -static const char * const argv[] = - { FILENAME, "first", "second", NULL, NULL, NULL }; -static const char * const envp[] = - { "foobar=1", "foo\nbar=2", NULL , "", NULL , "", NULL, NULL}; +#define FILENAME "test.execve\nfilename" +#define Q_FILENAME "test.execve\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; int main(void) { - execve(FILENAME, (char * const *) argv, (char * const *) envp); + char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1], envp[2], envp[3], envp[4] +#endif + ); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[0], q_envp[1] +#endif + ); + + execve(FILENAME, tail_argv + 2, tail_envp + 1); + printf("execve(\"%s\", [\"%s\"]" +#ifdef VERBOSE_EXECVE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[2] +#ifdef VERBOSE_EXECVE + , q_envp[1] +#endif + ); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + execve(FILENAME, empty, empty); + printf("execve(\"%s\", []" +#ifdef VERBOSE_EXECVE + ", []" +#else + ", [/* 0 vars */]" +#endif + ") = -1 ENOENT (%m)\n", Q_FILENAME); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + execve(FILENAME, a, b); + printf("execve(\"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#ifdef VERBOSE_EXECVE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, a + 1, b + 1); + printf("execve(\"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#ifdef VERBOSE_EXECVE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, (char **) tail_argv[ARRAY_SIZE(q_argv)], efault); + printf("execve(\"%s\", NULL, %p) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + execve(FILENAME, efault, NULL); + printf("execve(\"%s\", %p, NULL) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + return 0; } diff -Nru strace-4.11/tests-mx32/execve.expected strace-4.12/tests-mx32/execve.expected --- strace-4.11/tests-mx32/execve.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execve.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \[/\* 2 vars \*/\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests-mx32/execve.test strace-4.12/tests-mx32/execve.test --- strace-4.11/tests-mx32/execve.test 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execve.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace $args -match_grep -run_strace -v $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +check_prog grep +run_prog > /dev/null +run_strace -eexecve $args > "$EXP" -exit 0 +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/execve-v.c strace-4.12/tests-mx32/execve-v.c --- strace-4.11/tests-mx32/execve-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/execve-v.c 2016-02-08 18:25:33.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of execve-v strace test. */ +#define VERBOSE_EXECVE +#include "execve.c" diff -Nru strace-4.11/tests-mx32/execve-v.expected strace-4.12/tests-mx32/execve-v.expected --- strace-4.11/tests-mx32/execve-v.expected 2015-07-27 15:27:43.000000000 +0000 +++ strace-4.12/tests-mx32/execve-v.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -execve\("execve\\nfilename", \["execve\\nfilename", "first", "second"\], \["foobar=1", "foo\\nbar=2"\]\) += -1 ENOENT .* diff -Nru strace-4.11/tests-mx32/execve-v.test strace-4.12/tests-mx32/execve-v.test --- strace-4.11/tests-mx32/execve-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/execve-v.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of execve syscall. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -veexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/faccessat.c strace-4.12/tests-mx32/faccessat.c --- strace-4.11/tests-mx32/faccessat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/faccessat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_faccessat + +# include +# include + +int +main(void) +{ + static const char sample[] = "faccessat.sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_faccessat, fd, sample, F_OK); + printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_faccessat") + +#endif diff -Nru strace-4.11/tests-mx32/faccessat.test strace-4.12/tests-mx32/faccessat.test --- strace-4.11/tests-mx32/faccessat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/faccessat.test 2016-03-28 00:16:17.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check faccessat syscall decoding. + +. "${srcdir=.}/openat.test" diff -Nru strace-4.11/tests-mx32/fanotify_mark.c strace-4.12/tests-mx32/fanotify_mark.c --- strace-4.11/tests-mx32/fanotify_mark.c 2015-01-10 00:40:10.000000000 +0000 +++ strace-4.12/tests-mx32/fanotify_mark.c 2016-01-05 23:06:14.000000000 +0000 @@ -1,19 +1,18 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK + # include + int main(void) { fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, "."); return 0; } + #else -int -main(void) -{ - return 77; -} + +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK") + #endif diff -Nru strace-4.11/tests-mx32/fchdir.c strace-4.12/tests-mx32/fchdir.c --- strace-4.11/tests-mx32/fchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_fchdir + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fchdir, fd); + printf("fchdir(%d) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchdir") + +#endif diff -Nru strace-4.11/tests-mx32/fchdir.test strace-4.12/tests-mx32/fchdir.test --- strace-4.11/tests-mx32/fchdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchdir.test 2016-04-21 17:35:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests-mx32/fchmodat.c strace-4.12/tests-mx32/fchmodat.c --- strace-4.11/tests-mx32/fchmodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchmodat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Check decoding of fchmodat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmodat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "fchmodat_sample"; + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) == 0) { + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = 0\n", sample); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmodat, -100, sample, 0600) != -1) + perror_msg_and_fail("fchmodat"); + } + + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = -1 %s (%m)\n", + sample, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmodat") + +#endif diff -Nru strace-4.11/tests-mx32/fchmodat.test strace-4.12/tests-mx32/fchmodat.test --- strace-4.11/tests-mx32/fchmodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchmodat.test 2016-04-02 13:13:16.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchmodat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/fchmod.c strace-4.12/tests-mx32/fchmod.c --- strace-4.11/tests-mx32/fchmod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchmod.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_fchmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "fchmod_test_file"; + + int fd = open(fname, O_CREAT|O_RDONLY, 0400); + + if (fd == -1) + perror_msg_and_fail("open"); + + if (unlink(fname) == -1) + perror_msg_and_fail("unlink"); + + if (syscall(__NR_fchmod, fd, 0600) == 0) { + close(fd); + + printf("fchmod(%d, 0600) = 0\n", fd); + + if (syscall(__NR_fchmod, fd, 0600) != -1) + perror_msg_and_fail("fchmod"); + } + printf("fchmod(%d, 0600) = -1 %s (%m)\n", fd, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmod") + +#endif diff -Nru strace-4.11/tests-mx32/fchmod.test strace-4.12/tests-mx32/fchmod.test --- strace-4.11/tests-mx32/fchmod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchmod.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-mx32/fchown32.c strace-4.12/tests-mx32/fchown32.c --- strace-4.11/tests-mx32/fchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown32 + +# define SYSCALL_NR __NR_fchown32 +# define SYSCALL_NAME "fchown32" +# define ACCESS_BY_DESCRIPTOR +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown32") + +#endif diff -Nru strace-4.11/tests-mx32/fchown32.test strace-4.12/tests-mx32/fchown32.test --- strace-4.11/tests-mx32/fchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-mx32/fchownat.c strace-4.12/tests-mx32/fchownat.c --- strace-4.11/tests-mx32/fchownat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchownat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of fchownat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_fchownat && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW + +# include +# include + +int +main(void) +{ + static const char sample[] = "fchownat_sample"; + uid_t uid = geteuid(); + uid_t gid = getegid(); + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchownat, AT_FDCWD, sample, uid, gid, 0); + if (rc == 0) { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0) = 0\n", + sample, uid, gid); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchownat, AT_FDCWD, + sample, -1, -1L, AT_SYMLINK_NOFOLLOW); + + printf("fchownat(AT_FDCWD, \"%s\", -1, -1, AT_SYMLINK_NOFOLLOW)" + " = %ld %s (%m)\n", sample, rc, errno2name()); + } else { + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0)" + " = %ld %s (%m)\n", sample, uid, gid, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchownat && AT_FDCWD && AT_SYMLINK_NOFOLLOW") + +#endif diff -Nru strace-4.11/tests-mx32/fchownat.test strace-4.12/tests-mx32/fchownat.test --- strace-4.11/tests-mx32/fchownat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchownat.test 2016-04-02 14:07:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchownat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/fchown.c strace-4.12/tests-mx32/fchown.c --- strace-4.11/tests-mx32/fchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchown.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown + +# define SYSCALL_NR __NR_fchown +# define SYSCALL_NAME "fchown" +# define ACCESS_BY_DESCRIPTOR + +# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown") + +#endif diff -Nru strace-4.11/tests-mx32/fchown.test strace-4.12/tests-mx32/fchown.test --- strace-4.11/tests-mx32/fchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fchown.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-mx32/fcntl64.c strace-4.12/tests-mx32/fcntl64.c --- strace-4.11/tests-mx32/fcntl64.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-mx32/fcntl64.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl64 -# define TEST_SYSCALL_NAME fcntl64 +# define TEST_SYSCALL_NR __NR_fcntl64 +# define TEST_SYSCALL_STR "fcntl64" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -57,16 +55,16 @@ { TEST_FLOCK64_EINVAL(F_SETLK64); TEST_FLOCK64_EINVAL(F_SETLKW64); -#ifdef F_OFD_SETLK +# ifdef F_OFD_SETLK TEST_FLOCK64_EINVAL(F_OFD_SETLK); TEST_FLOCK64_EINVAL(F_OFD_SETLKW); -#endif +# endif struct_kernel_flock64 fl = { .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + long rc = invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); @@ -74,12 +72,12 @@ if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK64, &fl); + invoke_test_syscall(F_GETLK64, &fl); printf("%s(0, F_GETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK64, &fl); + invoke_test_syscall(F_SETLK64, &fl); printf("%s(0, F_SETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); @@ -88,9 +86,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -100,10 +96,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl64") #endif diff -Nru strace-4.11/tests-mx32/fcntl.c strace-4.12/tests-mx32/fcntl.c --- strace-4.11/tests-mx32/fcntl.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-mx32/fcntl.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_fcntl -# define TEST_SYSCALL_NAME fcntl +# define TEST_SYSCALL_NR __NR_fcntl +# define TEST_SYSCALL_STR "fcntl" # include "struct_flock.c" -#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) static void test_flock64_einval(const int cmd, const char *name) @@ -46,7 +44,7 @@ .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, %p) = %s\n", TEST_SYSCALL_STR, name, &fl, EINVAL_STR); } @@ -70,9 +68,7 @@ int main(void) { - if (create_sample()) - return 77; - + create_sample(); test_flock(); test_flock64(); @@ -82,10 +78,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_fcntl") #endif diff -Nru strace-4.11/tests-mx32/fcntl.test strace-4.12/tests-mx32/fcntl.test --- strace-4.11/tests-mx32/fcntl.test 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-mx32/fcntl.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check fcntl decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscall=${ME_%.test} -run_strace -a8 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-mx32/fdatasync.c strace-4.12/tests-mx32/fdatasync.c --- strace-4.11/tests-mx32/fdatasync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fdatasync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fdatasync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fdatasync, fd); + printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fdatasync") + +#endif diff -Nru strace-4.11/tests-mx32/fdatasync.test strace-4.12/tests-mx32/fdatasync.test --- strace-4.11/tests-mx32/fdatasync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fdatasync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fdatasync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-mx32/file_handle.c strace-4.12/tests-mx32/file_handle.c --- strace-4.11/tests-mx32/file_handle.c 2015-11-26 16:49:39.000000000 +0000 +++ strace-4.12/tests-mx32/file_handle.c 2016-04-21 22:05:53.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #ifdef MAX_HANDLE_SZ +# include +# include +# include +# include + int main(void) { @@ -49,26 +47,20 @@ handle->handle_bytes = 0; - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) != -1 - || EINVAL != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) == -1); + if (EINVAL != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" - ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (Invalid argument)\n", - &mount_id); + ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); - if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags) != -1 - || EOVERFLOW != errno) { - perror("name_to_handle_at"); - return 77; - } + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == -1); + if (EOVERFLOW != errno) + perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" - ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW" - " (Value too large for defined data type)\n", + ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", handle->handle_bytes, &mount_id); - assert(!name_to_handle_at(dirfd, ".", handle, &mount_id, flags)); + assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == 0); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" ", handle_type=%d, f_handle=0x", handle->handle_bytes, handle->handle_type); @@ -76,15 +68,12 @@ printf("%02x", handle->f_handle[i]); printf("}, [%d], AT_SYMLINK_FOLLOW) = 0\n", mount_id); - assert(open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY)); printf("open_by_handle_at(-1, {handle_bytes=%u, handle_type=%d" ", f_handle=0x", handle->handle_bytes, handle->handle_type); for (i = 0; i < handle->handle_bytes; ++i) printf("%02x", handle->f_handle[i]); - printf("}, O_RDONLY|O_DIRECTORY) = -1 %s\n", - EPERM == errno ? "EPERM (Operation not permitted)" : - EINVAL == errno ? "EINVAL (Invalid argument)" : - "EBADF (Bad file descriptor)"); + int rc = open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY); + printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -92,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MAX_HANDLE_SZ") #endif diff -Nru strace-4.11/tests-mx32/file_handle.test strace-4.12/tests-mx32/file_handle.test --- strace-4.11/tests-mx32/file_handle.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/file_handle.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check name_to_handle_at and open_by_handle_at syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -ename_to_handle_at,open_by_handle_at $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at diff -Nru strace-4.11/tests-mx32/file_ioctl.c strace-4.12/tests-mx32/file_ioctl.c --- strace-4.11/tests-mx32/file_ioctl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/file_ioctl.c 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,45 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_FIEMAP_H + +# include +# include +# include +# include +# include "xlat.h" +# include "xlat/fiemap_flags.h" + +static void +test_fiemap(void) +{ + (void) tail_alloc(1); + struct fiemap *const args = tail_alloc(sizeof(*args)); + + printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + args->fm_start, args->fm_length); + printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u})", args->fm_extent_count); + ioctl(-1, FS_IOC_FIEMAP, args); + printf(" = -1 EBADF (%m)\n"); + + /* The live version of this test is in btrfs.c */ +} + +/* clone and dedupe ioctls are in btrfs.c since they originated there */ + +int +main(int argc, char *argv[]) +{ + test_fiemap(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H") + +#endif diff -Nru strace-4.11/tests-mx32/file_ioctl.test strace-4.12/tests-mx32/file_ioctl.test --- strace-4.11/tests-mx32/file_ioctl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/file_ioctl.test 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check FS_IOC_FIEMAP ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/filter-unavailable.c strace-4.12/tests-mx32/filter-unavailable.c --- strace-4.11/tests-mx32/filter-unavailable.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/filter-unavailable.c 2016-01-06 00:14:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -52,7 +53,8 @@ (void) close(0); (void) close(1); - assert(pipe(fds) == 0 && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); for (i = 0; i < T; ++i) assert(pthread_create(&t, NULL, thread, NULL) == 0); @@ -70,10 +72,13 @@ pid_t p; for (i = 0; i < P; ++i) { - assert((p = fork()) >= 0); + p = fork(); + if (p < 0) + perror_msg_and_fail("fork"); if (p == 0) return process(); - assert(waitpid(p, &s, 0) == p && WIFEXITED(s)); + assert(waitpid(p, &s, 0) == p); + assert(WIFEXITED(s)); if (WEXITSTATUS(s)) return WEXITSTATUS(s); } diff -Nru strace-4.11/tests-mx32/flock.c strace-4.12/tests-mx32/flock.c --- strace-4.11/tests-mx32/flock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/flock.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_flock + +# include +# include +# include + +int +main(void) +{ + const unsigned long fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_flock, fd, LOCK_SH); + printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_flock") + +#endif diff -Nru strace-4.11/tests-mx32/flock.test strace-4.12/tests-mx32/flock.test --- strace-4.11/tests-mx32/flock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/flock.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check flock syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-mx32/fork-f.c strace-4.12/tests-mx32/fork-f.c --- strace-4.11/tests-mx32/fork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "fork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) + return logit("exec"); + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + close(child_wait_fds[1]); + + if (read(0, child_wait_fds, sizeof(int))) + _exit(2); + + char *const args[] = { av[0], (char *) "", NULL }; + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + ppid, prefix, + pid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests-mx32/fork-f.test strace-4.12/tests-mx32/fork-f.test --- strace-4.11/tests-mx32/fork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fork-f.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how strace -f follows fork syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none diff -Nru strace-4.11/tests-mx32/fstat64.c strace-4.12/tests-mx32/fstat64.c --- strace-4.11/tests-mx32/fstat64.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-mx32/fstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat64 -# define TEST_SYSCALL_NAME fstat64 + +# define TEST_SYSCALL_NR __NR_fstat64 +# define TEST_SYSCALL_STR "fstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat64") + +#endif diff -Nru strace-4.11/tests-mx32/fstatat64.c strace-4.12/tests-mx32/fstatat64.c --- strace-4.11/tests-mx32/fstatat64.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-mx32/fstatat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstatat64 -# define TEST_SYSCALL_NAME fstatat64 -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_fstatat64 +# define TEST_SYSCALL_STR "fstatat64" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatat64") + +#endif diff -Nru strace-4.11/tests-mx32/fstatat.c strace-4.12/tests-mx32/fstatat.c --- strace-4.11/tests-mx32/fstatat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/fstatat.c 2016-01-05 22:41:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HAVE_FSTATAT -# undef TEST_SYSCALL_NAME -#endif +#ifdef HAVE_FSTATAT -#define TEST_SYSCALL_INVOKE(sample, pst) \ +# define TEST_SYSCALL_INVOKE(sample, pst) \ fstatat(AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) -#define PRINT_SYSCALL_HEADER(sample) \ +# define PRINT_SYSCALL_HEADER(sample) \ printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) -#define PRINT_SYSCALL_FOOTER \ +# define PRINT_SYSCALL_FOOTER \ puts(", AT_SYMLINK_NOFOLLOW) = 0") -#include "xstatx.c" +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif diff -Nru strace-4.11/tests-mx32/fstat.c strace-4.12/tests-mx32/fstat.c --- strace-4.11/tests-mx32/fstat.c 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-mx32/fstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_fstat -# define TEST_SYSCALL_NAME fstat + +# define TEST_SYSCALL_NR __NR_fstat +# define TEST_SYSCALL_STR "fstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "fstatx.c" -#include "fstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat") + +#endif diff -Nru strace-4.11/tests-mx32/fstatfs64.c strace-4.12/tests-mx32/fstatfs64.c --- strace-4.11/tests-mx32/fstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs64 + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs64 +# define SYSCALL_NAME "fstatfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs64") + +#endif diff -Nru strace-4.11/tests-mx32/fstatfs64.test strace-4.12/tests-mx32/fstatfs64.test --- strace-4.11/tests-mx32/fstatfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fstatfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-mx32/fstatfs.c strace-4.12/tests-mx32/fstatfs.c --- strace-4.11/tests-mx32/fstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs +# define SYSCALL_NAME "fstatfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs") + +#endif diff -Nru strace-4.11/tests-mx32/fstatfs.test strace-4.12/tests-mx32/fstatfs.test --- strace-4.11/tests-mx32/fstatfs.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fstatfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-mx32/fstat.test strace-4.12/tests-mx32/fstat.test --- strace-4.11/tests-mx32/fstat.test 2015-12-05 00:02:44.000000000 +0000 +++ strace-4.12/tests-mx32/fstat.test 2016-03-30 00:13:56.000000000 +0000 @@ -8,9 +8,8 @@ [ -d /proc/self/fd/ ] || framework_skip_ '/proc/self/fd/ is not available' -syscall=${ME_%.test} +syscall=$NAME run_prog > /dev/null -OUT="$LOG.out" sample=$syscall.sample > "$sample" run_strace -ve$syscall -P$sample $args > "$OUT" diff -Nru strace-4.11/tests-mx32/fstatx.c strace-4.12/tests-mx32/fstatx.c --- strace-4.11/tests-mx32/fstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/fstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests-mx32/fsync.c strace-4.12/tests-mx32/fsync.c --- strace-4.11/tests-mx32/fsync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fsync.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fsync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + + long rc = syscall(__NR_fsync, fd); + printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fsync") + +#endif diff -Nru strace-4.11/tests-mx32/fsync.test strace-4.12/tests-mx32/fsync.test --- strace-4.11/tests-mx32/fsync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/fsync.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fsync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/ftruncate64.c strace-4.12/tests-mx32/ftruncate64.c --- strace-4.11/tests-mx32/ftruncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/ftruncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate64 -#include -#include -#include +# include +# include int main(void) { const off_t len = 0xdefaceddeadbeef; - int rc = ftruncate(-1, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate64(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + int rc = ftruncate(-1, len); + printf("ftruncate64(-1, %llu) = %d %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -55,10 +48,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate64") #endif diff -Nru strace-4.11/tests-mx32/ftruncate64.test strace-4.12/tests-mx32/ftruncate64.test --- strace-4.11/tests-mx32/ftruncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests-mx32/ftruncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -eftruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-mx32/ftruncate.c strace-4.12/tests-mx32/ftruncate.c --- strace-4.11/tests-mx32/ftruncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/ftruncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,29 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_ftruncate -#include -#include -#include +# include +# include -#include "kernel_types.h" +# include "kernel_types.h" int main(void) { const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = ftruncate(-1, len); else rc = syscall(__NR_ftruncate, -1L, len); - if (rc != -1 || EBADF != errno) - return 77; - - printf("ftruncate(-1, %llu) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) len); + printf("ftruncate(-1, %llu) = %ld %s (%m)\n", + (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +55,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_ftruncate") #endif diff -Nru strace-4.11/tests-mx32/ftruncate.test strace-4.12/tests-mx32/ftruncate.test --- strace-4.11/tests-mx32/ftruncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests-mx32/ftruncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check ftruncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eftruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-mx32/futimesat.c strace-4.12/tests-mx32/futimesat.c --- strace-4.11/tests-mx32/futimesat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/futimesat.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of futimesat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_futimesat + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "futimesat_sample"; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U; + + long rc = syscall(__NR_futimesat, dirfd, sample, 0); + printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + dirfd = (unsigned long) 0xdeadbeefffffffff; + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + (void) close(0); + rc = syscall(__NR_futimesat, 0, "", ts); + printf("futimesat(0, \"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futimesat") + +#endif diff -Nru strace-4.11/tests-mx32/futimesat.test strace-4.12/tests-mx32/futimesat.test --- strace-4.11/tests-mx32/futimesat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/futimesat.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check futimesat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff -Nru strace-4.11/tests-mx32/getcwd.c strace-4.12/tests-mx32/getcwd.c --- strace-4.11/tests-mx32/getcwd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getcwd.c 2016-03-23 13:38:35.000000000 +0000 @@ -0,0 +1,39 @@ +#include "tests.h" + +#include + +#ifdef __NR_getcwd + +# include +# include +# include + +int +main(void) +{ + long res; + char cur_dir[PATH_MAX + 1]; + + res = syscall(__NR_getcwd, cur_dir, sizeof(cur_dir)); + + if (res <= 0) + perror_msg_and_fail("getcwd"); + + printf("getcwd(\""); + print_quoted_string(cur_dir); + printf("\", %zu) = %ld\n", sizeof(cur_dir), res); + + syscall(__NR_getcwd, cur_dir, 0); + + printf("getcwd(%p, 0) = -1 ERANGE (%m)\n", cur_dir); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcwd"); + +#endif diff -Nru strace-4.11/tests-mx32/getcwd.test strace-4.12/tests-mx32/getcwd.test --- strace-4.11/tests-mx32/getcwd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getcwd.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-mx32/getdents64.c strace-4.12/tests-mx32/getdents64.c --- strace-4.11/tests-mx32/getdents64.c 2015-11-20 00:08:48.000000000 +0000 +++ strace-4.12/tests-mx32/getdents64.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents64 -#include -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -104,7 +101,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -114,12 +110,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents64, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count); + printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents64, 0, buf, count))) { kernel_dirent64 *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents64"); printf("getdents64(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent64 *) &buf[i]; @@ -127,9 +130,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents64(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents64(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -140,10 +143,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents64") #endif diff -Nru strace-4.11/tests-mx32/getdents64.test strace-4.12/tests-mx32/getdents64.test --- strace-4.11/tests-mx32/getdents64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/getdents64.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a24 -vegetdents64 $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -v diff -Nru strace-4.11/tests-mx32/getdents.c strace-4.12/tests-mx32/getdents.c --- strace-4.11/tests-mx32/getdents.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/getdents.c 2016-04-26 22:38:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,23 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_getdents -#include -#include -#include -#include -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include +# include +# include +# include +# include +# include "kernel_types.h" static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -100,7 +96,6 @@ main(int ac, const char **av) { char *dname; - int rc; assert(ac == 1); assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); @@ -110,12 +105,19 @@ assert(!creat(fname, 0600)); assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - while ((rc = syscall(__NR_getdents, 0, buf, sizeof(buf)))) { + + unsigned long count = (unsigned long) 0xfacefeeddeadbeef; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count); + printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + while ((rc = syscall(__NR_getdents, 0, buf, count))) { kernel_dirent *d; - int i; + long i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents"); printf("getdents(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent *) &buf[i]; @@ -123,9 +125,9 @@ printf(", "); print_dirent(d); } - printf("], %zu) = %d\n", sizeof(buf), rc); + printf("], %u) = %ld\n", (unsigned) count, rc); } - printf("getdents(0, [], %zu) = 0\n", sizeof(buf)); + printf("getdents(0, [], %u) = 0\n", (unsigned) count); puts("+++ exited with 0 +++"); assert(!unlink(fname)); assert(!chdir("..")); @@ -136,10 +138,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents") #endif diff -Nru strace-4.11/tests-mx32/getdents.test strace-4.12/tests-mx32/getdents.test --- strace-4.11/tests-mx32/getdents.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/getdents.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a22 -vegetdents $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a22 -v diff -Nru strace-4.11/tests-mx32/getegid32.c strace-4.12/tests-mx32/getegid32.c --- strace-4.11/tests-mx32/getegid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getegid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid32 + +# include +# include + +int +main(void) +{ + printf("getegid32() = %ld\n", syscall(__NR_getegid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid32") + +#endif diff -Nru strace-4.11/tests-mx32/getegid32.test strace-4.12/tests-mx32/getegid32.test --- strace-4.11/tests-mx32/getegid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getegid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/getegid.c strace-4.12/tests-mx32/getegid.c --- strace-4.11/tests-mx32/getegid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getegid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid + +# include +# include + +int +main(void) +{ + printf("getegid() = %ld\n", syscall(__NR_getegid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid") + +#endif diff -Nru strace-4.11/tests-mx32/getegid.test strace-4.12/tests-mx32/getegid.test --- strace-4.11/tests-mx32/getegid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getegid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/geteuid32.c strace-4.12/tests-mx32/geteuid32.c --- strace-4.11/tests-mx32/geteuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/geteuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid32 + +# include +# include + +int +main(void) +{ + printf("geteuid32() = %ld\n", syscall(__NR_geteuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid32") + +#endif diff -Nru strace-4.11/tests-mx32/geteuid32.test strace-4.12/tests-mx32/geteuid32.test --- strace-4.11/tests-mx32/geteuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/geteuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/geteuid.c strace-4.12/tests-mx32/geteuid.c --- strace-4.11/tests-mx32/geteuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/geteuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid + +# include +# include + +int +main(void) +{ + printf("geteuid() = %ld\n", syscall(__NR_geteuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid") + +#endif diff -Nru strace-4.11/tests-mx32/geteuid.test strace-4.12/tests-mx32/geteuid.test --- strace-4.11/tests-mx32/geteuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/geteuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/getgid32.c strace-4.12/tests-mx32/getgid32.c --- strace-4.11/tests-mx32/getgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid32 + +# include +# include + +int +main(void) +{ + printf("getgid32() = %ld\n", syscall(__NR_getgid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid32") + +#endif diff -Nru strace-4.11/tests-mx32/getgid32.test strace-4.12/tests-mx32/getgid32.test --- strace-4.11/tests-mx32/getgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/getgid.c strace-4.12/tests-mx32/getgid.c --- strace-4.11/tests-mx32/getgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid + +# include +# include + +int +main(void) +{ + printf("getgid() = %ld\n", syscall(__NR_getgid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid") + +#endif diff -Nru strace-4.11/tests-mx32/getgid.test strace-4.12/tests-mx32/getgid.test --- strace-4.11/tests-mx32/getgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/getgroups32.c strace-4.12/tests-mx32/getgroups32.c --- strace-4.11/tests-mx32/getgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_getgroups32 + +# include "getgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups32") + +#endif diff -Nru strace-4.11/tests-mx32/getgroups32.test strace-4.12/tests-mx32/getgroups32.test --- strace-4.11/tests-mx32/getgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-mx32/getgroups.c strace-4.12/tests-mx32/getgroups.c --- strace-4.11/tests-mx32/getgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,148 @@ +/* + * Check decoding of getgroups/getgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_getgroups32 + +# define SYSCALL_NR __NR_getgroups32 +# define SYSCALL_NAME "getgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_getgroups + +# define SYSCALL_NR __NR_getgroups +# define SYSCALL_NAME "getgroups" +# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +#define MAX_STRLEN 32 +static long ngroups; + +static void +get_groups(const long size, GID_TYPE *const g) +{ + long i = syscall(SYSCALL_NR, size, g); + if (i != ngroups) + perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); + + printf("%s(%u, [", SYSCALL_NAME, (unsigned) size); + for (i = 0; i < ngroups; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + printf("%u", (unsigned int) g[i]); + } + printf("]) = %ld\n", ngroups); +} + +int +main(void) +{ + long rc; + + /* check how the first argument is decoded */ + ngroups = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, ngroups); + if (ngroups < 0) + perror_msg_and_fail(SYSCALL_NAME); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, -1U, rc, errno2name()); + + const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); + + rc = syscall(SYSCALL_NR, ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); + if (rc < 0) + printf("%s(%u, NULL) = %ld %s (%m)\n", + SYSCALL_NAME, ngroups_max, rc, errno2name()); + else + printf("%s(%u, NULL) = %ld\n", + SYSCALL_NAME, ngroups_max, rc); + + /* check how the second argument is decoded */ + GID_TYPE *const g1 = + tail_alloc(ngroups ? sizeof(*g1) * ngroups : 1); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * (ngroups + 1)); + void *efault = g2 + ngroups + 1; + + get_groups(ngroups, g1); + get_groups(ngroups + 1, g1); + get_groups(ngroups + 1, g2); + + if (ngroups) { + rc = syscall(SYSCALL_NR, ngroups, efault); + printf("%s(%u, %p) = %ld %s (%m)\n", + SYSCALL_NAME, (unsigned) ngroups, efault, + rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups") + +#endif diff -Nru strace-4.11/tests-mx32/getgroups.test strace-4.12/tests-mx32/getgroups.test --- strace-4.11/tests-mx32/getgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-mx32/get_mempolicy.c strace-4.12/tests-mx32/get_mempolicy.c --- strace-4.11/tests-mx32/get_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/get_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,135 @@ +/* + * Check decoding of get_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_get_mempolicy + +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(unsigned long maxnode) +{ + unsigned long *const nodemask = + tail_alloc(sizeof(*nodemask) * NLONGS(maxnode)); + + if (syscall(__NR_get_mempolicy, 0, nodemask, maxnode, 0, 0)) { + printf("get_mempolicy(NULL, %p, %lu, NULL, 0) = -1 %s (%m)\n", + nodemask, maxnode, errno2name()); + return; + } + + printf("get_mempolicy(NULL, ["); + + unsigned int nlongs = NLONGS(maxnode); + unsigned int i; + for (i = 0; i < nlongs; ++i) { + if (i) + fputs(", ", stdout); + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(*nodemask) * 2 + 2, nodemask[i]); + } + + printf("], %lu, NULL, 0) = 0\n", maxnode); +} + +int +main(void) +{ + long rc; + + if (syscall(__NR_get_mempolicy, 0, 0, 0, 0, 0)) + perror_msg_and_skip("get_mempolicy"); + puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); + + int *mode = (void *) 0xdefaced1baddeed2; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long flags = -1U; + rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); + printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", + mode, nodemask, maxnode, addr, + "MPOL_F_NODE|MPOL_F_ADDR", + flags & ~3, rc, errno2name()); + + mode = tail_alloc(sizeof(*mode)); + + rc = syscall(__NR_get_mempolicy, mode, 0, 0, 0, 0); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, NULL, 0) = %ld\n", rc); + + *mode = -1; + rc = syscall(__NR_get_mempolicy, mode, 0, 0, mode - 1, 2); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, %p, MPOL_F_ADDR) = %ld\n", mode - 1, rc); + + maxnode = get_page_size() * 8; + + print_nodes(maxnode); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + + maxnode = sizeof(*nodemask) * 8; + print_nodes(maxnode - 1); + print_nodes(maxnode ); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + print_nodes(maxnode * 2 - 1); + print_nodes(maxnode * 2 ); + print_nodes(maxnode * 2 + 1); + print_nodes(maxnode * 2 + 2); + print_nodes(maxnode * 3 - 1); + print_nodes(maxnode * 3 ); + print_nodes(maxnode * 3 + 1); + print_nodes(maxnode * 3 + 2); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_mempolicy") + +#endif diff -Nru strace-4.11/tests-mx32/get_mempolicy.test strace-4.12/tests-mx32/get_mempolicy.test --- strace-4.11/tests-mx32/get_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/get_mempolicy.test 2016-04-28 01:17:39.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a38 diff -Nru strace-4.11/tests-mx32/get_page_size.c strace-4.12/tests-mx32/get_page_size.c --- strace-4.11/tests-mx32/get_page_size.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/get_page_size.c 2016-01-05 23:17:07.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include + +size_t +get_page_size(void) +{ + static size_t page_size; + + if (!page_size) + page_size = sysconf(_SC_PAGESIZE); + + return page_size; +} diff -Nru strace-4.11/tests-mx32/getpgrp.c strace-4.12/tests-mx32/getpgrp.c --- strace-4.11/tests-mx32/getpgrp.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getpgrp.c 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_getpgrp + +# include +# include + +int +main(void) +{ + printf("getpgrp() = %ld\n", syscall(__NR_getpgrp)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgrp") + +#endif diff -Nru strace-4.11/tests-mx32/getpgrp.test strace-4.12/tests-mx32/getpgrp.test --- strace-4.11/tests-mx32/getpgrp.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getpgrp.test 2016-04-21 17:37:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgrp syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/getrandom.c strace-4.12/tests-mx32/getrandom.c --- strace-4.11/tests-mx32/getrandom.c 2015-08-28 08:16:43.000000000 +0000 +++ strace-4.12/tests-mx32/getrandom.c 2016-01-06 11:36:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,38 +25,40 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_getrandom + +# include +# include + int main(void) { -#ifdef __NR_getrandom unsigned char buf[4]; if (syscall(__NR_getrandom, buf, sizeof(buf) - 1, 0) != sizeof(buf) - 1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\", 3, 0) = 3\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 1) != sizeof(buf)) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(\"\\x%02x\\x%02x\\x%02x\"..., 4, GRND_NONBLOCK) = 4\n", (int) buf[0], (int) buf[1], (int) buf[2]); if (syscall(__NR_getrandom, buf, sizeof(buf), 0x3003) != -1) - return 77; + perror_msg_and_skip("getrandom"); printf("getrandom(%p, 4, GRND_NONBLOCK|GRND_RANDOM|0x3000) = " - "-1 EINVAL (Invalid argument)\n", buf); + "-1 EINVAL (%m)\n", buf); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_getrandom") + #endif -} diff -Nru strace-4.11/tests-mx32/getrandom.test strace-4.12/tests-mx32/getrandom.test --- strace-4.11/tests-mx32/getrandom.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/getrandom.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check getrandom syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e getrandom -xx -s3 -a32 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a32 -xx -s3 diff -Nru strace-4.11/tests-mx32/getresgid32.c strace-4.12/tests-mx32/getresgid32.c --- strace-4.11/tests-mx32/getresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid32 + +# define SYSCALL_NR __NR_getresgid32 +# define SYSCALL_NAME "getresgid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid32") + +#endif diff -Nru strace-4.11/tests-mx32/getresgid32.test strace-4.12/tests-mx32/getresgid32.test --- strace-4.11/tests-mx32/getresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-mx32/getresgid.c strace-4.12/tests-mx32/getresgid.c --- strace-4.11/tests-mx32/getresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid + +# define SYSCALL_NR __NR_getresgid +# define SYSCALL_NAME "getresgid" + +# if defined __NR_getresgid32 && __NR_getresgid != __NR_getresgid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid") + +#endif diff -Nru strace-4.11/tests-mx32/getresgid.test strace-4.12/tests-mx32/getresgid.test --- strace-4.11/tests-mx32/getresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests-mx32/getresugid.c strace-4.12/tests-mx32/getresugid.c --- strace-4.11/tests-mx32/getresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresugid.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Check decoding of getresuid/getresgid/getresuid32/getresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +main(void) +{ + unsigned UGID_TYPE *const r = tail_alloc(sizeof(*r)); + unsigned UGID_TYPE *const e = tail_alloc(sizeof(*e)); + unsigned UGID_TYPE *const s = tail_alloc(sizeof(*s)); + + if (syscall(SYSCALL_NR, r, e, s)) + perror_msg_and_fail(SYSCALL_NAME); + + printf("%s([%u], [%u], [%u]) = 0\n", SYSCALL_NAME, + (unsigned) *r, (unsigned) *e, (unsigned) *s); + + assert(syscall(SYSCALL_NR, NULL, e, s) == -1); + printf("%s(NULL, %p, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, e, s); + + assert(syscall(SYSCALL_NR, r, NULL, s) == -1); + printf("%s(%p, NULL, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, s); + + assert(syscall(SYSCALL_NR, r, e, NULL) == -1); + printf("%s(%p, %p, NULL) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, e); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/getresuid32.c strace-4.12/tests-mx32/getresuid32.c --- strace-4.11/tests-mx32/getresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid32 + +# define SYSCALL_NR __NR_getresuid32 +# define SYSCALL_NAME "getresuid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid32") + +#endif diff -Nru strace-4.11/tests-mx32/getresuid32.test strace-4.12/tests-mx32/getresuid32.test --- strace-4.11/tests-mx32/getresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-mx32/getresuid.c strace-4.12/tests-mx32/getresuid.c --- strace-4.11/tests-mx32/getresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid + +# define SYSCALL_NR __NR_getresuid +# define SYSCALL_NAME "getresuid" + +# if defined __NR_getresuid32 && __NR_getresuid != __NR_getresuid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid") + +#endif diff -Nru strace-4.11/tests-mx32/getresuid.test strace-4.12/tests-mx32/getresuid.test --- strace-4.11/tests-mx32/getresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getresuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff -Nru strace-4.11/tests-mx32/getrusage.c strace-4.12/tests-mx32/getrusage.c --- strace-4.11/tests-mx32/getrusage.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getrusage.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrusage + +# include +# include +# include +# include + +int +main(void) +{ + struct rusage *const usage = tail_alloc(sizeof(struct rusage)); + int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); + printf("getrusage(RUSAGE_SELF, {ru_utime={%ju, %ju}" + ", ru_stime={%ju, %ju}, ru_maxrss=%lu, ru_ixrss=%lu" + ", ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" + ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" + ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", + (uintmax_t) usage->ru_utime.tv_sec, + (uintmax_t) usage->ru_utime.tv_usec, + (uintmax_t) usage->ru_stime.tv_sec, + (uintmax_t) usage->ru_stime.tv_usec, + usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, + usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, + usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, + usage->ru_msgsnd, usage->ru_msgrcv, usage->ru_nsignals, + usage->ru_nvcsw, usage->ru_nivcsw, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrusage") + +#endif diff -Nru strace-4.11/tests-mx32/getrusage.test strace-4.12/tests-mx32/getrusage.test --- strace-4.11/tests-mx32/getrusage.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getrusage.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrusage syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v diff -Nru strace-4.11/tests-mx32/getsid.c strace-4.12/tests-mx32/getsid.c --- strace-4.11/tests-mx32/getsid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getsid.c 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/getsid.test strace-4.12/tests-mx32/getsid.test --- strace-4.11/tests-mx32/getsid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getsid.test 2016-04-21 17:31:05.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/getuid32.c strace-4.12/tests-mx32/getuid32.c --- strace-4.11/tests-mx32/getuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid32 + +# include +# include + +int +main(void) +{ + printf("getuid32() = %ld\n", syscall(__NR_getuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid32") + +#endif diff -Nru strace-4.11/tests-mx32/getuid32.test strace-4.12/tests-mx32/getuid32.test --- strace-4.11/tests-mx32/getuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff -Nru strace-4.11/tests-mx32/getuid.c strace-4.12/tests-mx32/getuid.c --- strace-4.11/tests-mx32/getuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid + +# include +# include + +int +main(void) +{ + printf("getuid() = %ld\n", syscall(__NR_getuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid") + +#endif diff -Nru strace-4.11/tests-mx32/getuid.test strace-4.12/tests-mx32/getuid.test --- strace-4.11/tests-mx32/getuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check getuid syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq +run_prog > /dev/null +run_strace -qq -a9 -e$NAME $args > "$EXP" +uniq < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests-mx32/getxxid.c strace-4.12/tests-mx32/getxxid.c --- strace-4.11/tests-mx32/getxxid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getxxid.c 2016-01-09 00:09:04.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getxpid && defined __NR_getxuid && defined __NR_getxgid + +# include +# include + +int +main(void) +{ + long id; + pid_t ppid; + + id = syscall(__NR_getxpid); + ppid = getppid(); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + + id = syscall(__NR_getxuid); + printf("getxuid() = %ld (euid %ld)\n", id, id); + + id = syscall(__NR_getxgid); + printf("getxgid() = %ld (egid %ld)\n", id, id); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getxpid && __NR_getxuid && __NR_getxgid") + +#endif diff -Nru strace-4.11/tests-mx32/getxxid.test strace-4.12/tests-mx32/getxxid.test --- strace-4.11/tests-mx32/getxxid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/getxxid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getxpid, getxuid, and getxgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid diff -Nru strace-4.11/tests-mx32/hexdump_strdup.c strace-4.12/tests-mx32/hexdump_strdup.c --- strace-4.11/tests-mx32/hexdump_strdup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/hexdump_strdup.c 2016-04-02 18:24:36.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Make a hexdump copy of C string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexdump_memdup(const char *src, size_t len) +{ + size_t dst_size = 3 * len + 2; + assert(dst_size > len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + const unsigned char *usrc = (const unsigned char *) src; + size_t i; + for (i = 0; i < len; ++i) { + unsigned int c = usrc[i]; + *(p++) = ' '; + if (i == 8) + *(p++) = ' '; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} + +const char * +hexdump_strdup(const char *src) +{ + return hexdump_memdup(src, strlen(src)); +} diff -Nru strace-4.11/tests-mx32/hexquote_strndup.c strace-4.12/tests-mx32/hexquote_strndup.c --- strace-4.11/tests-mx32/hexquote_strndup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/hexquote_strndup.c 2016-02-04 03:36:25.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Make a hexquoted copy of a string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexquote_strndup(const char *src, const size_t src_len) +{ + const size_t dst_size = 4 * src_len + 1; + assert(dst_size > src_len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + size_t i; + for (i = 0; i < src_len; ++i) { + unsigned int c = ((const unsigned char *) src)[i]; + *(p++) = '\\'; + *(p++) = 'x'; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} diff -Nru strace-4.11/tests-mx32/inet-accept-connect-send-recv.c strace-4.12/tests-mx32/inet-accept-connect-send-recv.c --- strace-4.11/tests-mx32/inet-accept-connect-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/inet-accept-connect-send-recv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main(void) -{ - static const char data[] = "data"; - const size_t size = sizeof(data) - 1; - struct sockaddr_in addr; - socklen_t len = sizeof(addr); - pid_t pid; - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - close(0); - close(1); - - if (socket(PF_INET, SOCK_STREAM, 0)) { - perror("socket"); - return 77; - } - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } - assert(listen(0, 5) == 0); - - memset(&addr, 0, sizeof(addr)); - assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); - - assert((pid = fork()) >= 0); - - if (pid) { - char buf[sizeof(data)]; - int status; - - assert(accept(0, (struct sockaddr *) &addr, &len) == 1); - assert(close(0) == 0); - assert(recv(1, buf, sizeof(buf), MSG_WAITALL) == (int) size); - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - assert(close(1) == 0); - } else { - assert(close(0) == 0); - assert(socket(PF_INET, SOCK_STREAM, 0) == 0); - assert(connect(0, (struct sockaddr *) &addr, len) == 0); - assert(send(0, data, size, MSG_DONTROUTE) == (int) size); - assert(close(0) == 0); - } - - return 0; -} diff -Nru strace-4.11/tests-mx32/inet-cmsg.c strace-4.12/tests-mx32/inet-cmsg.c --- strace-4.11/tests-mx32/inet-cmsg.c 2015-12-06 01:02:17.000000000 +0000 +++ strace-4.12/tests-mx32/inet-cmsg.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,8 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include #include #include #include @@ -75,6 +75,7 @@ } } +#ifdef IP_ORIGDSTADDR static void print_origdstaddr(const struct cmsghdr *c) { @@ -84,6 +85,7 @@ printf("IP_ORIGDSTADDR, {sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}", ntohs(sin->sin_port)); } +#endif int main(void) @@ -94,22 +96,18 @@ assert(!close(0)); assert(!close(3)); - if (socket(PF_INET, SOCK_DGRAM, 0)) { - perror("socket"); - return 77; - } + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); struct sockaddr_in addr = { .sin_family = AF_INET, .sin_addr.s_addr = htonl(INADDR_LOOPBACK) }; socklen_t len = sizeof(addr); - if (bind(0, (struct sockaddr *) &addr, len)) { - perror("bind"); - return 77; - } + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); assert(!getsockname(0, (struct sockaddr *) &addr, &len)); - assert(socket(PF_INET, SOCK_DGRAM, 0) == 3); + assert(socket(AF_INET, SOCK_DGRAM, 0) == 3); assert(!connect(3, (struct sockaddr *) &addr, len)); const int opt_1 = htonl(0x01000000); @@ -149,9 +147,9 @@ printf("recvmsg(0, {msg_name(%u)={sa_family=AF_INET, sin_port=htons(%u)" ", sin_addr=inet_addr(\"127.0.0.1\")}, msg_iov(1)=[{\"%s\", %zu}]" - ", msg_controllen=%zu, [", + ", msg_controllen=%lu, [", (unsigned) mh.msg_namelen, ntohs(addr.sin_port), - data, size, mh.msg_controllen); + data, size, (unsigned long) mh.msg_controllen); struct cmsghdr *c; for (c = CMSG_FIRSTHDR(&mh); c; c = CMSG_NXTHDR(&mh, c)) { @@ -159,8 +157,8 @@ continue; if (c != control) printf(", "); - printf("{cmsg_len=%zu, cmsg_level=SOL_IP, cmsg_type=", - c->cmsg_len); + printf("{cmsg_len=%lu, cmsg_level=SOL_IP, cmsg_type=", + (unsigned long) c->cmsg_len); switch (c->cmsg_type) { case IP_PKTINFO: print_pktinfo(c); diff -Nru strace-4.11/tests-mx32/inet-cmsg.test strace-4.12/tests-mx32/inet-cmsg.test --- strace-4.11/tests-mx32/inet-cmsg.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/inet-cmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check IPPROTO_IP control messages decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -erecvmsg $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=recvmsg diff -Nru strace-4.11/tests-mx32/init.sh strace-4.12/tests-mx32/init.sh --- strace-4.11/tests-mx32/init.sh 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/init.sh 2016-03-30 00:16:24.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,6 +26,10 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ME_="${0##*/}" +LOG="$ME_.tmp" +OUT="$LOG.out" +EXP="$LOG.exp" +NAME="${ME_%.test}" warn_() { printf >&2 '%s\n' "$*"; } fail_() { warn_ "$ME_: failed test: $*"; exit 1; } @@ -48,7 +52,7 @@ run_prog() { if [ $# -eq 0 ]; then - set -- "./${ME_%.test}" + set -- "./$NAME" fi args="$*" "$@" || { @@ -108,7 +112,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - program="$srcdir/${ME_%.test}.awk" + program="$srcdir/$NAME.awk" else program="$1"; shift fi @@ -138,7 +142,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - expected="$srcdir/${ME_%.test}.expected" + expected="$srcdir/$NAME.expected" else expected="$1"; shift fi @@ -168,7 +172,7 @@ output="$1"; shift fi if [ $# -eq 0 ]; then - patterns="$srcdir/${ME_%.test}.expected" + patterns="$srcdir/$NAME.expected" else patterns="$1"; shift fi @@ -197,10 +201,21 @@ } } +# Usage: run_strace_match_diff [args to run_strace] +run_strace_match_diff() +{ + args="$*" + [ -n "$args" -a -z "${args##*-e trace=*}" ] || + set -- -e trace="$NAME" "$@" + run_prog > /dev/null + run_strace "$@" $args > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + check_prog cat check_prog rm -LOG="$ME_.tmp" rm -f "$LOG" : "${STRACE:=../strace}" diff -Nru strace-4.11/tests-mx32/inode_of_sockfd.c strace-4.12/tests-mx32/inode_of_sockfd.c --- strace-4.11/tests-mx32/inode_of_sockfd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/inode_of_sockfd.c 2016-02-02 00:24:48.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of strace test suite. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +unsigned long +inode_of_sockfd(const int fd) +{ + assert(fd >= 0); + + char linkpath[sizeof("/proc/self/fd/%u") + sizeof(int) * 3]; + assert(snprintf(linkpath, sizeof(linkpath), "/proc/self/fd/%u", fd) + < (int) sizeof(linkpath)); + + char path[PATH_MAX + 1]; + const ssize_t path_len = readlink(linkpath, path, sizeof(path) - 1); + if (path_len < 0) + perror_msg_and_fail("readlink: %s", linkpath); + path[path_len] = '\0'; + + static const char prefix[] = "socket:["; + const size_t prefix_len = sizeof(prefix) - 1; + assert(strncmp(path, prefix, prefix_len) == 0 + && path[path_len - 1] == ']'); + + return strtoul(path + prefix_len, NULL, 10); +} diff -Nru strace-4.11/tests-mx32/ioctl_block.c strace-4.12/tests-mx32/ioctl_block.c --- strace-4.11/tests-mx32/ioctl_block.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_block.c 2016-05-26 15:16:31.000000000 +0000 @@ -0,0 +1,216 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRUCT_BLK_USER_TRACE_SETUP +# include +#endif +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static struct xlat block_argless[] = { + XLAT(BLKRRPART), + XLAT(BLKFLSBUF), +#ifdef BLKTRACESTART + XLAT(BLKTRACESTART), +#endif +#ifdef BLKTRACESTOP + XLAT(BLKTRACESTOP), +#endif +#ifdef BLKTRACETEARDOWN + XLAT(BLKTRACETEARDOWN), +#endif +}; + +#define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(BLKBSZGET); + TEST_NULL_ARG(BLKBSZSET); + TEST_NULL_ARG(BLKFRAGET); + TEST_NULL_ARG(BLKGETSIZE); + TEST_NULL_ARG(BLKGETSIZE64); + TEST_NULL_ARG(BLKPG); + TEST_NULL_ARG(BLKRAGET); + TEST_NULL_ARG(BLKROGET); + TEST_NULL_ARG(BLKROSET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSSZGET); +#ifdef BLKALIGNOFF + TEST_NULL_ARG(BLKALIGNOFF); +#endif +#ifdef BLKDAXGET + TEST_NULL_ARG(BLKDAXGET); +#endif +#ifdef BLKDISCARD + TEST_NULL_ARG(BLKDISCARD); +#endif +#ifdef BLKDISCARDZEROES + TEST_NULL_ARG(BLKDISCARDZEROES); +#endif +#ifdef BLKIOMIN + TEST_NULL_ARG(BLKIOMIN); +#endif +#ifdef BLKIOOPT + TEST_NULL_ARG(BLKIOOPT); +#endif +#ifdef BLKPBSZGET + TEST_NULL_ARG(BLKPBSZGET); +#endif +#ifdef BLKROTATIONAL + TEST_NULL_ARG(BLKROTATIONAL); +#endif +#ifdef BLKSECDISCARD + TEST_NULL_ARG(BLKSECDISCARD); +#endif +#ifdef BLKZEROOUT + TEST_NULL_ARG(BLKZEROOUT); +#endif +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + TEST_NULL_ARG(BLKTRACESETUP); +#endif + + ioctl(-1, BLKRASET, lmagic); + printf("ioctl(-1, BLKRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + ioctl(-1, BLKFRASET, lmagic); + printf("ioctl(-1, BLKFRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + + ioctl(-1, BLKROSET, val_int); + printf("ioctl(-1, BLKROSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + ioctl(-1, BLKBSZSET, val_int); + printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); + pair_int64[0] = 0xdeadbeefbadc0ded; + pair_int64[1] = 0xfacefeedcafef00d; + +#ifdef BLKDISCARD + ioctl(-1, BLKDISCARD, pair_int64); + printf("ioctl(-1, BLKDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKSECDISCARD + ioctl(-1, BLKSECDISCARD, pair_int64); + printf("ioctl(-1, BLKSECDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKZEROOUT + ioctl(-1, BLKZEROOUT, pair_int64); + printf("ioctl(-1, BLKZEROOUT, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + + struct blkpg_ioctl_arg *const blkpg = tail_alloc(sizeof(*blkpg)); + blkpg->op = 3; + blkpg->flags = 0xdeadbeef; + blkpg->datalen = 0xbadc0ded; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data=%#lx}) = -1 EBADF (%m)\n", + "BLKPG_RESIZE_PARTITION", blkpg->flags, blkpg->datalen, + (unsigned long) blkpg->data); + + struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); + bp->start = 0xfac1fed2dad3bef4; + bp->length = 0xfac5fed6dad7bef8; + bp->pno = magic; + memset(bp->devname, 'A', sizeof(bp->devname)); + memset(bp->volname, 'B', sizeof(bp->volname)); + blkpg->op = 1; + blkpg->data = bp; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data={start=%lld, length=%lld, pno=%d" + ", devname=\"%.*s\", volname=\"%.*s\"}})" + " = -1 EBADF (%m)\n", + "BLKPG_ADD_PARTITION", + blkpg->flags, blkpg->datalen, + bp->start, bp->length, bp->pno, + (int) sizeof(bp->devname) - 1, bp->devname, + (int) sizeof(bp->volname) - 1, bp->volname); + +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); + init_magic(buts, sizeof(*buts)); + + ioctl(-1, BLKTRACESETUP, buts); + printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" + ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})" + " = -1 EBADF (%m)\n", + buts->act_mask, buts->buf_size, buts->buf_nr, + buts->start_lba, buts->end_lba, buts->pid); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(block_argless); ++i) { + ioctl(-1, (unsigned long) block_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", block_argless[i].str); + } + + ioctl(-1, _IOC(_IOC_READ, 0x12, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x12, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/ioctl_block.test strace-4.12/tests-mx32/ioctl_block.test --- strace-4.11/tests-mx32/ioctl_block.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_block.test 2016-05-26 14:44:13.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of BLK* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioctl.c strace-4.12/tests-mx32/ioctl.c --- strace-4.11/tests-mx32/ioctl.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl.c 2016-05-05 21:20:45.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -64,36 +61,36 @@ struct termios tty; (void) ioctl(-1, TCGETS, &tty); printf("ioctl(-1, TCGETS, %p)" - " = -1 EBADF (Bad file descriptor)\n", &tty); + " = -1 EBADF (%m)\n", &tty); #endif (void) ioctl(-1, MMTIMER_GETRES, &data); printf("ioctl(-1, MMTIMER_GETRES, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, VIDIOC_ENUMINPUT, 0); - printf("ioctl(-1, VIDIOC_ENUMINPUT, 0)" - " = -1 EBADF (Bad file descriptor)\n"); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL)" + " = -1 EBADF (%m)\n"); (void) ioctl(-1, HIDIOCGVERSION, &data); printf("ioctl(-1, HIDIOCGRDESCSIZE or HIDIOCGVERSION, %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, HIDIOCGPHYS(8), &data); printf("ioctl(-1, HIDIOCGPHYS(8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data); printf("ioctl(-1, EVIOCGBIT(EV_KEY, 8), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); (void) ioctl(-1, _IOR('M', 13, int), &data); printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" - " = -1 EBADF (Bad file descriptor)\n"); + " = -1 EBADF (%m)\n"); (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x08), %p)" - " = -1 EBADF (Bad file descriptor)\n", &data); + " = -1 EBADF (%m)\n", &data); puts("+++ exited with 0 +++"); return 0; @@ -101,10 +98,8 @@ #else -int -main(void ) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("MMTIMER_GETRES && VIDIOC_ENUMINPUT" + " && HIDIOCGVERSION && HIDIOCGPHYS" + " && EVIOCGBIT && EV_KEY") #endif diff -Nru strace-4.11/tests-mx32/ioctl_evdev.c strace-4.12/tests-mx32/ioctl_evdev.c --- strace-4.11/tests-mx32/ioctl_evdev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_evdev.c 2016-05-28 22:13:27.000000000 +0000 @@ -0,0 +1,284 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_INPUT_H + +# include +# include +# include +# include +# include +# include + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +# ifdef VERBOSE_IOCTL +static void +print_envelope(const struct ff_envelope *const e) +{ + printf(", envelope={attack_length=%hu, attack_level=%hu" + ", fade_length=%hu, fade_level=%#hx}", + e->attack_length, e->attack_level, + e->fade_length, e->fade_level); +} +# endif /* VERBOSE_IOCTL */ + +static void +print_ffe_common(const struct ff_effect *const ffe, const char *const type_str) +{ + printf("ioctl(-1, EVIOCSFF, {type=%s, id=%" PRIu16 + ", direction=%" PRIu16 ", ", + type_str, ffe->id, ffe->direction); +# ifdef VERBOSE_IOCTL + printf("trigger={button=%hu, interval=%hu}" + ", replay={length=%hu, delay=%hu}", + ffe->trigger.button, ffe->trigger.interval, + ffe->replay.length, ffe->replay.delay); +# endif /* VERBOSE_IOCTL */ +} + +# define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(EVIOCGVERSION); + TEST_NULL_ARG(EVIOCGEFFECTS); + TEST_NULL_ARG(EVIOCGID); + TEST_NULL_ARG(EVIOCGKEYCODE); + TEST_NULL_ARG(EVIOCSKEYCODE); + TEST_NULL_ARG(EVIOCSFF); +# ifdef EVIOCGKEYCODE_V2 + TEST_NULL_ARG(EVIOCGKEYCODE_V2); +# endif +# ifdef EVIOCSKEYCODE_V2 + TEST_NULL_ARG(EVIOCSKEYCODE_V2); +# endif +# ifdef EVIOCGREP + TEST_NULL_ARG(EVIOCGREP); +# endif +# ifdef EVIOCSREP + TEST_NULL_ARG(EVIOCSREP); +# endif +# ifdef EVIOCSCLOCKID + TEST_NULL_ARG(EVIOCSCLOCKID); +# endif + + TEST_NULL_ARG(EVIOCGNAME(0)); + TEST_NULL_ARG(EVIOCGPHYS(0)); + TEST_NULL_ARG(EVIOCGUNIQ(0)); + TEST_NULL_ARG(EVIOCGKEY(0)); + TEST_NULL_ARG(EVIOCGLED(0)); +# ifdef EVIOCGMTSLOTS + TEST_NULL_ARG(EVIOCGMTSLOTS(0)); +# endif +# ifdef EVIOCGPROP + TEST_NULL_ARG(EVIOCGPROP(0)); +# endif + TEST_NULL_ARG(EVIOCGSND(0)); +# ifdef EVIOCGSW + TEST_NULL_ARG(EVIOCGSW(0)); +# endif + + TEST_NULL_ARG(EVIOCGABS(ABS_X)); + TEST_NULL_ARG(EVIOCSABS(ABS_X)); + + TEST_NULL_ARG(EVIOCGBIT(EV_SYN, 0)); + TEST_NULL_ARG(EVIOCGBIT(EV_KEY, 1)); + TEST_NULL_ARG(EVIOCGBIT(EV_REL, 2)); + TEST_NULL_ARG(EVIOCGBIT(EV_ABS, 3)); + TEST_NULL_ARG(EVIOCGBIT(EV_MSC, 4)); +# ifdef EV_SW + TEST_NULL_ARG(EVIOCGBIT(EV_SW, 5)); +# endif + TEST_NULL_ARG(EVIOCGBIT(EV_LED, 6)); + TEST_NULL_ARG(EVIOCGBIT(EV_SND, 7)); + TEST_NULL_ARG(EVIOCGBIT(EV_REP, 8)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF, 9)); + TEST_NULL_ARG(EVIOCGBIT(EV_PWR, 10)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF_STATUS, 11)); + + ioctl(-1, EVIOCGBIT(EV_MAX, 42), 0); + printf("ioctl(-1, EVIOCGBIT(%#x /* EV_??? */, 42), NULL)" + " = -1 EBADF (%m)\n", EV_MAX); + + ioctl(-1, EVIOCRMFF, lmagic); + printf("ioctl(-1, EVIOCRMFF, %d) = -1 EBADF (%m)\n", (int) lmagic); + + ioctl(-1, EVIOCGRAB, lmagic); + printf("ioctl(-1, EVIOCGRAB, %lu) = -1 EBADF (%m)\n", lmagic); + +# ifdef EVIOCREVOKE + ioctl(-1, EVIOCREVOKE, lmagic); + printf("ioctl(-1, EVIOCREVOKE, %lu) = -1 EBADF (%m)\n", lmagic); +# endif + + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + +# ifdef EVIOCSCLOCKID + ioctl(-1, EVIOCSCLOCKID, val_int); + printf("ioctl(-1, EVIOCSCLOCKID, [%u]) = -1 EBADF (%m)\n", *val_int); +# endif + + int *pair_int = tail_alloc(sizeof(*pair_int) * 2); + pair_int[0] = 0xdeadbeef; + pair_int[1] = 0xbadc0ded; + +# ifdef EVIOSGREP + ioctl(-1, EVIOCSREP, pair_int); + printf("ioctl(-1, EVIOCSREP, [%u, %u]) = -1 EBADF (%m)\n", + pair_int[0], pair_int[1]); +# endif + + pair_int[1] = 1; + ioctl(-1, EVIOCSKEYCODE, pair_int); + printf("ioctl(-1, EVIOCSKEYCODE, [%u, %s]) = -1 EBADF (%m)\n", + pair_int[0], "KEY_ESC"); + +# ifdef EVIOCSKEYCODE_V2 + struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); + init_magic(ike, sizeof(*ike)); + ike->keycode = 2; + + ioctl(-1, EVIOCSKEYCODE_V2, ike); + printf("ioctl(-1, EVIOCSKEYCODE_V2, {flags=%" PRIu8 + ", len=%" PRIu8 ", ", ike->flags, ike->len); +# ifdef VERBOSE_IOCTL + printf("index=%" PRIu16 ", keycode=%s, scancode=[", + ike->index, "KEY_1"); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(ike->scancode); ++i) { + if (i > 0) + printf(", "); + printf("%" PRIx8, ike->scancode[i]); + } + printf("]"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); + init_magic(ffe, sizeof(*ffe)); + + ffe->type = FF_CONSTANT; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_CONSTANT"); + +# ifdef VERBOSE_IOCTL + printf(", constant={level=%hd", ffe->u.constant.level); + print_envelope(&ffe->u.constant.envelope); + printf("}"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + +# ifdef VERBOSE_IOCTL + ffe->type = FF_RAMP; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RAMP"); + printf(", ramp={start_level=%hd, end_level=%hd", + ffe->u.ramp.start_level, ffe->u.ramp.end_level); + print_envelope(&ffe->u.ramp.envelope); + errno = EBADF; + printf("}}) = -1 EBADF (%m)\n"); + + ffe->type = FF_PERIODIC; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_PERIODIC"); + printf(", periodic={waveform=%hu, period=%hu, magnitude=%hd" + ", offset=%hd, phase=%hu", + ffe->u.periodic.waveform, ffe->u.periodic.period, + ffe->u.periodic.magnitude, ffe->u.periodic.offset, + ffe->u.periodic.phase); + print_envelope(&ffe->u.periodic.envelope); + printf(", custom_len=%u, custom_data=%p}", + ffe->u.periodic.custom_len, ffe->u.periodic.custom_data); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = FF_RUMBLE; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RUMBLE"); + printf(", rumble={strong_magnitude=%hu, weak_magnitude=%hu}", + ffe->u.rumble.strong_magnitude, ffe->u.rumble.weak_magnitude); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = 0xff; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "0xff /* FF_??? */"); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x01, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_WRITE, 0x45, 0x01, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_INPUT_H") + +#endif diff -Nru strace-4.11/tests-mx32/ioctl_evdev.test strace-4.12/tests-mx32/ioctl_evdev.test --- strace-4.11/tests-mx32/ioctl_evdev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_evdev.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of EVIOC* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioctl_evdev-v.c strace-4.12/tests-mx32/ioctl_evdev-v.c --- strace-4.11/tests-mx32/ioctl_evdev-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_evdev-v.c 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_evdev-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_evdev.c" diff -Nru strace-4.11/tests-mx32/ioctl_evdev-v.test strace-4.12/tests-mx32/ioctl_evdev-v.test --- strace-4.11/tests-mx32/ioctl_evdev-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_evdev-v.test 2016-05-28 00:56:47.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding EVIOC* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/ioctl_mtd.c strace-4.12/tests-mx32/ioctl_mtd.c --- strace-4.11/tests-mx32/ioctl_mtd.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_mtd.c 2016-05-28 19:55:01.000000000 +0000 @@ -0,0 +1,208 @@ +/* + * This file is part of ioctl_mtd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +#define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + if (_IOC_DIR(cmd) == _IOC_WRITE) \ + printf("ioctl(-1, MIXER_WRITE(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else if (_IOC_DIR(cmd) == _IOC_READ) \ + printf("ioctl(-1, MIXER_READ(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +#define TEST_erase_info_user(cmd, eiu) \ + ioctl(-1, cmd, eiu); \ + printf("ioctl(-1, MIXER_%s(%u) or %s, {start=%#x, length=%#x})" \ + " = -1 EBADF (%m)\n", \ + (_IOC_DIR(cmd) == _IOC_READ) ? "READ" : "WRITE", \ + (unsigned int) _IOC_NR(cmd), #cmd, \ + eiu->start, eiu->length) + +int +main(void) +{ + TEST_NULL_ARG(ECCGETLAYOUT); + TEST_NULL_ARG(ECCGETSTATS); + TEST_NULL_ARG(MEMERASE); + TEST_NULL_ARG(MEMERASE64); + TEST_NULL_ARG(MEMGETBADBLOCK); + TEST_NULL_ARG(MEMGETINFO); + TEST_NULL_ARG(MEMGETOOBSEL); + TEST_NULL_ARG(MEMGETREGIONCOUNT); + TEST_NULL_ARG(MEMISLOCKED); + TEST_NULL_ARG(MEMLOCK); + TEST_NULL_ARG(MEMREADOOB); + TEST_NULL_ARG(MEMREADOOB64); + TEST_NULL_ARG(MEMSETBADBLOCK); + TEST_NULL_ARG(MEMUNLOCK); + TEST_NULL_ARG(MEMWRITE); + TEST_NULL_ARG(MEMWRITEOOB); + TEST_NULL_ARG(MEMWRITEOOB64); + TEST_NULL_ARG(OTPGETREGIONCOUNT); + TEST_NULL_ARG(OTPGETREGIONINFO); + TEST_NULL_ARG(OTPLOCK); + TEST_NULL_ARG(OTPSELECT); + + ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL); + printf("ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL) = -1 EBADF (%m)\n"); + + int *const opt = tail_alloc(sizeof(*opt)); + *opt = MTD_OTP_OFF; + ioctl(-1, OTPSELECT, opt); + printf("ioctl(-1, MIXER_READ(%u) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); + + uint64_t *const v64 = tail_alloc(sizeof(*v64)); + init_magic(v64, sizeof(*v64)); + + ioctl(-1, MEMGETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMGETBADBLOCK), *v64); + + ioctl(-1, MEMSETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMSETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); + + struct region_info_user *const riu = tail_alloc(sizeof(*riu)); + init_magic(riu, sizeof(*riu)); + ioctl(-1, MEMGETREGIONINFO, riu); + printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", + "MEMGETREGIONINFO" +#ifdef __i386__ + " or MTRRIOC_GET_PAGE_ENTRY" +#endif + , riu->regionindex); + + struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); + init_magic(eiu, sizeof(*eiu)); + + TEST_erase_info_user(MEMERASE, eiu); + TEST_erase_info_user(MEMLOCK, eiu); + TEST_erase_info_user(MEMUNLOCK, eiu); + TEST_erase_info_user(MEMISLOCKED, eiu); + + struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); + init_magic(eiu64, sizeof(*eiu64)); + ioctl(-1, MEMERASE64, eiu64); + printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMERASE64), "MEMERASE64", + (unsigned long long) eiu64->start, + (unsigned long long) eiu64->length); + + struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); + init_magic(oob, sizeof(*oob)); + + ioctl(-1, MEMWRITEOOB, oob); + printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + ioctl(-1, MEMREADOOB, oob); + printf("ioctl(-1, MEMREADOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); + init_magic(oob64, sizeof(*oob64)); + + ioctl(-1, MEMWRITEOOB64, oob64); + printf("ioctl(-1, MEMWRITEOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + ioctl(-1, MEMREADOOB64, oob64); + printf("ioctl(-1, MEMREADOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + + struct otp_info *const oi = tail_alloc(sizeof(*oi)); + init_magic(oi, sizeof(*oi)); + ioctl(-1, OTPLOCK, oi); + printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" + ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); + + struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); + init_magic(wr, sizeof(*wr)); + wr->mode = MTD_OPS_PLACE_OOB; + ioctl(-1, MEMWRITE, wr); + printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" + ", usr_data=%#llx, usr_oob=%#llx, mode=MTD_OPS_PLACE_OOB})" + " = -1 EBADF (%m)\n", + (unsigned long long) wr->start, + (unsigned long long) wr->len, + (unsigned long long) wr->ooblen, + (unsigned long long) wr->usr_data, + (unsigned long long) wr->usr_oob); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/ioctl_mtd.test strace-4.12/tests-mx32/ioctl_mtd.test --- strace-4.11/tests-mx32/ioctl_mtd.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_mtd.test 2016-05-28 19:31:50.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of 'M' type ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioctl_rtc.c strace-4.12/tests-mx32/ioctl_rtc.c --- strace-4.11/tests-mx32/ioctl_rtc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_rtc.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,218 @@ +/* + * This file is part of ioctl_rtc strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size - sizeof(int); + + for (; p <= end; ++p) + *(unsigned int *) p = magic; +} + +static void +print_rtc_time(const struct rtc_time *rt) +{ + printf("{tm_sec=%d, tm_min=%d, tm_hour=%d" + ", tm_mday=%d, tm_mon=%d, tm_year=%d", + rt->tm_sec, rt->tm_min, rt->tm_hour, + rt->tm_mday, rt->tm_mon, rt->tm_year); +#ifdef VERBOSE_IOCTL + printf(", tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); +#else + printf(", ...}"); +#endif +} + +static struct xlat rtc_argless[] = { + XLAT(RTC_AIE_OFF), + XLAT(RTC_PIE_ON), + XLAT(RTC_PIE_OFF), + XLAT(RTC_UIE_ON), + XLAT(RTC_WIE_ON), + XLAT(RTC_WIE_OFF), +#ifdef RTC_VL_CLR + XLAT(RTC_VL_CLR), +#endif +}; + +int +main(void) +{ + const unsigned int size = get_page_size(); + + void *const page = tail_alloc(size); + init_magic(page, size); + + struct rtc_time *rt = tail_alloc(sizeof(*rt)); + init_magic(rt, sizeof(*rt)); + + struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); + init_magic(wk, sizeof(*wk)); + + struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); + init_magic(pll, sizeof(*pll)); + + /* RTC_ALM_READ */ + ioctl(-1, RTC_ALM_READ, 0); + printf("ioctl(-1, RTC_ALM_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_READ, page); + printf("ioctl(-1, RTC_ALM_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_RD_TIME */ + ioctl(-1, RTC_RD_TIME, 0); + printf("ioctl(-1, RTC_RD_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_RD_TIME, page); + printf("ioctl(-1, RTC_RD_TIME, %p) = -1 EBADF (%m)\n", page); + + /* RTC_ALM_SET */ + ioctl(-1, RTC_ALM_SET, 0); + printf("ioctl(-1, RTC_ALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_SET, rt); + printf("ioctl(-1, RTC_ALM_SET, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_SET_TIME */ + ioctl(-1, RTC_SET_TIME, 0); + printf("ioctl(-1, RTC_SET_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_SET_TIME, rt); + printf("ioctl(-1, RTC_SET_TIME, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_IRQP_SET */ + ioctl(-1, RTC_IRQP_SET, lmagic); + printf("ioctl(-1, RTC_IRQP_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_EPOCH_SET */ + ioctl(-1, RTC_EPOCH_SET, lmagic); + printf("ioctl(-1, RTC_EPOCH_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_IRQP_READ */ + ioctl(-1, RTC_IRQP_READ, 0); + printf("ioctl(-1, RTC_IRQP_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_IRQP_READ, page); + printf("ioctl(-1, RTC_IRQP_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_EPOCH_READ */ + ioctl(-1, RTC_EPOCH_READ, 0); + printf("ioctl(-1, RTC_EPOCH_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_EPOCH_READ, page); + printf("ioctl(-1, RTC_EPOCH_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_RD */ + ioctl(-1, RTC_WKALM_RD, 0); + printf("ioctl(-1, RTC_WKALM_RD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_RD, page); + printf("ioctl(-1, RTC_WKALM_RD, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_SET */ + ioctl(-1, RTC_WKALM_SET, 0); + printf("ioctl(-1, RTC_WKALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_SET, wk); + printf("ioctl(-1, RTC_WKALM_SET, {enabled=%u, pending=%u, time=", + (unsigned) wk->enabled, (unsigned) wk->pending); + print_rtc_time(&wk->time); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + /* RTC_PLL_GET */ + ioctl(-1, RTC_PLL_GET, 0); + printf("ioctl(-1, RTC_PLL_GET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_GET, page); + printf("ioctl(-1, RTC_PLL_GET, %p) = -1 EBADF (%m)\n", page); + + /* RTC_PLL_SET */ + ioctl(-1, RTC_PLL_SET, 0); + printf("ioctl(-1, RTC_PLL_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_SET, pll); + printf("ioctl(-1, RTC_PLL_SET, {pll_ctrl=%d, pll_value=%d" + ", pll_max=%d, pll_min=%d, pll_posmult=%d, pll_negmult=%d" + ", pll_clock=%ld}) = -1 EBADF (%m)\n", + pll->pll_ctrl, pll->pll_value, pll->pll_max, pll->pll_min, + pll->pll_posmult, pll->pll_negmult, pll->pll_clock); + +#ifdef RTC_VL_READ + /* RTC_VL_READ */ + ioctl(-1, RTC_VL_READ, 0); + printf("ioctl(-1, RTC_VL_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_VL_READ, page); + printf("ioctl(-1, RTC_VL_READ, %p) = -1 EBADF (%m)\n", page); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(rtc_argless); ++i) { + ioctl(-1, (unsigned long) rtc_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", rtc_argless[i].str); + } + + ioctl(-1, RTC_UIE_OFF, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PHN_NOT_OH or RTC_UIE_OFF"); + + ioctl(-1, RTC_AIE_ON, lmagic); +#ifdef HPPA + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PA_PERF_ON or RTC_AIE_ON"); +#else + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "RTC_AIE_ON"); +#endif + + ioctl(-1, _IO(0x70, 0x40), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "NVRAM_INIT", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/ioctl_rtc.test strace-4.12/tests-mx32/ioctl_rtc.test --- strace-4.11/tests-mx32/ioctl_rtc.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_rtc.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic decoding of RTC_* ioctls. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioctl_rtc-v.c strace-4.12/tests-mx32/ioctl_rtc-v.c --- strace-4.11/tests-mx32/ioctl_rtc-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_rtc-v.c 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,3 @@ +/* This file is part of ioctl_rtc-v strace test. */ +#define VERBOSE_IOCTL +#include "ioctl_rtc.c" diff -Nru strace-4.11/tests-mx32/ioctl_rtc-v.test strace-4.12/tests-mx32/ioctl_rtc-v.test --- strace-4.11/tests-mx32/ioctl_rtc-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_rtc-v.test 2016-05-25 17:58:57.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding of RTC_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/ioctl.test strace-4.12/tests-mx32/ioctl.test --- strace-4.11/tests-mx32/ioctl.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,9 +5,11 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" -run_strace -a16 -e ioctl $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-mx32/ioctl_uffdio.c strace-4.12/tests-mx32/ioctl_uffdio.c --- strace-4.11/tests-mx32/ioctl_uffdio.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_uffdio.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_userfaultfd && defined HAVE_LINUX_USERFAULTFD_H + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +int +main(void) +{ + int rc; + int fd = syscall(__NR_userfaultfd, O_NONBLOCK); + size_t pagesize = getpagesize(); + + if (fd < 0) + perror_msg_and_skip("userfaultfd"); + + /* ---- API ---- */ + struct uffdio_api *api_struct = tail_alloc(sizeof(*api_struct)); + + /* With a bad fd */ + memset(api_struct, 0, sizeof(*api_struct)); + rc = ioctl(-1, UFFDIO_API, api_struct); + printf("ioctl(-1, UFFDIO_API, {api=0, features=0}) = %d %s (%m)\n", + rc, errno2name()); + /* With a bad pointer */ + rc = ioctl(fd, UFFDIO_API, NULL); + printf("ioctl(%d, UFFDIO_API, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + /* Normal call */ + api_struct->api = UFFD_API; + api_struct->features = 0; + rc = ioctl(fd, UFFDIO_API, api_struct); + printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, " + "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|" + "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API", + fd, (uint64_t)api_struct->features); + api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER| + 1ull<<_UFFDIO_UNREGISTER| + 1ull<<_UFFDIO_API); + if (api_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)api_struct->ioctls); + printf("}) = %d\n", rc); + + /* For the rest of the tests we need some anonymous memory */ + void *area1 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area1 == MAP_FAILED) + perror_msg_and_fail("mmap area1"); + void *area2 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area2 == MAP_FAILED) + perror_msg_and_fail("mmap area2"); + madvise(area2, pagesize, MADV_DONTNEED); + *(char *)area1 = 42; + + /* ---- REGISTER ---- */ + struct uffdio_register *register_struct = + tail_alloc(sizeof(*register_struct)); + memset(register_struct, 0, sizeof(*register_struct)); + + rc = ioctl(-1, UFFDIO_REGISTER, register_struct); + printf("ioctl(-1, UFFDIO_REGISTER, {range={start=0, len=0}, " + "mode=0}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_REGISTER, NULL); + printf("ioctl(%d, UFFDIO_REGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + register_struct->range.start = (uint64_t)(uintptr_t)area2; + register_struct->range.len = pagesize; + register_struct->mode = UFFDIO_REGISTER_MODE_MISSING; + rc = ioctl(fd, UFFDIO_REGISTER, register_struct); + printf("ioctl(%d, UFFDIO_REGISTER, {range={start=%p, len=%#zx}, " + "mode=UFFDIO_REGISTER_MODE_MISSING, ioctls=" + "1<<_UFFDIO_WAKE|1<<_UFFDIO_COPY|1<<_UFFDIO_ZEROPAGE", + fd, area2, pagesize); + register_struct->ioctls &= ~(1ull<<_UFFDIO_WAKE| + 1ull<<_UFFDIO_COPY| + 1ull<<_UFFDIO_ZEROPAGE); + if (register_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)register_struct->ioctls); + printf("}) = %d\n", rc); + + /* With area2 registered we can now do the atomic copies onto it + * but be careful not to access it in any other way otherwise + * userfaultfd will cause us to stall. + */ + /* ---- COPY ---- */ + struct uffdio_copy *copy_struct = tail_alloc(sizeof(*copy_struct)); + + memset(copy_struct, 0, sizeof(*copy_struct)); + rc = ioctl(-1, UFFDIO_COPY, copy_struct); + printf("ioctl(-1, UFFDIO_COPY, {dst=0, src=0, len=0, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_COPY, NULL); + printf("ioctl(%d, UFFDIO_COPY, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + copy_struct->dst = (uint64_t)(uintptr_t)area2; + copy_struct->src = (uint64_t)(uintptr_t)area1; + copy_struct->len = pagesize; + copy_struct->mode = UFFDIO_COPY_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_COPY, copy_struct); + printf("ioctl(%d, UFFDIO_COPY, {dst=%p, src=%p, len=%#zx," + " mode=UFFDIO_COPY_MODE_DONTWAKE, copy=%#zx}) = %d\n", + fd, area2, area1, pagesize, pagesize, rc); + + /* ---- ZEROPAGE ---- */ + struct uffdio_zeropage *zero_struct = tail_alloc(sizeof(*zero_struct)); + madvise(area2, pagesize, MADV_DONTNEED); + + memset(zero_struct, 0, sizeof(*zero_struct)); + rc = ioctl(-1, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(-1, UFFDIO_ZEROPAGE, {range={start=0, len=0}, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_ZEROPAGE, NULL); + printf("ioctl(%d, UFFDIO_ZEROPAGE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + zero_struct->range.start = (uint64_t)(uintptr_t)area2; + zero_struct->range.len = pagesize; + zero_struct->mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(%d, UFFDIO_ZEROPAGE, {range={start=%p, len=%#zx}," + " mode=UFFDIO_ZEROPAGE_MODE_DONTWAKE, zeropage=%#zx}) = %d\n", + fd, area2, pagesize, pagesize, rc); + + /* ---- WAKE ---- */ + struct uffdio_range *range_struct = tail_alloc(sizeof(*range_struct)); + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_WAKE, range_struct); + printf("ioctl(-1, UFFDIO_WAKE, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_WAKE, NULL); + printf("ioctl(%d, UFFDIO_WAKE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_WAKE, range_struct); + printf("ioctl(%d, UFFDIO_WAKE, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + + /* ---- UNREGISTER ---- */ + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(-1, UFFDIO_UNREGISTER, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_UNREGISTER, NULL); + printf("ioctl(%d, UFFDIO_UNREGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(%d, UFFDIO_UNREGISTER, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && HAVE_LINUX_USERFAULTFD_H") + +#endif diff -Nru strace-4.11/tests-mx32/ioctl_uffdio.test strace-4.12/tests-mx32/ioctl_uffdio.test --- strace-4.11/tests-mx32/ioctl_uffdio.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_uffdio.test 2016-05-10 11:00:12.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check userfaultfd ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioctl_v4l2.c strace-4.12/tests-mx32/ioctl_v4l2.c --- strace-4.11/tests-mx32/ioctl_v4l2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_v4l2.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,522 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static const unsigned int magic = 0xdeadbeef; + +static void +init_magic(void *addr, const unsigned int size) +{ + unsigned int *p = addr; + const unsigned int *end = addr + size; + + for (; p < end; ++p) + *(unsigned int *) p = magic; +} + +int +main(void ) +{ + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + init_magic(page, size); + + const union u_pixel_format { + unsigned int pixelformat; + unsigned char cc[sizeof(int)]; + } u = { +#if WORDS_BIGENDIAN + .cc = { + (unsigned char) (magic >> 24), + (unsigned char) (magic >> 16), + (unsigned char) (magic >> 8), + (unsigned char) magic + } +#else + .pixelformat = magic +#endif + }; + + /* VIDIOC_QUERYCAP */ + ioctl(-1, VIDIOC_QUERYCAP, 0); + printf("ioctl(-1, VIDIOC_QUERYCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCAP, page); + printf("ioctl(-1, VIDIOC_QUERYCAP, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_ENUM_FMT */ + ioctl(-1, VIDIOC_ENUM_FMT, 0); + printf("ioctl(-1, VIDIOC_ENUM_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_fmtdesc *const p_fmtdesc = tail_alloc(sizeof(*p_fmtdesc)); + p_fmtdesc->index = magic; + p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); + printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FMT */ + ioctl(-1, VIDIOC_G_FMT, 0); + printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_format *const p_format = + tail_alloc(sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + + ioctl(-1, VIDIOC_G_FMT, p_format); + printf("ioctl(-1, VIDIOC_G_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n"); + + /* VIDIOC_S_FMT */ + ioctl(-1, VIDIOC_S_FMT, 0); + printf("ioctl(-1, VIDIOC_S_FMT, NULL) = -1 EBADF (%m)\n"); + + p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_format->fmt.pix.width = 0xdad1beaf; + p_format->fmt.pix.height = 0xdad2beaf; + p_format->fmt.pix.pixelformat = 0xdeadbeef; + p_format->fmt.pix.field = V4L2_FIELD_NONE; + p_format->fmt.pix.bytesperline = 0xdad3beaf; + p_format->fmt.pix.sizeimage = 0xdad4beaf; + p_format->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; + + ioctl(-1, VIDIOC_S_FMT, p_format); + printf("ioctl(-1, VIDIOC_S_FMT, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", fmt.pix={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" + ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", + p_format->fmt.pix.width, p_format->fmt.pix.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3], + p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); + + /* VIDIOC_TRY_FMT */ + ioctl(-1, VIDIOC_TRY_FMT, 0); + printf("ioctl(-1, VIDIOC_TRY_FMT, NULL) = -1 EBADF (%m)\n"); + +#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + memset(p_format, -1, sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + p_format->fmt.pix_mp.width = 0xdad1beaf; + p_format->fmt.pix_mp.height = 0xdad2beaf; + p_format->fmt.pix_mp.pixelformat = 0xdeadbeef; + p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; + p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; + unsigned int i; + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + p_format->fmt.pix_mp.plane_fmt[i].sizeimage = 0xbadc0de0 | i; + p_format->fmt.pix_mp.plane_fmt[i].bytesperline = 0xdadbeaf0 | i; + } + ioctl(-1, VIDIOC_TRY_FMT, p_format); + printf("ioctl(-1, VIDIOC_TRY_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" + ", fmt.pix_mp={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" + ", plane_fmt=[", + p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, + u.cc[0], u.cc[1], u.cc[2], u.cc[3]); + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + if (i) + printf(", "); + printf("{sizeimage=%u, bytesperline=%u}", + p_format->fmt.pix_mp.plane_fmt[i].sizeimage, + p_format->fmt.pix_mp.plane_fmt[i].bytesperline); + } + printf("], num_planes=%u}}) = -1 EBADF (%m)\n", + p_format->fmt.pix_mp.num_planes); +#else + ioctl(-1, VIDIOC_TRY_FMT, page); + printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); +#endif + + /* VIDIOC_REQBUFS */ + ioctl(-1, VIDIOC_REQBUFS, 0); + printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_REQBUFS, + page + size - sizeof(struct v4l2_requestbuffers)); + printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" + " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" + " = -1 EBADF (%m)\n", magic, magic, magic); + + /* VIDIOC_QUERYBUF */ + ioctl(-1, VIDIOC_QUERYBUF, 0); + printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QBUF */ + ioctl(-1, VIDIOC_QBUF, 0); + printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_DQBUF */ + ioctl(-1, VIDIOC_DQBUF, 0); + printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_DQBUF, page + size - sizeof(struct v4l2_buffer)); + printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_FBUF */ + ioctl(-1, VIDIOC_G_FBUF, 0); + printf("ioctl(-1, VIDIOC_G_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_FBUF, page); + printf("ioctl(-1, VIDIOC_G_FBUF, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_FBUF */ + ioctl(-1, VIDIOC_S_FBUF, 0); + printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_FBUF, page + size - sizeof(struct v4l2_framebuffer)); + printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" + ", flags=%#x, base=%#lx}) = -1 EBADF (%m)\n", + magic, magic, *(unsigned long *) page); + + /* VIDIOC_STREAMON */ + ioctl(-1, VIDIOC_STREAMON, 0); + printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMON, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_STREAMOFF */ + ioctl(-1, VIDIOC_STREAMOFF, 0); + printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMOFF, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_PARM */ + ioctl(-1, VIDIOC_G_PARM, 0); + printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_PARM, page + size - sizeof(struct v4l2_streamparm)); + printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_PARM */ + ioctl(-1, VIDIOC_S_PARM, 0); + printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_PARM, page); + printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + struct v4l2_streamparm *const p_streamparm = + tail_alloc(sizeof(*p_streamparm)); + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + p_streamparm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + p_streamparm->parm.capture.capturemode = V4L2_MODE_HIGHQUALITY; + p_streamparm->parm.capture.timeperframe.numerator = 0xdeadbeef; + p_streamparm->parm.capture.timeperframe.denominator = 0xbadc0ded; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE" + ", parm.capture={capability=V4L2_CAP_TIMEPERFRAME" + ", capturemode=V4L2_MODE_HIGHQUALITY, timeperframe=%u/%u" + ", extendedmode=%u, readbuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.capture.timeperframe.numerator, + p_streamparm->parm.capture.timeperframe.denominator, -1U, -1U); + + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_streamparm->parm.output.outputmode = 0; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", parm.output={capability=V4L2_CAP_TIMEPERFRAME" + ", outputmode=0, timeperframe=%u/%u" + ", extendedmode=%u, writebuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.output.timeperframe.numerator, + p_streamparm->parm.output.timeperframe.denominator, -1U, -1U); + + /* VIDIOC_G_STD */ + ioctl(-1, VIDIOC_G_STD, 0); + printf("ioctl(-1, VIDIOC_G_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_STD, page); + printf("ioctl(-1, VIDIOC_G_STD, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_STD */ + ioctl(-1, VIDIOC_S_STD, 0); + printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_STD, page + size - sizeof(long long)); + printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", + *(unsigned long long *) page); + + /* VIDIOC_ENUMSTD */ + ioctl(-1, VIDIOC_ENUMSTD, 0); + printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_standard *const p_standard = + tail_alloc(sizeof(*p_standard)); + p_standard->index = magic; + ioctl(-1, VIDIOC_ENUMSTD, p_standard); + printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_ENUMINPUT */ + ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUMINPUT, page); + printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", + magic); + + /* VIDIOC_G_CTRL */ + ioctl(-1, VIDIOC_G_CTRL, 0); + printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CTRL */ + ioctl(-1, VIDIOC_S_CTRL, 0); + printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CTRL, page + size - sizeof(struct v4l2_control)); + printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" + ", value=%d}) = -1 EBADF (%m)\n", magic, magic); + + /* VIDIOC_QUERYCTRL */ + ioctl(-1, VIDIOC_QUERYCTRL, 0); + printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCTRL, + page + size - sizeof(struct v4l2_queryctrl)); +# ifdef V4L2_CTRL_FLAG_NEXT_CTRL + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" + "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", + magic & ~V4L2_CTRL_FLAG_NEXT_CTRL); +# else + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", magic); +# endif + + struct v4l2_queryctrl *const p_queryctrl = + tail_alloc(sizeof(*p_queryctrl)); + p_queryctrl->id = V4L2_CID_SATURATION; + ioctl(-1, VIDIOC_QUERYCTRL, p_queryctrl); + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CID_SATURATION})" + " = -1 EBADF (%m)\n"); + + /* VIDIOC_G_INPUT */ + ioctl(-1, VIDIOC_G_INPUT, 0); + printf("ioctl(-1, VIDIOC_G_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_INPUT, page); + printf("ioctl(-1, VIDIOC_G_INPUT, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_INPUT */ + ioctl(-1, VIDIOC_S_INPUT, 0); + printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_INPUT, page + size - sizeof(int)); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", magic); + + /* VIDIOC_CROPCAP */ + ioctl(-1, VIDIOC_CROPCAP, 0); + printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CROPCAP, page + size - sizeof(struct v4l2_cropcap)); + printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_G_CROP */ + ioctl(-1, VIDIOC_G_CROP, 0); + printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", magic); + + /* VIDIOC_S_CROP */ + ioctl(-1, VIDIOC_S_CROP, 0); + printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CROP, page + size - sizeof(struct v4l2_crop)); + printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", + magic, magic, magic, magic, magic); + +#ifdef VIDIOC_S_EXT_CTRLS + /* VIDIOC_S_EXT_CTRLS */ + ioctl(-1, VIDIOC_S_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_ext_controls *const p_ext_controls = + tail_alloc(sizeof(*p_ext_controls)); + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = 0; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_USER" + ", count=%u}) = -1 EBADF (%m)\n", p_ext_controls->count); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_MPEG; + p_ext_controls->count = magic; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_MPEG" + ", count=%u, controls=%p}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + p_ext_controls->count = 2; + p_ext_controls->controls = + tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); + p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; + p_ext_controls->controls[0].size = 0; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef; + p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; + p_ext_controls->controls[1].size = 2; + p_ext_controls->controls[1].string = + tail_alloc(p_ext_controls->controls[1].size); + + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "] => controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "], error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->error_idx); + + ++p_ext_controls->count; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + ", %p]}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls + 2); +# endif /* HAVE_DECL_V4L2_CTRL_TYPE_STRING */ + + /* VIDIOC_TRY_EXT_CTRLS */ + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = magic; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p})" + " = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + + /* VIDIOC_G_EXT_CTRLS */ + ioctl(-1, VIDIOC_G_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p" + ", error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls, + p_ext_controls->error_idx); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmsizeenum *const p_frmsizeenum = + tail_alloc(sizeof(*p_frmsizeenum)); + p_frmsizeenum->index = magic; + const union u_pixel_format u_frmsizeenum = { + .cc = { 'A', '\'', '\\', '\xfa' } + }; +#if WORDS_BIGENDIAN + p_frmsizeenum->pixel_format = + (unsigned) u_frmsizeenum.cc[0] << 24 | + (unsigned) u_frmsizeenum.cc[1] << 16 | + (unsigned) u_frmsizeenum.cc[2] << 8 | + (unsigned) u_frmsizeenum.cc[3]; +#else + p_frmsizeenum->pixel_format = u_frmsizeenum.pixelformat; +#endif + + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" + ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" + " = -1 EBADF (%m)\n", p_frmsizeenum->index, + u_frmsizeenum.cc[0], u_frmsizeenum.cc[1], + u_frmsizeenum.cc[2], u_frmsizeenum.cc[3]); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, page); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" + ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", width=%u, height=%u}) = -1 EBADF (%m)\n", + magic, u.cc[0], u.cc[1], u.cc[2], u.cc[3], magic, magic); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + ioctl(-1, VIDIOC_CREATE_BUFS, 0); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_CREATE_BUFS, + page + size - sizeof(struct v4l2_create_buffers)); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" + " /* V4L2_MEMORY_??? */, format={type=%#x" + " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", + magic, magic, magic); +#endif /* VIDIOC_CREATE_BUFS */ + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/ioctl_v4l2.test strace-4.12/tests-mx32/ioctl_v4l2.test --- strace-4.11/tests-mx32/ioctl_v4l2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioctl_v4l2.test 2016-05-05 21:20:56.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic VIDIOC_* ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff -Nru strace-4.11/tests-mx32/ioperm.c strace-4.12/tests-mx32/ioperm.c --- strace-4.11/tests-mx32/ioperm.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioperm.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_ioperm + +# include +# include + +int +main(void) +{ + const unsigned long port = (unsigned long) 0xdeafbeefffffffff; + + long rc = syscall(__NR_ioperm, port, 1, 0); + printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", + port, 1UL, 0, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioperm") + +#endif diff -Nru strace-4.11/tests-mx32/ioperm.test strace-4.12/tests-mx32/ioperm.test --- strace-4.11/tests-mx32/ioperm.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ioperm.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ioperm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-mx32/iopl.c strace-4.12/tests-mx32/iopl.c --- strace-4.11/tests-mx32/iopl.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/iopl.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_iopl + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_iopl, 4); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_iopl") + +#endif diff -Nru strace-4.11/tests-mx32/iopl.test strace-4.12/tests-mx32/iopl.test --- strace-4.11/tests-mx32/iopl.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/iopl.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iopl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff -Nru strace-4.11/tests-mx32/ipc_msgbuf.c strace-4.12/tests-mx32/ipc_msgbuf.c --- strace-4.11/tests-mx32/ipc_msgbuf.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ipc_msgbuf.c 2016-01-06 11:55:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +26,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include - #include "kernel_types.h" #define text_string "STRACE_STRING" #define msgsz sizeof(text_string) +static int msqid = -1; + +static void +cleanup(void) +{ + msgctl(msqid, IPC_RMID, 0); + msqid = -1; +} + int main (void) { @@ -49,18 +56,13 @@ .mtype = mtype, .mtext = text_string }; - int msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); + msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); if (msqid == -1) - return 77; + perror_msg_and_skip("msgget"); + atexit(cleanup); if (msgsnd(msqid, &msg, msgsz, 0) == -1) - goto cleanup; + perror_msg_and_skip("msgsnd"); if (msgrcv(msqid, &msg, msgsz, mtype, 0) != msgsz) - goto cleanup; - if (msgctl(msqid, IPC_RMID, 0) == -1) - return 77; + perror_msg_and_skip("msgrcv"); return 0; - -cleanup: - msgctl(msqid, IPC_RMID, 0); - return 77; } diff -Nru strace-4.11/tests-mx32/ipc_msg.c strace-4.12/tests-mx32/ipc_msg.c --- strace-4.11/tests-mx32/ipc_msg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ipc_msg.c 2016-01-06 11:59:06.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + msgctl(id, IPC_RMID, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct msqid_ds ds; id = msgget(IPC_PRIVATE, 0600); if (id < 0) - return 77; + perror_msg_and_skip("msgget"); printf("msgget\\(IPC_PRIVATE, 0600\\) += %d\n", id); + atexit(cleanup); if (msgctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("msgctl IPC_STAT"); printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{msg_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u, msg_rtime=%u, " "msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u, msg_lspid=%u, " @@ -57,7 +70,7 @@ int max = msgctl(0, MSG_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("msgctl MSG_INFO"); printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %d\n", &ds, max); rc = msgctl(id, MSG_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("msgctl MSG_STAT"); + printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (msgctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-mx32/ipc_sem.c strace-4.12/tests-mx32/ipc_sem.c --- strace-4.11/tests-mx32/ipc_sem.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ipc_sem.c 2016-01-06 11:59:29.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Andreas Schwab + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,8 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include union semun { @@ -38,29 +40,40 @@ (Linux-specific) */ }; +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; union semun un; struct semid_ds ds; struct seminfo info; id = semget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("semget"); printf("semget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); un.buf = &ds; if (semctl(id, 0, IPC_STAT, un)) - goto fail; + perror_msg_and_skip("semctl IPC_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, \\[?%p\\]?\\) += 0\n", id, &ds); un.__buf = &info; int max = semctl(0, 0, SEM_INFO, un); if (max < 0) - goto fail; + perror_msg_and_skip("semctl SEM_INFO"); printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, \\[?%p\\]?\\) += %d\n", &info, max); @@ -72,22 +85,13 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; + perror_msg_and_skip("semctl SEM_STAT"); printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" - " += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + " += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\)" " += %d\n", id, &ds, id); } - rc = 0; -done: - if (semctl(id, 0, IPC_RMID, 0) < 0) - return 1; - printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-mx32/ipc.sh strace-4.12/tests-mx32/ipc.sh --- strace-4.11/tests-mx32/ipc.sh 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-mx32/ipc.sh 2016-03-30 00:13:37.000000000 +0000 @@ -4,8 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" - run_prog > /dev/null run_strace -eipc $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests-mx32/ipc_shm.c strace-4.12/tests-mx32/ipc_shm.c --- strace-4.11/tests-mx32/ipc_shm.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ipc_shm.c 2016-01-06 11:59:58.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015 Dmitry V. Levin * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,23 +26,36 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include +#include +#include #include +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + int main(void) { - int rc, id; + int rc; struct shmid_ds ds; id = shmget(IPC_PRIVATE, 1, 0600); if (id < 0) - return 77; + perror_msg_and_skip("shmget"); printf("shmget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); if (shmctl(id, IPC_STAT, &ds)) - goto fail; + perror_msg_and_skip("shmctl IPC_STAT"); printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{shm_perm=\\{uid=%u, gid=%u, " "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, " "shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, " @@ -57,7 +70,7 @@ int max = shmctl(0, SHM_INFO, &ds); if (max < 0) - goto fail; + perror_msg_and_skip("shmctl SHM_INFO"); printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %d\n", &ds, max); rc = shmctl(id, SHM_STAT, &ds); @@ -67,20 +80,11 @@ * an index in the kernel's internal array. */ if (-1 != rc || EINVAL != errno) - goto fail; - printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds); + perror_msg_and_skip("shmctl SHM_STAT"); + printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(%m\\)\n", id, &ds); } else { printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %d\n", id, &ds, id); } - rc = 0; -done: - if (shmctl(id, IPC_RMID, NULL) < 0) - return 1; - printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); - return rc; - -fail: - rc = 1; - goto done; + return 0; } diff -Nru strace-4.11/tests-mx32/ip_mreq.c strace-4.12/tests-mx32/ip_mreq.c --- strace-4.11/tests-mx32/ip_mreq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ip_mreq.c 2016-01-06 11:42:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,20 +25,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include +#include "tests.h" #include -#include + +#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ + && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON + +# include +# include +# include +# include int main(void) { -#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ - && defined IPV6_JOIN_ANYCAST && defined HAVE_INET_PTON struct ip_mreq m4; struct ipv6_mreq m6; @@ -48,13 +48,14 @@ m6.ipv6mr_interface = 1; (void) close(0); - assert(socket(AF_INET, SOCK_DGRAM, 0) == 0); + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); assert(setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, 1) == -1); assert(setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, 1) == -1); if (setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, sizeof(m4)) || setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, sizeof(m4))) - return 77; + perror_msg_and_skip("setsockopt"); assert(setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &m6, 1) == -1); assert(setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &m6, 1) == -1); @@ -67,7 +68,11 @@ assert(setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, &m6, sizeof(m6)) == -1); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("IP_ADD_MEMBERSHIP && IPV6_ADD_MEMBERSHIP" + " && IPV6_JOIN_ANYCAST && HAVE_INET_PTON") + #endif -} diff -Nru strace-4.11/tests-mx32/kill.c strace-4.12/tests-mx32/kill.c --- strace-4.11/tests-mx32/kill.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/kill.c 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Check decoding of kill syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_kill + +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const int pid = getpid(); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM); + printf("kill(%d, SIGALRM) = %ld\n", pid, rc); + + const long big_pid = (long) 0xfacefeedbadc0ded; + const long big_sig = (long) 0xdeadbeefcafef00d; + rc = syscall(__NR_kill, big_pid, big_sig); + printf("kill(%d, %d) = %ld %s (%m)\n", + (int) big_pid, (int) big_sig, rc, errno2name()); + + rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0); + printf("kill(%d, SIG_0) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kill") + +#endif diff -Nru strace-4.11/tests-mx32/kill.test strace-4.12/tests-mx32/kill.test --- strace-4.11/tests-mx32/kill.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/kill.test 2016-04-27 14:22:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kill syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -esignal=none diff -Nru strace-4.11/tests-mx32/ksysent.c strace-4.12/tests-mx32/ksysent.c --- strace-4.11/tests-mx32/ksysent.c 2015-12-10 02:06:25.000000000 +0000 +++ strace-4.12/tests-mx32/ksysent.c 2016-01-12 05:06:10.000000000 +0000 @@ -45,7 +45,7 @@ #include "syscallent.h" }; -typedef const char const *pstr_t; +typedef const char *pstr_t; static const pstr_t ksyslist[] = { #include "ksysent.h" }; diff -Nru strace-4.11/tests-mx32/lchown32.c strace-4.12/tests-mx32/lchown32.c --- strace-4.11/tests-mx32/lchown32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/lchown32.c 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown32 + +# define SYSCALL_NR __NR_lchown32 +# define SYSCALL_NAME "lchown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown32") + +#endif diff -Nru strace-4.11/tests-mx32/lchown32.test strace-4.12/tests-mx32/lchown32.test --- strace-4.11/tests-mx32/lchown32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/lchown32.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests-mx32/lchown.c strace-4.12/tests-mx32/lchown.c --- strace-4.11/tests-mx32/lchown.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/lchown.c 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown + +# define SYSCALL_NR __NR_lchown +# define SYSCALL_NAME "lchown" + +# if defined __NR_lchown32 && __NR_lchown != __NR_lchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown") + +#endif diff -Nru strace-4.11/tests-mx32/lchown.test strace-4.12/tests-mx32/lchown.test --- strace-4.11/tests-mx32/lchown.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/lchown.test 2016-04-18 01:10:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 diff -Nru strace-4.11/tests-mx32/linkat.c strace-4.12/tests-mx32/linkat.c --- strace-4.11/tests-mx32/linkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/linkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_linkat + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "linkat_sample_old"; + static const char sample_2[] = "linkat_sample_new"; + const long fd_old = (long) 0xdeadbeefffffffff; + const long fd_new = (long) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); + printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd_old, sample_1, (int) fd_new, sample_2, + rc, errno2name()); + + rc = syscall(__NR_linkat, -100, sample_1, -100, sample_2, -1L); + printf("linkat(%s, \"%s\", %s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample_1, "AT_FDCWD", sample_2, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_linkat") + +#endif diff -Nru strace-4.11/tests-mx32/linkat.test strace-4.12/tests-mx32/linkat.test --- strace-4.11/tests-mx32/linkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/linkat.test 2016-04-06 06:18:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check linkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/link.c strace-4.12/tests-mx32/link.c --- strace-4.11/tests-mx32/link.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/link.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_link + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "link_sample_old"; + static const char sample_2[] = "link_sample_new"; + + long rc = syscall(__NR_link, sample_1, sample_2); + printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_link") + +#endif diff -Nru strace-4.11/tests-mx32/link.test strace-4.12/tests-mx32/link.test --- strace-4.11/tests-mx32/link.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/link.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check link syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/llseek.c strace-4.12/tests-mx32/llseek.c --- strace-4.11/tests-mx32/llseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/llseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,32 +25,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR__llseek -#include -#include -#include +# include +# include int main(void) { - const unsigned long high = 0xdefaced; + const unsigned long high = 0xfacefeed; const unsigned long low = 0xdeadbeef; - const unsigned long long offset = 0xdefaceddeadbeef; + const long long offset = 0xfacefeeddeadbeefLL; unsigned long long result; - int rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); - if (rc != -1 || EBADF != errno) - return 77; - - printf("_llseek(-1, %llu, %p, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - offset, &result); + long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); + printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n", + offset, &result, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -58,10 +51,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR__llseek") #endif diff -Nru strace-4.11/tests-mx32/llseek.test strace-4.12/tests-mx32/llseek.test --- strace-4.11/tests-mx32/llseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests-mx32/llseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -e_llseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -e_llseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-mx32/lseek.c strace-4.12/tests-mx32/lseek.c --- strace-4.11/tests-mx32/lseek.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/lseek.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,33 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_lseek -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) { - const kernel_ulong_t offset = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; - - if (sizeof(offset) > sizeof(long)) - rc = lseek(-1, offset, SEEK_SET); - else - rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); - - if (rc != -1 || EBADF != errno) - return 77; + const kernel_ulong_t offset = (kernel_ulong_t) 0xfacefeeddeadbeefULL; - printf("lseek(-1, %llu, SEEK_SET) = -1 EBADF (Bad file descriptor)\n", - (unsigned long long) offset); + if (sizeof(offset) > sizeof(long)) { + /* + * Cannot use syscall because it takes long arguments. + * Let's call lseek with hope it will invoke lseek syscall. + */ + long long rc = lseek(-1, offset, SEEK_SET); + printf("lseek(-1, %lld, SEEK_SET) = %lld %s (%m)\n", + (long long) offset, rc, errno2name()); + } else { + long rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); + printf("lseek(-1, %ld, SEEK_SET) = %ld %s (%m)\n", + (long) offset, rc, errno2name()); + } puts("+++ exited with 0 +++"); return 0; @@ -62,10 +59,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_lseek") #endif diff -Nru strace-4.11/tests-mx32/lseek.test strace-4.12/tests-mx32/lseek.test --- strace-4.11/tests-mx32/lseek.test 2015-12-01 08:29:12.000000000 +0000 +++ strace-4.12/tests-mx32/lseek.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,10 +4,12 @@ . "${srcdir=.}/init.sh" +check_prog grep run_prog > /dev/null -OUT="$LOG.out" -run_strace -a30 -elseek $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" +run_strace -a30 -elseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" exit 0 diff -Nru strace-4.11/tests-mx32/lstat64.c strace-4.12/tests-mx32/lstat64.c --- strace-4.11/tests-mx32/lstat64.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests-mx32/lstat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat64 -# define TEST_SYSCALL_NAME lstat64 + +# define TEST_SYSCALL_NR __NR_lstat64 +# define TEST_SYSCALL_STR "lstat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat64") + +#endif diff -Nru strace-4.11/tests-mx32/lstat.c strace-4.12/tests-mx32/lstat.c --- strace-4.11/tests-mx32/lstat.c 2015-12-05 00:03:02.000000000 +0000 +++ strace-4.12/tests-mx32/lstat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_lstat -# define TEST_SYSCALL_NAME lstat + +# define TEST_SYSCALL_NR __NR_lstat +# define TEST_SYSCALL_STR "lstat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat") + +#endif diff -Nru strace-4.11/tests-mx32/lstatx.c strace-4.12/tests-mx32/lstatx.c --- strace-4.11/tests-mx32/lstatx.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/lstatx.c 2016-01-12 03:07:39.000000000 +0000 @@ -32,10 +32,6 @@ #define PRINT_SYSCALL_FOOTER \ puts(") = 0") -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define USE_ASM_STAT #include "xstatx.c" diff -Nru strace-4.11/tests-mx32/Makefile.am strace-4.12/tests-mx32/Makefile.am --- strace-4.11/tests-mx32/Makefile.am 2015-12-21 23:23:45.000000000 +0000 +++ strace-4.12/tests-mx32/Makefile.am 2016-05-31 11:35:29.000000000 +0000 @@ -1,6 +1,6 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ OS = linux ARCH = @arch_mx32@ +MPERS_NAME = mx32 ARCH_MFLAGS = -mx32 AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -39,82 +40,264 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a + check_PROGRAMS = \ _newselect \ + access \ + acct \ adjtimex \ aio \ + alarm \ + attach-f-p \ + attach-p-cmd-cmd \ + attach-p-cmd-p \ bpf \ + brk \ + btrfs \ caps \ + chmod \ + chown \ + chown32 \ + chroot \ + clock_adjtime \ clock_nanosleep \ clock_xettime \ + copy_file_range \ + count-f \ + creat \ + dup \ + dup2 \ + dup3 \ + epoll_create \ epoll_create1 \ + epoll_ctl \ + epoll_pwait \ + epoll_wait \ eventfd \ execve \ + execve-v \ execveat \ + execveat-v \ + faccessat \ fanotify_mark \ + fchdir \ + fchmod \ + fchmodat \ + fchown \ + fchown32 \ + fchownat \ fcntl \ fcntl64 \ + fdatasync \ file_handle \ + file_ioctl \ filter-unavailable \ + flock \ + fork-f \ fstat \ fstat64 \ fstatat64 \ + fstatfs \ + fstatfs64 \ + fsync \ ftruncate \ ftruncate64 \ + futimesat \ + get_mempolicy \ + getcwd \ getdents \ getdents64 \ + getegid \ + getegid32 \ + geteuid \ + geteuid32 \ + getgid \ + getgid32 \ + getgroups \ + getgroups32 \ + getpgrp \ getrandom \ - inet-accept-connect-send-recv \ + getresgid \ + getresgid32 \ + getresuid \ + getresuid32 \ + getrusage \ + getsid \ + getuid \ + getuid32 \ + getxxid \ inet-cmsg \ ioctl \ + ioctl_block \ + ioctl_evdev \ + ioctl_evdev-v \ + ioctl_mtd \ + ioctl_rtc \ + ioctl_rtc-v \ + ioctl_uffdio \ + ioctl_v4l2 \ + ioperm \ + iopl \ ip_mreq \ ipc_msg \ ipc_msgbuf \ ipc_sem \ ipc_shm \ + kill \ ksysent \ + lchown \ + lchown32 \ + link \ + linkat \ llseek \ lseek \ lstat \ lstat64 \ + mbind \ membarrier \ memfd_create \ + migrate_pages \ + mincore \ + mkdir \ + mkdirat \ + mknod \ + mknodat \ + mlock \ mlock2 \ + mlockall \ mmap \ mmap64 \ mmsg \ + mount \ + move_pages \ mq \ + munlockall \ nanosleep \ net-accept-connect \ + net-icmp_filter \ + net-y-unix \ + net-yy-inet \ + net-yy-netlink \ + net-yy-unix \ netlink_inet_diag \ + netlink_netlink_diag \ netlink_unix_diag \ newfstatat \ + nsyscalls \ + old_mmap \ oldselect \ + open \ + openat \ + pause \ pc \ + personality \ pipe \ + poll \ ppoll \ + prctl-seccomp-filter-v \ + prctl-seccomp-strict \ + pread64-pwrite64 \ + preadv \ + preadv-pwritev \ + preadv2-pwritev2 \ pselect6 \ + ptrace \ + pwritev \ + read-write \ readdir \ readlink \ readlinkat \ + readv \ + reboot \ + recvmsg \ + remap_file_pages \ + rename \ + renameat \ + renameat2 \ restart_syscall \ + rmdir \ + rt_sigpending \ + rt_sigprocmask \ rt_sigqueueinfo \ + rt_sigsuspend \ + rt_sigtimedwait \ + rt_tgsigqueueinfo \ + sched_get_priority_mxx \ + sched_rr_get_interval \ + sched_xetaffinity \ sched_xetattr \ + sched_xetparam \ + sched_xetscheduler \ + sched_yield \ scm_rights \ - seccomp \ + seccomp-filter \ + seccomp-filter-v \ + seccomp-strict \ select \ + semop \ sendfile \ sendfile64 \ + set_mempolicy \ set_ptracer_any \ + setdomainname \ + setfsgid \ + setfsgid32 \ + setfsuid \ + setfsuid32 \ + setgid \ + setgid32 \ + setgroups \ + setgroups32 \ + sethostname \ + setregid \ + setregid32 \ + setresgid \ + setresgid32 \ + setresuid \ + setresuid32 \ + setreuid \ + setreuid32 \ + setuid \ + setuid32 \ + shmxt \ sigaction \ sigaltstack \ signalfd \ sigreturn \ + sleep \ + splice \ stack-fcall \ stat \ stat64 \ statfs \ + statfs64 \ + swap \ + symlink \ + symlinkat \ + sync \ + sync_file_range \ + sync_file_range2 \ sysinfo \ + syslog \ + tee \ time \ timer_create \ timer_xettime \ @@ -123,121 +306,292 @@ times-fail \ truncate \ truncate64 \ - uid \ - uid16 \ - uid32 \ uio \ + umask \ umount \ umount2 \ umovestr \ umovestr2 \ + umovestr3 \ + uname \ unix-pair-send-recv \ + unlink \ + unlinkat \ userfaultfd \ utime \ utimensat \ + utimes \ + vfork-f \ + vhangup \ + vmsplice \ wait \ xattr \ xet_robust_list \ xetitimer \ + xetpgid \ + xetpriority \ xettimeofday \ # end of check_PROGRAMS -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 + stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -246,86 +600,121 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) -net-fd.log: net.log +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests-mx32/Makefile.in strace-4.12/tests-mx32/Makefile.in --- strace-4.11/tests-mx32/Makefile.in 2015-12-21 23:24:05.000000000 +0000 +++ strace-4.12/tests-mx32/Makefile.in 2016-05-31 11:35:58.000000000 +0000 @@ -16,7 +16,7 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -104,46 +104,108 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = _newselect$(EXEEXT) adjtimex$(EXEEXT) aio$(EXEEXT) \ - bpf$(EXEEXT) caps$(EXEEXT) clock_nanosleep$(EXEEXT) \ - clock_xettime$(EXEEXT) epoll_create1$(EXEEXT) eventfd$(EXEEXT) \ - execve$(EXEEXT) execveat$(EXEEXT) fanotify_mark$(EXEEXT) \ - fcntl$(EXEEXT) fcntl64$(EXEEXT) file_handle$(EXEEXT) \ - filter-unavailable$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ - fstatat64$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ - getdents$(EXEEXT) getdents64$(EXEEXT) getrandom$(EXEEXT) \ - inet-accept-connect-send-recv$(EXEEXT) inet-cmsg$(EXEEXT) \ - ioctl$(EXEEXT) ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) \ - ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ - ksysent$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) lstat$(EXEEXT) \ - lstat64$(EXEEXT) membarrier$(EXEEXT) memfd_create$(EXEEXT) \ - mlock2$(EXEEXT) mmap$(EXEEXT) mmap64$(EXEEXT) mmsg$(EXEEXT) \ - mq$(EXEEXT) nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ - netlink_inet_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ - newfstatat$(EXEEXT) oldselect$(EXEEXT) pc$(EXEEXT) \ - pipe$(EXEEXT) ppoll$(EXEEXT) pselect6$(EXEEXT) \ - readdir$(EXEEXT) readlink$(EXEEXT) readlinkat$(EXEEXT) \ - restart_syscall$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ - sched_xetattr$(EXEEXT) scm_rights$(EXEEXT) seccomp$(EXEEXT) \ - select$(EXEEXT) sendfile$(EXEEXT) sendfile64$(EXEEXT) \ - set_ptracer_any$(EXEEXT) sigaction$(EXEEXT) \ +check_PROGRAMS = _newselect$(EXEEXT) access$(EXEEXT) acct$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-p-cmd-cmd$(EXEEXT) \ + attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) brk$(EXEEXT) \ + btrfs$(EXEEXT) caps$(EXEEXT) chmod$(EXEEXT) chown$(EXEEXT) \ + chown32$(EXEEXT) chroot$(EXEEXT) clock_adjtime$(EXEEXT) \ + clock_nanosleep$(EXEEXT) clock_xettime$(EXEEXT) \ + copy_file_range$(EXEEXT) count-f$(EXEEXT) creat$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) eventfd$(EXEEXT) execve$(EXEEXT) \ + execve-v$(EXEEXT) execveat$(EXEEXT) execveat-v$(EXEEXT) \ + faccessat$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) flock$(EXEEXT) \ + fork-f$(EXEEXT) fstat$(EXEEXT) fstat64$(EXEEXT) \ + fstatat64$(EXEEXT) fstatfs$(EXEEXT) fstatfs64$(EXEEXT) \ + fsync$(EXEEXT) ftruncate$(EXEEXT) ftruncate64$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcwd$(EXEEXT) \ + getdents$(EXEEXT) getdents64$(EXEEXT) getegid$(EXEEXT) \ + getegid32$(EXEEXT) geteuid$(EXEEXT) geteuid32$(EXEEXT) \ + getgid$(EXEEXT) getgid32$(EXEEXT) getgroups$(EXEEXT) \ + getgroups32$(EXEEXT) getpgrp$(EXEEXT) getrandom$(EXEEXT) \ + getresgid$(EXEEXT) getresgid32$(EXEEXT) getresuid$(EXEEXT) \ + getresuid32$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getuid$(EXEEXT) getuid32$(EXEEXT) getxxid$(EXEEXT) \ + inet-cmsg$(EXEEXT) ioctl$(EXEEXT) ioctl_block$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) ioctl_mtd$(EXEEXT) \ + ioctl_rtc$(EXEEXT) ioctl_rtc-v$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ip_mreq$(EXEEXT) ipc_msg$(EXEEXT) ipc_msgbuf$(EXEEXT) \ + ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) kill$(EXEEXT) \ + ksysent$(EXEEXT) lchown$(EXEEXT) lchown32$(EXEEXT) \ + link$(EXEEXT) linkat$(EXEEXT) llseek$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) munlockall$(EXEEXT) \ + nanosleep$(EXEEXT) net-accept-connect$(EXEEXT) \ + net-icmp_filter$(EXEEXT) net-y-unix$(EXEEXT) \ + net-yy-inet$(EXEEXT) net-yy-netlink$(EXEEXT) \ + net-yy-unix$(EXEEXT) netlink_inet_diag$(EXEEXT) \ + netlink_netlink_diag$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldselect$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) \ + pause$(EXEEXT) pc$(EXEEXT) personality$(EXEEXT) pipe$(EXEEXT) \ + poll$(EXEEXT) ppoll$(EXEEXT) prctl-seccomp-filter-v$(EXEEXT) \ + prctl-seccomp-strict$(EXEEXT) pread64-pwrite64$(EXEEXT) \ + preadv$(EXEEXT) preadv-pwritev$(EXEEXT) \ + preadv2-pwritev2$(EXEEXT) pselect6$(EXEEXT) ptrace$(EXEEXT) \ + pwritev$(EXEEXT) read-write$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvmsg$(EXEEXT) remap_file_pages$(EXEEXT) \ + rename$(EXEEXT) renameat$(EXEEXT) renameat2$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setregid$(EXEEXT) setregid32$(EXEEXT) setresgid$(EXEEXT) \ + setresgid32$(EXEEXT) setresuid$(EXEEXT) setresuid32$(EXEEXT) \ + setreuid$(EXEEXT) setreuid32$(EXEEXT) setuid$(EXEEXT) \ + setuid32$(EXEEXT) shmxt$(EXEEXT) sigaction$(EXEEXT) \ sigaltstack$(EXEEXT) signalfd$(EXEEXT) sigreturn$(EXEEXT) \ - stack-fcall$(EXEEXT) stat$(EXEEXT) stat64$(EXEEXT) \ - statfs$(EXEEXT) sysinfo$(EXEEXT) time$(EXEEXT) \ - timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ - timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ - truncate$(EXEEXT) truncate64$(EXEEXT) uid$(EXEEXT) \ - uid16$(EXEEXT) uid32$(EXEEXT) uio$(EXEEXT) umount$(EXEEXT) \ - umount2$(EXEEXT) umovestr$(EXEEXT) umovestr2$(EXEEXT) \ - unix-pair-send-recv$(EXEEXT) userfaultfd$(EXEEXT) \ - utime$(EXEEXT) utimensat$(EXEEXT) wait$(EXEEXT) xattr$(EXEEXT) \ - xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ - xettimeofday$(EXEEXT) + sleep$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) time$(EXEEXT) timer_create$(EXEEXT) \ + timer_xettime$(EXEEXT) timerfd_xettime$(EXEEXT) times$(EXEEXT) \ + times-fail$(EXEEXT) truncate$(EXEEXT) truncate64$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umovestr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) userfaultfd$(EXEEXT) utime$(EXEEXT) \ + utimensat$(EXEEXT) utimes$(EXEEXT) vfork-f$(EXEEXT) \ + vhangup$(EXEEXT) vmsplice$(EXEEXT) wait$(EXEEXT) \ + xattr$(EXEEXT) xet_robust_list$(EXEEXT) xetitimer$(EXEEXT) \ + xetpgid$(EXEEXT) xetpriority$(EXEEXT) xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) subdir = tests-mx32 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/mpers.m4 $(top_srcdir)/m4/warnings.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -152,311 +214,1106 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) _newselect_SOURCES = _newselect.c _newselect_OBJECTS = _newselect.$(OBJEXT) _newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a adjtimex_SOURCES = adjtimex.c adjtimex_OBJECTS = adjtimex.$(OBJEXT) adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a aio_SOURCES = aio.c aio_OBJECTS = aio.$(OBJEXT) aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a bpf_SOURCES = bpf.c bpf_OBJECTS = bpf.$(OBJEXT) bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a caps_SOURCES = caps.c caps_OBJECTS = caps.$(OBJEXT) caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a clock_nanosleep_SOURCES = clock_nanosleep.c clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a clock_xettime_SOURCES = clock_xettime.c clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) -clock_xettime_DEPENDENCIES = +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a epoll_create1_SOURCES = epoll_create1.c epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a eventfd_SOURCES = eventfd.c eventfd_OBJECTS = eventfd.$(OBJEXT) eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a execve_SOURCES = execve.c execve_OBJECTS = execve.$(OBJEXT) execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a execveat_SOURCES = execveat.c execveat_OBJECTS = execveat.$(OBJEXT) execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a fanotify_mark_SOURCES = fanotify_mark.c fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a fcntl_SOURCES = fcntl.c fcntl_OBJECTS = fcntl.$(OBJEXT) fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a fcntl64_SOURCES = fcntl64.c fcntl64_OBJECTS = fcntl64.$(OBJEXT) fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a file_handle_SOURCES = file_handle.c file_handle_OBJECTS = file_handle.$(OBJEXT) file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a filter_unavailable_SOURCES = filter-unavailable.c filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) -filter_unavailable_DEPENDENCIES = +filter_unavailable_DEPENDENCIES = $(LDADD) +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a fstat_SOURCES = fstat.c fstat_OBJECTS = fstat.$(OBJEXT) fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a fstat64_SOURCES = fstat64.c fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a fstatat64_SOURCES = fstatat64.c fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a ftruncate_SOURCES = ftruncate.c ftruncate_OBJECTS = ftruncate.$(OBJEXT) ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a ftruncate64_SOURCES = ftruncate64.c ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a getdents_SOURCES = getdents.c getdents_OBJECTS = getdents.$(OBJEXT) getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a getdents64_SOURCES = getdents64.c getdents64_OBJECTS = getdents64.$(OBJEXT) getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a getrandom_SOURCES = getrandom.c getrandom_OBJECTS = getrandom.$(OBJEXT) getrandom_LDADD = $(LDADD) -inet_accept_connect_send_recv_SOURCES = \ - inet-accept-connect-send-recv.c -inet_accept_connect_send_recv_OBJECTS = \ - inet-accept-connect-send-recv.$(OBJEXT) -inet_accept_connect_send_recv_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a inet_cmsg_SOURCES = inet-cmsg.c inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a ioctl_SOURCES = ioctl.c ioctl_OBJECTS = ioctl.$(OBJEXT) ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a ip_mreq_SOURCES = ip_mreq.c ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a ipc_msg_SOURCES = ipc_msg.c ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a ipc_msgbuf_SOURCES = ipc_msgbuf.c ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a ipc_sem_SOURCES = ipc_sem.c ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a ipc_shm_SOURCES = ipc_shm.c ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a ksysent_SOURCES = ksysent.c ksysent_OBJECTS = ksysent.$(OBJEXT) ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a llseek_SOURCES = llseek.c llseek_OBJECTS = llseek.$(OBJEXT) llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a lseek_SOURCES = lseek.c lseek_OBJECTS = lseek.$(OBJEXT) lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a lstat_SOURCES = lstat.c lstat_OBJECTS = lstat.$(OBJEXT) lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a lstat64_SOURCES = lstat64.c lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a membarrier_SOURCES = membarrier.c membarrier_OBJECTS = membarrier.$(OBJEXT) membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a memfd_create_SOURCES = memfd_create.c memfd_create_OBJECTS = memfd_create.$(OBJEXT) memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a mlock2_SOURCES = mlock2.c mlock2_OBJECTS = mlock2.$(OBJEXT) mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a mmap_SOURCES = mmap.c mmap_OBJECTS = mmap.$(OBJEXT) mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a mmap64_SOURCES = mmap64.c mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a mmsg_SOURCES = mmsg.c mmsg_OBJECTS = mmsg.$(OBJEXT) mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a mq_SOURCES = mq.c mq_OBJECTS = mq.$(OBJEXT) -mq_DEPENDENCIES = +mq_DEPENDENCIES = $(LDADD) +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a nanosleep_SOURCES = nanosleep.c nanosleep_OBJECTS = nanosleep.$(OBJEXT) nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a net_accept_connect_SOURCES = net-accept-connect.c net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a netlink_inet_diag_SOURCES = netlink_inet_diag.c netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a netlink_unix_diag_SOURCES = netlink_unix_diag.c netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a newfstatat_SOURCES = newfstatat.c newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a oldselect_SOURCES = oldselect.c oldselect_OBJECTS = oldselect.$(OBJEXT) oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a pc_SOURCES = pc.c pc_OBJECTS = pc.$(OBJEXT) am__DEPENDENCIES_1 = -pc_DEPENDENCIES = $(am__DEPENDENCIES_1) +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a pipe_SOURCES = pipe.c pipe_OBJECTS = pipe.$(OBJEXT) pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a ppoll_SOURCES = ppoll.c ppoll_OBJECTS = ppoll.$(OBJEXT) ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a pselect6_SOURCES = pselect6.c pselect6_OBJECTS = pselect6.$(OBJEXT) pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a readdir_SOURCES = readdir.c readdir_OBJECTS = readdir.$(OBJEXT) readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a readlink_SOURCES = readlink.c readlink_OBJECTS = readlink.$(OBJEXT) readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a readlinkat_SOURCES = readlinkat.c readlinkat_OBJECTS = readlinkat.$(OBJEXT) readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a restart_syscall_SOURCES = restart_syscall.c restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a sched_xetattr_SOURCES = sched_xetattr.c sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a scm_rights_SOURCES = scm_rights.c scm_rights_OBJECTS = scm_rights.$(OBJEXT) scm_rights_LDADD = $(LDADD) -seccomp_SOURCES = seccomp.c -seccomp_OBJECTS = seccomp.$(OBJEXT) -seccomp_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a select_SOURCES = select.c select_OBJECTS = select.$(OBJEXT) select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a sendfile_SOURCES = sendfile.c sendfile_OBJECTS = sendfile.$(OBJEXT) sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a sendfile64_SOURCES = sendfile64.c sendfile64_OBJECTS = sendfile64.$(OBJEXT) sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a set_ptracer_any_SOURCES = set_ptracer_any.c set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a sigaction_SOURCES = sigaction.c sigaction_OBJECTS = sigaction.$(OBJEXT) sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a sigaltstack_SOURCES = sigaltstack.c sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a signalfd_SOURCES = signalfd.c signalfd_OBJECTS = signalfd.$(OBJEXT) signalfd_LDADD = $(LDADD) +signalfd_DEPENDENCIES = libtests.a sigreturn_SOURCES = sigreturn.c sigreturn_OBJECTS = sigreturn.$(OBJEXT) sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ stack-fcall-3.$(OBJEXT) stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a stat_SOURCES = stat.c stat_OBJECTS = stat.$(OBJEXT) stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a stat64_SOURCES = stat64.c stat64_OBJECTS = stat64-stat64.$(OBJEXT) stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a statfs_SOURCES = statfs.c statfs_OBJECTS = statfs-statfs.$(OBJEXT) statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a sysinfo_SOURCES = sysinfo.c sysinfo_OBJECTS = sysinfo.$(OBJEXT) sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a time_SOURCES = time.c time_OBJECTS = time.$(OBJEXT) time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a timer_create_SOURCES = timer_create.c timer_create_OBJECTS = timer_create.$(OBJEXT) timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a timer_xettime_SOURCES = timer_xettime.c timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a timerfd_xettime_SOURCES = timerfd_xettime.c timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a times_SOURCES = times.c times_OBJECTS = times.$(OBJEXT) -times_DEPENDENCIES = +times_DEPENDENCIES = $(LDADD) times_fail_SOURCES = times-fail.c times_fail_OBJECTS = times-fail.$(OBJEXT) times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a truncate_SOURCES = truncate.c truncate_OBJECTS = truncate.$(OBJEXT) truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a truncate64_SOURCES = truncate64.c truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) truncate64_LDADD = $(LDADD) -uid_SOURCES = uid.c -uid_OBJECTS = uid.$(OBJEXT) -uid_LDADD = $(LDADD) -uid16_SOURCES = uid16.c -uid16_OBJECTS = uid16.$(OBJEXT) -uid16_LDADD = $(LDADD) -uid32_SOURCES = uid32.c -uid32_OBJECTS = uid32.$(OBJEXT) -uid32_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a uio_SOURCES = uio.c uio_OBJECTS = uio-uio.$(OBJEXT) uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a umount_SOURCES = umount.c umount_OBJECTS = umount.$(OBJEXT) umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a umount2_SOURCES = umount2.c umount2_OBJECTS = umount2.$(OBJEXT) umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a umovestr_SOURCES = umovestr.c umovestr_OBJECTS = umovestr.$(OBJEXT) umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a umovestr2_SOURCES = umovestr2.c umovestr2_OBJECTS = umovestr2.$(OBJEXT) umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a unix_pair_send_recv_SOURCES = unix-pair-send-recv.c unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a userfaultfd_SOURCES = userfaultfd.c userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a utime_SOURCES = utime.c utime_OBJECTS = utime.$(OBJEXT) utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a utimensat_SOURCES = utimensat.c utimensat_OBJECTS = utimensat.$(OBJEXT) utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a wait_SOURCES = wait.c wait_OBJECTS = wait.$(OBJEXT) wait_LDADD = $(LDADD) +wait_DEPENDENCIES = libtests.a xattr_SOURCES = xattr.c xattr_OBJECTS = xattr.$(OBJEXT) xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a xet_robust_list_SOURCES = xet_robust_list.c xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a xetitimer_SOURCES = xetitimer.c xetitimer_OBJECTS = xetitimer.$(OBJEXT) xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a xettimeofday_SOURCES = xettimeofday.c xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -489,49 +1346,122 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c clock_nanosleep.c \ - clock_xettime.c epoll_create1.c eventfd.c execve.c execveat.c \ - fanotify_mark.c fcntl.c fcntl64.c file_handle.c \ - filter-unavailable.c fstat.c fstat64.c fstatat64.c ftruncate.c \ - ftruncate64.c getdents.c getdents64.c getrandom.c \ - inet-accept-connect-send-recv.c inet-cmsg.c ioctl.c ip_mreq.c \ - ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c ksysent.c llseek.c \ - lseek.c lstat.c lstat64.c membarrier.c memfd_create.c mlock2.c \ - mmap.c mmap64.c mmsg.c mq.c nanosleep.c net-accept-connect.c \ - netlink_inet_diag.c netlink_unix_diag.c newfstatat.c \ - oldselect.c pc.c pipe.c ppoll.c pselect6.c readdir.c \ - readlink.c readlinkat.c restart_syscall.c rt_sigqueueinfo.c \ - sched_xetattr.c scm_rights.c seccomp.c select.c sendfile.c \ - sendfile64.c set_ptracer_any.c sigaction.c sigaltstack.c \ - signalfd.c sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c \ - statfs.c sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c -DIST_SOURCES = _newselect.c adjtimex.c aio.c bpf.c caps.c \ - clock_nanosleep.c clock_xettime.c epoll_create1.c eventfd.c \ - execve.c execveat.c fanotify_mark.c fcntl.c fcntl64.c \ - file_handle.c filter-unavailable.c fstat.c fstat64.c \ - fstatat64.c ftruncate.c ftruncate64.c getdents.c getdents64.c \ - getrandom.c inet-accept-connect-send-recv.c inet-cmsg.c \ - ioctl.c ip_mreq.c ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c \ - ksysent.c llseek.c lseek.c lstat.c lstat64.c membarrier.c \ - memfd_create.c mlock2.c mmap.c mmap64.c mmsg.c mq.c \ - nanosleep.c net-accept-connect.c netlink_inet_diag.c \ - netlink_unix_diag.c newfstatat.c oldselect.c pc.c pipe.c \ - ppoll.c pselect6.c readdir.c readlink.c readlinkat.c \ - restart_syscall.c rt_sigqueueinfo.c sched_xetattr.c \ - scm_rights.c seccomp.c select.c sendfile.c sendfile64.c \ - set_ptracer_any.c sigaction.c sigaltstack.c signalfd.c \ - sigreturn.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ - sysinfo.c time.c timer_create.c timer_xettime.c \ - timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ - uid.c uid16.c uid32.c uio.c umount.c umount2.c umovestr.c \ - umovestr2.c unix-pair-send-recv.c userfaultfd.c utime.c \ - utimensat.c wait.c xattr.c xet_robust_list.c xetitimer.c \ - xettimeofday.c +SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c access.c acct.c \ + adjtimex.c aio.c alarm.c attach-f-p.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c chmod.c chown.c \ + chown32.c chroot.c clock_adjtime.c clock_nanosleep.c \ + clock_xettime.c copy_file_range.c count-f.c creat.c dup.c \ + dup2.c dup3.c epoll_create.c epoll_create1.c epoll_ctl.c \ + epoll_pwait.c epoll_wait.c eventfd.c execve.c execve-v.c \ + execveat.c execveat-v.c faccessat.c fanotify_mark.c fchdir.c \ + fchmod.c fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c \ + fcntl64.c fdatasync.c file_handle.c file_ioctl.c \ + filter-unavailable.c flock.c fork-f.c fstat.c fstat64.c \ + fstatat64.c fstatfs.c fstatfs64.c fsync.c ftruncate.c \ + ftruncate64.c futimesat.c get_mempolicy.c getcwd.c getdents.c \ + getdents64.c getegid.c getegid32.c geteuid.c geteuid32.c \ + getgid.c getgid32.c getgroups.c getgroups32.c getpgrp.c \ + getrandom.c getresgid.c getresgid32.c getresuid.c \ + getresuid32.c getrusage.c getsid.c getuid.c getuid32.c \ + getxxid.c inet-cmsg.c ioctl.c ioctl_block.c ioctl_evdev.c \ + ioctl_evdev-v.c ioctl_mtd.c ioctl_rtc.c ioctl_rtc-v.c \ + ioctl_uffdio.c ioctl_v4l2.c ioperm.c iopl.c ip_mreq.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lseek.c lstat.c \ + lstat64.c mbind.c membarrier.c memfd_create.c migrate_pages.c \ + mincore.c mkdir.c mkdirat.c mknod.c mknodat.c mlock.c mlock2.c \ + mlockall.c mmap.c mmap64.c mmsg.c mount.c move_pages.c mq.c \ + munlockall.c nanosleep.c net-accept-connect.c \ + net-icmp_filter.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_unix_diag.c newfstatat.c nsyscalls.c old_mmap.c \ + oldselect.c open.c openat.c pause.c pc.c personality.c pipe.c \ + poll.c ppoll.c prctl-seccomp-filter-v.c prctl-seccomp-strict.c \ + pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c pselect6.c ptrace.c pwritev.c read-write.c \ + readdir.c readlink.c readlinkat.c readv.c reboot.c recvmsg.c \ + remap_file_pages.c rename.c renameat.c renameat2.c \ + restart_syscall.c rmdir.c rt_sigpending.c rt_sigprocmask.c \ + rt_sigqueueinfo.c rt_sigsuspend.c rt_sigtimedwait.c \ + rt_tgsigqueueinfo.c sched_get_priority_mxx.c \ + sched_rr_get_interval.c sched_xetaffinity.c sched_xetattr.c \ + sched_xetparam.c sched_xetscheduler.c sched_yield.c \ + scm_rights.c seccomp-filter.c seccomp-filter-v.c \ + seccomp-strict.c select.c semop.c sendfile.c sendfile64.c \ + set_mempolicy.c set_ptracer_any.c setdomainname.c setfsgid.c \ + setfsgid32.c setfsuid.c setfsuid32.c setgid.c setgid32.c \ + setgroups.c setgroups32.c sethostname.c setregid.c \ + setregid32.c setresgid.c setresgid32.c setresuid.c \ + setresuid32.c setreuid.c setreuid32.c setuid.c setuid32.c \ + shmxt.c sigaction.c sigaltstack.c signalfd.c sigreturn.c \ + sleep.c splice.c $(stack_fcall_SOURCES) stat.c stat64.c \ + statfs.c statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + time.c timer_create.c timer_xettime.c timerfd_xettime.c \ + times.c times-fail.c truncate.c truncate64.c uio.c umask.c \ + umount.c umount2.c umovestr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unlink.c unlinkat.c userfaultfd.c \ + utime.c utimensat.c utimes.c vfork-f.c vhangup.c vmsplice.c \ + wait.c xattr.c xet_robust_list.c xetitimer.c xetpgid.c \ + xetpriority.c xettimeofday.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -740,6 +1670,7 @@ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) @@ -773,6 +1704,11 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ @@ -785,12 +1721,15 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBOBJS = @LIBOBJS@ @@ -810,6 +1749,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -875,6 +1815,7 @@ top_srcdir = @top_srcdir@ OS = linux ARCH = @arch_mx32@ +MPERS_NAME = mx32 ARCH_MFLAGS = -mx32 AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -887,102 +1828,279 @@ -I$(top_srcdir) AM_LDFLAGS = $(ARCH_MFLAGS) -clock_xettime_LDADD = -lrt -filter_unavailable_LDADD = -lpthread +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + overflowuid.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -mq_LDADD = -lrt +mq_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -pc_LDADD = $(dl_LIBS) +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 -times_LDADD = -lrt +times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c -TESTS = \ - strace-f.test \ - qual_syscall.test \ - ksysent.test \ - \ +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ _newselect.test \ + access.test \ + acct.test \ adjtimex.test \ aio.test \ - bexecve.test \ + alarm.test \ bpf.test \ + brk.test \ + btrfs.test \ + btrfs-v.test \ + btrfs-w.test \ + btrfs-vw.test \ caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ clock_nanosleep.test \ clock_xettime.test \ - dumpio.test \ + copy_file_range.test \ + creat.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ eventfd.test \ + execve-v.test \ execve.test \ + execveat-v.test \ execveat.test \ + faccessat.test \ fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ fcntl.test \ fcntl64.test \ + fdatasync.test \ file_handle.test \ - filter-unavailable.test \ + file_ioctl.test \ + flock.test \ fstat.test \ fstat64.test \ fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ ftruncate.test \ ftruncate64.test \ + futimesat.test \ + get_mempolicy.test \ + getcwd.test \ getdents.test \ getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpgrp.test \ getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrusage.test \ + getsid.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ inet-cmsg.test \ ioctl.test \ + ioctl_block.test \ + ioctl_evdev.test \ + ioctl_evdev-v.test \ + ioctl_mtd.test \ + ioctl_rtc.test \ + ioctl_rtc-v.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ ip_mreq.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ llseek.test \ lseek.test \ lstat.test \ lstat64.test \ + mbind.test \ membarrier.test \ memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ mlock2.test \ + mlockall.test \ mmap.test \ mmap64.test \ mmsg.test \ + mount.test \ + move_pages.test \ mq.test \ + munlockall.test \ nanosleep.test \ - net-fd.test \ - net-yy.test \ + net-icmp_filter.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ net.test \ newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ oldselect.test \ - pc.test \ + open.test \ + openat.test \ + pause.test \ + personality.test \ pipe.test \ + poll.test \ ppoll.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv2-pwritev2.test \ + preadv.test \ pselect6.test \ + ptrace.test \ + pwritev.test \ + read-write.test \ readdir.test \ readlink.test \ readlinkat.test \ + readv.test \ + reboot.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ scm_rights-fd.test \ - seccomp.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ select.test \ + semop.test \ sendfile.test \ sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ sigaction.test \ sigaltstack.test \ signalfd.test \ sigreturn.test \ + splice.test \ stat.test \ stat64.test \ statfs.test \ + statfs64.test \ sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ sysinfo.test \ + syslog.test \ + tee.test \ time.test \ timer_create.test \ timer_xettime.test \ @@ -991,77 +2109,111 @@ times.test \ truncate.test \ truncate64.test \ - uid.test \ - uid16.test \ - uid32.test \ uio.test \ + umask.test \ umount.test \ umount2.test \ umovestr.test \ umovestr2.test \ - unix-yy.test \ + umovestr3.test \ + uname.test \ + unlink.test \ + unlinkat.test \ userfaultfd.test \ utime.test \ utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ wait.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ + xetpgid.test \ + xetpriority.test \ xettimeofday.test \ - \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ count.test \ + detach-running.test \ detach-sleeping.test \ detach-stopped.test \ - detach-running.test \ + dumpio.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + pc.test \ + qual_syscall.test \ + redirect.test \ restart_syscall.test \ - strace-k.test - + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-f.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ + count-f.expected \ dumpio.expected \ - epoll_create1.expected \ eventfd.expected \ - execve.expected \ - execve-v.expected \ - execveat.expected \ - execveat-v.expected \ fanotify_mark.expected \ filter-unavailable.expected \ fstatat.c \ fstatx.c \ + getresugid.c \ ip_mreq.expected \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ memfd_create.expected \ - mmsg.expected \ mq.expected \ net.expected \ - net-fd.expected \ - net-yy-accept.awk \ - net-yy-connect.awk \ oldselect.expected \ pipe.expected \ ppoll.expected \ ppoll-v.expected \ + setfsugid.c \ + setreugid.c \ + setresugid.c \ + setugid.c \ sigaction.awk \ sigaltstack.expected \ signalfd.expected \ statfs.expected \ statx.sh \ + strace-T.expected \ + strace-ff.expected \ + strace-r.expected \ struct_flock.c \ sun_path.expected \ - uid.awk \ uio.expected \ umovestr.expected \ - unix-yy-accept.awk \ - unix-yy-connect.awk \ wait.expected \ - xattr.expected \ + xchownx.c \ xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ xstatx.c \ $(TESTS) @@ -1103,6 +2255,14 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) @@ -1110,6 +2270,14 @@ @rm -f _newselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) @rm -f adjtimex$(EXEEXT) $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) @@ -1118,14 +2286,58 @@ @rm -f aio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) @rm -f bpf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) @rm -f caps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) @rm -f clock_nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) @@ -1134,10 +2346,50 @@ @rm -f clock_xettime$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) @rm -f epoll_create1$(EXEEXT) $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) @rm -f eventfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) @@ -1146,14 +2398,50 @@ @rm -f execve$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) @rm -f execveat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) @rm -f fanotify_mark$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) @rm -f fcntl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) @@ -1162,14 +2450,30 @@ @rm -f fcntl64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) @rm -f file_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) @rm -f filter-unavailable$(EXEEXT) $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) @rm -f fstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) @@ -1182,6 +2486,18 @@ @rm -f fstatat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) @rm -f ftruncate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) @@ -1190,6 +2506,18 @@ @rm -f ftruncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) @rm -f getdents$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) @@ -1198,13 +2526,81 @@ @rm -f getdents64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) @rm -f getrandom$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) -inet-accept-connect-send-recv$(EXEEXT): $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_DEPENDENCIES) $(EXTRA_inet_accept_connect_send_recv_DEPENDENCIES) - @rm -f inet-accept-connect-send-recv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(inet_accept_connect_send_recv_OBJECTS) $(inet_accept_connect_send_recv_LDADD) $(LIBS) +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) @rm -f inet-cmsg$(EXEEXT) @@ -1214,6 +2610,46 @@ @rm -f ioctl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) @rm -f ip_mreq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) @@ -1234,10 +2670,30 @@ @rm -f ipc_shm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) @rm -f ksysent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) @rm -f llseek$(EXEEXT) $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) @@ -1254,6 +2710,10 @@ @rm -f lstat64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) @rm -f membarrier$(EXEEXT) $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) @@ -1262,10 +2722,42 @@ @rm -f memfd_create$(EXEEXT) $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) @rm -f mlock2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) @rm -f mmap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) @@ -1278,10 +2770,22 @@ @rm -f mmsg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) @rm -f mq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) @rm -f nanosleep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) @@ -1290,10 +2794,34 @@ @rm -f net-accept-connect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) @rm -f netlink_inet_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) @rm -f netlink_unix_diag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) @@ -1302,26 +2830,90 @@ @rm -f newfstatat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) @rm -f oldselect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) @rm -f pc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) @rm -f pipe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) @rm -f ppoll$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) @rm -f pselect6$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) @rm -f readdir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) @@ -1334,30 +2926,118 @@ @rm -f readlinkat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) @rm -f restart_syscall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) @rm -f rt_sigqueueinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) @rm -f sched_xetattr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) @rm -f scm_rights$(EXEEXT) $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) -seccomp$(EXEEXT): $(seccomp_OBJECTS) $(seccomp_DEPENDENCIES) $(EXTRA_seccomp_DEPENDENCIES) - @rm -f seccomp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(seccomp_OBJECTS) $(seccomp_LDADD) $(LIBS) +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) @rm -f select$(EXEEXT) $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) @rm -f sendfile$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) @@ -1366,10 +3046,98 @@ @rm -f sendfile64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) @rm -f set_ptracer_any$(EXEEXT) $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) @rm -f sigaction$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) @@ -1386,6 +3154,14 @@ @rm -f sigreturn$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) @rm -f stack-fcall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) @@ -1402,10 +3178,46 @@ @rm -f statfs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) @rm -f sysinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) @rm -f time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) @@ -1438,22 +3250,14 @@ @rm -f truncate64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) -uid$(EXEEXT): $(uid_OBJECTS) $(uid_DEPENDENCIES) $(EXTRA_uid_DEPENDENCIES) - @rm -f uid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid_OBJECTS) $(uid_LDADD) $(LIBS) - -uid16$(EXEEXT): $(uid16_OBJECTS) $(uid16_DEPENDENCIES) $(EXTRA_uid16_DEPENDENCIES) - @rm -f uid16$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid16_OBJECTS) $(uid16_LDADD) $(LIBS) - -uid32$(EXEEXT): $(uid32_OBJECTS) $(uid32_DEPENDENCIES) $(EXTRA_uid32_DEPENDENCIES) - @rm -f uid32$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(uid32_OBJECTS) $(uid32_LDADD) $(LIBS) - uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) @rm -f uio$(EXEEXT) $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) @rm -f umount$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) @@ -1470,10 +3274,26 @@ @rm -f umovestr2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) @rm -f unix-pair-send-recv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) @rm -f userfaultfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) @@ -1486,6 +3306,22 @@ @rm -f utimensat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + wait$(EXEEXT): $(wait_OBJECTS) $(wait_DEPENDENCIES) $(EXTRA_wait_DEPENDENCIES) @rm -f wait$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wait_OBJECTS) $(wait_LDADD) $(LIBS) @@ -1502,6 +3338,14 @@ @rm -f xetitimer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) @rm -f xettimeofday$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) @@ -1513,75 +3357,241 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-accept-connect-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ @@ -1590,7 +3600,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ @@ -1599,22 +3618,30 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid16.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ .c.o: @@ -1631,6 +3658,174 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + fstat64-fstat64.o: fstat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po @@ -1715,6 +3910,62 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + stat64-stat64.o: stat64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po @@ -1953,7 +4204,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all $(check_PROGRAMS) +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -2010,7 +4261,7 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am @@ -2054,7 +4305,8 @@ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -2124,24 +4376,23 @@ .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am -net-fd.log: net.log ksysent.h: $(srcdir)/ksysent.sed echo '#include ' | \ - $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1 + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 mv -f $@.t2 $@ rm -f $@.t1 diff -Nru strace-4.11/tests-mx32/mbind.c strace-4.12/tests-mx32/mbind.c --- strace-4.11/tests-mx32/mbind.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mbind.c 2016-05-16 23:48:05.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of mbind syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_mbind + +# include +# include + +int +main(void) +{ + const unsigned long len = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long mode = 3; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2; + const unsigned long flags = -1UL; + + long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); + printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n", + len, "MPOL_INTERLEAVE", nodemask, maxnode, + "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL", + (unsigned) flags & ~7, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mbind") + +#endif diff -Nru strace-4.11/tests-mx32/mbind.test strace-4.12/tests-mx32/mbind.test --- strace-4.11/tests-mx32/mbind.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mbind.test 2016-04-29 18:21:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mbind syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/membarrier.c strace-4.12/tests-mx32/membarrier.c --- strace-4.11/tests-mx32/membarrier.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/membarrier.c 2016-04-21 18:16:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +25,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_membarrier + +# include +# include +# include +# include + int main(void) { -#ifdef __NR_membarrier - if (syscall(__NR_membarrier, 3, 255) != -1) - return 77; - printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + assert(syscall(__NR_membarrier, 3, 255) == -1); + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", + errno2name()); if (errno != ENOSYS) { - if (syscall(__NR_membarrier, 0, 0) != 1) - return 1; /* the test needs to be updated? */ + /* the test needs to be updated? */ + assert(syscall(__NR_membarrier, 0, 0) == 1); puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" " = 0x1 (MEMBARRIER_CMD_SHARED)"); } puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_membarrier") + #endif -} diff -Nru strace-4.11/tests-mx32/membarrier.test strace-4.12/tests-mx32/membarrier.test --- strace-4.11/tests-mx32/membarrier.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/membarrier.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check membarrier syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a36 -emembarrier $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-mx32/memfd_create.c strace-4.12/tests-mx32/memfd_create.c --- strace-4.11/tests-mx32/memfd_create.c 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests-mx32/memfd_create.c 2016-01-04 23:41:27.000000000 +0000 @@ -1,7 +1,4 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include @@ -16,10 +13,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_memfd_create") #endif diff -Nru strace-4.11/tests-mx32/migrate_pages.c strace-4.12/tests-mx32/migrate_pages.c --- strace-4.11/tests-mx32/migrate_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/migrate_pages.c 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Check decoding of migrate_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_migrate_pages + +# include +# include + +int +main(void) +{ + const long pid = (long) 0xfacefeedffffffff; + long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); + printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_migrate_pages") + +#endif diff -Nru strace-4.11/tests-mx32/migrate_pages.test strace-4.12/tests-mx32/migrate_pages.test --- strace-4.11/tests-mx32/migrate_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/migrate_pages.test 2016-04-28 01:20:19.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check migrate_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff -Nru strace-4.11/tests-mx32/mincore.c strace-4.12/tests-mx32/mincore.c --- strace-4.11/tests-mx32/mincore.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mincore.c 2016-04-22 14:14:39.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define DEFAULT_STRLEN 32 + +static void +print_mincore(const unsigned int pages, void *const addr, + const size_t size, unsigned char *const vec) +{ + unsigned int i; + + if (mincore(addr, size, vec)) + perror_msg_and_skip("mincore"); + + printf("mincore(%p, %zu, [", addr, size); + for (i = 0; i < pages; ++i) { + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } + printf("%u", vec[i] & 1); + } + puts("]) = 0"); +} + +static void +test_mincore(const unsigned int pages) +{ + const size_t page_size = get_page_size(); + const size_t size = pages * page_size; + void *const addr = tail_alloc(size); + unsigned char *const vec = tail_alloc(pages); + + mincore(addr, size, NULL); + printf("mincore(%p, %zu, NULL) = -1 %s (%m)\n", + addr, size, errno2name()); + + print_mincore(pages, addr, size, vec); + if (size) + print_mincore(pages, addr, size - page_size + 1, vec); +} + +int main(void) +{ + test_mincore(1); + test_mincore(2); + test_mincore(DEFAULT_STRLEN); + test_mincore(DEFAULT_STRLEN + 1); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/mincore.test strace-4.12/tests-mx32/mincore.test --- strace-4.11/tests-mx32/mincore.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mincore.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mincore syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-mx32/mkdirat.c strace-4.12/tests-mx32/mkdirat.c --- strace-4.11/tests-mx32/mkdirat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mkdirat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdirat + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdirat.sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_mkdirat, fd, sample, 0600); + printf("mkdirat(%d, \"%s\", 0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdirat") + +#endif diff -Nru strace-4.11/tests-mx32/mkdirat.test strace-4.12/tests-mx32/mkdirat.test --- strace-4.11/tests-mx32/mkdirat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mkdirat.test 2016-04-06 06:18:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdirat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-mx32/mkdir.c strace-4.12/tests-mx32/mkdir.c --- strace-4.11/tests-mx32/mkdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mkdir.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "mkdir"; + + long rc = syscall(__NR_mkdir, sample, 0600); + printf("mkdir(\"%s\", 0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdir") + +#endif diff -Nru strace-4.11/tests-mx32/mkdir.test strace-4.12/tests-mx32/mkdir.test --- strace-4.11/tests-mx32/mkdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mkdir.test 2016-04-21 17:34:38.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/mknodat.c strace-4.12/tests-mx32/mknodat.c --- strace-4.11/tests-mx32/mknodat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mknodat.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,41 @@ +#include "tests.h" +#include + +#ifdef __NR_mknodat + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +int +main(void) +{ + static const char sample[] = "mknokat_sample"; + const long int fd = (long int) 0xdeadbeefffffffff; + long rc = syscall(__NR_mknodat, fd, sample, S_IFREG|0600, 0); + printf("mknodat(%d, \"%s\", S_IFREG|0600) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + const unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknodat, fd, sample, S_IFCHR | 0400, dev); + printf("mknodat(%d, \"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknodat") + +#endif diff -Nru strace-4.11/tests-mx32/mknodat.test strace-4.12/tests-mx32/mknodat.test --- strace-4.11/tests-mx32/mknodat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mknodat.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknodat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/mknod.c strace-4.12/tests-mx32/mknod.c --- strace-4.11/tests-mx32/mknod.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mknod.c 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,60 @@ +#include "tests.h" +#include + +#ifdef __NR_mknod + +# include +# include +# include + +# ifdef MAJOR_IN_SYSMACROS +# include +# endif +# ifdef MAJOR_IN_MKDEV +# include +# endif + +# define TMP_FILE "mknod" + +int +main(void) +{ + long rc = syscall(__NR_mknod, TMP_FILE, 0, 0xdeadbeef); + printf("mknod(\"%s\", 0) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, -1L, 0xdeadbeef); + printf("mknod(\"%s\", %#o) = %ld %s (%m)\n", + TMP_FILE, -1, rc, errno2name()); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFREG|0600, 0); + printf("mknod(\"%s\", S_IFREG|0600) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + unsigned long dev = + (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + + rc = syscall(__NR_mknod, TMP_FILE, S_IFCHR | 0400, dev); + printf("mknod(\"%s\", S_IFCHR|0400, makedev(1, 7)) = %ld %s (%m)\n", + TMP_FILE, rc, errno2name()); + + const unsigned long mode = + ((unsigned long) 0xfacefeedffffffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0ded; + + rc = syscall(__NR_mknod, TMP_FILE, mode, dev); + printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#o" + ", makedev(%u, %u)) = %ld %s (%m)\n", + TMP_FILE, (unsigned) mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknod") + +#endif diff -Nru strace-4.11/tests-mx32/mknod.test strace-4.12/tests-mx32/mknod.test --- strace-4.11/tests-mx32/mknod.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mknod.test 2016-04-26 11:00:51.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff -Nru strace-4.11/tests-mx32/mlock2.c strace-4.12/tests-mx32/mlock2.c --- strace-4.11/tests-mx32/mlock2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/mlock2.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,28 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include +#ifdef __NR_mlock2 + +# include +# include + int main(void) { -#ifdef __NR_mlock2 - if (syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff) != -1) - return 77; - printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_mlock2, 0xdeadbeef, 0xdefaced, 0xffff); + printf("mlock2(0xdeadbeef, 233811181, MLOCK_ONFAULT|0xfffe)" + " = %ld %s (%m)\n", rc, errno2name()); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_mlock2") + #endif -} diff -Nru strace-4.11/tests-mx32/mlock2.test strace-4.12/tests-mx32/mlock2.test --- strace-4.11/tests-mx32/mlock2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/mlock2.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check mlock2 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e mlock2 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/mlockall.c strace-4.12/tests-mx32/mlockall.c --- strace-4.11/tests-mx32/mlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mlockall.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Check decoding of mlockall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("mlockall(0) = %d EINVAL (%m)\n", mlockall(0)); + + if (mlockall(MCL_CURRENT) == 0) + puts("mlockall(MCL_CURRENT) = 0"); + else + printf("mlockall(MCL_CURRENT) = -1 %s (%m)\n", errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/mlockall.test strace-4.12/tests-mx32/mlockall.test --- strace-4.11/tests-mx32/mlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mlockall.test 2016-04-09 23:34:18.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mlockall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-mx32/mlock.c strace-4.12/tests-mx32/mlock.c --- strace-4.11/tests-mx32/mlock.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mlock.c 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#if defined __NR_mlock && defined __NR_munlock + +# include +# include + +const int size = 1024; + +int +main(void) +{ + const char *addr = tail_alloc(size); + if (syscall(__NR_mlock, addr, size) == 0) { + printf("mlock(%p, %d) = 0\n", addr, size); + } else { + printf("mlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + if (syscall(__NR_munlock, addr, size) == 0) { + printf("munlock(%p, %d) = 0\n", addr, size); + } else { + printf("munlock(%p, %d) = -1 %s (%m)\n", + addr, size, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_DEFINED("__NR_mlock && __NR_munlock") + +#endif diff -Nru strace-4.11/tests-mx32/mlock.test strace-4.12/tests-mx32/mlock.test --- strace-4.11/tests-mx32/mlock.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mlock.test 2016-04-27 11:11:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock and munlock syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mlock,munlock -a20 diff -Nru strace-4.11/tests-mx32/mmap.c strace-4.12/tests-mx32/mmap.c --- strace-4.11/tests-mx32/mmap.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/mmap.c 2016-02-12 02:35:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -36,10 +33,13 @@ #include int -main(void) +main(int ac, char **av) { - const intmax_t pagesize = sysconf(_SC_PAGESIZE); - const unsigned long length = pagesize * 3; + const char *const name = ac > 1 ? av[1] : "mmap"; + const intmax_t pagesize = get_page_size(); + const unsigned long length1 = pagesize * 6; + const unsigned long length2 = pagesize * 3; + const unsigned long length3 = pagesize * 2; const int fd = -1; off_t offset; void *addr, *p; @@ -51,23 +51,56 @@ offset = 0xdeadbeef000 & -pagesize; addr = (void *) (unsigned int) (0xfaced000 & -pagesize); #endif + const uintmax_t uoffset = + sizeof(offset) == sizeof(int) ? (uintmax_t) (unsigned int) offset + : (uintmax_t) offset; + + (void) close(0); + (void) close(0); + printf("%s(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EBADF (%m)\n", + name); + mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0); - p = mmap(addr, length, PROT_READ | PROT_WRITE, + p = mmap(addr, length1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, fd, offset); - if (p == MAP_FAILED || - mprotect(p, length, PROT_NONE) || - munmap(p, length)) - return 77; - - if (sizeof(offset) == sizeof(int)) - printf("mmap2?\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#x\\) = %p\n", - addr, length, fd, (unsigned int) offset, p); - else - printf("(mmap2?|old_mmap)\\(%p, %lu, PROT_READ\\|PROT_WRITE, " - "MAP_PRIVATE\\|MAP_ANONYMOUS, %d, %#jx\\) = %p\n", - addr, length, fd, (uintmax_t) offset, p); - printf("mprotect\\(%p, %lu, PROT_NONE\\) += 0\n", p, length); - printf("munmap\\(%p, %lu\\) += 0\n", p, length); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap"); + printf("%s(%p, %lu, PROT_READ|PROT_WRITE, " + "MAP_PRIVATE|MAP_ANONYMOUS, %d, %#jx) = %p\n", + name, addr, length1, fd, uoffset, p); + + if (msync(p, length1, MS_SYNC)) + perror_msg_and_fail("msync"); + printf("msync(%p, %lu, MS_SYNC) = 0\n", p, length1); + + if (mprotect(p, length1, PROT_NONE)) + perror_msg_and_fail("mprotect"); + printf("mprotect(%p, %lu, PROT_NONE) = 0\n", p, length1); + + addr = mremap(p, length1, length2, 0); + if (MAP_FAILED == addr) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, 0) = %p\n", p, length1, length2, addr); + + p = mremap(addr, length2, length3, MREMAP_MAYMOVE | MREMAP_FIXED, + addr + length2); + if (MAP_FAILED == p) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, MREMAP_MAYMOVE|MREMAP_FIXED" + ", %p) = %p\n", addr, length2, length3, addr + length2, p); + + if (madvise(p, length3, MADV_NORMAL)) + perror_msg_and_fail("madvise"); + printf("madvise(%p, %lu, MADV_NORMAL) = 0\n", p, length3); + + if (munmap(p, length3)) + perror_msg_and_fail("munmap"); + printf("munmap(%p, %lu) = 0\n", p, length3); + + if (mlockall(MCL_FUTURE)) + perror_msg_and_fail("mlockall"); + puts("mlockall(MCL_FUTURE) = 0"); + + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-mx32/mmap.test strace-4.12/tests-mx32/mmap.test --- strace-4.11/tests-mx32/mmap.test 2015-12-08 21:19:43.000000000 +0000 +++ strace-4.12/tests-mx32/mmap.test 2016-03-30 00:13:56.000000000 +0000 @@ -1,20 +1,58 @@ #!/bin/sh - -# Check mmap/mprotect/munmap syscalls decoding. +# +# Check mmap/mmap2, madvise, mlockall, mprotect, mremap, msync, and munmap +# syscalls decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . "${srcdir=.}/init.sh" -syscall=mprotect,munmap +check_prog grep +check_prog sed +run_prog > /dev/null + +syscall= for n in mmap mmap2; do $STRACE -e$n -h > /dev/null && syscall=$syscall,$n done +run_strace -e$syscall $args > /dev/null -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -e$syscall $args > "$OUT" -match_grep "$LOG" "$OUT" - -rm -f "$OUT" +if grep '^mmap(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap +elif grep '^mmap2(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap2 +else + dump_log_and_fail_with "mmap/mmap2 not found in $STRACE $args output" +fi + +syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap + +run_prog "./$NAME" $mmap > /dev/null +run_strace -a20 -e$syscall $args > "$EXP" +sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" -exit 0 +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/mmsg.c strace-4.12/tests-mx32/mmsg.c --- strace-4.11/tests-mx32/mmsg.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/mmsg.c 2016-01-20 17:36:41.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2014 Masatake YAMATO - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,81 +26,218 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" +#include "tests.h" +# include + +#if (defined __NR_sendmmsg || defined HAVE_SENDMMSG) \ + && (defined __NR_recvmmsg || defined HAVE_RECVMMSG) + +# include +# include +# include +# include +# include + +# ifndef HAVE_STRUCT_MMSGHDR +struct mmsghdr { + struct msghdr msg_hdr; + unsigned msg_len; +}; +# endif + +static int +send_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags) +{ + int rc; +#ifdef __NR_sendmmsg + rc = syscall(__NR_sendmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("sendmmsg(%d, %p, %u, MSG_DONTROUTE|MSG_NOSIGNAL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_SENDMMSG + rc = sendmmsg(fd, vec, vlen, flags); +#endif + return rc; +} + +static int +recv_mmsg(int fd, struct mmsghdr *vec, unsigned int vlen, unsigned int flags, + struct timespec *timeout) +{ + int rc; +#ifdef __NR_recvmmsg + rc = syscall(__NR_recvmmsg, (long) fd, vec, (unsigned long) vlen, + (unsigned long) flags, timeout); + if (rc >= 0 || ENOSYS != errno) + return rc; + tprintf("recvmmsg(%d, %p, %u, MSG_DONTWAIT, NULL)" + " = -1 ENOSYS (%m)\n", fd, vec, vlen); +#endif +#ifdef HAVE_RECVMMSG + rc = recvmmsg(fd, vec, vlen, flags, timeout); #endif -#include -#include -#include -#include -#include + return rc; +} int main(void) { -#if defined(HAVE_SENDMMSG) && defined(HAVE_STRUCT_MMSGHDR) - const int R = 0, W = 1; - int fd; - int sv[2]; - char one[] = "one"; - char two[] = "two"; - char three[] = "three"; + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); - struct iovec iov[] = { + const struct iovec w0_iov_[] = { { - .iov_base = one, - .iov_len = sizeof(one) - 1 - }, { - .iov_base = two, - .iov_len = sizeof(two) - 1 + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) }, { - .iov_base = three, - .iov_len = sizeof(three) - 1 + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + } + }; + struct iovec *w0_iov = tail_memdup(w0_iov_, sizeof(w0_iov_)); + + const struct iovec w1_iov_[] = { + { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) } }; + struct iovec *w1_iov = tail_memdup(w1_iov_, sizeof(w1_iov_)); - struct mmsghdr mmh[] = { + const struct mmsghdr w_mmh_[] = { { .msg_hdr = { - .msg_iov = iov + 0, - .msg_iovlen = 2, + .msg_iov = w0_iov, + .msg_iovlen = ARRAY_SIZE(w0_iov_), } }, { .msg_hdr = { - .msg_iov = iov + 2, - .msg_iovlen = 1, + .msg_iov = w1_iov, + .msg_iovlen = ARRAY_SIZE(w1_iov_), } } }; -#define n_mmh (sizeof(mmh)/sizeof(mmh[0])) - - /* - * Following open/dup2/close calls make the output of strace - * more predictable, so we can just compare the output and - * expected output (mmsg.expected) for testing purposes. - */ - while ((fd = open("/dev/null", O_RDWR)) < 3) - assert(fd >= 0); - (void) close(3); - - assert(socketpair(AF_UNIX, SOCK_DGRAM, 0, sv) == 0); - - assert(dup2(sv[W], W) == W); - assert(close(sv[W]) == 0); - assert(dup2(sv[R], R) == R); - assert(close(sv[R]) == 0); + void *w_mmh = tail_memdup(w_mmh_, sizeof(w_mmh_)); + const unsigned int n_w_mmh = ARRAY_SIZE(w_mmh_); - int r = sendmmsg(W, mmh, n_mmh, 0); + int r = send_mmsg(1, w_mmh, n_w_mmh, MSG_DONTROUTE | MSG_NOSIGNAL); if (r < 0 && errno == ENOSYS) - return 77; - assert((size_t)r == n_mmh); - assert(close(W) == 0); + perror_msg_and_skip("sendmmsg"); + assert(r == (int) n_w_mmh); + assert(close(1) == 0); + tprintf("sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}" + ", {\"%s\", %u}], msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTROUTE|MSG_NOSIGNAL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w0_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + LENGTH_OF(w0_c) + LENGTH_OF(w1_c), + ARRAY_SIZE(w1_iov_), w2_c, LENGTH_OF(w2_c), LENGTH_OF(w2_c), + n_w_mmh, r, + ARRAY_SIZE(w0_iov_), LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + ARRAY_SIZE(w1_iov_), LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r0_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = r_len + } + }; + struct iovec *r1_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); - assert(recvmmsg(R, mmh, n_mmh, 0, NULL) == n_mmh); - assert(close(R) == 0); + const struct mmsghdr r_mmh_[] = { + { + .msg_hdr = { + .msg_iov = r0_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = r1_iov, + .msg_iovlen = ARRAY_SIZE(r1_iov_), + } + } + }; + void *r_mmh = tail_memdup(r_mmh_, sizeof(r_mmh_)); + const unsigned int n_r_mmh = ARRAY_SIZE(r_mmh_); + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + assert(recv_mmsg(0, r_mmh, n_r_mmh, MSG_DONTWAIT, NULL) == (int) n_r_mmh); + assert(close(0) == 0); + tprintf("recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}" + ", {{msg_name(0)=NULL, msg_iov(%u)=[{\"%s\", %u}, {\"\", %u}]" + ", msg_controllen=0, msg_flags=0}, %u}}, %u" + ", MSG_DONTWAIT, NULL) = %d (left NULL)\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, LENGTH_OF(r0_c), + ARRAY_SIZE(r1_iov_), r1_c, r_len, r_len, LENGTH_OF(r1_c), + n_r_mmh, r, + ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), r0_d, r0_c, + ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), r1_d, r1_c); + + tprintf("+++ exited with 0 +++\n"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("(__NR_sendmmsg || HAVE_SENDMMSG) && (__NR_recvmmsg || HAVE_RECVMMSG)") + #endif -} diff -Nru strace-4.11/tests-mx32/mmsg.expected strace-4.12/tests-mx32/mmsg.expected --- strace-4.11/tests-mx32/mmsg.expected 2014-11-11 15:45:26.000000000 +0000 +++ strace-4.12/tests-mx32/mmsg.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -sendmmsg(1, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0) = 2 - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -recvmmsg(0, {{{msg_name(0)=NULL, msg_iov(2)=[{"one", 3}, {"two", 3}], msg_controllen=0, msg_flags=0}, 6}, {{msg_name(0)=NULL, msg_iov(1)=[{"three", 5}], msg_controllen=0, msg_flags=0}, 5}}, 2, 0, NULL) = 2 (left NULL) - = 2 buffers in vector 0 - * 3 bytes in buffer 0 - | 00000 6f 6e 65 one | - * 3 bytes in buffer 1 - | 00000 74 77 6f two | - = 1 buffers in vector 1 - * 5 bytes in buffer 0 - | 00000 74 68 72 65 65 three | -+++ exited with 0 +++ diff -Nru strace-4.11/tests-mx32/mmsg.test strace-4.12/tests-mx32/mmsg.test --- strace-4.11/tests-mx32/mmsg.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-mx32/mmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,9 +3,4 @@ # Check how iovecs in struct mmsghdr are decoded. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 $args -match_diff - -exit 0 +run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 diff -Nru strace-4.11/tests-mx32/mount.c strace-4.12/tests-mx32/mount.c --- strace-4.11/tests-mx32/mount.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mount.c 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of mount syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#ifndef MS_MGC_VAL +# define MS_MGC_VAL 0xC0ED0000 +#endif + +#ifndef MS_RELATIME +# define MS_RELATIME (1ul << 21) +#endif + +#define str_ro_nosuid_nodev_noexec "MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC" + +int +main(void) +{ + static const char source[] = "mount_source"; + static const char target[] = "mount_target"; + static const char fstype[] = "mount_fstype"; + static const char data[] = "mount_data"; + + int rc = mount(source, target, fstype, 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_RELATIME | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + str_ro_nosuid_nodev_noexec "|MS_RELATIME", + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_MGC_VAL", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + "MS_MGC_VAL|" str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_REMOUNT, data); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_REMOUNT", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_BIND, data); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", + source, target, fstype, "MS_BIND", data, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/mount.test strace-4.12/tests-mx32/mount.test --- strace-4.11/tests-mx32/mount.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/mount.test 2016-05-25 00:11:37.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mount syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/move_pages.c strace-4.12/tests-mx32/move_pages.c --- strace-4.11/tests-mx32/move_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/move_pages.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,251 @@ +/* + * Check decoding of move_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_move_pages + +# include +# include +# include + +# define MAX_STRLEN 3 + +static void +print_page_array(const void **const pages, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", pages ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", pages); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", pages + i); + break; + } + const void *const addr = pages[i]; + if (addr) + printf("%p", addr); + else + printf("NULL"); + } + printf("]"); +} + +static void +print_node_array(const int *const nodes, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", nodes ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", nodes); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", nodes + i); + break; + } + printf("%d", nodes[i]); + } + printf("]"); +} + +static void +print_status_array(const int *const status, const unsigned long count) +{ + if (!count) { + printf("%s", status ? "[]" : "NULL"); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + if (status[i] >= 0) { + printf("%d", status[i]); + } else { + errno = -status[i]; + printf("%s", errno2name()); + } + } + printf("]"); +} + +static void +print_stat_pages(const unsigned long pid, const unsigned long count, + const void **const pages, int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000002; + + long rc = syscall(__NR_move_pages, + pid, count, pages, NULL, status, flags); + if (rc) { + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + if (count) + printf("%p", status); + else + printf("[]"); + errno = saved_errno; + printf(", MPOL_MF_MOVE) = %ld %s (%m)\n", + rc, errno2name()); + } else { + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + print_status_array(status, count); + printf(", MPOL_MF_MOVE) = 0\n"); + } +} + +static void +print_move_pages(const unsigned long pid, + unsigned long count, + const unsigned int offset, + const void **const pages, + int *const nodes, + int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000004; + count += offset; + + long rc = syscall(__NR_move_pages, + pid, count, pages, nodes, status, flags); + int saved_errno = errno; + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, offset); + printf(", "); + print_node_array(nodes, count, offset); + printf(", "); + if (count) + printf("%p", status); + else + printf("[]"); + printf(", MPOL_MF_MOVE_ALL) = "); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +int +main(void) +{ + const unsigned long pid = + (unsigned long) 0xfacefeed00000000 | getpid(); + unsigned long count = 1; + const unsigned page_size = get_page_size(); + const void *const page = tail_alloc(page_size); + const void *const efault = page + page_size; + const void **pages = tail_alloc(sizeof(*pages)); + int *nodes = tail_alloc(sizeof(*nodes)); + int *status = tail_alloc(sizeof(*status)); + + print_stat_pages(pid, 0, pages, status); + print_move_pages(pid, 0, 0, pages, nodes, status); + print_move_pages(pid, 0, 1, pages + 1, nodes + 1, status + 1); + + *pages = page; + print_stat_pages(pid, count, pages, status); + *nodes = 0xdeadbee1; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = efault; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee2; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = nodes; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee3; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = status; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee4; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_move_pages") + +#endif diff -Nru strace-4.11/tests-mx32/move_pages.test strace-4.12/tests-mx32/move_pages.test --- strace-4.11/tests-mx32/move_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/move_pages.test 2016-04-29 18:21:02.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of move_pages syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 diff -Nru strace-4.11/tests-mx32/mq.c strace-4.12/tests-mx32/mq.c --- strace-4.11/tests-mx32/mq.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/mq.c 2016-01-06 11:52:43.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,37 +26,34 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_MQUEUE_H -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include int main (void) { struct mq_attr attr; (void) close(0); - if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0) || - mq_getattr(0, &attr) || - mq_setattr(0, &attr, 0) || - mq_unlink("/strace-mq.test")) - return 77; + if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0)) + perror_msg_and_skip("mq_open"); + if (mq_getattr(0, &attr)) + perror_msg_and_skip("mq_getattr"); + if (mq_setattr(0, &attr, 0)) + perror_msg_and_skip("mq_setattr"); + if (mq_unlink("/strace-mq.test")) + perror_msg_and_skip("mq_unlink"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_MQUEUE_H") #endif diff -Nru strace-4.11/tests-mx32/munlockall.c strace-4.12/tests-mx32/munlockall.c --- strace-4.11/tests-mx32/munlockall.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/munlockall.c 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,13 @@ +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("munlockall() = %d\n", munlockall()); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/munlockall.test strace-4.12/tests-mx32/munlockall.test --- strace-4.11/tests-mx32/munlockall.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/munlockall.test 2016-05-11 12:26:00.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check munlockall syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff -Nru strace-4.11/tests-mx32/nanosleep.c strace-4.12/tests-mx32/nanosleep.c --- strace-4.11/tests-mx32/nanosleep.c 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-mx32/nanosleep.c 2016-01-06 09:56:09.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -54,32 +56,28 @@ const struct itimerval itv = { .it_value.tv_usec = 111111 }; if (nanosleep(&req.ts, NULL)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); - if (!nanosleep(NULL, &rem.ts)) - return 77; - printf("nanosleep(NULL, %p) = -1 EFAULT (Bad address)\n", &rem.ts); + assert(nanosleep(NULL, &rem.ts) == -1); + printf("nanosleep(NULL, %p) = -1 EFAULT (%m)\n", &rem.ts); if (nanosleep(&req.ts, &rem.ts)) - return 77; + perror_msg_and_fail("nanosleep"); printf("nanosleep({%jd, %jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 1000000000; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; - printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (Invalid argument)\n", + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" ", it_value={%jd, %jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, @@ -88,8 +86,7 @@ (intmax_t) itv.it_value.tv_usec); req.ts.tv_nsec = 999999999; - if (!nanosleep(&req.ts, &rem.ts)) - return 77; + assert(nanosleep(&req.ts, &rem.ts) == -1); printf("nanosleep({%jd, %jd}, {%jd, %jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, diff -Nru strace-4.11/tests-mx32/nanosleep.test strace-4.12/tests-mx32/nanosleep.test --- strace-4.11/tests-mx32/nanosleep.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/nanosleep.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check nanosleep syscall decoding. +# Check nanosleep and setitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=nanosleep,setitimer -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=nanosleep,setitimer diff -Nru strace-4.11/tests-mx32/net-accept-connect.c strace-4.12/tests-mx32/net-accept-connect.c --- strace-4.11/tests-mx32/net-accept-connect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/net-accept-connect.c 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Dmitry V. Levin + * Copyright (c) 2013-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -61,9 +62,12 @@ close(0); close(1); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 0); - assert(bind(0, (struct sockaddr *) &addr, len) == 0); - assert(listen(0, 5) == 0); + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); memset(&addr, 0, sizeof addr); assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); @@ -71,7 +75,8 @@ len = sizeof(addr); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(accept(0, (struct sockaddr *) &addr, &len) == 1); @@ -88,7 +93,7 @@ assert(sigprocmask(SIG_BLOCK, &set, NULL) == 0); assert(signal(SIGUSR1, handler) != SIG_ERR); - assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 1); + assert(socket(AF_LOCAL, SOCK_STREAM, 0) == 1); assert(close(0) == 0); assert(connect(1, (struct sockaddr *) &addr, len) == 0); assert(sigprocmask(SIG_UNBLOCK, &set, NULL) == 0); diff -Nru strace-4.11/tests-mx32/net.expected strace-4.12/tests-mx32/net.expected --- strace-4.11/tests-mx32/net.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-mx32/net.expected 2016-04-04 01:35:28.000000000 +0000 @@ -1,5 +1,5 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 [1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, \[19\]\) += 0 diff -Nru strace-4.11/tests-mx32/net-fd.expected strace-4.12/tests-mx32/net-fd.expected --- strace-4.11/tests-mx32/net-fd.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-mx32/net-fd.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, \[22\]\) += 0 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +accept\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1 -[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-fd-local-stream"\}, 22\) += 0 diff -Nru strace-4.11/tests-mx32/net-fd.test strace-4.12/tests-mx32/net-fd.test --- strace-4.11/tests-mx32/net-fd.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-mx32/net-fd.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh - -# Check how network syscalls are traced when decoding socket descriptors - -. "${srcdir=.}/init.sh" - -# strace -y is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -run_prog ./net-accept-connect net-fd-local-stream -# using -y to test socket descriptors 'paths' decoding -run_strace_merge -y -enetwork $args -match_grep - -exit 0 diff -Nru strace-4.11/tests-mx32/net-icmp_filter.c strace-4.12/tests-mx32/net-icmp_filter.c --- strace-4.11/tests-mx32/net-icmp_filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-icmp_filter.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Check decoding of ICMP_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0) = -1 %s (%m)\n", + errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0) = -1 %s (%m)\n", + errno2name()); + + socklen_t *const plen = tail_alloc(sizeof(*plen)); + void *const efault = plen + 1; + struct icmp_filter *const f = tail_alloc(sizeof(*f)); + + getsockopt(-1, SOL_RAW, ICMP_FILTER, f, plen); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %p) = -1 %s (%m)\n", + f, plen, errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %u) = -1 %s (%m)\n", + efault, (unsigned) sizeof(*f), errno2name()); + + f->data = ~( + 1< + * This file is part of inet-yy strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" +#include #include #include #include @@ -33,7 +36,7 @@ #include #include -static int +static void send_query(const int fd, const int family, const int proto) { struct sockaddr_nl nladdr = { @@ -59,28 +62,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -88,12 +96,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct inet_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } int main(void) @@ -108,12 +129,16 @@ close(0); close(1); - if (socket(PF_INET, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5) || - socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) - return 77; - - return (send_query(1, AF_INET, IPPROTO_TCP) && - check_responses(1)) ? 0 : 77; + if (socket(AF_INET, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_INET"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1, AF_INET, IPPROTO_TCP); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests-mx32/netlink_netlink_diag.c strace-4.12/tests-mx32/netlink_netlink_diag.c --- strace-4.11/tests-mx32/netlink_netlink_diag.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/netlink_netlink_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct netlink_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + close(0); + close(1); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) + perror_msg_and_skip("socket AF_NETLINK"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff -Nru strace-4.11/tests-mx32/netlink_unix_diag.c strace-4.12/tests-mx32/netlink_unix_diag.c --- strace-4.11/tests-mx32/netlink_unix_diag.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/netlink_unix_diag.c 2016-05-21 09:33:12.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include +#include #include #include #include @@ -40,8 +44,8 @@ # define NETLINK_SOCK_DIAG NETLINK_INET_DIAG #endif -static int -send_query(const int fd, const int family, const int proto) +static void +send_query(const int fd) { struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK @@ -53,11 +57,10 @@ .nlh = { .nlmsg_len = sizeof(req), .nlmsg_type = SOCK_DIAG_BY_FAMILY, - .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP }, .udr = { - .sdiag_family = family, - .sdiag_protocol = proto, + .sdiag_family = AF_UNIX, .udiag_states = -1, .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER } @@ -67,28 +70,33 @@ .iov_len = sizeof(req) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 }; - return sendmsg(fd, &msg, 0) > 0; + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); } -static int +static void check_responses(const int fd) { - static char buf[8192]; + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK }; struct iovec iov = { - .iov_base = buf, - .iov_len = sizeof(buf) + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) }; struct msghdr msg = { - .msg_name = (void*)&nladdr, + .msg_name = (void *) &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1 @@ -96,12 +104,25 @@ ssize_t ret = recvmsg(fd, &msg, 0); if (ret <= 0) - return 0; + perror_msg_and_skip("recvmsg"); - struct nlmsghdr *h = (struct nlmsghdr*)buf; - return (NLMSG_OK(h, ret) && - h->nlmsg_type != NLMSG_ERROR && - h->nlmsg_type != NLMSG_DONE) ? 1 : 0; + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct unix_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); } #define SUN_PATH "netlink_unix_diag_socket" @@ -117,16 +138,19 @@ close(1); (void) unlink(SUN_PATH); - if (socket(PF_LOCAL, SOCK_STREAM, 0) || - bind(0, (struct sockaddr *) &addr, len) || - listen(0, 5)) - return 77; + if (socket(AF_LOCAL, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_LOCAL"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); assert(unlink(SUN_PATH) == 0); if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) - return 77; + perror_msg_and_skip("socket AF_NETLINK"); - return (send_query(1, AF_UNIX, 0) && - check_responses(1)) ? 0 : 77; + send_query(1); + check_responses(1); + return 0; } diff -Nru strace-4.11/tests-mx32/net-y-unix.c strace-4.12/tests-mx32/net-y-unix.c --- strace-4.11/tests-mx32/net-y-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-y-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,230 @@ +/* + * This file is part of net-y-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d\n", + listen_fd, listen_inode, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + listen_fd, listen_inode, av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d\n", + listen_fd, listen_inode, sun_path1, (unsigned) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(connect_fd, accept_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = 0\n", + connect_fd, connect_inode, sun_path1, (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/net-y-unix.test strace-4.12/tests-mx32/net-y-unix.test --- strace-4.11/tests-mx32/net-y-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-y-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of network syscalls in -y mode. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a20 -y -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/net-yy-accept.awk strace-4.12/tests-mx32/net-yy-accept.awk --- strace-4.11/tests-mx32/net-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 9 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_bind = "^bind\\(0, \\{sa_family=AF_INET, sin_port=htons\\(0\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 { - if (match($0, r_getsockname, a) && a[1] == a[2]) { - port_l = a[1] - r_accept = "^accept\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, \\[" r_i "\\]\\) += 1" r_localhost ":(" r_port ")\\]>$" - r_close0 = "^close\\(0) += 0$" - next - } -} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a) && a[1] == a[2]) { - port_r = a[1] - r_recv = "^recv\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL\\) += 4$" - r_recvfrom = "^recvfrom\\(1" r_localhost ":" port_r "\\]>, \"data\", 5, MSG_WAITALL, NULL, NULL\\) += 4$" - r_close1 = "^close\\(1" r_localhost ":" port_r "\\]>) += 0$" - next - } -} - -NR == 6 {if (r_close0 != "" && match($0, r_close0)) next} - -NR == 7 {if (r_recv != "" && (match($0, r_recv) || match($0, r_recvfrom))) next} - -NR == 8 {if (r_close1 != "" && match($0, r_close1)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-mx32/net-yy-connect.awk strace-4.12/tests-mx32/net-yy-connect.awk --- strace-4.11/tests-mx32/net-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 5 - fail = 0 - - r_i = "[1-9][0-9]*" - r_port = "[1-9][0-9][0-9][0-9]+" - r_localhost = "127\\.0\\.0\\.1" - r_socket = "^socket\\(PF_INET, SOCK_STREAM, IPPROTO_IP\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[1] - r_connect = "^connect\\(0, \\{sa_family=AF_INET, sin_port=htons\\((" r_port ")\\), sin_addr=inet_addr\\(\"" r_localhost "\"\\)\\}, " r_i ") += 0$" - next - } -} - -NR == 2 { - if (r_connect != "" && match($0, r_connect, a)) { - port_r = a[1] - r_send = "^send\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE\\) += 4$" - r_sendto = "^sendto\\(0" r_localhost ":" port_r "\\]>, \"data\", 4, MSG_DONTROUTE, NULL, 0\\) += 4$" - next - } -} - -NR == 3 { - if (r_send != "" && (match($0, r_send, a) || match($0, r_sendto, a))) { - port_l = a[1] - r_close = "^close\\(0" r_localhost ":" port_r "\\]>\\) += 0$" - next - } -} - -NR == 4 {if (r_close != "" && match($0, r_close)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-mx32/net-yy-inet.c strace-4.12/tests-mx32/net-yy-inet.c --- strace-4.11/tests-mx32/net-yy-inet.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-inet.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * This file is part of net-yy-inet strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + const struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int listen_fd = socket(AF_INET, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + const unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + listen_fd, listen_inode); + + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_INET, sin_port=htons(0)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + listen_fd, listen_inode, (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + const unsigned int listen_port = + ntohs(((struct sockaddr_in *) listen_sa) -> sin_port); + printf("getsockname(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = 0\n", + listen_fd, listen_port, listen_port, (unsigned) *len); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_TCP, TCP_MAXSEG, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_TCP, TCP_MAXSEG" + ", [%u], [%u]) = 0\n", + listen_fd, listen_port, *optval, (unsigned) *len); + + const int connect_fd = socket(AF_INET, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + const unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + connect_fd, connect_inode); + + *len = sizeof(addr); + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + connect_fd, connect_inode, listen_port, (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + const int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + const unsigned int connect_port = + ntohs(((struct sockaddr_in *) accept_sa) -> sin_port); + printf("accept(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = %d127.0.0.1:%u]>\n", + listen_fd, listen_port, connect_port, (unsigned) *len, + accept_fd, listen_port, connect_port); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(accept_fd, accept_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + accept_fd, listen_port, connect_port, connect_port, + (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + connect_fd, connect_port, listen_port, listen_port, + (unsigned) *len); + + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_TCP, TCP_MAXSEG, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d127.0.0.1:%u]>" + ", SOL_TCP, TCP_MAXSEG, [%u], %u) = 0\n", + connect_fd, connect_port, listen_port, *optval, + (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, + MSG_DONTROUTE | MSG_DONTWAIT, NULL, 0) == sizeof(text) - 1); + printf("sendto(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_DONTROUTE|MSG_DONTWAIT, NULL, 0) = %u\n", + connect_fd, connect_port, listen_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + connect_fd, connect_port, listen_port); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_WAITALL, + NULL, NULL) == sizeof(text) - 1); + printf("recvfrom(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_WAITALL, NULL, NULL) = %u\n", + accept_fd, listen_port, connect_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + accept_fd, listen_port, connect_port); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_port); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/net-yy-inet.test strace-4.12/tests-mx32/net-yy-inet.test --- strace-4.11/tests-mx32/net-yy-inet.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-inet.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of ip:port pairs associated with socket descriptors +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_inet_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/net-yy-netlink.c strace-4.12/tests-mx32/net-yy-netlink.c --- strace-4.11/tests-mx32/net-yy-netlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-netlink.c 2016-05-23 10:26:46.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +int +main(void) +{ + unsigned magic = 1234; + struct sockaddr_nl addr = { + .nl_family = AF_NETLINK, + .nl_pid = 1234 + }; + struct sockaddr *const sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + if (fd < 0) + perror_msg_and_skip("socket"); + const unsigned long inode = inode_of_sockfd(fd); + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = " + "%d\n", fd, inode); + + if (bind(fd, sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, %u) = 0\n", + fd, inode, magic, (unsigned) *len); + + if (getsockname(fd, sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_NETLINK" + ", pid=%u, groups=00000000}, [%u]) = 0\n", + fd, magic, magic, (unsigned) *len); + + if (close(fd)) + perror_msg_and_fail("close"); + printf("close(%d) = 0\n", fd, magic); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/net-yy-netlink.test strace-4.12/tests-mx32/net-yy-netlink.test --- strace-4.11/tests-mx32/net-yy-netlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-netlink.test 2016-05-23 10:14:39.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of protocol:portid pairs associated with socket +# descriptors +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# Copyright (c) 2016 Fabien Siron +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_netlink_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/net-yy.test strace-4.12/tests-mx32/net-yy.test --- strace-4.11/tests-mx32/net-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -#!/bin/sh -# -# Check decoding of ip:port pairs associated with socket descriptors -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_inet_diag -run_prog ./inet-accept-connect-send-recv -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/net-yy-connect.awk "$STRACE $args connect output mismatch" -match_awk "$LOG-accept" "$srcdir"/net-yy-accept.awk "$STRACE $args accept output mismatch" - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests-mx32/net-yy-unix.c strace-4.12/tests-mx32/net-yy-unix.c --- strace-4.11/tests-mx32/net-yy-unix.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-unix.c 2016-04-04 01:35:28.000000000 +0000 @@ -0,0 +1,227 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_LOCAL, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", + listen_fd, listen_inode, av[1]); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, av[1], *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + int connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_LOCAL, NULL}" + ", [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, av[1], (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu]>) = 0\n", + connect_fd, connect_inode, accept_inode); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + connect_fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_LOCAL, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (unsigned) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_LOCAL" + ", sun_path=@\"%s\"}, [%u]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], sun_path1, (unsigned) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu,@\"%s\"]>, {sa_family=AF_LOCAL" + ", sun_path=\"%s\"}, [%u]) = 0\n", connect_fd, connect_inode, + accept_inode, sun_path1, av[1], (unsigned) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu,@\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, sun_path1, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu,@\"%s\"]>) = 0\n", + connect_fd, connect_inode, accept_inode, sun_path1); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode, av[1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/net-yy-unix.test strace-4.12/tests-mx32/net-yy-unix.test --- strace-4.11/tests-mx32/net-yy-unix.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/net-yy-unix.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of address information (inode[->peer][,path]) +# associated with unix domain socket descriptors. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_unix_diag + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/newfstatat.c strace-4.12/tests-mx32/newfstatat.c --- strace-4.11/tests-mx32/newfstatat.c 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-mx32/newfstatat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_newfstatat -# define TEST_SYSCALL_NAME newfstatat -#endif -#include "fstatat.c" +# define TEST_SYSCALL_NR __NR_newfstatat +# define TEST_SYSCALL_STR "newfstatat" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_newfstatat") + +#endif diff -Nru strace-4.11/tests-mx32/_newselect.c strace-4.12/tests-mx32/_newselect.c --- strace-4.11/tests-mx32/_newselect.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-mx32/_newselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR__newselect -# define TEST_SYSCALL_NAME _newselect -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR__newselect +# define TEST_SYSCALL_STR "_newselect" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR__newselect") + +#endif diff -Nru strace-4.11/tests-mx32/nsyscalls.c strace-4.12/tests-mx32/nsyscalls.c --- strace-4.11/tests-mx32/nsyscalls.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/nsyscalls.c 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Check decoding of out-of-range syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "syscall.h" + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +#include + +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) != 0 +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif + +static const unsigned long nr = ARRAY_SIZE(syscallent) | SYSCALL_BIT; + +int +main(void) +{ + static const unsigned long a[] = { + (unsigned long) 0xface0fedbadc0ded, + (unsigned long) 0xface1fedbadc1ded, + (unsigned long) 0xface2fedbadc2ded, + (unsigned long) 0xface3fedbadc3ded, + (unsigned long) 0xface4fedbadc4ded, + (unsigned long) 0xface5fedbadc5ded + }; + + long rc = syscall(nr, a[0], a[1], a[2], a[3], a[4], a[5]); +#ifdef LINUX_MIPSO32 + printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld ENOSYS (%m)\n", nr, + a[0], a[1], a[2], a[3], a[4], a[5], rc); +#else + printf("syscall_%lu(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld (errno %d)\n", nr & (~SYSCALL_BIT), + a[0], a[1], a[2], a[3], a[4], a[5], rc, errno); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/nsyscalls.test strace-4.12/tests-mx32/nsyscalls.test --- strace-4.11/tests-mx32/nsyscalls.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/nsyscalls.test 2016-05-05 18:04:33.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of out-of-range syscalls. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + mips) syscall=syscall ;; + *) syscall=none ;; +esac + +run_strace_match_diff -e trace=$syscall diff -Nru strace-4.11/tests-mx32/old_mmap.c strace-4.12/tests-mx32/old_mmap.c --- strace-4.11/tests-mx32/old_mmap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/old_mmap.c 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * Check decoding of "old mmap" edition of mmap syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +/* + * On s390x, this is the mmap syscall used by glibc, so, + * from one side, it's already covered by another test, and, from another side, + * it would require additional efforts to filter out mmap calls made by glibc. + */ + +#if defined __NR_mmap && \ +( defined __arm__ \ + || defined __i386__ \ + || defined __m68k__ \ + || (defined __s390__ && !defined __s390x__) \ +) + +# include +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_mmap, 0); + printf("mmap(NULL) = %ld %s (%m)\n", rc, errno2name()); + + const unsigned int args1_c[6] = { + 0xdeadbeef, /* addr */ + 0xfacefeed, /* len */ + PROT_READ|PROT_EXEC, /* prot */ + MAP_FILE|MAP_FIXED, /* flags */ + -2U, /* fd */ + 0xbadc0ded /* offset */ + }; + const unsigned int page_size = get_page_size(); + const unsigned int args2_c[6] = { + 0, + page_size, + PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1U, + 0xfaced000 & -page_size + }; + void *args = tail_memdup(args1_c, sizeof(args1_c)); + + rc = syscall(__NR_mmap, args); + printf("mmap(%#x, %u, PROT_READ|PROT_EXEC, MAP_FILE|MAP_FIXED" + ", %d, %#x) = %ld %s (%m)\n", + args1_c[0], args1_c[1], args1_c[4], args1_c[5], + rc, errno2name()); + + memcpy(args, args2_c, sizeof(args2_c)); + rc = syscall(__NR_mmap, args); + printf("mmap(NULL, %u, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS" + ", %d, %#x) = %#lx\n", + args2_c[1], args2_c[4], args2_c[5], rc); + + void *addr = (void *) rc; + if (mprotect(addr, page_size, PROT_NONE)) + perror_msg_and_fail("mprotect(%p, %u, PROT_NONE)", + addr, page_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__ || __m68k__" + " || (__s390__ && !__s390x__))") + +#endif diff -Nru strace-4.11/tests-mx32/old_mmap.test strace-4.12/tests-mx32/old_mmap.test --- strace-4.11/tests-mx32/old_mmap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/old_mmap.test 2016-04-23 00:07:14.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of "old mmap" edition of mmap syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=mmap diff -Nru strace-4.11/tests-mx32/oldselect.c strace-4.12/tests-mx32/oldselect.c --- strace-4.11/tests-mx32/oldselect.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/oldselect.c 2016-01-05 22:53:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include #if defined __NR_select && defined __NR__newselect \ && __NR_select != __NR__newselect \ && !defined SPARC +# include +# include + int main(void) { @@ -51,22 +49,18 @@ (void) close(0); (void) close(1); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); FD_SET(0, &w); FD_SET(1, &r); if (syscall(__NR_select, args)) - return 77; + perror_msg_and_skip("select"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_select && __NR__newselect") #endif diff -Nru strace-4.11/tests-mx32/openat.c strace-4.12/tests-mx32/openat.c --- strace-4.11/tests-mx32/openat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/openat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016 Katerina Koukiou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_openat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "openat.sample"; + int fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); + if (fd == -1) { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = -1 %s (%m)\n", sample, errno2name()); + } else { + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d\n", sample, fd); + close(fd); + if (unlink(sample) == -1) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_openat, -100, sample, O_RDONLY); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_openat") + +#endif diff -Nru strace-4.11/tests-mx32/openat.test strace-4.12/tests-mx32/openat.test --- strace-4.11/tests-mx32/openat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/openat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check openat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -P $NAME.sample diff -Nru strace-4.11/tests-mx32/open.c strace-4.12/tests-mx32/open.c --- strace-4.11/tests-mx32/open.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/open.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_open + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "open.sample"; + int fd = syscall(__NR_open, sample, O_RDONLY|O_CREAT, 0400); + + if (fd < 0) { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } else { + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400) = %d\n", + sample, fd); + close(fd); + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_open, sample, O_RDONLY); + printf("open(\"%s\", O_RDONLY) = %d %s (%m)\n", + sample, fd, errno2name()); + + fd = syscall(__NR_open, sample, O_WRONLY|O_NONBLOCK|0x80000000); + printf("open(\"%s\", O_WRONLY|O_NONBLOCK|0x80000000)" + " = %d %s (%m)\n", sample, fd, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_open") + +#endif diff -Nru strace-4.11/tests-mx32/open.test strace-4.12/tests-mx32/open.test --- strace-4.11/tests-mx32/open.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/open.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check open syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -P $NAME.sample diff -Nru strace-4.11/tests-mx32/opipe.test strace-4.12/tests-mx32/opipe.test --- strace-4.11/tests-mx32/opipe.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/opipe.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +# Check how -o '|pipe' works. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog grep chdir $srcdir/umovestr.expected > "$EXP" +run_prog ./umovestr + +> "$LOG" || fail_ "failed to write $LOG" +$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || + dump_log_and_fail_with "$STRACE $args failed" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/overflowuid.c strace-4.12/tests-mx32/overflowuid.c --- strace-4.11/tests-mx32/overflowuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/overflowuid.c 2016-04-18 01:10:41.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static void +check_overflow_id(const int id, const char *overflowid) +{ + int fd = open(overflowid, O_RDONLY); + if (fd < 0) { + if (ENOENT == errno) + return; + perror_msg_and_fail("open: %s", overflowid); + } + + /* we trust the kernel */ + char buf[sizeof(int)*3]; + int n = read(fd, buf, sizeof(buf) - 1); + if (n > 0) { + buf[n] = '\0'; + n = atoi(buf); + if (id == n) + error_msg_and_skip("%d matches %s", id, overflowid); + } + + close(fd); +} + +void +check_overflowuid(const int uid) +{ + check_overflow_id(uid, "/proc/sys/kernel/overflowuid"); +} + +void +check_overflowgid(const int gid) +{ + check_overflow_id(gid, "/proc/sys/kernel/overflowgid"); +} diff -Nru strace-4.11/tests-mx32/pause.c strace-4.12/tests-mx32/pause.c --- strace-4.11/tests-mx32/pause.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pause.c 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check decoding of pause syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pause + +# include +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + pause(); + printf("pause() = ? ERESTARTNOHAND (To be restarted if no handler)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pause") + +#endif diff -Nru strace-4.11/tests-mx32/pause.test strace-4.12/tests-mx32/pause.test --- strace-4.11/tests-mx32/pause.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pause.test 2016-04-27 14:22:22.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pause syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 -esignal=none diff -Nru strace-4.11/tests-mx32/pc.c strace-4.12/tests-mx32/pc.c --- strace-4.11/tests-mx32/pc.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/pc.c 2016-01-06 11:33:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" +#include #include #include #include @@ -37,27 +36,25 @@ int main(void) { - const unsigned long pagesize = sysconf(_SC_PAGESIZE); + const unsigned long pagesize = get_page_size(); #ifdef __s390__ /* * The si_addr field is unreliable: * https://marc.info/?l=linux-s390&m=142515870124248&w=2 */ - return 77; + error_msg_and_skip("s390: si_addr is unreliable"); #endif /* write instruction pointer length to the log */ - if (write(-1, NULL, 2 * sizeof(void *)) >= 0) - return 77; + assert(write(-1, NULL, 2 * sizeof(void *)) < 0); /* just a noticeable line in the log */ - if (munmap(&main, 0) >= 0) - return 77; + assert(munmap(&main, 0) < 0); int pid = fork(); if (pid < 0) - return 77; + perror_msg_and_fail("fork"); if (!pid) { const unsigned long mask = ~(pagesize - 1); @@ -83,14 +80,13 @@ /* SIGSEGV is expected */ (void) munmap((void *) addr, size); (void) munmap((void *) addr, size); - return 77; + error_msg_and_skip("SIGSEGV did not happen"); } int status; - if (wait(&status) != pid || - !WIFSIGNALED(status) || - WTERMSIG(status) != SIGSEGV) - return 77; + assert(wait(&status) == pid); + assert(WIFSIGNALED(status)); + assert(WTERMSIG(status) == SIGSEGV); /* dump process map for debug purposes */ close(0); diff -Nru strace-4.11/tests-mx32/personality.c strace-4.12/tests-mx32/personality.c --- strace-4.11/tests-mx32/personality.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/personality.c 2015-12-26 02:10:46.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int main(void) +{ + const unsigned int good_type = PER_BSD; + const char *good_type_str = "PER_BSD"; + + const unsigned int bad_type = 0x1f; + const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/"; + + const unsigned int good_flags = + SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS; + const char *good_flags_str = + "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS"; + + const unsigned int bad_flags = 0x10000; + const char *bad_flags_str = "0x10000"; + + const unsigned int saved_pers = personality(0xffffffff); + printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers); + + /* PER_LINUX */ + personality(PER_LINUX); + printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers); + + personality(0xffffffff); + puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)"); + + personality(good_flags); + printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n", + good_flags_str); + + personality(bad_flags); + printf("personality\\(PER_LINUX\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + bad_flags_str, good_flags, good_flags_str); + + personality(good_flags | bad_flags); + printf("personality\\(PER_LINUX\\|%s\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + good_flags_str, bad_flags_str, bad_flags, bad_flags_str); + + /* another valid type */ + personality(good_type); + printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", + good_type_str, good_flags | bad_flags, + good_flags_str, bad_flags_str); + + personality(good_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + good_type_str, good_flags_str, good_type, good_type_str); + + personality(good_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, bad_flags_str, good_type | good_flags, + good_type_str, good_flags_str); + + personality(good_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, good_flags_str, bad_flags_str, + good_type | bad_flags, + good_type_str, bad_flags_str); + + /* invalid type */ + personality(bad_type); + printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type_str, good_type | good_flags | bad_flags, + good_type_str, good_flags_str, bad_flags_str); + + personality(bad_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + bad_type_str, good_flags_str, bad_type, bad_type_str); + + personality(bad_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, bad_flags_str, bad_type | good_flags, + bad_type_str, good_flags_str); + + personality(bad_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, good_flags_str, bad_flags_str, + bad_type | bad_flags, bad_type_str, bad_flags_str); + + personality(saved_pers); + printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type | good_flags | bad_flags, + bad_type_str, good_flags_str, bad_flags_str); + + return 0; +} diff -Nru strace-4.11/tests-mx32/personality.test strace-4.12/tests-mx32/personality.test --- strace-4.11/tests-mx32/personality.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/personality.test 2016-03-30 00:13:37.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check personality syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a20 -epersonality $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff -Nru strace-4.11/tests-mx32/pipe.c strace-4.12/tests-mx32/pipe.c --- strace-4.11/tests-mx32/pipe.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/pipe.c 2016-01-06 11:38:05.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" + +#ifdef HAVE_PIPE2 -#include -#include -#include +# include +# include +# include int main(void) @@ -39,16 +39,19 @@ (void) close(0); (void) close(1); int fds[2]; - if (pipe(fds) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe(fds)) + perror_msg_and_fail("pipe"); -#ifdef HAVE_PIPE2 (void) close(0); (void) close(1); - if (pipe2(fds, O_NONBLOCK) || fds[0] != 0 || fds[1] != 1) - return 77; + if (pipe2(fds, O_NONBLOCK)) + perror_msg_and_skip("pipe2"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PIPE2") + #endif -} diff -Nru strace-4.11/tests-mx32/poll.c strace-4.12/tests-mx32/poll.c --- strace-4.11/tests-mx32/poll.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/poll.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,259 @@ +/* + * This file is part of poll strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_poll + +# include +# include +# include +# include +# include +# include + +#define PRINT_EVENT(flag, member) \ + if (member & flag) { \ + if (member != pfd->member) \ + tprintf("|"); \ + tprintf(#flag); \ + member &= ~flag; \ + } + +static void +print_pollfd_entering(const struct pollfd *const pfd) +{ + tprintf("{fd=%d", pfd->fd); + if (pfd->fd >= 0) { + tprintf(", events="); + short events = pfd->events; + + if (pfd->events) { + PRINT_EVENT(POLLIN, events) + PRINT_EVENT(POLLPRI, events) + PRINT_EVENT(POLLOUT, events) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, events) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, events) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, events) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, events) +#endif + PRINT_EVENT(POLLERR, events) + PRINT_EVENT(POLLHUP, events) + PRINT_EVENT(POLLNVAL, events) + } else + tprintf("0"); + } + tprintf("}"); +} + +static void +print_pollfd_array_entering(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int valid, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int i; + for (i = 0; i < size; ++i) { + if (i) + tprintf(", "); + if (i >= valid) { + tprintf("%p", &pfd[i]); + break; + } + if (i >= abbrev) { + tprintf("..."); + break; + } + print_pollfd_entering(&pfd[i]); + } + tprintf("]"); +} + +static void +print_pollfd_exiting(const struct pollfd *const pfd, + unsigned int *const seen, + const unsigned int abbrev) +{ + if (!pfd->revents || pfd->fd < 0 || *seen > abbrev) + return; + + if (*seen) + tprintf(", "); + ++(*seen); + + if (*seen > abbrev) { + tprintf("..."); + return; + } + tprintf("{fd=%d, revents=", pfd->fd); + short revents = pfd->revents; + + PRINT_EVENT(POLLIN, revents) + PRINT_EVENT(POLLPRI, revents) + PRINT_EVENT(POLLOUT, revents) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, revents) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, revents) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, revents) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, revents) +#endif + PRINT_EVENT(POLLERR, revents) + PRINT_EVENT(POLLHUP, revents) + PRINT_EVENT(POLLNVAL, revents) + tprintf("}"); +} + +static void +print_pollfd_array_exiting(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int seen = 0; + unsigned int i; + for (i = 0; i < size; ++i) + print_pollfd_exiting(&pfd[i], &seen, abbrev); + tprintf("]"); +} + +int +main(int ac, char **av) +{ + tprintf("%s", ""); + + assert(syscall(__NR_poll, NULL, 42, 0) == -1); + if (ENOSYS == errno) + perror_msg_and_skip("poll"); + tprintf("poll(NULL, 42, 0) = -1 EFAULT (%m)\n"); + + int fds[2]; + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + const unsigned int abbrev = (ac > 1) ? atoi(av[1]) : -1; + const struct pollfd pfds0[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = fds[0], .events = POLLIN | POLLPRI }, + { .fd = fds[1], .events = POLLOUT }, + { .fd = 2, .events = POLLOUT | POLLWRBAND } + }; + struct pollfd *const tail_fds0 = tail_memdup(pfds0, sizeof(pfds0)); + const int timeout = 42; + int rc = syscall(__NR_poll, tail_fds0, 0, timeout); + assert(rc == 0); + + tprintf("poll([], 0, %d) = %d (Timeout)\n", timeout, rc); + + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 3); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[0].fd = -1; + tail_fds0[2].fd = -3; + tail_fds0[4].events = 0; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 2); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[1].fd = -2; + tail_fds0[4].fd = -5; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 1); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + struct pollfd pfds1[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + struct pollfd *const tail_fds1 = tail_memdup(pfds1, sizeof(pfds1)); + rc = syscall(__NR_poll, tail_fds1, ARRAY_SIZE(pfds1), timeout); + assert(rc == 0); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds1, ARRAY_SIZE(pfds1), + ARRAY_SIZE(pfds1), abbrev); + tprintf(", %u, %d) = %d (Timeout)\n", ARRAY_SIZE(pfds1), timeout, rc); + + const void *const efault = tail_fds0 + ARRAY_SIZE(pfds0); + rc = syscall(__NR_poll, efault, 1, 0); + assert(rc == -1); + tprintf("poll(%p, 1, 0) = -1 EFAULT (%m)\n", efault); + + const unsigned int valid = 1; + const void *const epfds = tail_fds0 + ARRAY_SIZE(pfds0) - valid; + rc = syscall(__NR_poll, epfds, valid + 1, 0); + assert(rc == -1); + tprintf("poll("); + print_pollfd_array_entering(epfds, valid + 1, valid, abbrev); + errno = EFAULT; + tprintf(", %u, 0) = -1 EFAULT (%m)\n", valid + 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_poll") + +#endif diff -Nru strace-4.11/tests-mx32/poll.test strace-4.12/tests-mx32/poll.test --- strace-4.11/tests-mx32/poll.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/poll.test 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check poll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -vepoll $args > "$OUT" +match_diff "$LOG" "$OUT" + +for abbrev in 0 1 2 3 4 5; do + run_prog "./$NAME" $abbrev > /dev/null + run_strace -a16 -epoll -s$abbrev $args > "$OUT" + match_diff "$LOG" "$OUT" +done + +rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/ppoll.c strace-4.12/tests-mx32/ppoll.c --- strace-4.11/tests-mx32/ppoll.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/ppoll.c 2016-01-06 11:44:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include -static int +static void test1(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 42, .tv_nsec = 999999999 }; struct pollfd fds[] = { { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, @@ -45,35 +42,41 @@ { .fd = 4, .events = POLLOUT } }; + sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 2 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 2); } -static int +static void test2(void) { - sigset_t mask; const struct timespec timeout = { .tv_sec = 0, .tv_nsec = 999 }; struct pollfd fds[] = { { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } }; + sigset_t mask; sigfillset(&mask); sigdelset(&mask, SIGHUP); sigdelset(&mask, SIGKILL); sigdelset(&mask, SIGSTOP); - return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 0 ? 0 : 77; + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 0); } int main(void) { - int rc; int fds[2]; (void) close(0); @@ -81,14 +84,11 @@ (void) close(3); (void) close(4); if (pipe(fds) || pipe(fds)) - return 77; - - - if ((rc = test1())) - return rc; + perror_msg_and_fail("pipe"); - if ((rc = test2())) - return rc; + test1(); + test2(); - return ppoll(NULL, 42, NULL, NULL) < 0 ? 0 : 77; + assert(ppoll(NULL, 42, NULL, NULL) < 0); + return 0; } diff -Nru strace-4.11/tests-mx32/ppoll.expected strace-4.12/tests-mx32/ppoll.expected --- strace-4.11/tests-mx32/ppoll.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests-mx32/ppoll.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \.\.\.\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests-mx32/ppoll.test strace-4.12/tests-mx32/ppoll.test --- strace-4.11/tests-mx32/ppoll.test 2015-07-30 22:03:07.000000000 +0000 +++ strace-4.12/tests-mx32/ppoll.test 2016-03-30 00:13:56.000000000 +0000 @@ -5,9 +5,9 @@ . "${srcdir=.}/init.sh" run_prog -run_strace -s2 -e ppoll $args +run_strace -a30 -s2 -e ppoll $args match_grep -run_strace -v -s2 -e ppoll $args -match_grep "$LOG" "$srcdir/${ME_%.test}-v.expected" +run_strace -a30 -v -s2 -e ppoll $args +match_grep "$LOG" "$srcdir/$NAME-v.expected" exit 0 diff -Nru strace-4.11/tests-mx32/ppoll-v.expected strace-4.12/tests-mx32/ppoll-v.expected --- strace-4.11/tests-mx32/ppoll-v.expected 2015-08-01 16:52:13.000000000 +0000 +++ strace-4.12/tests-mx32/ppoll-v.expected 2016-02-16 01:35:36.000000000 +0000 @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) += 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) += 0 \(Timeout\) -ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) += -1 EFAULT .* +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff -Nru strace-4.11/tests-mx32/prctl-seccomp-filter-v.c strace-4.12/tests-mx32/prctl-seccomp-filter-v.c --- strace-4.11/tests-mx32/prctl-seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/prctl-seccomp-filter-v.c 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined HAVE_PRCTL \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined PR_SET_SECCOMP \ + && defined SECCOMP_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +static const struct sock_fprog prog = { + .len = ARRAY_SIZE(filter), + .filter = (struct sock_filter *) filter, +}; + +int +main(void) +{ + int fds[2]; + + puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); + + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", + prog.len); + + printf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + printf("BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"); + + puts("]}) = 0"); + puts("+++ exited with 0 +++"); + + fflush(stdout); + close(0); + close(1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) + perror_msg_and_skip("PR_SET_SECCOMP"); + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_NO_NEW_PRIVS && PR_SET_SECCOMP" + " && SECCOMP_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests-mx32/prctl-seccomp-filter-v.test strace-4.12/tests-mx32/prctl-seccomp-filter-v.test --- strace-4.11/tests-mx32/prctl-seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/prctl-seccomp-filter-v.test 2016-04-18 01:10:44.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -v -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/prctl-seccomp-strict.c strace-4.12/tests-mx32/prctl-seccomp-strict.c --- strace-4.11/tests-mx32/prctl-seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/prctl-seccomp-strict.c 2016-05-16 23:50:59.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + + int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3); + printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)" + " = %d %s (%m)\n", -1L, rc, errno2name()); + fflush(stdout); + + rc = prctl(PR_SET_SECCOMP, 1); + if (rc) { + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)" + " = %d %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_SECCOMP && __NR_exit") + +#endif diff -Nru strace-4.11/tests-mx32/prctl-seccomp-strict.test strace-4.12/tests-mx32/prctl-seccomp-strict.test --- strace-4.11/tests-mx32/prctl-seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/prctl-seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +check_prog grep +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eprctl "$@" > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff -Nru strace-4.11/tests-mx32/pread64-pwrite64.c strace-4.12/tests-mx32/pread64-pwrite64.c --- strace-4.11/tests-mx32/pread64-pwrite64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pread64-pwrite64.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * Check decoding of pread64 and pwrite64 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + const off_t offset = 0xdefaceddeadbeefLL + len; + long rc = pread(0, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pread64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pread64", 0); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = pwrite(1, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pwrite64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pwrite64", 1); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "pread64-pwrite64-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + char *nil = tail_alloc(1); + *nil = '\0'; + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = pwrite(1, w, 0, 0); + if (rc) + perror_msg_and_fail("pwrite64: expected 0, returned %ld", rc); + tprintf("pwrite64(1, \"\", 0, 0) = 0\n"); + + rc = pwrite(1, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("pwrite64(1, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pwrite(1, nil, 1, -3); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1, returned %ld", rc); + tprintf("pwrite64(1, \"\\0\", 1, -3) = -1 EINVAL (%m)\n"); + + rc = pwrite(1, w, w_len, 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwrite64: expected %u, returned %ld", + w_len, rc); + tprintf("pwrite64(1, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = pread(0, r0, 0, 0); + if (rc) + perror_msg_and_fail("pread64: expected 0, returned %ld", rc); + tprintf("pread64(0, \"\", 0, 0) = 0\n"); + + rc = pread(0, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pread(0, efault, 2, -7); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 2, -7) = -1 EINVAL (%m)\n", efault); + + rc = pread(0, r0, r0_len, 0); + if (rc != (int) r0_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r0_len, rc); + tprintf("pread64(0, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = pread(0, r1, w_len, r0_len); + if (rc != (int) r1_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r1_len, rc); + tprintf("pread64(0, \"%s\", %u, %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, r0_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-mx32/pread64-pwrite64.test strace-4.12/tests-mx32/pread64-pwrite64.test --- strace-4.11/tests-mx32/pread64-pwrite64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pread64-pwrite64.test 2016-04-02 18:27:44.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of pread64 and pwrite64 syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=pread64-pwrite64-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests-mx32/preadv2-pwritev2.c strace-4.12/tests-mx32/preadv2-pwritev2.c --- strace-4.11/tests-mx32/preadv2-pwritev2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv2-pwritev2.c 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,211 @@ +/* + * Check decoding of preadv2 and pwritev2 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_preadv2 && defined __NR_pwritev2 + +# include +# include +# include +# include +# include + +static int +pr(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L); +} + +static int +pw(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L); +} + +static void +dumpio(void) +{ + static char tmp[] = "preadv2-pwritev2-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pw(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc); + tprintf("pwritev2(1, [], 0, 0, 0) = 0\n"); + + rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev2(1, [{\"%s\", %u}, %p], 2, 0, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev2: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev2(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv2: expected %u, returned %ld", + r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv2: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv2(0, [{\"%s\", %u}, {\"\", %u}], %u, %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); +} + +int +main(void) +{ + const unsigned long vlen = (unsigned long) 0xfac1fed2dad3bef4; + const unsigned long long pos = 0xfac5fed6dad7bef8; + const unsigned long pos_l = (unsigned long) pos; + const unsigned long pos_h = (sizeof(long) == sizeof(long long)) ? + (unsigned long) 0xbadc0deddeadbeef : 0xfac5fed6UL; + int test_dumpio = 1; + + tprintf("%s", ""); + + syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + vlen, pos, errno2name()); + + if (test_dumpio) + dumpio(); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2") + +#endif diff -Nru strace-4.11/tests-mx32/preadv2-pwritev2.test strace-4.12/tests-mx32/preadv2-pwritev2.test --- strace-4.11/tests-mx32/preadv2-pwritev2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv2-pwritev2.test 2016-05-11 01:54:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv2 and pwritev2 syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -eread=0 -ewrite=1 -e trace=preadv2,pwritev2 diff -Nru strace-4.11/tests-mx32/preadv.c strace-4.12/tests-mx32/preadv.c --- strace-4.11/tests-mx32/preadv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv.c 2016-05-07 23:32:29.000000000 +0000 @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PREADV + +# include +# include +# include +# include + +# define LEN 8 + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) + printf("\\%d", (int) buf[i]); + printf("\", %u}", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt) +{ + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char *buf = tail_alloc(LEN); + struct iovec *iov = tail_alloc(sizeof(*iov)); + iov->iov_base = buf; + iov->iov_len = LEN; + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (preadv(0, iov, 1, offset) != LEN) + perror_msg_and_fail("preadv"); + printf("preadv(0, "); + print_iovec(iov, 1); + printf(", 1, %lld) = %u\n", (long long) offset, LEN); + + if (preadv(0, iov, 1, -1) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, %p, 1, -1) = -1 EINVAL (%m)\n", iov); + + if (preadv(0, NULL, 1, -2) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, NULL, 1, -2) = -1 EINVAL (%m)\n"); + + if (preadv(0, iov, 0, -3) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [], 0, -3) = -1 EINVAL (%m)\n"); + + static const char tmp[] = "preadv-tmpfile"; + int fd = open(tmp, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd < 0) + perror_msg_and_fail("open"); + if (unlink(tmp)) + perror_msg_and_fail("unlink"); + + static const char w[] = "0123456789abcde"; + if (write(fd, w, LENGTH_OF(w)) != LENGTH_OF(w)) + perror_msg_and_fail("write"); + + static const char r0_c[] = "01234567"; + static const char r1_c[] = "89abcde"; + + const unsigned int r_len = (LENGTH_OF(w) + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + long rc; + + rc = preadv(fd, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + printf("preadv(%d, [{\"%s\", %u}], %u, 0) = %u\n", + fd, r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(LENGTH_OF(w)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = LENGTH_OF(w) + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) LENGTH_OF(w) - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) LENGTH_OF(w) - r_len, rc); + printf("preadv(%d, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n", + fd, r1_c, r_len, LENGTH_OF(w), ARRAY_SIZE(r1_iov_), + r_len, LENGTH_OF(w) - r_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV") + +#endif diff -Nru strace-4.11/tests-mx32/preadv-pwritev.c strace-4.12/tests-mx32/preadv-pwritev.c --- strace-4.11/tests-mx32/preadv-pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv-pwritev.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Check decoding of preadv and pwritev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined HAVE_PREADV && defined HAVE_PWRITEV + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "preadv-pwritev-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + rc = pwritev(1, efault, 42, 0); + tprintf("pwritev(1, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = preadv(0, efault, 42, 0); + tprintf("preadv(0, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pwritev(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev: expected 0, returned %ld", rc); + tprintf("pwritev(1, [], 0, 0) = 0\n"); + + rc = pwritev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev(1, [{\"%s\", %u}, %p], 2, 0) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pwritev(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv(0, [{\"%s\", %u}, {\"\", %u}], %u, %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests-mx32/preadv-pwritev.test strace-4.12/tests-mx32/preadv-pwritev.test --- strace-4.11/tests-mx32/preadv-pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv-pwritev.test 2016-03-31 00:01:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv and pwritev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev diff -Nru strace-4.11/tests-mx32/preadv.test strace-4.12/tests-mx32/preadv.test --- strace-4.11/tests-mx32/preadv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/preadv.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check preadv syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/printflags.c strace-4.12/tests-mx32/printflags.c --- strace-4.11/tests-mx32/printflags.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/printflags.c 2016-04-26 00:13:47.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printflags(const struct xlat *xlat, unsigned long long flags, + const char *const dflt) +{ + if (flags == 0 && xlat->val == 0 && xlat->str) { + fputs(xlat->str, stdout); + return 1; + } + + int n; + char sep = 0; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + if (sep) + putc(sep, stdout); + else + sep = '|'; + fputs(xlat->str, stdout); + flags &= ~xlat->val; + n++; + } + } + + if (n) { + if (flags) { + if (sep) + putc(sep, stdout); + printf("%#llx", flags); + n++; + } + } else { + if (flags) { + printf("%#llx", flags); + if (dflt) + printf(" /* %s */", dflt); + } else { + if (dflt) + putc('0', stdout); + } + } + + return n; +} diff -Nru strace-4.11/tests-mx32/print_quoted_string.c strace-4.12/tests-mx32/print_quoted_string.c --- strace-4.11/tests-mx32/print_quoted_string.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/print_quoted_string.c 2016-05-10 22:12:01.000000000 +0000 @@ -0,0 +1,75 @@ +#include "tests.h" + +#include +#include +#include + +/* + * Based on string_quote() from util.c. + * Assumes instr is NUL-terminated. + */ + +void +print_quoted_string(const char *instr) +{ + print_quoted_memory(instr, strlen(instr)); +} + +void +print_quoted_memory(const char *instr, const size_t len) +{ + const unsigned char *str = (const unsigned char*) instr; + size_t i; + + for (i = 0; i < len; ++i) { + const int c = str[i]; + switch (c) { + case '\"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + case '\v': + printf("\\v"); + break; + default: + if (c >= ' ' && c <= 0x7e) + putchar(c); + else { + putchar('\\'); + + char c1 = '0' + (c & 0x7); + char c2 = '0' + ((c >> 3) & 0x7); + char c3 = '0' + (c >> 6); + + if (*str >= '0' && *str <= '9') { + /* Print \octal */ + putchar(c3); + putchar(c2); + } else { + /* Print \[[o]o]o */ + if (c3 != '0') + putchar(c3); + if (c3 != '0' || c2 != '0') + putchar(c2); + } + putchar(c1); + } + break; + } + } + +} diff -Nru strace-4.11/tests-mx32/printxval.c strace-4.12/tests-mx32/printxval.c --- strace-4.11/tests-mx32/printxval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/printxval.c 2016-04-27 20:31:34.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printxval(const struct xlat *xlat, unsigned long long val, + const char *const dflt) +{ + for (; xlat->str; xlat++) { + if (xlat->val == val) { + fputs(xlat->str, stdout); + return 1; + } + } + + printf("%#llx", val); + if (dflt) + printf(" /* %s */", dflt); + return 0; +} diff -Nru strace-4.11/tests-mx32/pselect6.c strace-4.12/tests-mx32/pselect6.c --- strace-4.11/tests-mx32/pselect6.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/pselect6.c 2016-04-18 01:10:44.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,9 @@ /* * Based on test by Dr. David Alan Gilbert */ + +#include "tests.h" +#include #include #include #include @@ -68,7 +71,7 @@ sigaddset(&mask, SIGCHLD); if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple pselect. @@ -79,8 +82,10 @@ FD_SET(fds[1], set[1]); FD_SET(1, set[2]); FD_SET(2, set[2]); - if (pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL) != 1) - return 77; + int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL); + if (rc < 0) + perror_msg_and_skip("pselect"); + assert(rc == 1); printf("pselect6(%d, [%d %d], [%d %d], [1 2], NULL, {NULL, %u}) " "= 1 (out [%d])\n", fds[1] + 1, fds[0], fds[1], @@ -94,8 +99,7 @@ FD_SET(2, set[1]); FD_SET(fds[0], set[1]); FD_SET(fds[1], set[1]); - if (syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) != 3) - return 77; + assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); printf("pselect6(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld}, NULL)" " = 3 (out [1 2 %d], left {%lld, %lld})\n", fds[1] + 1, fds[0], fds[1], @@ -109,10 +113,9 @@ */ FD_ZERO(set[0]); FD_SET(fds[1],set[0]); - if (pselect(-1, NULL, set[0], NULL, NULL, &mask) != -1) - return 77; + assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " - "= -1 EINVAL (Invalid argument)\n", set[0], NSIG / 8); + "= -1 EINVAL (%m)\n", set[0], NSIG / 8); /* * Another variant, with nfds exceeding FD_SETSIZE limit. @@ -122,24 +125,21 @@ FD_ZERO(set[1]); tm.ts.tv_sec = 0; tm.ts.tv_nsec = 123; - if (pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) != 0) - return 77; + assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); printf("pselect6(%d, [%d], [], NULL, {0, 123}, {[HUP CHLD], %u}) " "= 0 (Timeout)\n", FD_SETSIZE + 1, fds[0], NSIG / 8); /* * See how timeouts are decoded. */ - if (sigaction(SIGALRM, &act, NULL) != 0) - return 77; - if (setitimer(ITIMER_REAL, &itv, NULL) != 0) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(setitimer(ITIMER_REAL, &itv, NULL) == 0); tm.ts.tv_nsec = 222222222; - if (pselect(0, NULL, NULL, NULL, &tm.ts, &mask) != -1) - return 77; - puts("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], 8})" - " = ? ERESTARTNOHAND (To be restarted if no handler)"); + assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); + printf("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], %u})" + " = ? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG / 8); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); puts("+++ exited with 0 +++"); @@ -148,10 +148,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_pselect6") #endif diff -Nru strace-4.11/tests-mx32/pselect6.test strace-4.12/tests-mx32/pselect6.test --- strace-4.11/tests-mx32/pselect6.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/pselect6.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check pselect6 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e pselect6 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/ptrace.c strace-4.12/tests-mx32/ptrace.c --- strace-4.11/tests-mx32/ptrace.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ptrace.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,477 @@ +/* + * Check decoding of ptrace syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include +# include +# include "ptrace.h" +# include + +static long +do_ptrace(unsigned long request, unsigned long pid, + unsigned long addr, unsigned long data) +{ + return syscall(__NR_ptrace, request, pid, addr, data); +} + +static void +test_peeksiginfo(unsigned long pid, const unsigned long bad_request) +{ + long rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, 0, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, NULL, %#lx)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, rc, errno2name()); + + struct { + unsigned long long off; + unsigned int flags, nr; + } *const psi = tail_alloc(sizeof(*psi)); + + psi->off = 0xdeadbeeffacefeed; + psi->flags = 1; + psi->nr = 42; + + rc = do_ptrace(PTRACE_PEEKSIGINFO, + pid, (unsigned long) psi, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=PTRACE_PEEKSIGINFO_SHARED, nr=%u}, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, bad_request, rc, errno2name()); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGALRM); + + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + raise(SIGUSR2); + raise(SIGALRM); + + if (do_ptrace(PTRACE_TRACEME, 0, 0, 0)) + perror_msg_and_fail("child: PTRACE_TRACEME"); + + raise(SIGSTOP); + _exit(0); + } + + const unsigned int nsigs = 4; + const uid_t uid = geteuid(); + siginfo_t *sigs = tail_alloc(sizeof(*sigs) * nsigs); + + psi->off = 0; + psi->flags = 0; + psi->nr = nsigs; + + for (;;) { + int status, tracee, saved; + + errno = 0; + tracee = wait(&status); + if (tracee <= 0) { + if (errno == EINTR) + continue; + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("wait"); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_fail("unexpected exit status %u", + WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) + error_msg_and_fail("unexpected signal %u", + WTERMSIG(status)); + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill(pid, SIGKILL); + error_msg_and_fail("unexpected wait status %x", + status); + } + + rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, + (unsigned long) psi, (unsigned long) sigs); + if (rc < 0) { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}, %p) = %ld %s (%m)\n", + (unsigned) pid, psi->off, psi->nr, sigs, + rc, errno2name()); + } else { + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=0, nr=%u}" + ", [{si_signo=SIGUSR1, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGUSR2, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGALRM, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + "]) = %ld\n", + (unsigned) pid, psi->off, psi->nr, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + rc); + } + + if (do_ptrace(PTRACE_CONT, pid, 0, 0)) { + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("ptrace"); + } + printf("ptrace(PTRACE_CONT, %ld, NULL, SIG_0) = 0\n", pid); + } +} + +int +main(void) +{ + const unsigned long bad_request = + (unsigned long) 0xdeadbeeffffffeed; + const unsigned long bad_data = + (unsigned long) 0xdeadcafefffff00d; + const unsigned long pid = + (unsigned long) 0xdefaced00000000 | (unsigned) getpid(); + + unsigned int sigset_size; + + for (sigset_size = 1024 / 8; sigset_size; sigset_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, + SIG_SETMASK, NULL, NULL, sigset_size)) + break; + } + if (!sigset_size) + perror_msg_and_fail("rt_sigprocmask"); + + void *const k_set = tail_alloc(sigset_size); + siginfo_t *const sip = tail_alloc(sizeof(*sip)); + + long rc = do_ptrace(bad_request, pid, 0, 0); + printf("ptrace(%#lx /* PTRACE_??? */, %u, NULL, NULL) = %ld %s (%m)\n", + bad_request, (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_PEEKDATA, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKTEXT, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_PEEKUSER, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); +# else + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_POKEUSER, pid, bad_request, bad_data); + printf("ptrace(PTRACE_POKEUSER, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + rc = do_ptrace(PTRACE_ATTACH, pid, 0, 0); + printf("ptrace(PTRACE_ATTACH, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_INTERRUPT, pid, 0, 0); + printf("ptrace(PTRACE_INTERRUPT, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_KILL, pid, 0, 0); + printf("ptrace(PTRACE_KILL, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_LISTEN, pid, 0, 0); + printf("ptrace(PTRACE_LISTEN, %u) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + sigset_t libc_set; + sigemptyset(&libc_set); + sigaddset(&libc_set, SIGUSR1); + memcpy(k_set, &libc_set, sigset_size); + + rc = do_ptrace(PTRACE_SETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_SETSIGMASK, %u, %u, [USR1])" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETSIGMASK, + pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_GETSIGMASK, %u, %u, %p)" + " = %ld %s (%m)\n", + (unsigned) pid, sigset_size, k_set, rc, errno2name()); + + rc = do_ptrace(PTRACE_SECCOMP_GET_FILTER, pid, 42, 0); + printf("ptrace(PTRACE_SECCOMP_GET_FILTER, %u, 42, NULL)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETEVENTMSG, pid, bad_request, bad_data); + printf("ptrace(PTRACE_GETEVENTMSG, %u, %#lx, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, bad_data, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGIO; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_band = -2; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGIO" + ", si_code=POLL_IN, si_errno=ENOENT, si_band=-2})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGTRAP; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_pid = 2; + sip->si_uid = 3; + sip->si_ptr = (void *) bad_request; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGTRAP" + ", si_code=TRAP_BRKPT, si_errno=ENOENT, si_pid=2, si_uid=3" + ", si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_int, sip->si_ptr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGILL; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGILL" + ", si_code=ILL_ILLOPC, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGFPE; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGFPE" + ", si_code=FPE_INTDIV, si_errno=ENOENT, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_addr, rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGBUS; + sip->si_code = 1; + sip->si_errno = -2; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGBUS" + ", si_code=BUS_ADRALN, si_errno=%d, si_addr=%p})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_addr, + rc, errno2name()); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGPROF; + sip->si_code = 0xbadc0ded; + sip->si_errno = -2; + sip->si_pid = 0; + sip->si_uid = 3; + sip->si_ptr = 0; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGPROF" + ", si_code=%#x, si_errno=%d, si_pid=0, si_uid=3})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_code, sip->si_errno, + rc, errno2name()); + +#ifdef HAVE_SIGINFO_T_SI_SYSCALL + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGSYS; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_call_addr = (void *) (unsigned long) 0xfacefeeddeadbeef; + sip->si_syscall = -1U; + sip->si_arch = AUDIT_ARCH_X86_64; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" + ", si_syscall=__NR_syscall_%u, si_arch=AUDIT_ARCH_X86_64})" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, + rc, errno2name()); +#endif + +#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGHUP; + sip->si_code = SI_TIMER; + sip->si_errno = ENOENT; + sip->si_timerid = 0xdeadbeef; + sip->si_overrun = -1; + sip->si_ptr = (void *) (unsigned long) 0xfacefeeddeadbeef; + + rc = do_ptrace(PTRACE_SETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGHUP" + ", si_code=SI_TIMER, si_errno=ENOENT, si_timerid=%#x" + ", si_overrun=%d, si_value={int=%d, ptr=%p}}) = %ld %s (%m)\n", + (unsigned) pid, bad_request, sip->si_timerid, sip->si_overrun, + sip->si_int, sip->si_ptr, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_GETSIGINFO, + pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_GETSIGINFO, %u, %#lx, %p)" + " = %ld %s (%m)\n", (unsigned) pid, bad_request, sip, rc, errno2name()); + + rc = do_ptrace(PTRACE_CONT, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_CONT, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_DETACH, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_DETACH, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SYSCALL, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSCALL, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + +#ifdef PTRACE_SINGLESTEP + rc = do_ptrace(PTRACE_SINGLESTEP, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SINGLESTEP, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SINGLEBLOCK + rc = do_ptrace(PTRACE_SINGLEBLOCK, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SINGLEBLOCK, %u, NULL, SIGUSR1) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif + +#ifdef PTRACE_SYSEMU + rc = do_ptrace(PTRACE_SYSEMU, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SYSEMU, %u, NULL, SIGUSR2) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + rc = do_ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSEMU_SINGLESTEP, %u, NULL, SIGUSR1)" + " = %ld %s (%m)\n", (unsigned) pid, rc, errno2name()); +#endif + + rc = do_ptrace(PTRACE_SETOPTIONS, + pid, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE); + printf("ptrace(PTRACE_SETOPTIONS, %u, NULL" + ", PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE) = %ld %s (%m)\n", + (unsigned) pid, rc, errno2name()); + + rc = do_ptrace(PTRACE_SEIZE, + pid, bad_request, PTRACE_O_TRACESYSGOOD); + printf("ptrace(PTRACE_SEIZE, %u, %#lx" + ", PTRACE_O_TRACESYSGOOD) = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_SETREGSET, pid, 1, bad_request); + printf("ptrace(PTRACE_SETREGSET, %u, NT_PRSTATUS, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + rc = do_ptrace(PTRACE_GETREGSET, pid, 3, bad_request); + printf("ptrace(PTRACE_GETREGSET, %u, NT_PRPSINFO, %#lx)" + " = %ld %s (%m)\n", + (unsigned) pid, bad_request, rc, errno2name()); + + test_peeksiginfo(pid, bad_request); + + rc = do_ptrace(PTRACE_TRACEME, 0, 0, 0); + if (rc) + printf("ptrace(PTRACE_TRACEME) = %ld %s (%m)\n", + rc, errno2name()); + else + printf("ptrace(PTRACE_TRACEME) = 0\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests-mx32/ptrace.test strace-4.12/tests-mx32/ptrace.test --- strace-4.11/tests-mx32/ptrace.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/ptrace.test 2016-05-13 05:18:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ptrace syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e signal=none diff -Nru strace-4.11/tests-mx32/pwritev.c strace-4.12/tests-mx32/pwritev.c --- strace-4.11/tests-mx32/pwritev.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pwritev.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PWRITEV + +# include +# include +# include +# include + +# define LEN 8 +# define LIM (LEN - 1) + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{\"", stdout); + for (i = 0; i < iov->iov_len; ++i) { + if (i < LIM) + printf("\\%d", (int) buf[i]); + } + printf("\"%s, %u}", + i > LIM ? "..." : "", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt, unsigned int size) +{ + if (!size) { + printf("%p", iov); + return; + } + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + if (i == size) { + printf("%p", &iov[i]); + break; + } + if (i == LIM) { + fputs("...", stdout); + break; + } + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + (void) close(0); + if (open("/dev/null", O_WRONLY)) + perror_msg_and_fail("open"); + + char *buf = tail_alloc(LEN); + unsigned i; + for (i = 0; i < LEN; ++i) + buf[i] = i; + + struct iovec *iov = tail_alloc(sizeof(*iov) * LEN); + for (i = 0; i < LEN; ++i) { + buf[i] = i; + iov[i].iov_base = &buf[i]; + iov[i].iov_len = LEN - i; + } + + const off_t offset = 0xdefaceddeadbeefLL; + long rc; + int written = 0; + for (i = 0; i < LEN; ++i) { + written += iov[i].iov_len; + if (pwritev(0, iov, i + 1, offset + i) != written) + perror_msg_and_fail("pwritev"); + fputs("pwritev(0, ", stdout); + print_iovec(iov, i + 1, LEN); + printf(", %u, %lld) = %d\n", + i + 1, (long long) offset + i, written); + } + + for (i = 0; i <= LEN; ++i) { + unsigned int n = LEN + 1 - i; + fputs("pwritev(0, ", stdout); + print_iovec(iov + i, n, LEN - i); + rc = pwritev(0, iov + i, n, offset + LEN + i); + printf(", %u, %lld) = %ld %s (%m)\n", + n, (long long) offset + LEN + i, rc, errno2name()); + } + + iov->iov_base = iov + LEN * 2; + rc = pwritev(0, iov, 1, -1); + printf("pwritev(0, [{%p, %d}], 1, -1) = %ld %s (%m)\n", + iov->iov_base, LEN, rc, errno2name()); + + iov += LEN; + rc = pwritev(0, iov, 42, -2); + printf("pwritev(0, %p, 42, -2) = %ld %s (%m)\n", + iov, rc, errno2name()); + + rc = pwritev(0, NULL, 1, -3); + printf("pwritev(0, NULL, 1, -3) = %ld %s (%m)\n", + rc, errno2name()); + + rc = pwritev(0, iov, 0, -4); + printf("pwritev(0, [], 0, -4) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PWRITEV") + +#endif diff -Nru strace-4.11/tests-mx32/pwritev.test strace-4.12/tests-mx32/pwritev.test --- strace-4.11/tests-mx32/pwritev.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/pwritev.test 2016-03-30 03:54:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pwritev syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -s7 diff -Nru strace-4.11/tests-mx32/readdir.c strace-4.12/tests-mx32/readdir.c --- strace-4.11/tests-mx32/readdir.c 2015-11-19 22:57:42.000000000 +0000 +++ strace-4.12/tests-mx32/readdir.c 2016-01-06 12:03:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,21 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_readdir -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -82,7 +79,7 @@ assert(!open(".", O_RDONLY | O_DIRECTORY)); while ((rc = syscall(__NR_readdir, 0, &e, 1))) { if (rc < 0) - return 77; + perror_msg_and_skip("readdir"); e.d_name[e.d_reclen] = '\0'; printf("readdir(0, {d_ino=%lu, d_off=%lu, d_reclen=%u" ", d_name=\"%s\"}) = %d\n", @@ -100,10 +97,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_readdir") #endif diff -Nru strace-4.11/tests-mx32/readdir.test strace-4.12/tests-mx32/readdir.test --- strace-4.11/tests-mx32/readdir.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/readdir.test 2016-03-30 00:16:24.000000000 +0000 @@ -5,12 +5,4 @@ . "${srcdir=.}/init.sh" rm -rf -- "$LOG".dir -run_prog > /dev/null - -OUT="$LOG.out" -run_strace -a16 -ereaddir $args > "$OUT" - -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a16 diff -Nru strace-4.11/tests-mx32/readlinkat.c strace-4.12/tests-mx32/readlinkat.c --- strace-4.11/tests-mx32/readlinkat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/readlinkat.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlinkat + +# include +# include + +# define PREFIX "test.readlinkat" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlinkat - static const char fname[] = "readlinkat.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlinkat, -100, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlinkat, -100, fname, buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlinkat, -100, fname, buf, size); + if (rc < 0) { + perror("readlinkat"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlinkat(AT_FDCWD, \""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests-mx32/readlinkat.test strace-4.12/tests-mx32/readlinkat.test --- strace-4.11/tests-mx32/readlinkat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/readlinkat.test 2016-02-04 03:36:25.000000000 +0000 @@ -2,20 +2,4 @@ # Check readlinkat syscall decoding. -. "${srcdir=.}/init.sh" - -syscall=readlinkat -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +. "${srcdir=.}/readlink.test" diff -Nru strace-4.11/tests-mx32/readlink.c strace-4.12/tests-mx32/readlink.c --- strace-4.11/tests-mx32/readlink.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/readlink.c 2016-02-04 03:36:25.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +26,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include +#include "tests.h" #include +#ifdef __NR_readlink + +# include +# include + +# define PREFIX "test.readlink" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + int main(void) { -#ifdef __NR_readlink - static const char fname[] = "readlink.link"; - unsigned char buf[31]; - long rc; - unsigned int i; - - rc = syscall(__NR_readlink, fname, buf, sizeof(buf)); - if (rc < 0) + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlink, fname, buf, size); + printf("readlink(\"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlink, fname, buf, size); + if (rc < 0) { + perror("readlink"); + (void) unlink(fname); return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlink(\"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); - printf("readlink(\""); - for (i = 0; fname[i]; ++i) - printf("\\x%02x", (int) (unsigned char) fname[i]); - printf("\", \""); - for (i = 0; i < 3; ++i) - printf("\\x%02x", (int) buf[i]); - printf("\"..., %zu) = %ld\n", sizeof(buf), rc); + if (unlink(fname)) + perror_msg_and_fail("unlink"); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_readlink") + #endif -} diff -Nru strace-4.11/tests-mx32/readlink.test strace-4.12/tests-mx32/readlink.test --- strace-4.11/tests-mx32/readlink.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/readlink.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,19 +3,4 @@ # Check readlink syscall decoding. . "${srcdir=.}/init.sh" - -syscall=readlink -target=$syscall.c -link=$syscall.link -OUT="$LOG.out" - -ln -snf $target $link || - framework_skip_ 'failed to create a symlink' - -run_prog > /dev/null -run_strace -e $syscall -xx -s3 $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f -- "$OUT" $link - -exit 0 +run_strace_match_diff -xx diff -Nru strace-4.11/tests-mx32/readv.c strace-4.12/tests-mx32/readv.c --- strace-4.11/tests-mx32/readv.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/readv.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,156 @@ +/* + * Check decoding of readv and writev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + long rc; + + rc = writev(1, efault, 42); + tprintf("writev(1, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = readv(0, efault, 42); + tprintf("readv(0, %p, 42) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + tprintf("writev(1, [], 0) = %ld\n", + (long) writev(1, w_iov, 0)); + + rc = writev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(1, [{\"%s\", %u}, %p], 2) = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + assert(writev(1, w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(1); + tprintf("writev(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(0, [{\"%s\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + assert(readv(0, r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - r_len); + tprintf("readv(0, [{\"%s\", %u}, {\"\", %u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-mx32/readv.test strace-4.12/tests-mx32/readv.test --- strace-4.11/tests-mx32/readv.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/readv.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of readv and writev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 -eread=0 -ewrite=1 -e trace=readv,writev diff -Nru strace-4.11/tests-mx32/read-write.c strace-4.12/tests-mx32/read-write.c --- strace-4.11/tests-mx32/read-write.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/read-write.c 2016-05-18 09:26:01.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Check decoding and dumping of read and write syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + long rc = read(0, buf, len); + if (rc != (int) len) + perror_msg_and_fail("read: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "read", 0); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = write(1, buf, len); + if (rc != (int) len) + perror_msg_and_fail("write: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "write", 1); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "read-write-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = write(1, w, 0); + if (rc) + perror_msg_and_fail("write: expected 0, returned %ld", rc); + tprintf("write(1, \"\", 0) = 0\n"); + + rc = write(1, efault, 1); + if (rc != -1) + perror_msg_and_fail("write: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = write(1, w, w_len); + if (rc != (int) w_len) + perror_msg_and_fail("write: expected %u, returned %ld", + w_len, rc); + tprintf("write(1, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = read(0, r0, 0); + if (rc) + perror_msg_and_fail("read: expected 0, returned %ld", rc); + tprintf("read(0, \"\", 0) = 0\n"); + + rc = read(0, efault, 1); + if (rc != -1) + perror_msg_and_fail("read: expected -1, returned %ld", rc); + tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = read(0, r0, r0_len); + if (rc != (int) r0_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r0_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = read(0, r1, w_len); + if (rc != (int) r1_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r1_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-mx32/read-write.test strace-4.12/tests-mx32/read-write.test --- strace-4.11/tests-mx32/read-write.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/read-write.test 2016-04-03 16:37:43.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of read and write syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=read-write-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a15 -eread=0 -ewrite=1 -e trace=read,write \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff -Nru strace-4.11/tests-mx32/reboot.c strace-4.12/tests-mx32/reboot.c --- strace-4.11/tests-mx32/reboot.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/reboot.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_reboot + +# include +# include +# include + +# define INVALID_MAGIC 319887762 +# define INVALID_CMD 0x01234568 + +int +main(void) +{ + static const char buf[] = "reboot"; + long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); + printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", + INVALID_MAGIC, buf, rc, errno2name()); + + rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + LINUX_REBOOT_MAGIC2, INVALID_CMD); + printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," + " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", + INVALID_CMD, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_reboot") + +#endif diff -Nru strace-4.11/tests-mx32/reboot.test strace-4.12/tests-mx32/reboot.test --- strace-4.11/tests-mx32/reboot.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/reboot.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check reboot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/recvmsg.c strace-4.12/tests-mx32/recvmsg.c --- strace-4.11/tests-mx32/recvmsg.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/recvmsg.c 2016-01-20 17:35:27.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Check decoding of recvmsg and sendmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + const struct msghdr w_mh_ = { + .msg_iov = w_iov, + .msg_iovlen = ARRAY_SIZE(w_iov_) + }; + const struct msghdr *w_mh = tail_memdup(&w_mh_, sizeof(w_mh_)); + + assert(sendmsg(1, w_mh, 0) == (int) w_len); + close(1); + tprintf("sendmsg(1, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"%s\", %u}, {\"%s\", %u}]" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(w_iov_), w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), w2_c, LENGTH_OF(w2_c), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, LENGTH_OF(w1_c), w1_d, w1_c, + LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + const struct msghdr r_mh_ = { + .msg_iov = r_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_) + }; + struct msghdr *r_mh = tail_memdup(&r_mh_, sizeof(r_mh_)); + + assert(recvmsg(0, r_mh, 0) == (int) r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}], msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r0_iov_), r0_c, r_len, r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + r_mh->msg_iov = r_iov; + r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); + + assert(recvmsg(0, r_mh, 0) == (int) w_len - r_len); + tprintf("recvmsg(0, {msg_name(0)=NULL, msg_iov(%u)=" + "[{\"%s\", %u}, {\"\", %u}], msg_controllen=0" + ", msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + ARRAY_SIZE(r1_iov_), r1_c, r_len, w_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff -Nru strace-4.11/tests-mx32/recvmsg.test strace-4.12/tests-mx32/recvmsg.test --- strace-4.11/tests-mx32/recvmsg.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/recvmsg.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of recvmsg and sendmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg diff -Nru strace-4.11/tests-mx32/redirect.test strace-4.12/tests-mx32/redirect.test --- strace-4.11/tests-mx32/redirect.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/redirect.test 2016-02-14 00:59:42.000000000 +0000 @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Ensure that strace does not retain stdin and stdout descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep +check_prog yes + +> "$LOG" + +( + $SLEEP_A_BIT & + yes + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) | $STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard input" +fi + +$STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" | +( + $SLEEP_A_BIT & + cat > /dev/null + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> $LOG + fi +) + +if [ -s "$LOG" ]; then + fail_ "$STRACE failed to redirect standard output" +fi diff -Nru strace-4.11/tests-mx32/remap_file_pages.c strace-4.12/tests-mx32/remap_file_pages.c --- strace-4.11/tests-mx32/remap_file_pages.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/remap_file_pages.c 2016-05-16 23:47:34.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Check decoding of remap_file_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_remap_file_pages + +# include +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00d; + const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; + + long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); + printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", + addr, size, "PROT_READ|PROT_WRITE|PROT_EXEC", pgoff, + "MAP_PRIVATE|MAP_ANONYMOUS", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_remap_file_pages") + +#endif diff -Nru strace-4.11/tests-mx32/remap_file_pages.test strace-4.12/tests-mx32/remap_file_pages.test --- strace-4.11/tests-mx32/remap_file_pages.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/remap_file_pages.test 2016-04-27 16:04:01.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check remap_file_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/renameat2.c strace-4.12/tests-mx32/renameat2.c --- strace-4.11/tests-mx32/renameat2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/renameat2.c 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Check decoding of renameat2 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_renameat2 + +# include +# include + +int +main(void) +{ + static const char oldpath[] = "renameat2_oldpath"; + static const char newpath[] = "renameat2_newpath"; + const unsigned long olddirfd = + (unsigned long) 0xfacefeedffffffff; + const unsigned long newdirfd = + (unsigned long) 0xfacefeed00000000 | -100U; + + long rc = syscall(__NR_renameat2, + olddirfd, oldpath, newdirfd, newpath, 1); + printf("renameat2(%d, \"%s\", AT_FDCWD, \"%s\", RENAME_NOREPLACE)" + " = %ld %s (%m)\n", + (int) olddirfd, oldpath, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat2") + +#endif diff -Nru strace-4.11/tests-mx32/renameat2.test strace-4.12/tests-mx32/renameat2.test --- strace-4.11/tests-mx32/renameat2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/renameat2.test 2016-04-26 16:30:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/renameat.c strace-4.12/tests-mx32/renameat.c --- strace-4.11/tests-mx32/renameat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/renameat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#ifdef __NR_renameat + +# include +# include + +# define OLD_FILE "renameat_old" +# define NEW_FILE "renameat_new" + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffff; + const long int fd_new = (long int) 0xdeadbeeffffffffe; + + long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); + printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", + (int) fd_old, OLD_FILE, (int) fd_new, NEW_FILE, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat") + +#endif diff -Nru strace-4.11/tests-mx32/renameat.test strace-4.12/tests-mx32/renameat.test --- strace-4.11/tests-mx32/renameat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/renameat.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/rename.c strace-4.12/tests-mx32/rename.c --- strace-4.11/tests-mx32/rename.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rename.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_rename + +# include +# include + +# define OLD_FILE "rename_old" +# define NEW_FILE "rename_new" + +int +main(void) +{ + long rc = syscall(__NR_rename, OLD_FILE, NEW_FILE); + printf("rename(\"%s\", \"%s\") = %ld %s (%m)\n", + OLD_FILE, NEW_FILE, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rename") + +#endif diff -Nru strace-4.11/tests-mx32/rename.test strace-4.12/tests-mx32/rename.test --- strace-4.11/tests-mx32/rename.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rename.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rename syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests-mx32/restart_syscall.c strace-4.12/tests-mx32/restart_syscall.c --- strace-4.11/tests-mx32/restart_syscall.c 2015-12-13 01:12:55.000000000 +0000 +++ strace-4.12/tests-mx32/restart_syscall.c 2016-01-05 23:14:25.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -43,21 +41,19 @@ * x32 is broken from the beginning: * https://lkml.org/lkml/2015/11/30/790 */ - return 77; + error_msg_and_skip("x32 is broken"); #else const sigset_t set = {}; const struct sigaction act = { .sa_handler = SIG_IGN }; const struct itimerval itv = { .it_value.tv_usec = 111111 }; struct timespec req = { .tv_nsec = 222222222 }, rem; - if (sigaction(SIGALRM, &act, NULL)) - return 77; - if (sigprocmask(SIG_SETMASK, &set, NULL)) - return 77; + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); if (setitimer(ITIMER_REAL, &itv, NULL)) - return 77; + perror_msg_and_skip("setitimer"); if (nanosleep(&req, &rem)) - return 0; + perror_msg_and_fail("nanosleep"); printf("nanosleep\\(\\{%jd, %jd\\}, \\{%jd, %jd\\}\\)" " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", diff -Nru strace-4.11/tests-mx32/restart_syscall.test strace-4.12/tests-mx32/restart_syscall.test --- strace-4.11/tests-mx32/restart_syscall.test 2015-09-19 01:04:48.000000000 +0000 +++ strace-4.12/tests-mx32/restart_syscall.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" syscalls=nanosleep,restart_syscall run_strace -a20 -e trace=$syscalls $args > "$OUT" match_grep "$LOG" "$OUT" diff -Nru strace-4.11/tests-mx32/rmdir.c strace-4.12/tests-mx32/rmdir.c --- strace-4.11/tests-mx32/rmdir.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rmdir.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_rmdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "rmdir_sample"; + long rc = syscall(__NR_rmdir, sample); + printf("rmdir(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rmdir") + +#endif diff -Nru strace-4.11/tests-mx32/rmdir.test strace-4.12/tests-mx32/rmdir.test --- strace-4.11/tests-mx32/rmdir.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rmdir.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rmdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-mx32/rt_sigpending.c strace-4.12/tests-mx32/rt_sigpending.c --- strace-4.11/tests-mx32/rt_sigpending.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigpending.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * This file is part of rt_sigpending strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigpending + +# include +# include +# include +# include +# include + +static long +k_sigpending(void *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigpending, set, size); +} + +static void +iterate(const char *const text, unsigned int size, void *set) +{ + for (;;) { + if (k_sigpending(set, size)) { + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + set, size); + break; + } + if (size) { +#if WORDS_BIGENDIAN + if (size < sizeof(long)) + tprintf("rt_sigpending(%s, %u) = 0\n", + "[]", size); + else +#endif + tprintf("rt_sigpending(%s, %u) = 0\n", + text, size); + } else { + tprintf("rt_sigpending(%p, %u) = 0\n", set, size); + break; + } + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + sigemptyset(libc_set); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + memset(k_set, 0, big_size); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + if (!k_sigpending(k_set, set_size)) + break; + tprintf("rt_sigpending(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigpending"); + tprintf("rt_sigpending(%s, %u) = 0\n", "[]", set_size); + + iterate("[]", set_size >> 1, k_set + (set_size >> 1)); + + void *const efault = k_set + (set_size >> 1); + assert(k_sigpending(efault, set_size) == -1); + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + efault, set_size); + + sigaddset(libc_set, SIGHUP); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGHUP); + + iterate("[HUP]", set_size, k_set); + + sigaddset(libc_set, SIGINT); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGINT); + + iterate("[HUP INT]", set_size, k_set); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigpending") + +#endif diff -Nru strace-4.11/tests-mx32/rt_sigpending.test strace-4.12/tests-mx32/rt_sigpending.test --- strace-4.11/tests-mx32/rt_sigpending.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigpending.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigpending syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff -Nru strace-4.11/tests-mx32/rt_sigprocmask.c strace-4.12/tests-mx32/rt_sigprocmask.c --- strace-4.11/tests-mx32/rt_sigprocmask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigprocmask.c 2016-02-19 01:44:33.000000000 +0000 @@ -0,0 +1,174 @@ +/* + * This file is part of rt_sigprocmask strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include + +static long +k_sigprocmask(const unsigned long how, void *const new_set, + void *const old_set, const unsigned long size) +{ + return syscall(__NR_rt_sigprocmask, how, new_set, old_set, size); +} + +static void +iterate(const char *const text, void *set, void *old, unsigned int size) +{ + for (;;) { + if (k_sigprocmask(SIG_UNBLOCK, set, old, size)) { + if (size < sizeof(long)) + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %p, %p, %u) = -1 EINVAL (%m)\n", + set, old, size); + else + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %s, %p, %u) = -1 EINVAL (%m)\n", + text, old, size); + } else { + tprintf("rt_sigprocmask(SIG_UNBLOCK, %s, [], %u)" + " = 0\n", text, size); + } + if (!size) + break; + size >>= 1; + set += size; + old += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!k_sigprocmask(SIG_SETMASK, NULL, NULL, set_size)) + break; + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u)" + " = -1 EINVAL (%m)\n", set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u) = 0\n", + set_size); + + void *const k_set = tail_alloc(set_size); + void *const old_set = tail_alloc(set_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + memset(k_set, 0, set_size); + if (k_sigprocmask(SIG_SETMASK, k_set, NULL, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, [], NULL, %u) = 0\n", set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set - set_size, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[], [], %u) = 0\n", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set - set_size, + old_set, set_size << 1) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, %p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, old_set, set_size << 1); + + iterate("~[]", k_set - set_size, old_set, set_size >> 1); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, [HUP], [], %u) = 0\n", set_size); + + memset(libc_set, -1, sizeof(sigset_t)); + sigdelset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP], [HUP], %u) = 0\n", + set_size); + + sigdelset(libc_set, SIGKILL); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP KILL], [HUP], %u) = 0\n", + set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + sigaddset(libc_set, SIGINT); + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, %s, [HUP], %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + if (k_sigprocmask(SIG_SETMASK, NULL, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, %s, %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set + (set_size >> 1), NULL, + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, NULL, %u) = -1 EFAULT (%m)\n", + k_set + (set_size >> 1), set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set, old_set + (set_size >> 1), + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %s, %p, %u) = -1 EFAULT (%m)\n", + "[HUP INT QUIT ALRM TERM]", + old_set + (set_size >> 1), set_size); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff -Nru strace-4.11/tests-mx32/rt_sigprocmask.test strace-4.12/tests-mx32/rt_sigprocmask.test --- strace-4.11/tests-mx32/rt_sigprocmask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigprocmask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigprocmask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/rt_sigqueueinfo.c strace-4.12/tests-mx32/rt_sigqueueinfo.c --- strace-4.11/tests-mx32/rt_sigqueueinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigqueueinfo.c 2016-01-06 00:14:36.000000000 +0000 @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -40,10 +42,9 @@ }; pid_t pid = getpid(); - if (sigaction(SIGUSR1, &sa, NULL) == -1) - return 77; - if (sigqueue(pid, SIGUSR1, value) == -1) - return 77; + assert(sigaction(SIGUSR1, &sa, NULL) == 0); + if (sigqueue(pid, SIGUSR1, value)) + perror_msg_and_skip("sigqueue"); printf("rt_sigqueueinfo(%u, SIGUSR1, {si_signo=SIGUSR1, " "si_code=SI_QUEUE, si_pid=%u, si_uid=%u, " "si_value={int=%d, ptr=%p}}) = 0\n", diff -Nru strace-4.11/tests-mx32/rt_sigqueueinfo.test strace-4.12/tests-mx32/rt_sigqueueinfo.test --- strace-4.11/tests-mx32/rt_sigqueueinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of rt_sigqueueinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ert_sigqueueinfo -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-mx32/rt_sigsuspend.c strace-4.12/tests-mx32/rt_sigsuspend.c --- strace-4.11/tests-mx32/rt_sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigsuspend.c 2016-04-20 04:35:25.000000000 +0000 @@ -0,0 +1,165 @@ +/* + * This file is part of rt_sigsuspend strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigsuspend + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigsuspend(const sigset_t *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigsuspend, set, size); +} + +static void +iterate(const char *const text, const int sig, + const void *const set, unsigned int size) +{ + const void *mask; + + for (mask = set;; size >>= 1, mask += size) { + raise(sig); + assert(k_sigsuspend(mask, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigsuspend(%s, %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", + text, size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigsuspend(%p, %u)" + " = -1 EINVAL (%m)\n", + mask, size); + else + tprintf("rt_sigsuspend(%s, %u)" + " = -1 EINVAL (%m)\n", + set == mask ? text : "~[]", size); + } + if (!size) + break; + } +} + +static void +handler(int signo) +{ +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR1); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct sigaction sa = { + .sa_handler = handler + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + raise(SIGUSR1); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigsuspend(k_set, set_size) == -1); + if (EINTR == errno) + break; + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigsuspend"); + tprintf("rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR2); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP INT USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + memset(libc_set, -1, sizeof(*libc_set)); + sigdelset(libc_set, SIGUSR1); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend(~[USR1], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + assert(k_sigsuspend(k_set - set_size, set_size << 1) == -1); + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, set_size << 1); + + iterate("~[USR1]", SIGUSR1, k_set, set_size >> 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigsuspend") + +#endif diff -Nru strace-4.11/tests-mx32/rt_sigsuspend.test strace-4.12/tests-mx32/rt_sigsuspend.test --- strace-4.11/tests-mx32/rt_sigsuspend.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigsuspend.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigsuspend syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -esignal=none diff -Nru strace-4.11/tests-mx32/rt_sigtimedwait.c strace-4.12/tests-mx32/rt_sigtimedwait.c --- strace-4.11/tests-mx32/rt_sigtimedwait.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigtimedwait.c 2016-02-19 03:39:59.000000000 +0000 @@ -0,0 +1,182 @@ +/* + * This file is part of rt_sigtimedwait strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigtimedwait + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigtimedwait(const sigset_t *const set, siginfo_t *const info, + const struct timespec *const timeout, const unsigned long size) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, size); +} + +static void +iterate(const char *const text, const void *set, + const struct timespec *const timeout, unsigned int size) +{ + for (;;) { + assert(k_sigtimedwait(set, NULL, timeout, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", text, + (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, + size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + else + tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}" + ", %u) = -1 EINVAL (%m)\n", + text, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + } + if (!size) + break; + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + struct timespec *const timeout = tail_alloc(sizeof(*timeout)); + timeout->tv_sec = 0; + timeout->tv_nsec = 42; + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); + if (EAGAIN == errno) + break; + tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}, %u)" + " = -1 EINVAL (%m)\n", + k_set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigtimedwait"); + tprintf("rt_sigtimedwait([], NULL, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP INT], %p, {%jd, %jd}, %u)" + " = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(%s, %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + "[HUP INT QUIT ALRM TERM]", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + memset(k_set - set_size, -1, set_size); + assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(~[], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + assert(k_sigtimedwait(k_set - set_size, info, NULL, set_size << 1) == -1); + tprintf("rt_sigtimedwait(%p, %p, NULL, %u) = -1 EINVAL (%m)\n", + k_set - set_size, info, set_size << 1); + + iterate("~[]", k_set - set_size, timeout, set_size >> 1); + + timeout->tv_sec = 1; + raise(SIGALRM); + assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" + ", si_pid=%d, si_uid=%d}, {%jd, %jd}, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size, SIGALRM, "SIGALRM"); + + raise(SIGALRM); + assert(k_sigtimedwait(k_set, NULL, NULL, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, NULL, NULL, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", set_size, SIGALRM, "SIGALRM"); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigtimedwait") + +#endif diff -Nru strace-4.11/tests-mx32/rt_sigtimedwait.test strace-4.12/tests-mx32/rt_sigtimedwait.test --- strace-4.11/tests-mx32/rt_sigtimedwait.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_sigtimedwait.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigtimedwait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff -Nru strace-4.11/tests-mx32/rt_tgsigqueueinfo.c strace-4.12/tests-mx32/rt_tgsigqueueinfo.c --- strace-4.11/tests-mx32/rt_tgsigqueueinfo.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_tgsigqueueinfo.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * This file is part of rt_tgsigqueueinfo strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_tgsigqueueinfo + +# include +# include +# include +# include +# include + +static long +k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info) +{ + return syscall(__NR_rt_tgsigqueueinfo, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000 | sig, + info); +} + +int +main (void) +{ + const struct sigaction sa = { + .sa_handler = SIG_IGN + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->si_signo = SIGUSR1; + info->si_errno = ENOENT; + info->si_code = SI_QUEUE; + info->si_pid = getpid(); + info->si_uid = getuid(); + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed; + + if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) + perror_msg_and_fail("rt_tgsigqueueinfo"); + + printf("rt_tgsigqueueinfo(%u, %u, %s, {si_signo=%s" + ", si_code=SI_QUEUE, si_errno=ENOENT, si_pid=%u" + ", si_uid=%u, si_value={int=%d, ptr=%p}}) = 0\n", + info->si_pid, info->si_pid, "SIGUSR1", "SIGUSR1", + info->si_pid, info->si_uid, info->si_value.sival_int, + info->si_value.sival_ptr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_tgsigqueueinfo") + +#endif diff -Nru strace-4.11/tests-mx32/rt_tgsigqueueinfo.test strace-4.12/tests-mx32/rt_tgsigqueueinfo.test --- strace-4.11/tests-mx32/rt_tgsigqueueinfo.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/rt_tgsigqueueinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_tgsigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-mx32/sched_get_priority_mxx.c strace-4.12/tests-mx32/sched_get_priority_mxx.c --- strace-4.11/tests-mx32/sched_get_priority_mxx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_get_priority_mxx.c 2016-03-10 09:12:23.000000000 +0000 @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined(__NR_sched_get_priority_min) \ + && defined(__NR_sched_get_priority_max) + +# include +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_sched_get_priority_min, SCHED_FIFO); + printf("sched_get_priority_min(SCHED_FIFO) = %d\n", rc); + + rc = syscall(__NR_sched_get_priority_max, SCHED_RR); + printf("sched_get_priority_max(SCHED_RR) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_get_priority_min" + " && defined __NR_sched_get_priority_max"); + +#endif diff -Nru strace-4.11/tests-mx32/sched_get_priority_mxx.test strace-4.12/tests-mx32/sched_get_priority_mxx.test --- strace-4.11/tests-mx32/sched_get_priority_mxx.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_get_priority_mxx.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_get_priority_min and sched_get_priority_max syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max diff -Nru strace-4.11/tests-mx32/sched_rr_get_interval.c strace-4.12/tests-mx32/sched_rr_get_interval.c --- strace-4.11/tests-mx32/sched_rr_get_interval.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_rr_get_interval.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_rr_get_interval + +# include +# include +# include + +int +main(void) +{ + struct timespec *const tp = tail_alloc(sizeof(struct timespec)); + long rc = syscall(__NR_sched_rr_get_interval, -1, tp); + printf("sched_rr_get_interval(-1, %p) = %ld %s (%m)\n", + tp, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") + +#endif diff -Nru strace-4.11/tests-mx32/sched_rr_get_interval.test strace-4.12/tests-mx32/sched_rr_get_interval.test --- strace-4.11/tests-mx32/sched_rr_get_interval.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_rr_get_interval.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_rr_get_interval syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff -Nru strace-4.11/tests-mx32/sched_xetaffinity.c strace-4.12/tests-mx32/sched_xetaffinity.c --- strace-4.11/tests-mx32/sched_xetaffinity.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetaffinity.c 2016-02-08 18:18:51.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * This file is part of sched_xetaffinity strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_sched_getaffinity && defined __NR_sched_setaffinity \ + && defined CPU_ISSET_S && defined CPU_ZERO_S && defined CPU_SET_S + +# include +# include +# include +# include + +static int +getaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_getaffinity, pid, size, set); +} + +static int +setaffinity(unsigned long pid, unsigned long size, void *set) +{ + return syscall(__NR_sched_setaffinity, pid, size, set); +} + +int +main(void) +{ + unsigned int cpuset_size = 1; + const pid_t pid = getpid(); + + while (cpuset_size) { + assert(getaffinity(pid, cpuset_size, NULL) == -1); + if (EFAULT == errno) + break; + if (EINVAL != errno) + perror_msg_and_skip("sched_getaffinity"); + printf("sched_getaffinity(%d, %u, NULL) = -1 EINVAL (%m)\n", + pid, cpuset_size); + cpuset_size <<= 1; + } + assert(cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = -1 EFAULT (%m)\n", + pid, cpuset_size); + + cpu_set_t *cpuset = tail_alloc(cpuset_size); + assert(getaffinity(pid, cpuset_size, cpuset + 1) == -1); + printf("sched_getaffinity(%d, %u, %p) = -1 EFAULT (%m)\n", + pid, cpuset_size, cpuset + 1); + + assert(getaffinity(pid, cpuset_size, cpuset) == (int) cpuset_size); + printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); + const char *sep; + unsigned int i, cpu; + for (i = 0, cpu = 0, sep = ""; i < cpuset_size * 8; ++i) { + if (CPU_ISSET_S(i, cpuset_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + cpu = i; + } + } + printf("]) = %u\n", cpuset_size); + + CPU_ZERO_S(cpuset_size, cpuset); + CPU_SET_S(cpu, cpuset_size, cpuset); + if (setaffinity(pid, cpuset_size, cpuset)) + perror_msg_and_skip("sched_setaffinity"); + printf("sched_setaffinity(%d, %u, [%u]) = 0\n", + pid, cpuset_size, cpu); + + const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; + cpuset = tail_alloc(big_size); + const int ret_size = getaffinity(pid, big_size, cpuset); + assert(ret_size >= (int) cpuset_size && ret_size <= (int) big_size); + printf("sched_getaffinity(%d, %u, [", pid, big_size); + for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = " "; + } + } + printf("]) = %d\n", ret_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getaffinity && __NR_sched_setaffinity" + " && CPU_ISSET_S && CPU_ZERO_S && CPU_SET_S") + +#endif diff -Nru strace-4.11/tests-mx32/sched_xetaffinity.test strace-4.12/tests-mx32/sched_xetaffinity.test --- strace-4.11/tests-mx32/sched_xetaffinity.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetaffinity.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getaffinity and sched_setaffinity syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity diff -Nru strace-4.11/tests-mx32/sched_xetattr.c strace-4.12/tests-mx32/sched_xetattr.c --- strace-4.11/tests-mx32/sched_xetattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetattr.c 2016-01-06 11:25:47.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_sched_getattr && defined __NR_sched_setattr +# include +# include +# include + int main(void) { @@ -54,7 +52,7 @@ } sched; if (syscall(__NR_sched_getattr, 0, &sched, sizeof(sched), 0)) - return 77; + perror_msg_and_skip("sched_getattr"); printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 256, 0\\) += 0\n", sched.attr.size, @@ -67,7 +65,7 @@ sched.attr.sched_flags |= 1; if (syscall(__NR_sched_setattr, 0, &sched, 0)) - return 77; + perror_msg_and_skip("sched_setattr"); printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, sched_flags=%s, sched_nice=%u, sched_priority=%u, sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", sched.attr.size, @@ -83,10 +81,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sched_getattr && __NR_sched_setattr") #endif diff -Nru strace-4.11/tests-mx32/sched_xetattr.test strace-4.12/tests-mx32/sched_xetattr.test --- strace-4.11/tests-mx32/sched_xetattr.test 2015-07-29 09:18:26.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetattr.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e sched_getattr,sched_setattr $args > "$OUT" match_grep "$LOG" "$OUT" rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/sched_xetparam.c strace-4.12/tests-mx32/sched_xetparam.c --- strace-4.11/tests-mx32/sched_xetparam.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetparam.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,33 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getparam && defined __NR_sched_setparam + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = + tail_alloc(sizeof(struct sched_param)); + + long rc = syscall(__NR_sched_getparam, 0, param); + printf("sched_getparam(0, [%d]) = %ld\n", + param->sched_priority, rc); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setparam, 0, param); + printf("sched_setparam(0, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam") + +#endif diff -Nru strace-4.11/tests-mx32/sched_xetparam.test strace-4.12/tests-mx32/sched_xetparam.test --- strace-4.11/tests-mx32/sched_xetparam.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetparam.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getparam and sched_setparam syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam diff -Nru strace-4.11/tests-mx32/sched_xetscheduler.c strace-4.12/tests-mx32/sched_xetscheduler.c --- strace-4.11/tests-mx32/sched_xetscheduler.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetscheduler.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,62 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getscheduler && defined __NR_sched_setscheduler + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = tail_alloc(sizeof(struct sched_param)); + long rc = syscall(__NR_sched_getscheduler, 0); + const char *scheduler; + switch (rc) { + case SCHED_FIFO: + scheduler = "SCHED_FIFO"; + break; + case SCHED_RR: + scheduler = "SCHED_RR"; + break; +# ifdef SCHED_BATCH + case SCHED_BATCH: + scheduler = "SCHED_BATCH"; + break; +# endif +# ifdef SCHED_IDLE + case SCHED_IDLE: + scheduler = "SCHED_IDLE"; + break; +# endif +# ifdef SCHED_ISO + case SCHED_ISO: + scheduler = "SCHED_ISO"; + break; +# endif +# ifdef SCHED_DEADLINE + case SCHED_DEADLINE: + scheduler = "SCHED_DEADLINE"; + break; +# endif + default: + scheduler = "SCHED_OTHER"; + } + printf("sched_getscheduler(0) = %ld (%s)\n", + rc, scheduler); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param); + printf("sched_setscheduler(0, SCHED_FIFO, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getscheduler && __NR_sched_setscheduler") + +#endif diff -Nru strace-4.11/tests-mx32/sched_xetscheduler.test strace-4.12/tests-mx32/sched_xetscheduler.test --- strace-4.11/tests-mx32/sched_xetscheduler.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_xetscheduler.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getscheduler and sched_setscheduler syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler diff -Nru strace-4.11/tests-mx32/sched_yield.c strace-4.12/tests-mx32/sched_yield.c --- strace-4.11/tests-mx32/sched_yield.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_yield.c 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_yield + +# include +# include + +int +main(void) +{ + printf("sched_yield() = %ld\n", syscall(__NR_sched_yield)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_yield") + +#endif diff -Nru strace-4.11/tests-mx32/sched_yield.test strace-4.12/tests-mx32/sched_yield.test --- strace-4.11/tests-mx32/sched_yield.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sched_yield.test 2016-04-26 10:31:11.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_yield syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-mx32/scm_rights.c strace-4.12/tests-mx32/scm_rights.c --- strace-4.11/tests-mx32/scm_rights.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/scm_rights.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,86 +25,81 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include -#include +#include #include +#include #include -#include -#include #include -#include int main(int ac, const char **av) { - int i; - int data = 0; - struct iovec iov = { - .iov_base = &data, - .iov_len = sizeof(iov) - }; + assert(ac > 0); + int fds[ac]; - while ((i = open("/dev/null", O_RDWR)) < 3) + static const char sample[] = + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + const unsigned int data_size = sizeof(sample) - 1; + void *data = tail_alloc(data_size); + memcpy(data, sample, data_size); + + struct iovec *iov = tail_alloc(sizeof(struct iovec)); + iov->iov_base = data; + iov->iov_len = data_size; + + struct msghdr *mh = tail_alloc(sizeof(struct msghdr)); + memset(mh, 0, sizeof(*mh)); + mh->msg_iov = iov; + mh->msg_iovlen = 1; + + int i; + while ((i = open("/dev/null", O_RDWR)) <= ac + 2) assert(i >= 0); - (void) close(3); + while (i > 2) + assert(close(i--) == 0); + assert(close(0) == 0); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); int one = 1; - assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0); + if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one))) + perror_msg_and_skip("setsockopt"); - pid_t pid = fork(); - assert(pid >= 0); + assert((fds[0] = open("/dev/null", O_RDWR)) == 4); + for (i = 1; i < ac; ++i) + assert((fds[i] = open(av[i], O_RDONLY)) == i + 4); + + unsigned int cmsg_size = CMSG_SPACE(sizeof(fds)); + struct cmsghdr *cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); + memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(sendmsg(sv[1], mh, 0) == (int) data_size); + + assert(close(sv[1]) == 0); + assert(open("/dev/null", O_RDWR) == sv[1]); + + for (i = 0; i < ac; ++i) { + assert(close(fds[i]) == 0); + fds[i] = 0; + } - if (pid) { - assert(close(sv[0]) == 0); - assert(dup2(sv[1], 1) == 1); - assert(close(sv[1]) == 0); - - int fds[ac]; - assert((fds[0] = open("/dev/null", O_RDWR)) == 3); - for (i = 1; i < ac; ++i) - assert((fds[i] = open(av[i], O_RDONLY)) == i + 3); - - union { - struct cmsghdr cmsg; - char buf[CMSG_LEN(sizeof(fds))]; - } control; - - control.cmsg.cmsg_level = SOL_SOCKET; - control.cmsg.cmsg_type = SCM_RIGHTS; - control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds)); - memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds)); - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = &control, - .msg_controllen = sizeof(control) - }; - - assert(sendmsg(1, &mh, 0) == sizeof(iov)); - assert(close(1) == 0); - - int status; - assert(waitpid(pid, &status, 0) == pid); - assert(status == 0); - } else { - assert(close(sv[1]) == 0); - assert(dup2(sv[0], 0) == 0); - assert(close(sv[0]) == 0); - - struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)]; - - struct msghdr mh = { - .msg_iov = &iov, - .msg_iovlen = 1, - .msg_control = control, - .msg_controllen = sizeof(control) - }; + cmsg_size += CMSG_SPACE(sizeof(struct ucred)); + cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; - assert(recvmsg(0, &mh, 0) == sizeof(iov)); - assert(close(0) == 0); - } + assert(recvmsg(0, mh, 0) == (int) data_size); + assert(close(0) == 0); return 0; } diff -Nru strace-4.11/tests-mx32/scm_rights-fd.test strace-4.12/tests-mx32/scm_rights-fd.test --- strace-4.11/tests-mx32/scm_rights-fd.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/scm_rights-fd.test 2016-03-23 19:13:13.000000000 +0000 @@ -49,18 +49,27 @@ framework_skip_ 'failed to create a file' run_prog ./scm_rights /dev/zero -run_strace_merge -y -x -enetwork $args "$file" +run_strace -y -x -enetwork $args "$file" +hex='[[:xdigit:]]' n='[1-9][0-9]*' -msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n" -rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3, 4, 5]*/(A\\n){127}Z>\]\}' -creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}' -prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +' +sample="$(for i in $(seq 1 15); do printf '\\\\xf%x' $i; done)" +socket='' + +path6='(/.*/(A\\n){127}Z|\\x2f(\\x'"$hex$hex"')*\\x2f(\\x41\\x0a){127}\\x5a)' +rights_data='\[4, 5, 6<'"$path6"'>\]' +iov='\[\{"'"$sample"'", 15\}\]' +ids='\{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}' + +msg='\{msg_name\(0\)=NULL, msg_iov\(1\)='"$iov"', msg_controllen='"$n" +rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, '"$rights_data"'\}' +creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, '"$ids"'\}' + EXPECTED="$LOG.expected" cat > "$EXPECTED" << __EOF__ -${prefix}sendmsg\\(1, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n -${prefix}recvmsg\\(0, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n +sendmsg\\(3$socket, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15 +recvmsg\\(0$socket, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15 __EOF__ match_grep "$LOG" "$EXPECTED" diff -Nru strace-4.11/tests-mx32/seccomp.c strace-4.12/tests-mx32/seccomp.c --- strace-4.11/tests-mx32/seccomp.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_PRCTL -# include -#endif -#ifdef HAVE_LINUX_SECCOMP_H -# include -#endif -#ifdef HAVE_LINUX_FILTER_H -# include -#endif - -#if defined HAVE_PRCTL \ - && defined PR_SET_NO_NEW_PRIVS \ - && defined PR_SET_SECCOMP \ - && defined SECCOMP_MODE_FILTER \ - && defined SECCOMP_RET_ERRNO \ - && defined BPF_JUMP \ - && defined BPF_STMT - -#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW) - -#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ - BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | (SECCOMP_RET_DATA & (err))) - -#define SOCK_FILTER_KILL_PROCESS \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL) - -#define PRINT_ALLOW_SYSCALL(nr) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), ", \ - __NR_ ## nr) - -#define PRINT_DENY_SYSCALL(nr, err) \ - printf("BPF_JUMP(BPF_JMP | BPF_K | BPF_JEQ, %#x, 0, 0x1), " \ - "BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | %#x), ", \ - __NR_ ## nr, err) - -static const struct sock_filter filter[] = { - /* load syscall number */ - BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)), - - /* allow syscalls */ - SOCK_FILTER_ALLOW_SYSCALL(close), - SOCK_FILTER_ALLOW_SYSCALL(exit), - SOCK_FILTER_ALLOW_SYSCALL(exit_group), - - /* deny syscalls */ - SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), - SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), - - /* kill process */ - SOCK_FILTER_KILL_PROCESS -}; - -static const struct sock_fprog prog = { - .len = sizeof(filter) / sizeof(filter[0]), - .filter = (struct sock_filter *) filter, -}; - -int -main(void) -{ - int fds[2]; - - puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); - - printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ["); - - printf("BPF_STMT(BPF_LD | BPF_W | BPF_ABS, %#x), ", - (unsigned) offsetof(struct seccomp_data, nr)); - - PRINT_ALLOW_SYSCALL(close); - PRINT_ALLOW_SYSCALL(exit); - PRINT_ALLOW_SYSCALL(exit_group); - - PRINT_DENY_SYSCALL(sync, EBUSY), - PRINT_DENY_SYSCALL(setsid, EPERM), - - printf("BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL)"); - - puts("]) = 0"); - puts("+++ exited with 0 +++"); - - fflush(stdout); - close(0); - close(1); - - if (pipe(fds) || - prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) || - prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) || - close(0) || close(1)) - _exit(77); - - _exit(0); -} - -#else - -int main(void) { return 77; } - -#endif diff -Nru strace-4.11/tests-mx32/seccomp-filter.c strace-4.12/tests-mx32/seccomp-filter.c --- strace-4.11/tests-mx32/seccomp-filter.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-filter.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp && defined SECCOMP_SET_MODE_FILTER + +# define N 7 + +int +main(void) +{ + struct sock_filter *const filter = tail_alloc(sizeof(*filter) * N); + const void *const efault = tail_alloc(1); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + long rc; + + prog->filter = filter; + prog->len = N; + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=%p})" + " = %ld %s (%m)\n", "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", + prog->len, prog->filter, rc, errno2name()); + + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -2L, efault); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, %p) = %ld %s (%m)\n", + "0xfffffffe /* SECCOMP_FILTER_FLAG_??? */", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && SECCOMP_SET_MODE_FILTER") + +#endif diff -Nru strace-4.11/tests-mx32/seccomp-filter.test strace-4.12/tests-mx32/seccomp-filter.test --- strace-4.11/tests-mx32/seccomp-filter.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-filter.test 2016-04-12 00:20:03.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=seccomp diff -Nru strace-4.11/tests-mx32/seccomp-filter-v.c strace-4.12/tests-mx32/seccomp-filter-v.c --- strace-4.11/tests-mx32/seccomp-filter-v.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-filter-v.c 2016-05-07 23:37:53.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined SECCOMP_SET_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter_c[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +int +main(void) +{ + tprintf("%s", ""); + + static const char kill_stmt_txt[] = + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"; + struct sock_filter *const filter = + tail_memdup(filter_c, sizeof(filter_c)); + struct sock_filter *const big_filter = + tail_alloc(sizeof(*big_filter) * (BPF_MAXINSNS + 1)); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + + prog->filter = filter + ARRAY_SIZE(filter_c); + prog->len = 1; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=1, filter=%p})" + " = -1 EFAULT (%m)\n", prog->filter); + + prog->filter = filter + ARRAY_SIZE(filter_c) - 1; + prog->len = 3; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u" + ", filter=[%s, %p]}) = -1 EFAULT (%m)\n", + prog->len, kill_stmt_txt, filter + ARRAY_SIZE(filter_c)); + + prog->len = 0; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=0, filter=[]})" + " = -1 EINVAL (%m)\n"); + + unsigned int i; + for (i = 0; i <= BPF_MAXINSNS; ++i) { + const struct sock_filter stmt = + BPF_STMT(BPF_CLASS(i), i << 16); + big_filter[i] = stmt; + } + + prog->filter = big_filter; + prog->len = BPF_MAXINSNS + 1; + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=[", + "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", prog->len); + for (i = 0; i < BPF_MAXINSNS; ++i) { + if (i) + tprintf(", "); + switch(BPF_CLASS(i)) { + case BPF_LD: + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_LDX: + tprintf("BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_ST: + tprintf("BPF_STMT(BPF_ST, %#x)", i << 16); + break; + case BPF_STX: + tprintf("BPF_STMT(BPF_STX, %#x)", i << 16); + break; + case BPF_ALU: + tprintf("BPF_STMT(BPF_ALU|BPF_K|BPF_ADD, %#x)", i << 16); + break; + case BPF_JMP: + tprintf("BPF_STMT(BPF_JMP|BPF_K|BPF_JA, %#x)", i << 16); + break; + case BPF_RET: + tprintf("BPF_STMT(BPF_RET|BPF_K, %#x" + " /* SECCOMP_RET_??? */)", i << 16); + break; + case BPF_MISC: + tprintf("BPF_STMT(BPF_MISC|BPF_TAX, %#x)", i << 16); + break; + } + } + tprintf(", ...]})"); + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + tprintf(" = -1 EINVAL (%m)\n"); + + prog->filter = filter; + prog->len = ARRAY_SIZE(filter_c); + + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u, filter=[", + prog->len); + + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + tprintf("%s]}) = 0\n+++ exited with 0 +++\n", kill_stmt_txt); + + if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog)) + perror_msg_and_skip("SECCOMP_SET_MODE_FILTER"); + + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && PR_SET_NO_NEW_PRIVS" + " && SECCOMP_SET_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff -Nru strace-4.11/tests-mx32/seccomp-filter-v.test strace-4.12/tests-mx32/seccomp-filter-v.test --- strace-4.11/tests-mx32/seccomp-filter-v.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-filter-v.test 2016-04-12 00:05:43.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=seccomp diff -Nru strace-4.11/tests-mx32/seccomp-strict.c strace-4.12/tests-mx32/seccomp-strict.c --- strace-4.11/tests-mx32/seccomp-strict.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-strict.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_seccomp && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + long rc; + + rc = syscall(__NR_seccomp, -1L, -1L, addr); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#lx)" + " = %ld %s (%m)\n", -1, -1, addr, rc, errno2name()); + fflush(stdout); + + rc = syscall(__NR_seccomp, 0, 0, 0); + if (rc) { + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL)" + " = %ld %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && __NR_exit") + +#endif diff -Nru strace-4.11/tests-mx32/seccomp-strict.test strace-4.12/tests-mx32/seccomp-strict.test --- strace-4.11/tests-mx32/seccomp-strict.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp-strict.test 2016-04-20 14:30:43.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eseccomp "$@" > "$EXP" +match_diff "$LOG" "$EXP" +rm -f "$EXP" diff -Nru strace-4.11/tests-mx32/seccomp.test strace-4.12/tests-mx32/seccomp.test --- strace-4.11/tests-mx32/seccomp.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/seccomp.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh - -# Check how SECCOMP_MODE_FILTER is decoded. - -. "${srcdir=.}/init.sh" - -OUT="$LOG.out" - -run_prog > /dev/null -run_strace -veprctl $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 diff -Nru strace-4.11/tests-mx32/select.c strace-4.12/tests-mx32/select.c --- strace-4.11/tests-mx32/select.c 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-mx32/select.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,12 +1,41 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #if defined __NR_select && !defined __NR__newselect -# define TEST_SYSCALL_NAME select -#endif -#include "xselect.c" +# define TEST_SYSCALL_NR __NR_select +# define TEST_SYSCALL_STR "select" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && !__NR__newselect") + +#endif diff -Nru strace-4.11/tests-mx32/select.test strace-4.12/tests-mx32/select.test --- strace-4.11/tests-mx32/select.test 2015-12-08 21:19:40.000000000 +0000 +++ strace-4.12/tests-mx32/select.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,13 +3,4 @@ # Check select syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -syscall=${ME_%.test} -OUT="$LOG.out" -run_strace -a36 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-mx32/semop.c strace-4.12/tests-mx32/semop.c --- strace-4.11/tests-mx32/semop.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/semop.c 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,54 @@ +#include "tests.h" +#include +#include +#include +#include +#include +#include + +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + id = -1; +} + +int +main(void) +{ + id = semget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + atexit(cleanup); + + union semun sem_union = { .val = 0 }; + if (semctl(id, 0, SETVAL, sem_union) == -1) + perror_msg_and_skip("semctl"); + + struct sembuf *const sem_b = tail_alloc(sizeof(*sem_b)); + sem_b->sem_num = 0; + sem_b->sem_op = 1; + sem_b->sem_flg = SEM_UNDO; + + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, 1"); + printf("semop(%d, [{0, 1, SEM_UNDO}], 1) = 0\n", id); + + sem_b->sem_op = -1; + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, -1"); + printf("semop(%d, [{0, -1, SEM_UNDO}], 1) = 0\n", id); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/semop.test strace-4.12/tests-mx32/semop.test --- strace-4.11/tests-mx32/semop.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/semop.test 2016-04-20 00:11:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check semop syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff -Nru strace-4.11/tests-mx32/sendfile64.c strace-4.12/tests-mx32/sendfile64.c --- strace-4.11/tests-mx32/sendfile64.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests-mx32/sendfile64.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,80 +25,72 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile64 +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile64, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile64, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile64"); + printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile64, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint64_t *p_off = tail_alloc(sizeof(uint64_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile64, 0, 1, p, page_len) == -1); + printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile64(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint64_t *p_off = p + page_len - sizeof(uint64_t); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) + == (long) alen); printf("sendfile64(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile64(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, @@ -106,17 +98,13 @@ (unsigned long) blen); *p_off = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); printf("sendfile64(%d, %d, [14627392582579060461], 1)" - " = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off = 0xfacefeed; - if (syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1)) - return 77; - printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", sv[1], reg_in); puts("+++ exited with 0 +++"); return 0; @@ -124,10 +112,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile64") #endif diff -Nru strace-4.11/tests-mx32/sendfile64.test strace-4.12/tests-mx32/sendfile64.test --- strace-4.11/tests-mx32/sendfile64.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/sendfile64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile64 syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a29 diff -Nru strace-4.11/tests-mx32/sendfile.c strace-4.12/tests-mx32/sendfile.c --- strace-4.11/tests-mx32/sendfile.c 2015-08-27 00:09:46.000000000 +0000 +++ strace-4.12/tests-mx32/sendfile.c 2016-03-29 17:01:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,106 +25,97 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_sendfile +# include +# include +# include +# include +# include +# include +# include +# include + int main(int ac, const char **av) { - assert(ac == 2); + assert(ac == 1); (void) close(0); if (open("/dev/zero", O_RDONLY) != 0) - return 77; + perror_msg_and_skip("open: %s", "/dev/zero"); int sv[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) - return 77; + perror_msg_and_skip("socketpair"); - int reg_in = open(av[1], O_RDONLY); + int reg_in = open(av[0], O_RDONLY); if (reg_in < 0) - return 77; + perror_msg_and_fail("open: %s", av[0]); struct stat stb; - if (fstat(reg_in, &stb)) - return 77; + assert(fstat(reg_in, &stb) == 0); const size_t blen = stb.st_size / 3; const size_t alen = stb.st_size - blen; assert(S_ISREG(stb.st_mode) && blen > 0); - const size_t page_len = sysconf(_SC_PAGESIZE); - if (!syscall(__NR_sendfile, 0, 1, NULL, page_len) || - EBADF != errno) - return 77; - printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (Bad file descriptor)\n", + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile"); + printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (%m)\n", (unsigned long) page_len); - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (MAP_FAILED == p || munmap(p + page_len, page_len)) - return 77; - - if (!syscall(__NR_sendfile, 0, 1, p + page_len, page_len)) - return 77; - printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (Bad address)\n", - (unsigned long) p + page_len, (unsigned long) page_len); + uint32_t *p_off = tail_alloc(sizeof(uint32_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile, 0, 1, p, page_len) == -1); + printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); - if (syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) != (long) alen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) + == (long) alen); printf("sendfile(%d, %d, NULL, %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen); - uint32_t *p_off = p + page_len - sizeof(uint32_t); + p = p_off; if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) != (long) alen) { - printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (Bad address)\n", + printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (%m)\n", sv[1], reg_in, (unsigned long) p_off, (unsigned long) alen); --p_off; - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) - != (long) alen) - return 77; + *p_off = 0; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) + == (long) alen); } printf("sendfile(%d, %d, [0] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) alen, (unsigned long) alen); - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) - != (long) blen) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); printf("sendfile(%d, %d, [%lu] => [%lu], %lu) = %lu\n", sv[1], reg_in, (unsigned long) alen, (unsigned long) stb.st_size, (unsigned long) stb.st_size + 1, (unsigned long) blen); - if (p_off == p + page_len - sizeof(uint64_t)) { + if (p_off != p) { uint64_t *p_off64 = (uint64_t *) p_off; *p_off64 = 0xcafef00dfacefeed; - if (!syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1)) - return 77; - printf("sendfile(%d, %d, [14627392582579060461], 1) = -1 EINVAL (Invalid argument)\n", - sv[1], reg_in); + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); + printf("sendfile(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); *p_off64 = 0xdefaced; } else { *p_off = 0xdefaced; } - if (syscall(__NR_sendfile, sv[1], reg_in, p_off, 1)) - return 77; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, 1) == 0); printf("sendfile(%d, %d, [233811181], 1) = 0\n", sv[1], reg_in); @@ -134,10 +125,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_sendfile") #endif diff -Nru strace-4.11/tests-mx32/sendfile.test strace-4.12/tests-mx32/sendfile.test --- strace-4.11/tests-mx32/sendfile.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/sendfile.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check sendfile syscall decoding. . "${srcdir=.}/init.sh" - -exe="./${ME_%.test}" -run_prog "$exe" "$exe" > /dev/null -OUT="$LOG.out" -run_strace -a24 -esendfile $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a27 diff -Nru strace-4.11/tests-mx32/setdomainname.c strace-4.12/tests-mx32/setdomainname.c --- strace-4.11/tests-mx32/setdomainname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setdomainname.c 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_setdomainname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_setdomainname, 0, 63); + printf("setdomainname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setdomainname") + +#endif diff -Nru strace-4.11/tests-mx32/setdomainname.test strace-4.12/tests-mx32/setdomainname.test --- strace-4.11/tests-mx32/setdomainname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setdomainname.test 2016-04-25 10:24:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setdomainname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-mx32/setfsgid32.c strace-4.12/tests-mx32/setfsgid32.c --- strace-4.11/tests-mx32/setfsgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid32 + +# define SYSCALL_NR __NR_setfsgid32 +# define SYSCALL_NAME "setfsgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid32") + +#endif diff -Nru strace-4.11/tests-mx32/setfsgid32.test strace-4.12/tests-mx32/setfsgid32.test --- strace-4.11/tests-mx32/setfsgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-mx32/setfsgid.c strace-4.12/tests-mx32/setfsgid.c --- strace-4.11/tests-mx32/setfsgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsgid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid + +# define SYSCALL_NR __NR_setfsgid +# define SYSCALL_NAME "setfsgid" + +# if defined __NR_setfsgid32 && __NR_setfsgid != __NR_setfsgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid") + +#endif diff -Nru strace-4.11/tests-mx32/setfsgid.test strace-4.12/tests-mx32/setfsgid.test --- strace-4.11/tests-mx32/setfsgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsgid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-mx32/setfsugid.c strace-4.12/tests-mx32/setfsugid.c --- strace-4.11/tests-mx32/setfsugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsugid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Check decoding of setfsuid/setfsgid/setfsuid32/setfsgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int +main(void) +{ + unsigned int ugid = GETUGID; + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L, + 0xc0deffffU, + 0xfacefeedU, + (long) 0xfacefeeddeadbeefULL + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + unsigned int rc; + + rc = syscall(SYSCALL_NR, tests[i]); + printf("%s(%u) = %u\n", SYSCALL_NAME, num, rc); + + rc = syscall(SYSCALL_NR, ugid); + printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/setfsuid32.c strace-4.12/tests-mx32/setfsuid32.c --- strace-4.11/tests-mx32/setfsuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsuid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid32 + +# define SYSCALL_NR __NR_setfsuid32 +# define SYSCALL_NAME "setfsuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid32") + +#endif diff -Nru strace-4.11/tests-mx32/setfsuid32.test strace-4.12/tests-mx32/setfsuid32.test --- strace-4.11/tests-mx32/setfsuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsuid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-mx32/setfsuid.c strace-4.12/tests-mx32/setfsuid.c --- strace-4.11/tests-mx32/setfsuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsuid.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid + +# define SYSCALL_NR __NR_setfsuid +# define SYSCALL_NAME "setfsuid" + +# if defined __NR_setfsuid32 && __NR_setfsuid != __NR_setfsuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid") + +#endif diff -Nru strace-4.11/tests-mx32/setfsuid.test strace-4.12/tests-mx32/setfsuid.test --- strace-4.11/tests-mx32/setfsuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setfsuid.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-mx32/setgid32.c strace-4.12/tests-mx32/setgid32.c --- strace-4.11/tests-mx32/setgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid32 + +# define SYSCALL_NR __NR_setgid32 +# define SYSCALL_NAME "setgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid32") + +#endif diff -Nru strace-4.11/tests-mx32/setgid32.test strace-4.12/tests-mx32/setgid32.test --- strace-4.11/tests-mx32/setgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-mx32/setgid.c strace-4.12/tests-mx32/setgid.c --- strace-4.11/tests-mx32/setgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid + +# define SYSCALL_NR __NR_setgid +# define SYSCALL_NAME "setgid" + +# if defined __NR_setgid32 && __NR_setgid != __NR_setgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid") + +#endif diff -Nru strace-4.11/tests-mx32/setgid.test strace-4.12/tests-mx32/setgid.test --- strace-4.11/tests-mx32/setgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/setgroups32.c strace-4.12/tests-mx32/setgroups32.c --- strace-4.11/tests-mx32/setgroups32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgroups32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_setgroups32 + +# include "setgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups32") + +#endif diff -Nru strace-4.11/tests-mx32/setgroups32.test strace-4.12/tests-mx32/setgroups32.test --- strace-4.11/tests-mx32/setgroups32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgroups32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a19 diff -Nru strace-4.11/tests-mx32/setgroups.c strace-4.12/tests-mx32/setgroups.c --- strace-4.11/tests-mx32/setgroups.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgroups.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of setgroups/setgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_setgroups32 + +# define SYSCALL_NR __NR_setgroups32 +# define SYSCALL_NAME "setgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_setgroups + +# define SYSCALL_NR __NR_setgroups +# define SYSCALL_NAME "setgroups" +# if defined __NR_setgroups32 && __NR_setgroups != __NR_setgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +int +main(void) +{ + /* check how the first argument is decoded */ + if (syscall(SYSCALL_NR, 0, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0)) + printf("%s(0, NULL) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, NULL) = 0\n", SYSCALL_NAME); + + syscall(SYSCALL_NR, 1, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, (long) 0xffffffff00000001ULL, 0); + printf("%s(1, NULL) = -1 %s (%m)\n", SYSCALL_NAME, errno2name()); + + syscall(SYSCALL_NR, -1U, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + syscall(SYSCALL_NR, -1L, 0); + printf("%s(%u, NULL) = -1 %s (%m)\n", SYSCALL_NAME, -1U, errno2name()); + + /* check how the second argument is decoded */ + const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * 2); + GID_TYPE *const g3 = tail_alloc(sizeof(*g3) * 3); + + if (syscall(SYSCALL_NR, 0, g1 + 1)) + printf("%s(0, []) = -1 %s (%m)\n", + SYSCALL_NAME, errno2name()); + else + printf("%s(0, []) = 0\n", SYSCALL_NAME); + + if (syscall(SYSCALL_NR, 1, g1)) + printf("%s(1, [%u]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, errno2name()); + else + printf("%s(1, [%u]) = 0\n", + SYSCALL_NAME, (unsigned) *g1); + + syscall(SYSCALL_NR, 1, g1 + 1); + printf("%s(1, %p) = -1 %s (%m)\n", + SYSCALL_NAME, g1 + 1, errno2name()); + + syscall(SYSCALL_NR, 1, -1L); + printf("%s(1, %#lx) = -1 %s (%m)\n", SYSCALL_NAME, -1L, errno2name()); + + syscall(SYSCALL_NR, 2, g1); + printf("%s(2, [%u, %p]) = -1 %s (%m)\n", + SYSCALL_NAME, (unsigned) *g1, g1 + 1, errno2name()); + + g2[0] = -2; + g2[1] = -3; + if (syscall(SYSCALL_NR, 2, g2)) + printf("%s(2, [%u, %u]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], errno2name()); + else + printf("%s(2, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1]); + + syscall(SYSCALL_NR, 3, g2); + printf("%s(3, [%u, %u, %p]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g2[0], (unsigned) g2[1], g2 + 2, errno2name()); + + g3[0] = 0; + g3[1] = 1; + if (syscall(SYSCALL_NR, 3, g3)) + printf("%s(3, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + else + printf("%s(3, [%u, %u]) = 0\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1]); + + syscall(SYSCALL_NR, 4, g3); + printf("%s(4, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + (unsigned) g3[0], (unsigned) g3[1], errno2name()); + + long rc = sysconf(_SC_NGROUPS_MAX); + const unsigned ngroups_max = rc; + + if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { + syscall(SYSCALL_NR, ngroups_max, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + const unsigned long size = + (unsigned long) 0xffffffff00000000ULL | ngroups_max; + syscall(SYSCALL_NR, size, g3); + printf("%s(%u, [%u, %u, ...]) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max, (unsigned) g3[0], (unsigned) g3[1], + errno2name()); + + syscall(SYSCALL_NR, ngroups_max + 1, g3); + printf("%s(%u, %p) = -1 %s (%m)\n", SYSCALL_NAME, + ngroups_max + 1, g3, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups") + +#endif diff -Nru strace-4.11/tests-mx32/setgroups.test strace-4.12/tests-mx32/setgroups.test --- strace-4.11/tests-mx32/setgroups.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setgroups.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a17 diff -Nru strace-4.11/tests-mx32/sethostname.c strace-4.12/tests-mx32/sethostname.c --- strace-4.11/tests-mx32/sethostname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sethostname.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_sethostname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_sethostname, 0, 63); + printf("sethostname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sethostname") + +#endif diff -Nru strace-4.11/tests-mx32/sethostname.test strace-4.12/tests-mx32/sethostname.test --- strace-4.11/tests-mx32/sethostname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sethostname.test 2016-04-01 23:34:33.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sethostname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff -Nru strace-4.11/tests-mx32/set_mempolicy.c strace-4.12/tests-mx32/set_mempolicy.c --- strace-4.11/tests-mx32/set_mempolicy.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/set_mempolicy.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,152 @@ +/* + * Check decoding of set_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_set_mempolicy + +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(const unsigned long maxnode, unsigned int offset) +{ + unsigned int nlongs = NLONGS(maxnode); + if (nlongs <= offset) + nlongs = 0; + else + nlongs -= offset; + const unsigned int size = nlongs * sizeof(long); + unsigned long *const nodemask = + tail_alloc(size ? size : (offset ? 1 : 0)); + memset(nodemask, 0, size); + + long rc = syscall(__NR_set_mempolicy, 0, nodemask, maxnode); + int saved_errno = errno; + + fputs("set_mempolicy(MPOL_DEFAULT, ", stdout); + + if (nlongs) { + putc('[', stdout); + unsigned int i; + for (i = 0; i < nlongs + offset; ++i) { + if (i) + fputs(", ", stdout); + if (i < nlongs) { + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(long) * 2 + 2, + nodemask[i]); + } else { + printf("%p", nodemask + i); + break; + } + } + putc(']', stdout); + } else { + if (maxnode) + printf("%p", nodemask); + else + printf("[]"); + } + + printf(", %lu) = ", maxnode); + if (rc) { + errno = saved_errno; + printf("%ld %s (%m)\n", rc, errno2name()); + } else { + puts("0"); + } +} + +static void +test_offset(const unsigned int offset) +{ + unsigned long maxnode = get_page_size() * 8; + + print_nodes(maxnode, offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + + maxnode = sizeof(long) * 8; + print_nodes(0, offset); + print_nodes(1, offset); + print_nodes(2, offset); + print_nodes(maxnode - 1, offset); + print_nodes(maxnode , offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + print_nodes(maxnode * 2 - 1, offset); + print_nodes(maxnode * 2 , offset); + print_nodes(maxnode * 2 + 1, offset); + print_nodes(maxnode * 2 + 2, offset); + print_nodes(maxnode * 3 - 1, offset); + print_nodes(maxnode * 3 , offset); + print_nodes(maxnode * 3 + 1, offset); + print_nodes(maxnode * 3 + 2, offset); + print_nodes(maxnode * 4 + 2, offset); +} + +int +main(void) +{ + if (syscall(__NR_set_mempolicy, 0, 0, 0)) + perror_msg_and_skip("set_mempolicy"); + puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); + + const unsigned long *nodemask = (void *) 0xfacefeedfffffffe; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); + printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %ld %s (%m)\n", + nodemask, maxnode, rc, errno2name()); + + test_offset(0); + test_offset(1); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_set_mempolicy") + +#endif diff -Nru strace-4.11/tests-mx32/set_mempolicy.test strace-4.12/tests-mx32/set_mempolicy.test --- strace-4.11/tests-mx32/set_mempolicy.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/set_mempolicy.test 2016-05-07 23:37:52.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check set_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a35 diff -Nru strace-4.11/tests-mx32/set_ptracer_any.c strace-4.12/tests-mx32/set_ptracer_any.c --- strace-4.11/tests-mx32/set_ptracer_any.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/set_ptracer_any.c 2016-01-05 23:17:11.000000000 +0000 @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include #ifdef HAVE_PRCTL diff -Nru strace-4.11/tests-mx32/setregid32.c strace-4.12/tests-mx32/setregid32.c --- strace-4.11/tests-mx32/setregid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setregid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid32 + +# define SYSCALL_NR __NR_setregid32 +# define SYSCALL_NAME "setregid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid32") + +#endif diff -Nru strace-4.11/tests-mx32/setregid32.test strace-4.12/tests-mx32/setregid32.test --- strace-4.11/tests-mx32/setregid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setregid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-mx32/setregid.c strace-4.12/tests-mx32/setregid.c --- strace-4.11/tests-mx32/setregid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setregid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid + +# define SYSCALL_NR __NR_setregid +# define SYSCALL_NAME "setregid" + +# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid") + +#endif diff -Nru strace-4.11/tests-mx32/setregid.test strace-4.12/tests-mx32/setregid.test --- strace-4.11/tests-mx32/setregid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setregid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests-mx32/setresgid32.c strace-4.12/tests-mx32/setresgid32.c --- strace-4.11/tests-mx32/setresgid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresgid32.c 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid32 + +# define SYSCALL_NR __NR_setresgid32 +# define SYSCALL_NAME "setresgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid32") + +#endif diff -Nru strace-4.11/tests-mx32/setresgid32.test strace-4.12/tests-mx32/setresgid32.test --- strace-4.11/tests-mx32/setresgid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresgid32.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/setresgid.c strace-4.12/tests-mx32/setresgid.c --- strace-4.11/tests-mx32/setresgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresgid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid + +# define SYSCALL_NR __NR_setresgid +# define SYSCALL_NAME "setresgid" + +# if defined __NR_setresgid32 && __NR_setresgid != __NR_setresgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid") + +#endif diff -Nru strace-4.11/tests-mx32/setresgid.test strace-4.12/tests-mx32/setresgid.test --- strace-4.11/tests-mx32/setresgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresgid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-mx32/setresugid.c strace-4.12/tests-mx32/setresugid.c --- strace-4.11/tests-mx32/setresugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Check decoding of setresuid/setresgid/setresuid32/setresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define TRIPLE(val) \ + { val, ugid, ugid }, { ugid, val, ugid }, { ugid, ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e, s; + } tests[] = { + { ugid, ugid, ugid }, + TRIPLE((unsigned long) 0xffffffff00000000ULL | ugid), + TRIPLE(-1U), + TRIPLE(-1L), + TRIPLE(0xffff0000U | ugid), + TRIPLE(0xffff), + TRIPLE(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + const unsigned int sn = ugid2int(tests[i].s); + + if (!num_matches_id(rn, ugid) || + !num_matches_id(en, ugid) || + !num_matches_id(sn, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e, tests[i].s)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx, %#lx)", + SYSCALL_NAME, + tests[i].r, tests[i].e, tests[i].s); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(", "); + print_int(sn); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/setresuid32.c strace-4.12/tests-mx32/setresuid32.c --- strace-4.11/tests-mx32/setresuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid32 + +# define SYSCALL_NR __NR_setresuid32 +# define SYSCALL_NAME "setresuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid32") + +#endif diff -Nru strace-4.11/tests-mx32/setresuid32.test strace-4.12/tests-mx32/setresuid32.test --- strace-4.11/tests-mx32/setresuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/setresuid.c strace-4.12/tests-mx32/setresuid.c --- strace-4.11/tests-mx32/setresuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid + +# define SYSCALL_NR __NR_setresuid +# define SYSCALL_NAME "setresuid" + +# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid") + +#endif diff -Nru strace-4.11/tests-mx32/setresuid.test strace-4.12/tests-mx32/setresuid.test --- strace-4.11/tests-mx32/setresuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setresuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff -Nru strace-4.11/tests-mx32/setreugid.c strace-4.12/tests-mx32/setreugid.c --- strace-4.11/tests-mx32/setreugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setreugid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Check decoding of setreuid/setregid/setreuid32/setregid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define PAIR(val) { val, ugid }, { ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e; + } tests[] = { + { ugid, ugid }, + PAIR((unsigned long) 0xffffffff00000000ULL | ugid), + PAIR(-1U), + PAIR(-1L), + PAIR(0xffff0000U | ugid), + PAIR(0xffff), + PAIR(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + + if (!num_matches_id(rn, ugid) || !num_matches_id(en, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx)", SYSCALL_NAME, + tests[i].r, tests[i].e); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/setreuid32.c strace-4.12/tests-mx32/setreuid32.c --- strace-4.11/tests-mx32/setreuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setreuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid32 + +# define SYSCALL_NR __NR_setreuid32 +# define SYSCALL_NAME "setreuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid32") + +#endif diff -Nru strace-4.11/tests-mx32/setreuid32.test strace-4.12/tests-mx32/setreuid32.test --- strace-4.11/tests-mx32/setreuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setreuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-mx32/setreuid.c strace-4.12/tests-mx32/setreuid.c --- strace-4.11/tests-mx32/setreuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setreuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid + +# define SYSCALL_NR __NR_setreuid +# define SYSCALL_NAME "setreuid" + +# if defined __NR_setreuid32 && __NR_setreuid != __NR_setreuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid") + +#endif diff -Nru strace-4.11/tests-mx32/setreuid.test strace-4.12/tests-mx32/setreuid.test --- strace-4.11/tests-mx32/setreuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setreuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff -Nru strace-4.11/tests-mx32/setugid.c strace-4.12/tests-mx32/setugid.c --- strace-4.11/tests-mx32/setugid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setugid.c 2016-04-21 22:05:56.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Check decoding of setuid/setgid/setuid32/setgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = ugid2int(tests[i]); + long expected; + + if (num == ugid) + expected = 0; + else if (num == -1U) + expected = -1; + else + continue; + + const long rc = syscall(SYSCALL_NR, tests[i]); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(%u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid); + break; + } + perror_msg_and_fail("%s(%#lx) != %ld", + SYSCALL_NAME, tests[i], expected); + } + + printf("%s(", SYSCALL_NAME); + if (num == -1U) + printf("-1"); + else + printf("%u", num); + errno = saved_errno; + if (expected) + printf(") = -1 %s (%m)\n", errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/setuid32.c strace-4.12/tests-mx32/setuid32.c --- strace-4.11/tests-mx32/setuid32.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setuid32.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid32 + +# define SYSCALL_NR __NR_setuid32 +# define SYSCALL_NAME "setuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid32") + +#endif diff -Nru strace-4.11/tests-mx32/setuid32.test strace-4.12/tests-mx32/setuid32.test --- strace-4.11/tests-mx32/setuid32.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setuid32.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff -Nru strace-4.11/tests-mx32/setuid.c strace-4.12/tests-mx32/setuid.c --- strace-4.11/tests-mx32/setuid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setuid.c 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid + +# define SYSCALL_NR __NR_setuid +# define SYSCALL_NAME "setuid" + +# if defined __NR_setuid32 && __NR_setuid != __NR_setuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid") + +#endif diff -Nru strace-4.11/tests-mx32/setuid.test strace-4.12/tests-mx32/setuid.test --- strace-4.11/tests-mx32/setuid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/setuid.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/shmxt.c strace-4.12/tests-mx32/shmxt.c --- strace-4.11/tests-mx32/shmxt.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/shmxt.c 2016-04-25 01:54:05.000000000 +0000 @@ -0,0 +1,53 @@ +#include "tests.h" +#include +#include +#include + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + id = -1; +} + +#ifdef __alpha__ +# define SHMAT "osf_shmat" +#else +# define SHMAT "shmat" +#endif + +int +main(void) +{ + id = shmget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + atexit(cleanup); + + shmat(id, NULL, SHM_REMAP); + printf("%s(%d, NULL, SHM_REMAP) = -1 %s (%m)\n", + SHMAT, id, errno2name()); + + void *shmaddr = shmat(id, NULL, SHM_RDONLY); + if (shmaddr == (void *)(-1)) + perror_msg_and_skip("shmat SHM_RDONLY"); + printf("%s(%d, NULL, SHM_RDONLY) = %p\n", SHMAT, id, shmaddr); + + if (shmdt(shmaddr)) + perror_msg_and_skip("shmdt"); + printf("shmdt(%p) = 0\n", shmaddr); + + ++shmaddr; + void *shmaddr2 = shmat(id, shmaddr, SHM_RND); + if (shmaddr2 == (void *)(-1)) + printf("%s(%d, %p, SHM_RND) = -1 %s (%m)\n", + SHMAT, id, shmaddr, errno2name()); + else + printf("%s(%d, %p, SHM_RND) = %p\n", + SHMAT, id, shmaddr, shmaddr2); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/shmxt.test strace-4.12/tests-mx32/shmxt.test --- strace-4.11/tests-mx32/shmxt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/shmxt.test 2016-04-20 01:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check shmat and shmdt syscalls decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) shmat=osf_shmat ;; + *) shmat=shmat ;; +esac + +run_strace_match_diff -e trace=$shmat,shmdt -a11 diff -Nru strace-4.11/tests-mx32/sigaltstack.c strace-4.12/tests-mx32/sigaltstack.c --- strace-4.11/tests-mx32/sigaltstack.c 2015-07-18 00:01:40.000000000 +0000 +++ strace-4.12/tests-mx32/sigaltstack.c 2016-01-05 23:37:01.000000000 +0000 @@ -1,3 +1,4 @@ +#include "tests.h" #include int @@ -8,5 +9,7 @@ .ss_flags = SS_DISABLE, .ss_size = 0xdeadbeef }; - return sigaltstack(&ss, (stack_t *) 0) ? 77 : 0; + if (sigaltstack(&ss, (stack_t *) 0)) + perror_msg_and_skip("sigaltstack"); + return 0; } diff -Nru strace-4.11/tests-mx32/signalfd.c strace-4.12/tests-mx32/signalfd.c --- strace-4.11/tests-mx32/signalfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/signalfd.c 2016-01-06 11:35:23.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,30 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include -#include -#include -#ifdef HAVE_SYS_SIGNALFD_H + +#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC + +# include +# include # include -#endif int main(void) { -#if defined HAVE_SYS_SIGNALFD_H && defined HAVE_SIGNALFD && defined O_CLOEXEC sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGCHLD); (void) close(0); - return signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK) == 0 ? - 0 : 77; + if (signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("signalfd"); + return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_SYS_SIGNALFD_H && HAVE_SIGNALFD && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-mx32/sigreturn.c strace-4.12/tests-mx32/sigreturn.c --- strace-4.11/tests-mx32/sigreturn.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/sigreturn.c 2016-01-10 22:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #include #include @@ -47,9 +45,9 @@ sigemptyset(&set); sigaddset(&set, SIGUSR2); sigaddset(&set, SIGCHLD); - sigaddset(&set, RT_0 + 2); sigaddset(&set, RT_0 + 3); sigaddset(&set, RT_0 + 4); + sigaddset(&set, RT_0 + 5); sigaddset(&set, RT_0 + 26); sigaddset(&set, RT_0 + 27); sigprocmask(SIG_SETMASK, &set, NULL); diff -Nru strace-4.11/tests-mx32/sigreturn.test strace-4.12/tests-mx32/sigreturn.test --- strace-4.11/tests-mx32/sigreturn.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/sigreturn.test 2016-01-10 22:48:51.000000000 +0000 @@ -2,7 +2,7 @@ # # Check rt_sigprocmask and sigreturn/rt_sigreturn decoding. # -# Copyright (c) 2015 Dmitry V. Levin +# Copyright (c) 2015-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ run_prog run_strace -esignal $args -mask='\[(USR2 CHLD|CHLD USR2) RT_2 RT_3 RT_4 RT_26 RT_27\]' +mask='\[(USR2 CHLD|CHLD USR2) RT_3 RT_4 RT_5 RT_26 RT_27\]' rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0' osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)' EXPECTED="$LOG.expected" diff -Nru strace-4.11/tests-mx32/sleep.c strace-4.12/tests-mx32/sleep.c --- strace-4.11/tests-mx32/sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sleep.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * A simple nanosleep based sleep(1) replacement. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + struct timespec ts = { atoi(av[1]), 0 }; + + if (nanosleep(&ts, NULL)) + perror_msg_and_fail("nanosleep"); + + return 0; +} diff -Nru strace-4.11/tests-mx32/splice.c strace-4.12/tests-mx32/splice.c --- strace-4.11/tests-mx32/splice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/splice.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is part of splice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_splice + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_splice") + +#endif diff -Nru strace-4.11/tests-mx32/splice.test strace-4.12/tests-mx32/splice.test --- strace-4.11/tests-mx32/splice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/splice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check splice syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/stat64.c strace-4.12/tests-mx32/stat64.c --- strace-4.11/tests-mx32/stat64.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests-mx32/stat64.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,14 +1,44 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat64 -# define TEST_SYSCALL_NAME stat64 + +# define TEST_SYSCALL_NR __NR_stat64 +# define TEST_SYSCALL_STR "stat64" # define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" # define SAMPLE_SIZE ((libc_off_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat64") + +#endif diff -Nru strace-4.11/tests-mx32/stat.c strace-4.12/tests-mx32/stat.c --- strace-4.11/tests-mx32/stat.c 2015-12-05 00:03:49.000000000 +0000 +++ strace-4.12/tests-mx32/stat.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,13 +1,42 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tests.h" #include -#undef TEST_SYSCALL_NAME #ifdef __NR_stat -# define TEST_SYSCALL_NAME stat + +# define TEST_SYSCALL_NR __NR_stat +# define TEST_SYSCALL_STR "stat" # define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) -#endif +# include "lstatx.c" -#include "lstatx.c" +#else + +SKIP_MAIN_UNDEFINED("__NR_stat") + +#endif diff -Nru strace-4.11/tests-mx32/statfs64.c strace-4.12/tests-mx32/statfs64.c --- strace-4.11/tests-mx32/statfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/statfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs64 + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs64 +# define SYSCALL_NAME "statfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs64") + +#endif diff -Nru strace-4.11/tests-mx32/statfs64.test strace-4.12/tests-mx32/statfs64.test --- strace-4.11/tests-mx32/statfs64.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/statfs64.test 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check statfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff -Nru strace-4.11/tests-mx32/statfs.c strace-4.12/tests-mx32/statfs.c --- strace-4.11/tests-mx32/statfs.c 2014-09-22 00:31:06.000000000 +0000 +++ strace-4.12/tests-mx32/statfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -1,13 +1,43 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs +# define SYSCALL_NAME "statfs" +# include "xstatfs.c" -int -main(void) -{ - struct statfs stb; - assert(statfs("/proc/self/status", &stb) == 0); - return 0; -} +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs") + +#endif diff -Nru strace-4.11/tests-mx32/statfs.expected strace-4.12/tests-mx32/statfs.expected --- strace-4.11/tests-mx32/statfs.expected 2015-04-07 21:11:50.000000000 +0000 +++ strace-4.12/tests-mx32/statfs.expected 2016-04-25 10:30:03.000000000 +0000 @@ -1 +1 @@ -statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type="PROC_SUPER_MAGIC", f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=[0-9]+)?\}\) += 0 +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff -Nru strace-4.11/tests-mx32/statfs.test strace-4.12/tests-mx32/statfs.test --- strace-4.11/tests-mx32/statfs.test 2015-03-18 02:29:36.000000000 +0000 +++ strace-4.12/tests-mx32/statfs.test 2016-04-26 01:35:31.000000000 +0000 @@ -1,15 +1,11 @@ #!/bin/sh -# Check how statfs/statfs64 syscalls are traced. +# Check statfs syscall decoding. . "${srcdir=.}/init.sh" # this test probes /proc/self/status [ -f /proc/self/status ] || - framework_skip_ '/proc/self/status is not available' + framework_skip_ '/proc/self/status is not available' -run_prog -run_strace -efile $args -match_grep - -exit 0 +run_strace_match_diff -a17 diff -Nru strace-4.11/tests-mx32/statx.sh strace-4.12/tests-mx32/statx.sh --- strace-4.11/tests-mx32/statx.sh 2015-12-05 00:01:56.000000000 +0000 +++ strace-4.12/tests-mx32/statx.sh 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check decoding of stat family syscalls. . "${srcdir=.}/init.sh" - -syscall=${ME_%.test} -run_prog > /dev/null -OUT="$LOG.out" -run_strace -ve$syscall -P$syscall.sample $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -v -P $NAME.sample diff -Nru strace-4.11/tests-mx32/strace-ff.expected strace-4.12/tests-mx32/strace-ff.expected --- strace-4.11/tests-mx32/strace-ff.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-ff.expected 2016-05-09 23:21:30.000000000 +0000 @@ -0,0 +1,2 @@ +exit_group(0) = ? ++++ exited with 0 +++ diff -Nru strace-4.11/tests-mx32/strace-ff.test strace-4.12/tests-mx32/strace-ff.test --- strace-4.11/tests-mx32/strace-ff.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-ff.test 2016-05-10 09:51:04.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -ff option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +./set_ptracer_any ./sleep 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +rm -f "$LOG".* +run_strace -a14 -eexit_group -ff -p $tracee_pid + +# check that output matches +match_diff "$LOG.$tracee_pid" + +# check that no other output files have been created +set -- "$LOG".* +[ "$LOG.$tracee_pid" = "$*" ] || + fail_ "too many output files: $*" + +rm -f "$OUT" "$LOG.$tracee_pid" diff -Nru strace-4.11/tests-mx32/strace-k.test strace-4.12/tests-mx32/strace-k.test --- strace-4.11/tests-mx32/strace-k.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/strace-k.test 2016-01-01 23:09:02.000000000 +0000 @@ -3,7 +3,7 @@ # Ensure that strace -k works. # # Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,9 +30,6 @@ . "${srcdir=.}/init.sh" -$STRACE -h | grep '^[[:space:]]*-k[[:space:]]' > /dev/null || - skip_ 'strace -k is not available' - # strace -k is implemented using /proc/$pid/maps [ -f /proc/self/maps ] || framework_skip_ '/proc/self/maps is not available' diff -Nru strace-4.11/tests-mx32/strace-r.expected strace-4.12/tests-mx32/strace-r.expected --- strace-4.11/tests-mx32/strace-r.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-r.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1,2 @@ +[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 +[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ diff -Nru strace-4.11/tests-mx32/strace-r.test strace-4.12/tests-mx32/strace-r.test --- strace-4.11/tests-mx32/strace-r.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-r.test 2016-03-24 01:27:03.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -r option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -r -eexecve ./sleep 1 +match_grep diff -Nru strace-4.11/tests-mx32/strace-S.test strace-4.12/tests-mx32/strace-S.test --- strace-4.11/tests-mx32/strace-S.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-S.test 2016-05-10 00:39:17.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -S option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date > /dev/null + +test_c() +{ + local sortby sortopts sedexpr + sortby="$1"; shift + sortopts="$1"; shift + sedexpr="$1"; shift + + run_strace -c -S "$sortby" date > /dev/null + sed -ne "$sedexpr" < "$LOG" > "$OUT" + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" + LC_ALL=C sort -c $sortopts "$OUT" || + fail_ "$STRACE $args output not sorted properly" +} + +c='[[:space:]]\+\([^[:space:]]\+\)' +test_c calls '-n -r' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'[[:space:]].*/\4/p' +test_c name '' '/^[[:space:]]\+[0-9]/ s/^'"$c$c$c$c"'\([[:space:]]\+[0-9]\+\)\?'"$c"'$/\6/p' + +rm -f "$OUT" diff -Nru strace-4.11/tests-mx32/strace-T.expected strace-4.12/tests-mx32/strace-T.expected --- strace-4.11/tests-mx32/strace-T.expected 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-T.expected 2016-05-08 00:00:18.000000000 +0000 @@ -0,0 +1 @@ +nanosleep\(\{1, 0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff -Nru strace-4.11/tests-mx32/strace-t.test strace-4.12/tests-mx32/strace-t.test --- strace-4.11/tests-mx32/strace-t.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-t.test 2016-03-24 00:59:32.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -t option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -t -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-mx32/strace-T.test strace-4.12/tests-mx32/strace-T.test --- strace-4.11/tests-mx32/strace-T.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-T.test 2016-03-24 00:31:23.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -T option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -T -enanosleep ./sleep 1 +match_grep diff -Nru strace-4.11/tests-mx32/strace-tt.test strace-4.12/tests-mx32/strace-tt.test --- strace-4.11/tests-mx32/strace-tt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-tt.test 2016-03-24 01:03:31.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -tt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -tt -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-mx32/strace-ttt.test strace-4.12/tests-mx32/strace-ttt.test --- strace-4.11/tests-mx32/strace-ttt.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-ttt.test 2016-03-24 01:10:02.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -ttt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > /dev/null +run_prog ./sleep 0 + +t0="$(date +%s)" +run_strace -ttt -eexecve $args +t1="$(date +%s)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff -Nru strace-4.11/tests-mx32/strace-V.test strace-4.12/tests-mx32/strace-V.test --- strace-4.11/tests-mx32/strace-V.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/strace-V.test 2016-05-09 23:19:37.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check -V option. + +. "${srcdir=.}/init.sh" + +run_strace -V > "$LOG" + +getval() +{ + sed -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h +} + +printf "%s -- version %s\n" "$(getval PACKAGE_NAME)" "$(getval VERSION)" > "$EXP" + +match_diff "$EXP" "$LOG" +rm -f "$EXP" diff -Nru strace-4.11/tests-mx32/struct_flock.c strace-4.12/tests-mx32/struct_flock.c --- strace-4.11/tests-mx32/struct_flock.c 2015-12-05 19:35:51.000000000 +0000 +++ strace-4.12/tests-mx32/struct_flock.c 2016-05-16 21:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include @@ -35,25 +34,31 @@ #define FILE_LEN 4096 #define EINVAL_STR "-1 EINVAL (Invalid argument)" -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg - -#define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -#define nrify(arg) nrify_(arg) -#define nrify_(arg) __NR_ ## arg - #define TEST_FLOCK_EINVAL(cmd) test_flock_einval(cmd, #cmd) +#ifdef HAVE_TYPEOF +# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len) +#else +# define TYPEOF_FLOCK_OFF_T off_t +#endif + +static long +invoke_test_syscall(const unsigned int cmd, void *const p) +{ + const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd; + + return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); +} + static void test_flock_einval(const int cmd, const char *name) { struct_kernel_flock fl = { .l_type = F_RDLCK, - .l_start = (off_t) 0xdefaced1facefeed, - .l_len = (off_t) 0xdefaced2cafef00d + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); @@ -69,29 +74,34 @@ .l_type = F_RDLCK, .l_len = FILE_LEN }; - int rc = syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + long rc = invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = %s\n", TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); if (rc) return; - syscall(TEST_SYSCALL_NR, 0, F_GETLK, &fl); + invoke_test_syscall(F_GETLK, &fl); printf("%s(0, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d, l_pid=0}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); - syscall(TEST_SYSCALL_NR, 0, F_SETLK, &fl); + invoke_test_syscall(F_SETLK, &fl); printf("%s(0, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" ", l_start=0, l_len=%d}) = 0\n", TEST_SYSCALL_STR, FILE_LEN); } -static int +static void create_sample(void) { char fname[] = TEST_SYSCALL_STR "_XXXXXX"; (void) close(0); - return mkstemp(fname) || unlink(fname) || ftruncate(0, FILE_LEN) ? 77 : 0; + if (mkstemp(fname)) + perror_msg_and_fail("mkstemp: %s", fname); + if (unlink(fname)) + perror_msg_and_fail("unlink: %s", fname); + if (ftruncate(0, FILE_LEN)) + perror_msg_and_fail("ftruncate"); } diff -Nru strace-4.11/tests-mx32/swap.c strace-4.12/tests-mx32/swap.c --- strace-4.11/tests-mx32/swap.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/swap.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,51 @@ +#include "tests.h" +#include + +#if defined __NR_swapon && defined __NR_swapoff + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "swap.sample"; + long rc; + + rc = syscall(__NR_swapon, sample, 0); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, -1L); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, + "SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE" + "|SWAP_FLAG_DISCARD_PAGES|0xfff80000|32767", + rc, errno2name()); + + rc = syscall(__NR_swapoff, sample); + printf("swapoff(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_swapon && __NR_swapoff") + +#endif diff -Nru strace-4.11/tests-mx32/swap.test strace-4.12/tests-mx32/swap.test --- strace-4.11/tests-mx32/swap.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/swap.test 2016-04-06 06:18:50.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check swapon and swapoff syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=swapon,swapoff diff -Nru strace-4.11/tests-mx32/symlinkat.c strace-4.12/tests-mx32/symlinkat.c --- strace-4.11/tests-mx32/symlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/symlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,28 @@ +#include "tests.h" +#include + +#ifdef __NR_symlinkat + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffff; + static const char oldpath[] = "symlink_old"; + static const char newpath[] = "symlink_new"; + + long rc = syscall(__NR_symlinkat, oldpath, fd, newpath); + printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n", + oldpath, (int) fd, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlinkat") + +#endif diff -Nru strace-4.11/tests-mx32/symlinkat.test strace-4.12/tests-mx32/symlinkat.test --- strace-4.11/tests-mx32/symlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/symlinkat.test 2016-04-20 01:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/symlink.c strace-4.12/tests-mx32/symlink.c --- strace-4.11/tests-mx32/symlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/symlink.c 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_symlink + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "symlink_new"; + static const char sample_2[] = "symlink"; + + long rc = syscall(__NR_symlink, sample_1, sample_2); + printf("symlink(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlink") + +#endif diff -Nru strace-4.11/tests-mx32/symlink.test strace-4.12/tests-mx32/symlink.test --- strace-4.11/tests-mx32/symlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/symlink.test 2016-04-25 10:24:48.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 diff -Nru strace-4.11/tests-mx32/sync.c strace-4.12/tests-mx32/sync.c --- strace-4.11/tests-mx32/sync.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync.c 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sync + +# include +# include + +int +main(void) +{ + printf("sync() = %ld\n", syscall(__NR_sync)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sync") + +#endif diff -Nru strace-4.11/tests-mx32/sync_file_range2.c strace-4.12/tests-mx32/sync_file_range2.c --- strace-4.11/tests-mx32/sync_file_range2.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync_file_range2.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range2 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range2 + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8, %lld, %lld) = %d %s (%m)\n", + "sync_file_range2", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range2") + +#endif diff -Nru strace-4.11/tests-mx32/sync_file_range2.test strace-4.12/tests-mx32/sync_file_range2.test --- strace-4.11/tests-mx32/sync_file_range2.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync_file_range2.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/sync_file_range.c strace-4.12/tests-mx32/sync_file_range.c --- strace-4.11/tests-mx32/sync_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync_file_range.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, %lld, %lld, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8) = %d %s (%m)\n", + "sync_file_range", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range") + +#endif diff -Nru strace-4.11/tests-mx32/sync_file_range.test strace-4.12/tests-mx32/sync_file_range.test --- strace-4.11/tests-mx32/sync_file_range.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync_file_range.test 2016-04-06 00:02:08.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/sync.test strace-4.12/tests-mx32/sync.test --- strace-4.11/tests-mx32/sync.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/sync.test 2016-04-26 10:29:58.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a7 diff -Nru strace-4.11/tests-mx32/sysinfo.c strace-4.12/tests-mx32/sysinfo.c --- strace-4.11/tests-mx32/sysinfo.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/sysinfo.c 2016-02-08 18:17:28.000000000 +0000 @@ -1,5 +1,8 @@ /* + * This file is part of sysinfo strace test. + * * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +28,20 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include int -main (void) +main(void) { - struct sysinfo si; - if (sysinfo(&si) == -1) - return 77; + sysinfo(NULL); + printf("sysinfo(NULL) = -1 EFAULT (%m)\n"); + + struct sysinfo * const si = tail_alloc(sizeof(*si)); + + if (sysinfo(si)) + perror_msg_and_skip("sysinfo"); printf("sysinfo({uptime=%llu" ", loads=[%llu, %llu, %llu]" ", totalram=%llu" @@ -46,22 +54,23 @@ ", totalhigh=%llu" ", freehigh=%llu" ", mem_unit=%u" - "}) = 0\n", - (unsigned long long) si.uptime - , (unsigned long long) si.loads[0] - , (unsigned long long) si.loads[1] - , (unsigned long long) si.loads[2] - , (unsigned long long) si.totalram - , (unsigned long long) si.freeram - , (unsigned long long) si.sharedram - , (unsigned long long) si.bufferram - , (unsigned long long) si.totalswap - , (unsigned long long) si.freeswap - , (unsigned) si.procs - , (unsigned long long) si.totalhigh - , (unsigned long long) si.freehigh - , si.mem_unit + "}) = 0\n" + , (unsigned long long) si->uptime + , (unsigned long long) si->loads[0] + , (unsigned long long) si->loads[1] + , (unsigned long long) si->loads[2] + , (unsigned long long) si->totalram + , (unsigned long long) si->freeram + , (unsigned long long) si->sharedram + , (unsigned long long) si->bufferram + , (unsigned long long) si->totalswap + , (unsigned long long) si->freeswap + , (unsigned) si->procs + , (unsigned long long) si->totalhigh + , (unsigned long long) si->freehigh + , si->mem_unit ); + puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-mx32/sysinfo.test strace-4.12/tests-mx32/sysinfo.test --- strace-4.11/tests-mx32/sysinfo.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/sysinfo.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of sysinfo syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -esysinfo $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a14 diff -Nru strace-4.11/tests-mx32/syslog.c strace-4.12/tests-mx32/syslog.c --- strace-4.11/tests-mx32/syslog.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/syslog.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_syslog + +# include +# include + +# define SYSLOG_ACTION_READ 2 + +int +main(void) +{ + const long addr = (long) 0xfacefeeddeadbeef; + int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); + printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", + addr, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_syslog") + +#endif diff -Nru strace-4.11/tests-mx32/syslog.test strace-4.12/tests-mx32/syslog.test --- strace-4.11/tests-mx32/syslog.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/syslog.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check syslog syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff -Nru strace-4.11/tests-mx32/tail_alloc.c strace-4.12/tests-mx32/tail_alloc.c --- strace-4.11/tests-mx32/tail_alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/tail_alloc.c 2016-05-22 22:21:48.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +void * +tail_alloc(const size_t size) +{ + const size_t page_size = get_page_size(); + const size_t len = (size + page_size - 1) & -page_size; + const size_t alloc_size = len + 6 * page_size; + + void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap(%zu)", alloc_size); + + void *start_work = p + 3 * page_size; + void *tail_guard = start_work + len; + + if (munmap(p, page_size) || + munmap(p + 2 * page_size, page_size) || + munmap(tail_guard, page_size) || + munmap(tail_guard + 2 * page_size, page_size)) + perror_msg_and_fail("munmap"); + + memset(start_work, 0xff, len); + return tail_guard - size; +} + +void * +tail_memdup(const void *p, const size_t size) +{ + void *dest = tail_alloc(size); + memcpy(dest, p, size); + return dest; +} diff -Nru strace-4.11/tests-mx32/tee.c strace-4.12/tests-mx32/tee.c --- strace-4.11/tests-mx32/tee.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/tee.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is part of tee strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_tee + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_tee, fd_in, fd_out, len, flags); + printf("tee(%d, %d, %zu, %s) = %ld %s (%m)\n", + (int) fd_in, (int) fd_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_tee") + +#endif diff -Nru strace-4.11/tests-mx32/tee.test strace-4.12/tests-mx32/tee.test --- strace-4.11/tests-mx32/tee.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/tee.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check tee syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/tests.h strace-4.12/tests-mx32/tests.h --- strace-4.11/tests-mx32/tests.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/tests.h 2016-05-22 22:54:23.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TESTS_H_ +# define TESTS_H_ + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# include +# include "gcc_compat.h" + +/* Cached sysconf(_SC_PAGESIZE). */ +size_t get_page_size(void); + +/* Print message and strerror(errno) to stderr, then exit(1). */ +void perror_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(1). */ +void error_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(77). */ +void error_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message and strerror(errno) to stderr, then exit(77). */ +void perror_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; + +/* + * Allocate memory that ends on the page boundary. + * Pages allocated by this call are preceeded by an unmapped page + * and followed also by an unmapped page. + */ +void *tail_alloc(const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); +/* Allocate memory using tail_alloc, then memcpy. */ +void *tail_memdup(const void *, const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); + +/* Close stdin, move stdout to a non-standard descriptor, and print. */ +void tprintf(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)); + +/* Make a hexdump copy of C string */ +const char *hexdump_strdup(const char *); + +/* Make a hexdump copy of memory */ +const char *hexdump_memdup(const char *, size_t); + +/* Make a hexquoted copy of a string */ +const char *hexquote_strndup(const char *, size_t); + +/* Return inode number of socket descriptor. */ +unsigned long inode_of_sockfd(int); + +/* Print string in a quoted form. */ +void print_quoted_string(const char *); + +/* Print memory in a quoted form. */ +void print_quoted_memory(const char *, size_t); + +/* Check whether given uid matches kernel overflowuid. */ +void check_overflowuid(const int); + +/* Check whether given gid matches kernel overflowgid. */ +void check_overflowgid(const int); + +/* Translate errno to its name. */ +const char *errno2name(void); + +struct xlat; + +/* Print flags in symbolic form according to xlat table. */ +int printflags(const struct xlat *, const unsigned long long, const char *); + +/* Print constant in symbolic form according to xlat table. */ +int printxval(const struct xlat *, const unsigned long long, const char *); + +# define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) +# define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) + +# define SKIP_MAIN_UNDEFINED(arg) \ + int main(void) { error_msg_and_skip("undefined: %s", arg); } + +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +# if SIZEOF_LONG == 4 +# define PRI__64 "ll" +# elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +# else +# define PRI__64 "ll" +# endif + +# define PRI__d64 PRI__64"d" +# define PRI__u64 PRI__64"u" +# define PRI__x64 PRI__64"x" + +#endif diff -Nru strace-4.11/tests-mx32/time.c strace-4.12/tests-mx32/time.c --- strace-4.11/tests-mx32/time.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/time.c 2016-02-08 18:27:17.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of time strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +27,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_time +# include +# include +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; + time_t *p = tail_alloc(sizeof(time_t)); - time_t *p_t = p + page_len - sizeof(time_t); - time_t t = syscall(__NR_time, p_t); + time_t t = syscall(__NR_time, NULL); + if ((time_t) -1 == t) + perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); - if ((time_t) -1 == t || t != *p_t) - return 77; - - printf("time([%jd]) = %jd\n", (intmax_t) t, (intmax_t) t); + t = syscall(__NR_time, p); + printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); puts("+++ exited with 0 +++"); return 0; @@ -62,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_time") #endif diff -Nru strace-4.11/tests-mx32/timer_create.c strace-4.12/tests-mx32/timer_create.c --- strace-4.11/tests-mx32/timer_create.c 2015-09-17 13:22:57.000000000 +0000 +++ strace-4.12/tests-mx32/timer_create.c 2016-05-18 09:26:01.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_create strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,34 +27,45 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include +#include "tests.h" #include #ifdef __NR_timer_create +# include +# include +# include +# include +# include "sigevent.h" + int main(void) { + syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + int tid[4] = {}; - struct sigevent sev = { - .sigev_notify = SIGEV_NONE, + struct_sigevent sev = { + .sigev_notify = 0xdefaced, .sigev_signo = 0xfacefeed, - .sigev_value.sival_ptr = - (void *) (unsigned long) 0xdeadbeefbadc0ded + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded }; + syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}" + ", NULL) = -1 %s (%m)\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, sev.sigev_notify, + errno2name()); + + sev.sigev_notify = SIGEV_NONE; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" - ", sigev_signo=%u, sigev_notify=SIGEV_NONE}" - ", [%d]) = 0\n", + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, sev.sigev_signo, tid[0]); @@ -60,55 +73,43 @@ sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGALRM; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, tid[1]); sev.sigev_notify = SIGEV_THREAD; - sev.sigev_notify_function = - (void *) (unsigned long) 0xdeadbeefbadc0ded; - sev.sigev_notify_attributes = - (void *) (unsigned long) 0xcafef00dfacefeed; + sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded; + sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) - return 77; - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" - ", sigev_notify_function=%p, sigev_notify_attributes=%p}" + ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_function, - sev.sigev_notify_attributes, + sev.sigev_un.sigev_thread.function, + sev.sigev_un.sigev_thread.attribute, tid[2]); -#ifndef sigev_notify_thread_id -# if defined HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD -# define sigev_notify_thread_id _sigev_un._pad[0] -# elif defined HAVE_STRUCT_SIGEVENT___PAD -# define sigev_notify_thread_id __pad[0] -# endif -#endif /* !sigev_notify_thread_id */ - -#ifdef sigev_notify_thread_id -# ifndef SIGEV_THREAD_ID -# define SIGEV_THREAD_ID 4 -# endif +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif sev.sigev_notify = SIGEV_THREAD_ID; - sev.sigev_notify_thread_id = getpid(); + sev.sigev_un.tid = getpid(); if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) - return 77; - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%p}" + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID" ", sigev_notify_thread_id=%d}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, - sev.sigev_notify_thread_id, + sev.sigev_un.tid, tid[3]); -#endif /* sigev_notify_thread_id */ puts("+++ exited with 0 +++"); return 0; @@ -116,10 +117,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create") #endif diff -Nru strace-4.11/tests-mx32/timer_create.test strace-4.12/tests-mx32/timer_create.test --- strace-4.11/tests-mx32/timer_create.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/timer_create.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check timer_create syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -e timer_create $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/timerfd_xettime.c strace-4.12/tests-mx32/timerfd_xettime.c --- strace-4.11/tests-mx32/timerfd_xettime.c 2015-09-17 23:23:41.000000000 +0000 +++ strace-4.12/tests-mx32/timerfd_xettime.c 2016-01-06 09:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include -#include #include #if defined __NR_timerfd_create \ @@ -41,12 +34,17 @@ && defined __NR_timerfd_settime \ && defined O_CLOEXEC +# include +# include +# include +# include + int main(void) { (void) close(0); if (syscall(__NR_timerfd_create, CLOCK_MONOTONIC, O_CLOEXEC | O_NONBLOCK)) - return 77; + perror_msg_and_skip("timerfd_create"); puts("timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 0"); struct { @@ -63,7 +61,7 @@ }; if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timerfd_settime"); printf("timerfd_settime(0, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -78,7 +76,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timerfd_gettime, 0, &old.its)) - return 77; + perror_msg_and_skip("timerfd_gettime"); printf("timerfd_gettime(0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -93,10 +91,7 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timerfd_create && __NR_timerfd_gettime" + " && __NR_timerfd_settime && O_CLOEXEC") #endif diff -Nru strace-4.11/tests-mx32/timerfd_xettime.test strace-4.12/tests-mx32/timerfd_xettime.test --- strace-4.11/tests-mx32/timerfd_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/timerfd_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timerfd_create,timerfd_settime,timerfd_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime diff -Nru strace-4.11/tests-mx32/timer_xettime.c strace-4.12/tests-mx32/timer_xettime.c --- strace-4.11/tests-mx32/timer_xettime.c 2015-09-17 23:22:43.000000000 +0000 +++ strace-4.12/tests-mx32/timer_xettime.c 2016-02-08 18:28:36.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of timer_xettime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +27,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include +#include "tests.h" #include #if defined __NR_timer_create \ && defined __NR_timer_gettime \ && defined __NR_timer_settime +# include +# include +# include +# include +# include + int main(void) { + syscall(__NR_timer_settime, 0xdefaced, TIMER_ABSTIME, NULL, NULL); + printf("timer_settime(%d, TIMER_ABSTIME, NULL, NULL)" + " = -1 EINVAL (%m)\n", 0xdefaced); + int tid; struct sigevent sev = { .sigev_notify = SIGEV_NONE }; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid)) - return 77; + perror_msg_and_skip("timer_create"); printf("timer_create(CLOCK_MONOTONIC, {sigev_signo=0" ", sigev_notify=SIGEV_NONE}, [%d]) = 0\n", tid); @@ -65,7 +69,7 @@ }; if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) - return 77; + perror_msg_and_skip("timer_settime"); printf("timer_settime(%d, 0" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -81,7 +85,7 @@ (intmax_t) old.its.it_value.tv_nsec); if (syscall(__NR_timer_gettime, tid, &old.its)) - return 77; + perror_msg_and_skip("timer_gettime"); printf("timer_gettime(%d" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", @@ -97,10 +101,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_timer_create && __NR_timer_gettime && __NR_timer_settime") #endif diff -Nru strace-4.11/tests-mx32/timer_xettime.test strace-4.12/tests-mx32/timer_xettime.test --- strace-4.11/tests-mx32/timer_xettime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/timer_xettime.test 2016-03-30 00:16:24.000000000 +0000 @@ -1,14 +1,6 @@ #!/bin/sh -# Check timer_settime and timer_gettime syscalls decoding. +# Check timer_create, timer_settime, and timer_gettime syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=timer_create,timer_settime,timer_gettime -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime diff -Nru strace-4.11/tests-mx32/times.c strace-4.12/tests-mx32/times.c --- strace-4.11/tests-mx32/times.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/times.c 2016-01-12 05:06:10.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 Eugene Syromyatnikov - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,10 +32,7 @@ * get some non-zero values returned by times(2). */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -55,13 +52,12 @@ main (void) { struct timespec ts; - volatile int dummy; + volatile int dummy = 0; int i; pid_t pid = fork(); - if (pid < 0) - return 77; + perror_msg_and_fail("fork"); const long cputime_limit = pid ? PARENT_CPUTIME_LIMIT_NSEC : CHILD_CPUTIME_LIMIT_NSEC; @@ -108,7 +104,7 @@ long res = syscall(__NR_times, &tbuf); if (-1L == res) - return 77; + perror_msg_and_skip("times"); else llres = (unsigned long) res; #elif defined __NR_times && defined __x86_64__ && defined __ILP32__ @@ -123,7 +119,7 @@ clock_t res = times(&tbuf); if ((clock_t) -1 == res) - return 77; + perror_msg_and_skip("times"); if (sizeof(res) < sizeof(unsigned long long)) llres = (unsigned long) res; else diff -Nru strace-4.11/tests-mx32/times-fail.c strace-4.12/tests-mx32/times-fail.c --- strace-4.11/tests-mx32/times-fail.c 2015-08-28 08:46:24.000000000 +0000 +++ strace-4.12/tests-mx32/times-fail.c 2016-01-04 23:43:09.000000000 +0000 @@ -1,7 +1,5 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" +#include #include #include #include @@ -9,9 +7,8 @@ int main (void) { - if (syscall(__NR_times, 0x42) != -1) - return 77; - puts("times(0x42) = -1 EFAULT (Bad address)"); + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests-mx32/times-fail.test strace-4.12/tests-mx32/times-fail.test --- strace-4.11/tests-mx32/times-fail.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/times-fail.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of failing times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a12 -etimes $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a12 -e trace=times diff -Nru strace-4.11/tests-mx32/times.test strace-4.12/tests-mx32/times.test --- strace-4.11/tests-mx32/times.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/times.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check decoding of times syscall . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etimes -esignal=none $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -esignal=none diff -Nru strace-4.11/tests-mx32/time.test strace-4.12/tests-mx32/time.test --- strace-4.11/tests-mx32/time.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/time.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check time syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a10 -etime $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/tprintf.c strace-4.12/tests-mx32/tprintf.c --- strace-4.11/tests-mx32/tprintf.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/tprintf.c 2016-01-20 15:17:28.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * Close stdin, move stdout to a non-standard descriptor, and print. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static ssize_t +write_retry(int fd, const void *buf, size_t count) +{ + ssize_t rc; + + do { + errno = 0; + rc = write(fd, buf, count); + } while (rc == -1 && EINTR == errno); + + if (rc <= 0) + perror_msg_and_fail("write"); + + return rc; +} + +static void +write_loop(int fd, const char *buf, size_t count) +{ + ssize_t offset = 0; + + while (count > 0) { + ssize_t block = write_retry(fd, &buf[offset], count); + + offset += block; + count -= (size_t) block; + } +} + +void +tprintf(const char *fmt, ...) +{ + static int initialized; + if (!initialized) { + assert(dup2(1, 3) == 3); + assert(close(1) == 0); + (void) close(0); + initialized = 1; + } + + va_list p; + va_start(p, fmt); + + static char buf[65536]; + int len = vsnprintf(buf, sizeof(buf), fmt, p); + if (len < 0) + perror_msg_and_fail("vsnprintf"); + assert((unsigned) len < sizeof(buf)); + + write_loop(3, buf, len); + + va_end(p); +} diff -Nru strace-4.11/tests-mx32/truncate64.c strace-4.12/tests-mx32/truncate64.c --- strace-4.11/tests-mx32/truncate64.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/truncate64.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,17 +25,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate64 -#include -#include -#include +# include +# include int main(void) @@ -43,13 +39,10 @@ static const char fname[] = "truncate64\nfilename"; static const char qname[] = "truncate64\\nfilename"; const off_t len = 0xdefaceddeadbeef; - int rc = truncate(fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate64(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + int rc = truncate(fname, len); + printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -57,10 +50,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate64") #endif diff -Nru strace-4.11/tests-mx32/truncate64.test strace-4.12/tests-mx32/truncate64.test --- strace-4.11/tests-mx32/truncate64.test 2015-12-01 08:28:45.000000000 +0000 +++ strace-4.12/tests-mx32/truncate64.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate64 syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate64 $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/truncate.c strace-4.12/tests-mx32/truncate.c --- strace-4.11/tests-mx32/truncate.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/truncate.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,19 +25,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #ifdef __NR_truncate -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include "kernel_types.h" int main(void) @@ -45,18 +40,15 @@ static const char fname[] = "truncate\nfilename"; static const char qname[] = "truncate\\nfilename"; const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; - int rc; + long rc; if (sizeof(len) > sizeof(long)) rc = truncate(fname, len); else rc = syscall(__NR_truncate, fname, len); - if (rc != -1 || ENOENT != errno) - return 77; - - printf("truncate(\"%s\", %llu) = -1 ENOENT (No such file or directory)\n", - qname, (unsigned long long) len); + printf("truncate(\"%s\", %llu) = %ld %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; @@ -64,10 +56,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_truncate") #endif diff -Nru strace-4.11/tests-mx32/truncate.test strace-4.12/tests-mx32/truncate.test --- strace-4.11/tests-mx32/truncate.test 2015-12-01 08:28:42.000000000 +0000 +++ strace-4.12/tests-mx32/truncate.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check truncate syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -etruncate $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff diff -Nru strace-4.11/tests-mx32/uid16.c strace-4.12/tests-mx32/uid16.c --- strace-4.11/tests-mx32/uid16.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/uid16.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) \ - \ - && defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) \ - \ - && __NR_getuid != __NR_getuid32 \ - && __NR_setuid != __NR_setuid32 \ - && __NR_getresuid != __NR_getresuid32 \ - && __NR_setreuid != __NR_setreuid32 \ - && __NR_setresuid != __NR_setresuid32 \ - && __NR_fchown != __NR_fchown32 \ - && __NR_getgroups != __NR_getgroups32 \ - /**/ - int uid; - int size; - int *list = 0; - - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, 0xffff) == 0); - assert(syscall(__NR_setresuid, uid, -1, 0xffff) == 0); - assert(syscall(__NR_fchown, 1, -1, 0xffff) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-mx32/uid16.test strace-4.12/tests-mx32/uid16.test --- strace-4.11/tests-mx32/uid16.test 2014-12-16 01:07:12.000000000 +0000 +++ strace-4.12/tests-mx32/uid16.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid16_t decoding. - -uid_t_size=16 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests-mx32/uid32.c strace-4.12/tests-mx32/uid32.c --- strace-4.11/tests-mx32/uid32.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/uid32.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include - -int -main(void) -{ -#if defined(__NR_getuid32) \ - && defined(__NR_setuid32) \ - && defined(__NR_getresuid32) \ - && defined(__NR_setreuid32) \ - && defined(__NR_setresuid32) \ - && defined(__NR_fchown32) \ - && defined(__NR_getgroups32) - int r, e, s; - int size; - int *list = 0; - - r = syscall(__NR_getuid32); - assert(syscall(__NR_setuid32, r) == 0); - assert(syscall(__NR_getresuid32, &r, &e, &s) == 0); - assert(syscall(__NR_setreuid32, -1, -1L) == 0); - assert(syscall(__NR_setresuid32, r, -1, -1L) == 0); - assert(syscall(__NR_fchown32, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups32, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups32, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-mx32/uid32.test strace-4.12/tests-mx32/uid32.test --- strace-4.11/tests-mx32/uid32.test 2014-12-14 03:54:04.000000000 +0000 +++ strace-4.12/tests-mx32/uid32.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh - -# Check uid32 decoding. - -uid_syscall_suffix=32 - -. "${srcdir=.}/uid.test" diff -Nru strace-4.11/tests-mx32/uid.awk strace-4.12/tests-mx32/uid.awk --- strace-4.11/tests-mx32/uid.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/uid.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - r_uint = "(0|[1-9][0-9]*)" - regexp = "^getx?uid" suffix "\\(\\)[[:space:]]+= " r_uint "$" - expected = "getuid" - fail = 0 -} - -regexp == "" { - fail = 1 - next -} - -{ - if (match($0, regexp, a)) { - if (expected == "getuid") { - uid = a[1] - expected = "setuid" - regexp = "^setuid" suffix "\\(" uid "\\)[[:space:]]+= 0$" - } else if (expected == "setuid") { - expected = "getresuid" - regexp = "^getresuid" suffix "\\(\\[" uid "\\], \\[" uid "\\], \\[" uid "\\]\\)[[:space:]]+= 0$" - } else if (expected == "getresuid") { - expected = "setreuid" - regexp = "^setreuid" suffix "\\(-1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setreuid") { - expected = "setresuid" - regexp = "^setresuid" suffix "\\(" uid ", -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "setresuid") { - expected = "fchown" - regexp = "^fchown" suffix "\\(1, -1, -1\\)[[:space:]]+= 0$" - } else if (expected == "fchown") { - expected = "1st getgroups" - regexp = "^getgroups" suffix "\\(0, NULL\\)[[:space:]]+= " r_uint "$" - } else if (expected == "1st getgroups") { - ngroups = a[1] - if (ngroups == "0") - list="" - else if (ngroups == "1") - list=r_uint - else - list=r_uint "(, " r_uint "){" (ngroups - 1) "}" - expected = "2nd getgroups" - regexp = "^getgroups" suffix "\\(" ngroups ", \\[" list "\\]\\)[[:space:]]+= " ngroups "$" - } else if (expected == "2nd getgroups") { - expected = "the last line" - regexp = "^\\+\\+\\+ exited with 0 \\+\\+\\+$" - } else if (expected == "the last line") { - expected = "nothing" - regexp = "" - } - } -} - -END { - if (fail) { - print "Unexpected output after exit" - exit 1 - } - if (regexp == "") - exit 0 - print "error: " expected " doesn't match" - exit 1 -} diff -Nru strace-4.11/tests-mx32/uid.c strace-4.12/tests-mx32/uid.c --- strace-4.11/tests-mx32/uid.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/uid.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2014-2015 Dmitry V. Levin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include -#include - -int -main(void) -{ -#if (defined __NR_getuid || defined __NR_getxuid) \ - && defined(__NR_setuid) \ - && defined(__NR_getresuid) \ - && defined(__NR_setreuid) \ - && defined(__NR_setresuid) \ - && defined(__NR_fchown) \ - && defined(__NR_getgroups) - int uid; - int size; - int *list = 0; - -#ifndef __NR_getuid -# define __NR_getuid __NR_getxuid -#endif - uid = syscall(__NR_getuid); - - (void) close(0); - if (open("/proc/sys/kernel/overflowuid", O_RDONLY) == 0) { - /* we trust the kernel */ - char buf[sizeof(int)*3]; - int n = read(0, buf, sizeof(buf) - 1); - if (n) { - buf[n] = '\0'; - n = atoi(buf); - if (uid == n) - return 77; - } - (void) close(0); - } - - assert(syscall(__NR_setuid, uid) == 0); - { - /* - * uids returned by getresuid should be ignored - * to avoid 16bit vs 32bit issues. - */ - int r, e, s; - assert(syscall(__NR_getresuid, &r, &e, &s) == 0); - } - assert(syscall(__NR_setreuid, -1, -1L) == 0); - assert(syscall(__NR_setresuid, uid, -1, -1L) == 0); - assert(syscall(__NR_fchown, 1, -1, -1L) == 0); - assert((size = syscall(__NR_getgroups, 0, list)) >= 0); - assert(list = calloc(size + 1, sizeof(*list))); - assert(syscall(__NR_getgroups, size, list) == size); - return 0; -#else - return 77; -#endif -} diff -Nru strace-4.11/tests-mx32/uid.test strace-4.12/tests-mx32/uid.test --- strace-4.11/tests-mx32/uid.test 2015-07-16 22:13:56.000000000 +0000 +++ strace-4.12/tests-mx32/uid.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#!/bin/sh - -# Check uid decoding. - -. "${srcdir=.}/init.sh" - -s="${uid_syscall_suffix-}" -w="${uid_t_size-}" - -run_prog ./uid$s$w - -syscalls= -for n in "getuid$s" "getxuid$s"; do - if $STRACE -e "$n" -h > /dev/null; then - syscalls="$n" - break - fi -done -test -n "$syscalls" || - fail_ "neither getuid$s nor getxuid$s is supported on this architecture" - -syscalls="$syscalls,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s" -run_strace -e trace="$syscalls" $args - -AWK=gawk -match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s" - -exit 0 diff -Nru strace-4.11/tests-mx32/uio.c strace-4.12/tests-mx32/uio.c --- strace-4.11/tests-mx32/uio.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/uio.c 2016-01-06 11:31:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,18 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include -#include -#include +#include "tests.h" + +#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) + +# include +# include +# include +# include int main(void) { -#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) const off_t offset = 0xdefaceddeadbeefLL; char buf[4]; struct iovec iov = { buf, sizeof buf }; @@ -53,7 +53,10 @@ assert(!close(0)); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + #endif -} diff -Nru strace-4.11/tests-mx32/umask.c strace-4.12/tests-mx32/umask.c --- strace-4.11/tests-mx32/umask.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/umask.c 2016-03-01 08:55:37.000000000 +0000 @@ -0,0 +1,12 @@ +#include +#include + +int +main(void) +{ + mode_t rc = umask(044); + printf("umask(%#o) = %#o\n", 044, rc); + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/umask.test strace-4.12/tests-mx32/umask.test --- strace-4.11/tests-mx32/umask.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/umask.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check umask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff -Nru strace-4.11/tests-mx32/umount2.c strace-4.12/tests-mx32/umount2.c --- strace-4.11/tests-mx32/umount2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/umount2.c 2016-01-06 00:05:41.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -42,14 +43,13 @@ main(void) { static const char sample[] = "umount2.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); (void) syscall(__NR_umount2, sample, 31); printf("%s(\"%s\", MNT_FORCE|MNT_DETACH|MNT_EXPIRE|UMOUNT_NOFOLLOW|0x10)" " = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, sample); - (void) rmdir(sample); + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); puts("+++ exited with 0 +++"); return 0; } diff -Nru strace-4.11/tests-mx32/umount2.test strace-4.12/tests-mx32/umount2.test --- strace-4.11/tests-mx32/umount2.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests-mx32/umount2.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha|ia64) syscall=umount ;; *) syscall=umount2 ;; esac -OUT="$LOG.out" -run_strace -s7 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -s7 -e trace=$syscall diff -Nru strace-4.11/tests-mx32/umount.c strace-4.12/tests-mx32/umount.c --- strace-4.11/tests-mx32/umount.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/umount.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +25,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "tests.h" #include -#include #include #include #include +#include #ifdef __NR_oldumount # define TEST_SYSCALL_STR "oldumount" @@ -41,31 +41,28 @@ # endif #endif +#ifdef __NR_oldumount + int main(void) { -#ifdef __NR_oldumount static const char sample[] = "umount.sample"; - if (mkdir(sample, 0700)) { - perror(sample); - return 77; - } - (void) syscall(__NR_oldumount, sample); - printf("%s(\"%s\") = -1 ", TEST_SYSCALL_STR, sample); - switch (errno) { - case ENOSYS: - printf("ENOSYS (%m)\n"); - break; - case EPERM: - printf("EPERM (%m)\n"); - break; - default: - printf("EINVAL (%m)\n"); - } - (void) rmdir(sample); + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + + long rc = syscall(__NR_oldumount, sample); + printf("%s(\"%s\") = %ld %s (%m)\n", + TEST_SYSCALL_STR, sample, rc, errno2name()); + + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_oldumount") + #endif -} diff -Nru strace-4.11/tests-mx32/umount.test strace-4.12/tests-mx32/umount.test --- strace-4.11/tests-mx32/umount.test 2015-12-07 01:23:39.000000000 +0000 +++ strace-4.12/tests-mx32/umount.test 2016-03-30 00:16:24.000000000 +0000 @@ -4,14 +4,8 @@ . "${srcdir=.}/init.sh" -run_prog > /dev/null case "$STRACE_ARCH" in alpha) syscall=oldumount ;; *) syscall=umount ;; esac -OUT="$LOG.out" -run_strace -a24 -s6 -e$syscall $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -s6 -e trace=$syscall diff -Nru strace-4.11/tests-mx32/umovestr2.c strace-4.12/tests-mx32/umovestr2.c --- strace-4.11/tests-mx32/umovestr2.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/umovestr2.c 2016-01-05 23:24:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,33 +25,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); - const size_t work_len = page_len * 2; - const size_t tail_len = work_len - 1; - - void *p = mmap(NULL, page_len * 3, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + work_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, work_len); - char *addr = p + work_len - tail_len; - memset(addr, '0', tail_len - 1); + const size_t page_len = get_page_size(); + const size_t tail_len = page_len * 2 - 1; + const size_t str_len = tail_len - 1; + + char *addr = tail_alloc(tail_len); + memset(addr, '0', str_len); + addr[str_len] = '\0'; char *argv[] = { NULL }; char *envp[] = { addr, NULL }; execve("", argv, envp); - printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (No such file or directory)\n", - (int) tail_len - 1, 0); + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (%m)\n", + (int) str_len, 0); puts("+++ exited with 0 +++"); return 0; diff -Nru strace-4.11/tests-mx32/umovestr2.test strace-4.12/tests-mx32/umovestr2.test --- strace-4.11/tests-mx32/umovestr2.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/umovestr2.test 2016-03-30 00:13:37.000000000 +0000 @@ -4,9 +4,6 @@ . "${srcdir=.}/init.sh" -OUT="$LOG.out" -EXP="$LOG.exp" - run_prog > /dev/null run_strace -veexecve -s262144 $args > "$EXP" check_prog sed diff -Nru strace-4.11/tests-mx32/umovestr3.c strace-4.12/tests-mx32/umovestr3.c --- strace-4.11/tests-mx32/umovestr3.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/umovestr3.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const unsigned int size = PATH_MAX - 1; + const char *p = tail_alloc(size); + const char *const efault = p + size; + + for (; p <= efault; ++p) { + int rc = chdir(p); + printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/umovestr3.test strace-4.12/tests-mx32/umovestr3.test --- strace-4.11/tests-mx32/umovestr3.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/umovestr3.test 2016-04-27 01:32:21.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# yet another umovestr short read test + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 -e trace=chdir diff -Nru strace-4.11/tests-mx32/umovestr.c strace-4.12/tests-mx32/umovestr.c --- strace-4.11/tests-mx32/umovestr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/umovestr.c 2016-01-05 23:24:36.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include -#include int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const size_t tail_len = 257; - - if (tail_len >= page_len) - return 77; - - void *p = mmap(NULL, page_len * 2, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || mprotect(p + page_len, page_len, PROT_NONE)) - return 77; - - memset(p, 0, page_len); - char *addr = p + page_len - tail_len; + char *addr = tail_alloc(tail_len); memset(addr, '/', tail_len - 1); + addr[tail_len - 1] = '\0'; if (chdir(addr)) - return 77; - + perror_msg_and_skip("chdir"); return 0; } diff -Nru strace-4.11/tests-mx32/uname.c strace-4.12/tests-mx32/uname.c --- strace-4.11/tests-mx32/uname.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/uname.c 2016-03-28 23:25:30.000000000 +0000 @@ -0,0 +1,44 @@ +#include "tests.h" +#include + +#ifdef __NR_uname + +# include +# include +# include + +int main(int ac, char **av) +{ + int abbrev = ac > 1; + struct utsname *const uname = tail_alloc(sizeof(struct utsname)); + int rc = syscall(__NR_uname, uname); + printf("uname({sysname=\""); + print_quoted_string(uname->sysname); + printf("\", nodename=\""); + print_quoted_string(uname->nodename); + if (abbrev) { + printf("\", ..."); + } else { + printf("\", release=\""); + print_quoted_string(uname->release); + printf("\", version=\""); + print_quoted_string(uname->version); + printf("\", machine=\""); + print_quoted_string(uname->machine); +# ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + printf("\", domainname=\""); + print_quoted_string(uname->domainname); +# endif + printf("\""); + } + printf("}) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_uname") + +#endif diff -Nru strace-4.11/tests-mx32/uname.test strace-4.12/tests-mx32/uname.test --- strace-4.11/tests-mx32/uname.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/uname.test 2016-03-30 00:13:56.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check uname syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq + +run_prog > /dev/null +run_strace -v -euname $args > "$EXP" +uniq < "$LOG" > "$OUT" + +run_prog "./$NAME" abbrev > /dev/null +run_strace -euname $args >> "$EXP" +uniq < "$LOG" >> "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff -Nru strace-4.11/tests-mx32/unix-pair-send-recv.c strace-4.12/tests-mx32/unix-pair-send-recv.c --- strace-4.11/tests-mx32/unix-pair-send-recv.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/unix-pair-send-recv.c 2016-01-05 23:02:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -54,12 +55,12 @@ (void) close(1); int sv[2]; - assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); - assert(sv[0] == 0); - assert(sv[1] == 1); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); pid_t pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); if (pid) { assert(close(1) == 0); diff -Nru strace-4.11/tests-mx32/unix-yy-accept.awk strace-4.12/tests-mx32/unix-yy-accept.awk --- strace-4.11/tests-mx32/unix-yy-accept.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/unix-yy-accept.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 8 - fail = 0 - - addrlen = length(addr) + 3 - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode_listen = a[2] - r_bind = "^bind\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - r_listen = "^listen\\(0, 5\\) += 0$" - r_getsockname = "^getsockname\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, \\[" addrlen "\\]\\) += 0$" - r_accept = "^accept\\(0, \\{sa_family=AF_(LOCAL|UNIX|FILE), NULL\\}, \\[2\\]\\) += 1(" r_i "),\"" addr "\"\\]>" - next - } -} - -NR == 2 {if (r_bind != "" && match($0, r_bind)) next} - -NR == 3 {if (r_listen != "" && match($0, r_listen)) next} - -NR == 4 {if (r_getsockname != "" && match($0, r_getsockname)) next} - -NR == 5 { - if (r_accept != "" && match($0, r_accept, a)) { - inode_accepted = a[2] - inode_peer = a[3] - r_close_listen = "^close\\(0\\) += 0$" - r_close_accepted = "^close\\(1\\) += 0$" - next - } -} - -NR == 6 {if (r_close_listen != "" && match($0, r_close_listen)) next} -NR == 7 {if (r_close_accepted != "" && match($0, r_close_accepted)) next} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-mx32/unix-yy-connect.awk strace-4.12/tests-mx32/unix-yy-connect.awk --- strace-4.11/tests-mx32/unix-yy-connect.awk 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/unix-yy-connect.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -#!/bin/gawk -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BEGIN { - lines = 6 - fail = 0 - addrlen = length(addr) + 3 - - r_i = "[1-9][0-9]*" - r_socket = "^socket\\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\\) += 1$" - r_close_listen = "^close\\(0\\) += 0$" -} - -NR == 1 { - if (match($0, r_socket, a)) { - inode = a[2] - r_connect = "^connect\\(1, \\{sa_family=AF_(LOCAL|UNIX|FILE), sun_path=\"" addr "\"\\}, " addrlen "\\) += 0$" - next - } -} - -NR == 2 {if (match($0, r_close_listen)) next} - -NR == 3 { - if (r_connect != "" && match($0, r_connect)) { - r_close_connected = "^close\\(1" r_i "\\]>\\) += 0$" - next - } -} - -NR == 4 && /^--- SIGUSR1 / {next} - -NR == 5 { - if (inode != "" && r_close_connected != "" && match($0, r_close_connected, a) && a[1] == inode) { - next - } -} - -NR == lines && $0 == "+++ exited with 0 +++" {next} - -{ - print "Line " NR " does not match: " $0 - fail=1 -} - -END { - if (NR != lines) { - print "Expected " lines " lines, found " NR " line(s)." - print "" - exit 1 - } - if (fail) { - print "" - exit 1 - } -} diff -Nru strace-4.11/tests-mx32/unix-yy.test strace-4.12/tests-mx32/unix-yy.test --- strace-4.11/tests-mx32/unix-yy.test 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/unix-yy.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -#!/bin/sh -# -# Check decoding of address information (inode[->peer][,path]) -# associated with unix domain socket descriptors. -# -# Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -. "${srcdir=.}/init.sh" - -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - -check_prog sed - -run_prog ./netlink_unix_diag -addr=unix-yy-local-stream -run_prog ./net-accept-connect $addr -run_strace_merge -yy -eclose,network $args - -child="$(sed -rn '/SIGCHLD/ s/^.*, si_pid=([1-9][0-9]*), .*/\1/p' "$LOG")" -[ -n "$child" ] || - dump_log_and_fail_with 'failed to find pid of child process' - -rm -f "$LOG"-* -sed -rn "/^$child"' /!d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-connect && -sed -rn "/^$child"' /d; /SIGCHLD/d; / socket\(/,$ s/^[0-9]+ +[^ ]+ (.+)/\1/p' "$LOG" > "$LOG"-accept || - dump_log_and_fail_with 'failed to separate logs' - -match_awk "$LOG-connect" "$srcdir"/unix-yy-connect.awk "$STRACE $args connect output mismatch" -v addr=$addr -match_awk "$LOG-accept" "$srcdir"/unix-yy-accept.awk "$STRACE $args accept output mismatch" -v addr=$addr - -rm -f "$LOG"-connect "$LOG"-accept - -exit 0 diff -Nru strace-4.11/tests-mx32/unlinkat.c strace-4.12/tests-mx32/unlinkat.c --- strace-4.11/tests-mx32/unlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/unlinkat.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_unlinkat + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlinkat_sample"; + const long fd = (long) 0xdeadbeefffffffff; + + long rc = syscall(__NR_unlinkat, fd, sample, 0); + printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlinkat") + +#endif diff -Nru strace-4.11/tests-mx32/unlinkat.test strace-4.12/tests-mx32/unlinkat.test --- strace-4.11/tests-mx32/unlinkat.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/unlinkat.test 2016-04-06 06:18:49.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff -Nru strace-4.11/tests-mx32/unlink.c strace-4.12/tests-mx32/unlink.c --- strace-4.11/tests-mx32/unlink.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/unlink.c 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_unlink + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlink_sample"; + + long rc = syscall(__NR_unlink, sample); + printf("unlink(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlink") + +#endif diff -Nru strace-4.11/tests-mx32/unlink.test strace-4.12/tests-mx32/unlink.test --- strace-4.11/tests-mx32/unlink.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/unlink.test 2016-04-26 10:11:41.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff -Nru strace-4.11/tests-mx32/userfaultfd.c strace-4.12/tests-mx32/userfaultfd.c --- strace-4.11/tests-mx32/userfaultfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/userfaultfd.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,29 +25,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" #include -#include -#include #include +#if defined __NR_userfaultfd && defined O_CLOEXEC + +# include +# include + int main(void) { -#if defined __NR_userfaultfd && defined O_CLOEXEC - if (syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC) != -1) - return 77; - printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = -1 %s\n", - errno == ENOSYS ? - "ENOSYS (Function not implemented)" : - "EINVAL (Invalid argument)"); + long rc = syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC); + printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = %ld %s (%m)\n", + rc, errno2name()); puts("+++ exited with 0 +++"); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && O_CLOEXEC") + #endif -} diff -Nru strace-4.11/tests-mx32/userfaultfd.test strace-4.12/tests-mx32/userfaultfd.test --- strace-4.11/tests-mx32/userfaultfd.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/userfaultfd.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check userfaultfd syscall decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a38 -euserfaultfd $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a38 diff -Nru strace-4.11/tests-mx32/utime.c strace-4.12/tests-mx32/utime.c --- strace-4.11/tests-mx32/utime.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/utime.c 2016-02-08 18:18:05.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,13 +27,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include #include static void -print_tm(struct tm *p) +print_tm(const struct tm * const p) { printf("%02d/%02d/%02d-%02d:%02d:%02d", p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, @@ -41,16 +45,23 @@ int main(void) { - time_t t = time(NULL); - struct utimbuf u = { .actime = t, .modtime = t }; - struct tm *p = localtime(&t); + utime("", NULL); + printf("utime(\"\", NULL) = -1 ENOENT (%m)\n"); + + const time_t t = time(NULL); + const struct tm * const p = localtime(&t); + const struct utimbuf u = { .actime = t, .modtime = t }; + const struct utimbuf const *tail_u = tail_memdup(&u, sizeof(u)); printf("utime(\"utime\\nfilename\", ["); print_tm(p); printf(", "); print_tm(p); - puts("]) = -1 ENOENT (No such file or directory)"); + printf("]) = -1 ENOENT "); + assert(utime("utime\nfilename", tail_u) == -1); + if (ENOENT != errno) + perror_msg_and_skip("utime"); + printf("(%m)\n"); puts("+++ exited with 0 +++"); - - return utime("utime\nfilename", &u) == -1 && errno == ENOENT ? 0 : 77; + return 0; } diff -Nru strace-4.11/tests-mx32/utimensat.c strace-4.12/tests-mx32/utimensat.c --- strace-4.11/tests-mx32/utimensat.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/utimensat.c 2016-02-08 18:27:59.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * This file is part of utimensat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,12 +27,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include +#include "tests.h" +#include +#include #include +#include #include #include #include @@ -48,47 +49,52 @@ int main(void) { + static const char fname[] = "utimensat\nfilename"; + + assert(utimensat(AT_FDCWD, fname, NULL, 0) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + + #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", " + printf(PREFIX "NULL, 0) = -1 ENOENT (%m)\n"); + struct timeval tv; struct timespec ts[2]; if (gettimeofday(&tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); ts[0].tv_sec = tv.tv_sec; ts[0].tv_nsec = tv.tv_usec; ts[1].tv_sec = tv.tv_sec - 1; ts[1].tv_nsec = tv.tv_usec + 1; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; - #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", [" - - printf(PREFIX); + printf(PREFIX "["); print_ts(&ts[0]); printf(", "); print_ts(&ts[1]); - puts("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); + printf("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT "); + + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf("(%m)\n"); ts[0].tv_nsec = UTIME_NOW; ts[1].tv_nsec = UTIME_OMIT; - if (!utimensat(AT_FDCWD, "utimensat\nfilename", ts, - AT_SYMLINK_NOFOLLOW)) - return 77; + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf(PREFIX "[UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW)" + " = -1 ENOENT (%m)\n"); - printf(PREFIX); - puts("UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)"); puts("+++ exited with 0 +++"); - return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_UTIMENSAT && AT_FDCWD && AT_SYMLINK_NOFOLLOW" + " && UTIME_NOW && UTIME_OMIT") #endif diff -Nru strace-4.11/tests-mx32/utimensat.test strace-4.12/tests-mx32/utimensat.test --- strace-4.11/tests-mx32/utimensat.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/utimensat.test 2016-03-30 00:13:37.000000000 +0000 @@ -5,7 +5,6 @@ . "${srcdir=.}/init.sh" run_prog > /dev/null -OUT="$LOG.out" run_strace -e utimensat $args > "$OUT" check_prog grep diff -Nru strace-4.11/tests-mx32/utimes.c strace-4.12/tests-mx32/utimes.c --- strace-4.11/tests-mx32/utimes.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/utimes.c 2016-05-22 22:29:33.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Check decoding of utimes syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utimes + +# include +# include +# include + +#define CAST_NUM(n) \ + (sizeof(n) == sizeof(long) ? \ + (unsigned long long) (unsigned long) (n) : \ + (unsigned long long) (n)) + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "utimes_sample"; + + long rc = syscall(__NR_utimes, sample, 0); + printf("utimes(\"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, %p) = %ld %s (%m)\n", + ts + 1, rc, errno2name()); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_utimes, "", ts); + printf("utimes(\"\", [{%llu, %llu}, {%llu, %llu}])" + " = %ld %s (%m)\n", + CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), + CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utimes") + +#endif diff -Nru strace-4.11/tests-mx32/utimes.test strace-4.12/tests-mx32/utimes.test --- strace-4.11/tests-mx32/utimes.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/utimes.test 2016-04-26 16:13:17.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check utimes syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff -Nru strace-4.11/tests-mx32/utime.test strace-4.12/tests-mx32/utime.test --- strace-4.11/tests-mx32/utime.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/utime.test 2016-03-30 00:13:37.000000000 +0000 @@ -7,9 +7,8 @@ $STRACE -e utime -h > /dev/null || skip_ 'utime syscall is not supported on this architecture' -OUT="$LOG.out" run_prog > /dev/null -run_strace -e utime $args > "$OUT" +run_strace -a 16 -e utime $args > "$OUT" check_prog grep LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || { diff -Nru strace-4.11/tests-mx32/vfork-f.c strace-4.12/tests-mx32/vfork-f.c --- strace-4.11/tests-mx32/vfork-f.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vfork-f.c 2016-01-08 02:45:05.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "vfork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) { + if (read(0, &ac, sizeof(int))) + return 2; + return logit("exec"); + } + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(child_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + int parent_wait_fds[2]; + if (pipe(parent_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(parent_wait_fds[0], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + if (fcntl(parent_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + char *const args[] = { av[0], (char *) "", NULL }; + pid_t pid = vfork(); + + if (pid < 0) + perror_msg_and_fail("vfork"); + + if (!pid) { + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + close(parent_wait_fds[1]); + + if (read(parent_wait_fds[0], &parent_wait_fds[1], sizeof(int))) + perror_msg_and_fail("read"); + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + pid, prefix, + ppid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff -Nru strace-4.11/tests-mx32/vfork-f.test strace-4.12/tests-mx32/vfork-f.test --- strace-4.11/tests-mx32/vfork-f.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vfork-f.test 2015-12-30 23:08:32.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check how strace -f follows vfork syscall. + +. "${srcdir=.}/fork-f.test" diff -Nru strace-4.11/tests-mx32/vhangup.c strace-4.12/tests-mx32/vhangup.c --- strace-4.11/tests-mx32/vhangup.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vhangup.c 2016-05-24 20:12:25.000000000 +0000 @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_vhangup + +# include +# include + +int +main(void) +{ + if (setsid() == -1) + perror_msg_and_skip("setsid"); + + long rc = syscall(__NR_vhangup); + printf("vhangup() = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vhangup") + +#endif diff -Nru strace-4.11/tests-mx32/vhangup.test strace-4.12/tests-mx32/vhangup.test --- strace-4.11/tests-mx32/vhangup.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vhangup.test 2016-05-24 20:09:16.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check vhangup syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a10 diff -Nru strace-4.11/tests-mx32/vmsplice.c strace-4.12/tests-mx32/vmsplice.c --- strace-4.11/tests-mx32/vmsplice.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vmsplice.c 2016-02-14 00:36:38.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * This file is part of vmsplice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_vmsplice + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *iov = tail_memdup(iov_, sizeof(iov_)); + const unsigned int len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + tprintf("vmsplice(1, [{\"%s\", %u}, {\"%s\", %u}" + ", {\"%s\", %u}], %u, %s) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_), + "SPLICE_F_NONBLOCK", len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const long rc = syscall(__NR_vmsplice, 1, iov, ARRAY_SIZE(iov_), 2); + if (rc < 0) + perror_msg_and_skip("vmsplice"); + assert(rc == (int) len); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vmsplice") + +#endif diff -Nru strace-4.11/tests-mx32/vmsplice.test strace-4.12/tests-mx32/vmsplice.test --- strace-4.11/tests-mx32/vmsplice.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/vmsplice.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of vmsplice syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -ewrite=1 diff -Nru strace-4.11/tests-mx32/wait.c strace-4.12/tests-mx32/wait.c --- strace-4.11/tests-mx32/wait.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/wait.c 2016-01-06 11:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - +#include "tests.h" #include #include #include @@ -46,10 +43,13 @@ (void) close(0); (void) close(1); - assert(!pipe(fds) && fds[0] == 0 && fds[1] == 1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { char c; (void) close(1); @@ -67,16 +67,20 @@ assert(WIFEXITED(s) && WEXITSTATUS(s) == 42); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { (void) raise(SIGUSR1); - return 77; + return 1; } assert(wait4(pid, &s, __WALL, NULL) == pid); assert(WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1); pid = fork(); - assert(pid >= 0); + if (pid < 0) + perror_msg_and_fail("fork"); + if (!pid) { raise(SIGSTOP); return 0; diff -Nru strace-4.11/tests-mx32/xattr.c strace-4.12/tests-mx32/xattr.c --- strace-4.11/tests-mx32/xattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/xattr.c 2016-05-22 22:29:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,30 +25,124 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "tests.h" #ifdef HAVE_SYS_XATTR_H + +# include +# include # include +# ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +# endif + int main(void) { -#define NAME "strace.test" -#define VALUE "foo\0bar" - if (!removexattr(".", NAME) || - !setxattr(".", NAME, VALUE, sizeof(VALUE), XATTR_CREATE)) - return 77; + static const char name[] = "strace.test"; + static const char c_value[] = "foo\0bar"; + static const char q_value[] = "foo\\0bar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + char *const efault = tail_alloc(1) + 1; + const char *const value = tail_memdup(c_value, sizeof(c_value) - 1); + char *const big = tail_alloc(XATTR_SIZE_MAX + 1); + + assert(fsetxattr(-1, 0, 0, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, NULL, 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, 0, z_value, 0, XATTR_CREATE) == -1); + printf("fsetxattr(-1, NULL, \"\", 0, XATTR_CREATE) = -1 %s (%m)\n", + errno2name()); + + assert(fsetxattr(-1, name, big, XATTR_SIZE_MAX + 1, XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value), XATTR_CREATE) == -1); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(fsetxattr(-1, name, value, sizeof(c_value) - 1, XATTR_CREATE|XATTR_REPLACE) == -1); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_CREATE|XATTR_REPLACE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(setxattr(".", name, z_value, sizeof(c_value), XATTR_CREATE) == -1); + printf("setxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value), errno2name()); + + assert(lsetxattr(".", name, value, sizeof(c_value) - 1, XATTR_CREATE) == -1); + printf("lsetxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE)" + " = -1 %s (%m)\n", + name, q_value, (unsigned) sizeof(c_value) - 1, errno2name()); + + assert(fgetxattr(-1, name, efault, 4) == -1); + printf("fgetxattr(-1, \"%s\", %p, 4) = -1 %s (%m)\n", + name, efault, errno2name()); + + assert(getxattr(".", name, big, XATTR_SIZE_MAX + 1) == -1); + printf("getxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big, XATTR_SIZE_MAX + 1, errno2name()); + + assert(lgetxattr(".", name, big + 1, XATTR_SIZE_MAX) == -1); + printf("lgetxattr(\".\", \"%s\", %p, %u) = -1 %s (%m)\n", + name, big + 1, XATTR_SIZE_MAX, errno2name()); + + assert(flistxattr(-1, efault, 4) == -1); + printf("flistxattr(-1, %p, 4) = -1 %s (%m)\n", + efault, errno2name()); + + assert(llistxattr("", efault + 1, 4) == -1); + printf("llistxattr(\"\", %p, 4) = -1 %s (%m)\n", + efault + 1, errno2name()); + + ssize_t rc = listxattr(".", big, 0); + if (rc < 0) + printf("listxattr(\".\", %p, 0) = -1 %s (%m)\n", + big, errno2name()); + else + printf("listxattr(\".\", %p, 0) = %ld\n", + big, (long) rc); + + rc = listxattr(".", big, XATTR_SIZE_MAX + 1); + if (rc < 0) + printf("listxattr(\".\", %p, %u) = -1 %s (%m)\n", + big, XATTR_SIZE_MAX + 1, errno2name()); + else { + printf("listxattr(\".\", \""); + print_quoted_memory(big, rc); + printf("\", %u) = %ld\n", XATTR_SIZE_MAX + 1, (long) rc); + } + + assert(fremovexattr(-1, name) == -1); + printf("fremovexattr(-1, \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(removexattr(".", name) == -1); + printf("removexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + assert(lremovexattr(".", name) == -1); + printf("lremovexattr(\".\", \"%s\") = -1 %s (%m)\n", + name, errno2name()); + + puts("+++ exited with 0 +++"); return 0; } #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") #endif diff -Nru strace-4.11/tests-mx32/xattr.expected strace-4.12/tests-mx32/xattr.expected --- strace-4.11/tests-mx32/xattr.expected 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests-mx32/xattr.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -removexattr\("\.", "strace\.test"\) += -1 .* -setxattr\("\.", "strace\.test", "foo\\0bar", 8, XATTR_CREATE\) += -1 .* diff -Nru strace-4.11/tests-mx32/xattr.test strace-4.12/tests-mx32/xattr.test --- strace-4.11/tests-mx32/xattr.test 2015-07-15 00:09:08.000000000 +0000 +++ strace-4.12/tests-mx32/xattr.test 2016-05-10 22:25:23.000000000 +0000 @@ -4,8 +4,9 @@ . "${srcdir=.}/init.sh" -run_prog -run_strace -e removexattr,setxattr $args -match_grep +syscalls= +for n in getxattr setxattr listxattr removexattr; do + syscalls="$syscalls,${n},f${n},l${n}" +done -exit 0 +run_strace_match_diff -a22 -e trace=$syscalls diff -Nru strace-4.11/tests-mx32/xchownx.c strace-4.12/tests-mx32/xchownx.c --- strace-4.11/tests-mx32/xchownx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xchownx.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Check decoding of chown/chown32/lchown/lchown32/fchown/fchown32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#ifdef UGID_TYPE_IS_SHORT +# define UGID_TYPE short +# define GETEUID syscall(__NR_geteuid) +# define GETEGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUID(arg) check_overflowuid(arg) +# define CHECK_OVERFLOWGID(arg) check_overflowgid(arg) +#else +# define UGID_TYPE int +# define GETEUID geteuid() +# define GETEGID getegid() +# define CHECK_OVERFLOWUID(arg) +# define CHECK_OVERFLOWGID(arg) +#endif + +#define UNLINK_SAMPLE \ + if (unlink(sample)) perror_msg_and_fail("unlink") +#define CLOSE_SAMPLE \ + if (close(fd)) perror_msg_and_fail("close") + +#ifdef ACCESS_BY_DESCRIPTOR +# define SYSCALL_ARG1 fd +# define FMT_ARG1 "%d" +# define EOK_CMD CLOSE_SAMPLE +# define CLEANUP_CMD UNLINK_SAMPLE +#else +# define SYSCALL_ARG1 sample +# define FMT_ARG1 "\"%s\"" +# define EOK_CMD UNLINK_SAMPLE +# define CLEANUP_CMD CLOSE_SAMPLE +#endif + +static int +ugid2int(const unsigned UGID_TYPE id) +{ + if ((unsigned UGID_TYPE) -1U == id) + return -1; + else + return id; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf(", -1"); + else + printf(", %u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int id) +{ + return num == id || num == -1U; +} + +#define PAIR(val) { val, gid }, { uid, val } + +int +main(void) +{ + static const char sample[] = SYSCALL_NAME "_sample"; + + unsigned int uid = GETEUID; + CHECK_OVERFLOWUID(uid); + unsigned int gid = GETEGID; + CHECK_OVERFLOWUID(gid); + + const struct { + const long uid, gid; + } tests[] = { + { uid, gid }, + { (unsigned long) 0xffffffff00000000ULL | uid, gid }, + { uid, (unsigned long) 0xffffffff00000000ULL | gid }, + PAIR(-1U), + PAIR(-1L), + { 0xffff0000U | uid, gid }, + { uid, 0xffff0000U | gid }, + PAIR(0xffff), + PAIR(0xc0deffffU), + PAIR(0xfacefeedU), + PAIR((long) 0xfacefeeddeadbeefULL) + }; + + int fd = open(sample, O_RDONLY | O_CREAT, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + CLEANUP_CMD; + + unsigned int i; + long expected = 0; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int unum = ugid2int(tests[i].uid); + const unsigned int gnum = ugid2int(tests[i].gid); + + if (num_matches_id(unum, uid) && + num_matches_id(gnum, gid)) { + if (expected) + continue; + } else { + if (!expected) { + expected = -1; + EOK_CMD; + } + } + + const long rc = syscall(SYSCALL_NR, SYSCALL_ARG1, + tests[i].uid, tests[i].gid); + int saved_errno = errno; + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(" FMT_ARG1 ", %u, %u)" + " = -1 ENOSYS (%m)\n", + SYSCALL_NAME, SYSCALL_ARG1, uid, gid); + break; + } + perror_msg_and_fail("%s(" FMT_ARG1 + ", %#lx, %#lx) != %ld", + SYSCALL_NAME, SYSCALL_ARG1, + tests[i].uid, tests[i].gid, + expected); + } + + printf("%s(" FMT_ARG1, SYSCALL_NAME, SYSCALL_ARG1); + print_int(unum); + print_int(gnum); + errno = saved_errno; + if (expected) + printf(") = %ld %s (%m)\n", expected, errno2name()); + else + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/xetitimer.c strace-4.12/tests-mx32/xetitimer.c --- strace-4.11/tests-mx32/xetitimer.c 2015-09-19 01:04:27.000000000 +0000 +++ strace-4.12/tests-mx32/xetitimer.c 2016-01-04 23:38:19.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" #include #include #include @@ -46,7 +47,7 @@ }; if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) - return 77; + perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" @@ -61,7 +62,7 @@ (intmax_t) old.itv.it_value.tv_usec); if (getitimer(ITIMER_REAL, &old.itv)) - return 77; + perror_msg_and_skip("getitimer"); printf("getitimer(ITIMER_REAL" ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" ") = 0\n", diff -Nru strace-4.11/tests-mx32/xetitimer.test strace-4.12/tests-mx32/xetitimer.test --- strace-4.11/tests-mx32/xetitimer.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/xetitimer.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check setitimer and getitimer syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=setitimer,getitimer -run_strace -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -e trace=setitimer,getitimer diff -Nru strace-4.11/tests-mx32/xetpgid.c strace-4.12/tests-mx32/xetpgid.c --- strace-4.11/tests-mx32/xetpgid.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xetpgid.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is part of xetpgid strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getpgid && defined __NR_setpgid + +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpgid, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpgid(%d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpgid, + (unsigned long) 0xffffffff00000000, + (unsigned long) 0xffffffff00000000 | pid); + printf("setpgid(0, %d) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgid && __NR_setpgid") + +#endif diff -Nru strace-4.11/tests-mx32/xetpgid.test strace-4.12/tests-mx32/xetpgid.test --- strace-4.11/tests-mx32/xetpgid.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xetpgid.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgid and setpgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=getpgid,setpgid diff -Nru strace-4.11/tests-mx32/xetpriority.c strace-4.12/tests-mx32/xetpriority.c --- strace-4.11/tests-mx32/xetpriority.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xetpriority.c 2016-04-21 22:05:57.000000000 +0000 @@ -0,0 +1,35 @@ +#include "tests.h" +#include + +#if defined __NR_getpriority && defined __NR_setpriority + +# include +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid); + printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000 | pid, + (unsigned long) 0xffffffff00000000); + if (rc) + printf("setpriority(PRIO_PROCESS, %d, 0) = %ld %s (%m)\n", + pid, rc, errno2name()); + else + printf("setpriority(PRIO_PROCESS, %d, 0) = 0\n", pid); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpriority && _NR_setpriority") + +#endif diff -Nru strace-4.11/tests-mx32/xetpriority.test strace-4.12/tests-mx32/xetpriority.test --- strace-4.11/tests-mx32/xetpriority.test 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xetpriority.test 2016-03-30 00:16:24.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpriority and setpriority syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 -e trace=getpriority,setpriority diff -Nru strace-4.11/tests-mx32/xet_robust_list.c strace-4.12/tests-mx32/xet_robust_list.c --- strace-4.11/tests-mx32/xet_robust_list.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/tests-mx32/xet_robust_list.c 2016-01-05 23:25:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,46 +25,35 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include "tests.h" #include #if defined __NR_get_robust_list && defined __NR_set_robust_list +# include +# include + int main(void) { - const size_t page_len = sysconf(_SC_PAGESIZE); const pid_t pid = getpid(); const long long_pid = (unsigned long) (0xdeadbeef00000000LL | pid); - - void *p = mmap(NULL, page_len * 4, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED || - mprotect(p + page_len, page_len, PROT_NONE) || - mprotect(p + page_len * 3, page_len, PROT_NONE)) - return 77; - - void **p_head = p + page_len - sizeof(void *); - size_t *p_len = p + page_len * 3 - sizeof(size_t); + void **p_head = tail_alloc(sizeof(void *)); + size_t *p_len = tail_alloc(sizeof(size_t)); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); - if (syscall(__NR_set_robust_list, p, *p_len)) - return 77; - printf("set_robust_list(%#lx, %lu) = 0\n", - (unsigned long) p, (unsigned long) *p_len); + void *head = tail_alloc(*p_len); + if (syscall(__NR_set_robust_list, head, *p_len)) + perror_msg_and_skip("set_robust_list"); + printf("set_robust_list(%p, %lu) = 0\n", + head, (unsigned long) *p_len); if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) - return 77; + perror_msg_and_skip("get_robust_list"); printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); @@ -74,10 +63,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_get_robust_list && __NR_set_robust_list") #endif diff -Nru strace-4.11/tests-mx32/xet_robust_list.test strace-4.12/tests-mx32/xet_robust_list.test --- strace-4.11/tests-mx32/xet_robust_list.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/xet_robust_list.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,11 +3,4 @@ # Check get_robust_list and set_robust_list syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -run_strace -a24 -eget_robust_list,set_robust_list $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list diff -Nru strace-4.11/tests-mx32/xettimeofday.c strace-4.12/tests-mx32/xettimeofday.c --- strace-4.11/tests-mx32/xettimeofday.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/tests-mx32/xettimeofday.c 2016-01-09 13:06:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tests.h" +#include #include #include #include @@ -45,12 +47,12 @@ }; if (syscall(__NR_gettimeofday, &t.tv, NULL)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}, NULL) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) - return 77; + perror_msg_and_skip("gettimeofday"); printf("gettimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, @@ -58,11 +60,10 @@ t.tv.tv_sec = -1; t.tv.tv_usec = 1000000000; - if (!settimeofday(&t.tv, &t.tz)) - return 77; + assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); printf("settimeofday({%jd, %jd}" ", {tz_minuteswest=%d, tz_dsttime=%d})" - " = -1 EINVAL (Invalid argument)\n", + " = -1 EINVAL (%m)\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, t.tz.tz_minuteswest, t.tz.tz_dsttime); diff -Nru strace-4.11/tests-mx32/xettimeofday.test strace-4.12/tests-mx32/xettimeofday.test --- strace-4.11/tests-mx32/xettimeofday.test 2015-11-26 20:36:35.000000000 +0000 +++ strace-4.12/tests-mx32/xettimeofday.test 2016-03-30 00:16:24.000000000 +0000 @@ -3,12 +3,4 @@ # Check gettimeofday and settimeofday syscalls decoding. . "${srcdir=.}/init.sh" - -run_prog > /dev/null -OUT="$LOG.out" -syscalls=gettimeofday,settimeofday -run_strace -a20 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday diff -Nru strace-4.11/tests-mx32/xselect.c strace-4.12/tests-mx32/xselect.c --- strace-4.11/tests-mx32/xselect.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/xselect.c 2016-01-12 03:07:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,19 +29,10 @@ * Based on test by Dr. David Alan Gilbert */ -#ifdef TEST_SYSCALL_NAME - -# include -# include -# include - -# define TEST_SYSCALL_NR nrify(TEST_SYSCALL_NAME) -# define nrify(arg) nrify_(arg) -# define nrify_(arg) __NR_ ## arg - -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define stringify(arg) stringify_(arg) -# define stringify_(arg) #arg +#include +#include +#include +#include static fd_set set[0x1000000 / sizeof(fd_set)]; @@ -57,7 +48,7 @@ }, tm = tm_in; if (pipe(fds)) - return 77; + perror_msg_and_fail("pipe"); /* * Start with a nice simple select. @@ -65,8 +56,10 @@ FD_ZERO(set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL) != 1) - return 77; + int rc = syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + assert(rc == 1); printf("%s(%d, [%d %d], [%d %d], [%d %d], NULL) = 1 ()\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], fds[0], fds[1], fds[0], fds[1]); @@ -78,8 +71,7 @@ FD_SET(2, set); FD_SET(fds[0], set); FD_SET(fds[1], set); - if (syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) != 3) - return 77; + assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); printf("%s(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld})" " = 3 (out [1 2 %d], left {%lld, %lld})\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], @@ -93,8 +85,7 @@ */ FD_ZERO(set); FD_SET(fds[1],set); - if (syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) != -1) - return 77; + assert(syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) == -1); printf("%s(-1, NULL, %p, NULL, NULL) = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, set); @@ -105,21 +96,10 @@ FD_SET(fds[0],set); tm.tv.tv_sec = 0; tm.tv.tv_usec = 123; - if (syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv)) - return 77; + assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); printf("%s(%d, [%d], [], NULL, {0, 123}) = 0 (Timeout)\n", TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); puts("+++ exited with 0 +++"); return 0; } - -#else - -int -main(void) -{ - return 77; -} - -#endif diff -Nru strace-4.11/tests-mx32/xstatfs64.c strace-4.12/tests-mx32/xstatfs64.c --- strace-4.11/tests-mx32/xstatfs64.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xstatfs64.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), size, ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", %u, ", SYSCALL_NAME, \ + SYSCALL_ARG(file, desc), (unsigned) size) + +#define STRUCT_STATFS struct statfs64 +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif +#define CHECK_ODD_SIZE + +#include "xstatfsx.c" diff -Nru strace-4.11/tests-mx32/xstatfs.c strace-4.12/tests-mx32/xstatfs.c --- strace-4.11/tests-mx32/xstatfs.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xstatfs.c 2016-04-26 01:35:31.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", ", SYSCALL_NAME, SYSCALL_ARG(file, desc)) + +#define STRUCT_STATFS struct statfs +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif + +#include "xstatfsx.c" diff -Nru strace-4.11/tests-mx32/xstatfsx.c strace-4.12/tests-mx32/xstatfsx.c --- strace-4.11/tests-mx32/xstatfsx.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/tests-mx32/xstatfsx.c 2016-05-05 21:20:58.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include "xlat.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +#define PRINT_NUM(arg) \ + if (sizeof(b->arg) == sizeof(int)) \ + printf(", %s=%u", #arg, (unsigned int) b->arg); \ + else if (sizeof(b->arg) == sizeof(long)) \ + printf(", %s=%lu", #arg, (unsigned long) b->arg); \ + else \ + printf(", %s=%llu", #arg, (unsigned long long) b->arg) + +static void +print_statfs_type(const char *const prefix, const unsigned int magic) +{ + fputs(prefix, stdout); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(fsmagic); ++i) + if (magic == fsmagic[i].val) { + fputs(fsmagic[i].str, stdout); + return; + } + printf("%#x", magic); +} + +static void +print_statfs(const char *const sample, const char *magic_str) +{ + int fd = open(sample, O_RDONLY); + if (fd < 0) + perror_msg_and_fail("open: %s", sample); + + STRUCT_STATFS *const b = tail_alloc(sizeof(*b)); + long rc = SYSCALL_INVOKE(sample, fd, b, sizeof(*b)); + if (rc) + perror_msg_and_skip(SYSCALL_NAME); + + PRINT_SYSCALL_HEADER(sample, fd, sizeof(*b)); + if (magic_str) + printf("{f_type=%s", magic_str); + else + print_statfs_type("{f_type=", b->f_type); + PRINT_NUM(f_bsize); + PRINT_NUM(f_blocks); + PRINT_NUM(f_bfree); + PRINT_NUM(f_bavail); + PRINT_NUM(f_files); + PRINT_NUM(f_ffree); +#ifdef PRINT_F_FSID + printf(", f_fsid={%u, %u}", + (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); +#endif + PRINT_NUM(f_namelen); +#ifdef PRINT_F_FRSIZE + PRINT_NUM(f_frsize); +#endif +#ifdef PRINT_F_FLAGS + if (b->f_flags & ST_VALID) { + printf(", f_flags="); + printflags(statfs_flags, b->f_flags, "ST_???"); + } +#endif + printf("}) = 0\n"); +} + +int +main(void) +{ + print_statfs("/proc/self/status", "PROC_SUPER_MAGIC"); + + print_statfs(".", NULL); + + long rc = SYSCALL_INVOKE("", -1, 0, sizeof(STRUCT_STATFS)); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS)); + printf("NULL) = %ld %s (%m)\n", rc, errno2name()); + +#ifdef CHECK_ODD_SIZE + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); + printf("%#lx) = %ld %s (%m)\n", addr, rc, errno2name()); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff -Nru strace-4.11/tests-mx32/xstatx.c strace-4.12/tests-mx32/xstatx.c --- strace-4.11/tests-mx32/xstatx.c 2015-12-16 00:07:16.000000000 +0000 +++ strace-4.12/tests-mx32/xstatx.c 2016-04-21 22:05:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,9 +25,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined TEST_SYSCALL_NAME \ - && defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +#if defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS +# ifndef TEST_SYSCALL_STR +# error TEST_SYSCALL_STR must be defined +# endif # ifndef TEST_SYSCALL_INVOKE # error TEST_SYSCALL_INVOKE must be defined # endif @@ -38,7 +40,6 @@ # error PRINT_SYSCALL_FOOTER must be defined # endif -# include # include # include # include @@ -131,6 +132,7 @@ # ifndef STRUCT_STAT # define STRUCT_STAT struct stat +# define STRUCT_STAT_STR "struct stat" # endif # ifndef SAMPLE_SIZE # define SAMPLE_SIZE 43147718418 @@ -228,11 +230,6 @@ return 0; } -# define stringify_(arg) #arg -# define stringify(arg) stringify_(arg) -# define TEST_SYSCALL_STR stringify(TEST_SYSCALL_NAME) -# define STRUCT_STAT_STR stringify(STRUCT_STAT) - int main(void) { @@ -314,10 +311,6 @@ #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("HAVE_FTRUNCATE && HAVE_FUTIMENS") #endif diff -Nru strace-4.11/time.c strace-4.12/time.c --- strace-4.11/time.c 2015-09-19 01:04:49.000000000 +0000 +++ strace-4.12/time.c 2016-05-14 22:05:06.000000000 +0000 @@ -171,7 +171,7 @@ { if (print_timex(tcp, addr)) return 0; - tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval); + tcp->auxstr = xlookup(adjtimex_state, (unsigned long) tcp->u_rval); if (tcp->auxstr) return RVAL_STR; return 0; @@ -303,18 +303,6 @@ #include "xlat/timerfdflags.h" -SYS_FUNC(timerfd) -{ - tprintf("%ld, ", tcp->u_arg[0]); - printclockname(tcp->u_arg[0]); - tprints(", "); - printflags(timerfdflags, tcp->u_arg[2], "TFD_???"); - tprints(", "); - print_itimerspec(tcp, tcp->u_arg[3]); - - return RVAL_DECODED | RVAL_FD; -} - SYS_FUNC(timerfd_create) { printclockname(tcp->u_arg[0]); diff -Nru strace-4.11/times.c strace-4.12/times.c --- strace-4.11/times.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/times.c 2016-05-26 14:44:13.000000000 +0000 @@ -46,11 +46,11 @@ if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) { tprintf("{tms_utime=%llu, tms_stime=%llu, ", - (unsigned long long) tbuf.tms_utime, - (unsigned long long) tbuf.tms_stime); + widen_to_ull(tbuf.tms_utime), + widen_to_ull(tbuf.tms_stime)); tprintf("tms_cutime=%llu, tms_cstime=%llu}", - (unsigned long long) tbuf.tms_cutime, - (unsigned long long) tbuf.tms_cstime); + widen_to_ull(tbuf.tms_cutime), + widen_to_ull(tbuf.tms_cstime)); } return syserror(tcp) ? RVAL_DECIMAL : diff -Nru strace-4.11/ubi.c strace-4.12/ubi.c --- strace-4.11/ubi.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/ubi.c 2016-05-28 10:29:30.000000000 +0000 @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2012 Mike Frysinger + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include + +/* The UBI api changes, so we have to keep a local copy */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) +# include "ubi-user.h" +#else +# include +#endif + +#include "xlat/ubi_volume_types.h" +#include "xlat/ubi_volume_props.h" + +int +ubi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +{ + if (!verbose(tcp)) + return RVAL_DECODED; + + switch (code) { + case UBI_IOCMKVOL: + if (entering(tcp)) { + struct ubi_mkvol_req mkvol; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &mkvol)) + break; + + tprintf("{vol_id=%" PRIi32 ", alignment=%" PRIi32 + ", bytes=%" PRIi64 ", vol_type=", mkvol.vol_id, + mkvol.alignment, (int64_t)mkvol.bytes); + printxval(ubi_volume_types, + (uint8_t) mkvol.vol_type, "UBI_???_VOLUME"); + tprintf(", name_len=%" PRIi16 ", name=", mkvol.name_len); + if (print_quoted_string(mkvol.name, + CLAMP(mkvol.name_len, 0, UBI_MAX_VOLUME_NAME), + QUOTE_0_TERMINATED) > 0) { + tprints("..."); + } + tprints("}"); + return 1; + } + if (!syserror(tcp)) { + tprints(" => "); + printnum_int(tcp, arg, "%d"); + } + break; + + case UBI_IOCRSVOL: { + struct ubi_rsvol_req rsvol; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &rsvol)) + break; + + tprintf("{vol_id=%" PRIi32 ", bytes=%" PRIi64 "}", + rsvol.vol_id, (int64_t)rsvol.bytes); + break; + } + + case UBI_IOCRNVOL: { + struct ubi_rnvol_req rnvol; + int c; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &rnvol)) + break; + + tprintf("{count=%" PRIi32 ", ents=[", rnvol.count); + for (c = 0; c < CLAMP(rnvol.count, 0, UBI_MAX_RNVOL); ++c) { + if (c) + tprints(", "); + tprintf("{vol_id=%" PRIi32 ", name_len=%" PRIi16 + ", name=", rnvol.ents[c].vol_id, + rnvol.ents[c].name_len); + if (print_quoted_string(rnvol.ents[c].name, + CLAMP(rnvol.ents[c].name_len, 0, UBI_MAX_VOLUME_NAME), + QUOTE_0_TERMINATED) > 0) { + tprints("..."); + } + tprints("}"); + } + tprints("]}"); + break; + } + + case UBI_IOCEBCH: { + struct ubi_leb_change_req leb; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &leb)) + break; + + tprintf("{lnum=%d, bytes=%d}", leb.lnum, leb.bytes); + break; + } + + case UBI_IOCATT: + if (entering(tcp)) { + struct ubi_attach_req attach; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &attach)) + break; + + tprintf("{ubi_num=%" PRIi32 ", mtd_num=%" PRIi32 + ", vid_hdr_offset=%" PRIi32 + ", max_beb_per1024=%" PRIi16 "}", + attach.ubi_num, attach.mtd_num, + attach.vid_hdr_offset, attach.max_beb_per1024); + return 1; + } + if (!syserror(tcp)) { + tprints(" => "); + printnum_int(tcp, arg, "%d"); + } + break; + + case UBI_IOCEBMAP: { + struct ubi_map_req map; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &map)) + break; + + tprintf("{lnum=%" PRIi32 ", dtype=%" PRIi8 "}", + map.lnum, map.dtype); + break; + } + + case UBI_IOCSETVOLPROP: { + struct ubi_set_vol_prop_req prop; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &prop)) + break; + + tprints("{property="); + printxval(ubi_volume_props, prop.property, "UBI_VOL_PROP_???"); + tprintf(", value=%#" PRIx64 "}", (uint64_t)prop.value); + break; + } + + + case UBI_IOCVOLUP: + tprints(", "); + printnum_int64(tcp, arg, "%" PRIi64); + break; + + case UBI_IOCDET: + case UBI_IOCEBER: + case UBI_IOCEBISMAP: + case UBI_IOCEBUNMAP: + case UBI_IOCRMVOL: + tprints(", "); + printnum_int(tcp, arg, "%d"); + break; + +#ifdef UBI_IOCVOLCRBLK + case UBI_IOCVOLCRBLK: +#endif +#ifdef UBI_IOCVOLRMBLK + case UBI_IOCVOLRMBLK: +#endif + /* no arguments */ + break; + + default: + return RVAL_DECODED; + } + + return RVAL_DECODED | 1; +} diff -Nru strace-4.11/uid.c strace-4.12/uid.c --- strace-4.11/uid.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/uid.c 2016-05-07 23:37:53.000000000 +0000 @@ -3,7 +3,7 @@ * Copyright (c) 1993 Branko Lankester * Copyright (c) 1993-1996 Rick Sladkey * Copyright (c) 1996-1999 Wichert Akkerman - * Copyright (c) 2003-2015 Dmitry V. Levin + * Copyright (c) 2003-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,18 +70,14 @@ SYS_FUNC(getuid) { - if (exiting(tcp)) - tcp->u_rval = (uid_t) tcp->u_rval; - return RVAL_UDECIMAL; + return RVAL_UDECIMAL | RVAL_DECODED; } SYS_FUNC(setfsuid) { - if (entering(tcp)) - tprintf("%u", (uid_t) tcp->u_arg[0]); - else - tcp->u_rval = (uid_t) tcp->u_rval; - return RVAL_UDECIMAL; + tprintf("%u", (uid_t) tcp->u_arg[0]); + + return RVAL_UDECIMAL | RVAL_DECODED; } SYS_FUNC(setuid) @@ -151,117 +147,52 @@ void printuid(const char *text, const unsigned int uid) { - if ((unsigned int) -1 == uid || (uid_t) -1 == uid) + if ((uid_t) -1U == (uid_t) uid) tprintf("%s-1", text); else - tprintf("%s%u", text, uid); + tprintf("%s%u", text, (uid_t) uid); } -SYS_FUNC(setgroups) +static bool +print_gid(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - unsigned long cur, abbrev_end; - uid_t gid; - int failed = 0; - const unsigned long len = tcp->u_arg[0]; - const unsigned long start = tcp->u_arg[1]; - const unsigned long size = len * sizeof(gid); - const unsigned long end = start + size; - - tprintf("%lu, ", len); - if (len == 0) { - tprints("[]"); - return RVAL_DECODED; - } - if (!start || !verbose(tcp) || - size / sizeof(gid) != len || end < start) { - printaddr(start); - return RVAL_DECODED; - } - if (abbrev(tcp)) { - abbrev_end = start + max_strlen * sizeof(gid); - if (abbrev_end < start) - abbrev_end = end; - } else { - abbrev_end = end; - } - tprints("["); - for (cur = start; cur < end; cur += sizeof(gid)) { - if (cur > start) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umoven(tcp, cur, sizeof(gid), &gid) < 0) { - tprints("?"); - failed = 1; - break; - } - tprintf("%u", (unsigned int) gid); - } - tprints("]"); - if (failed) { - tprints(" "); - printaddr(start); + tprintf("%u", (unsigned int) (* (uid_t *) elem_buf)); + + return true; +} + +static void +print_groups(struct tcb *tcp, const unsigned int len, const unsigned long addr) +{ + static unsigned long ngroups_max; + if (!ngroups_max) + ngroups_max = sysconf(_SC_NGROUPS_MAX); + + if (len > ngroups_max) { + printaddr(addr); + return; } + uid_t gid; + print_array(tcp, addr, len, &gid, sizeof(gid), + umoven_or_printaddr, print_gid, 0); +} + +SYS_FUNC(setgroups) +{ + const unsigned int len = tcp->u_arg[0]; + + tprintf("%u, ", len); + print_groups(tcp, len, tcp->u_arg[1]); return RVAL_DECODED; } SYS_FUNC(getgroups) { - if (entering(tcp)) { - tprintf("%lu, ", tcp->u_arg[0]); - } else { - unsigned long cur, abbrev_end; - uid_t gid; - int failed = 0; - const unsigned long len = tcp->u_rval; - const unsigned long size = len * sizeof(gid); - const unsigned long start = tcp->u_arg[1]; - const unsigned long end = start + size; - - if (!start) { - printaddr(start); - return 0; - } - if (len == 0) { - tprints("[]"); - return 0; - } - if (!verbose(tcp) || syserror(tcp) || - size / sizeof(gid) != len || end < start) { - printaddr(start); - return 0; - } - if (abbrev(tcp)) { - abbrev_end = start + max_strlen * sizeof(gid); - if (abbrev_end < start) - abbrev_end = end; - } else { - abbrev_end = end; - } - tprints("["); - for (cur = start; cur < end; cur += sizeof(gid)) { - if (cur > start) - tprints(", "); - if (cur >= abbrev_end) { - tprints("..."); - break; - } - if (umoven(tcp, cur, sizeof(gid), &gid) < 0) { - tprints("?"); - failed = 1; - break; - } - tprintf("%u", (unsigned int) gid); - } - tprints("]"); - if (failed) { - tprints(" "); - printaddr(start); - } - } + if (entering(tcp)) + tprintf("%u, ", (unsigned int) tcp->u_arg[0]); + else + print_groups(tcp, tcp->u_rval, tcp->u_arg[1]); return 0; } diff -Nru strace-4.11/upeek.c strace-4.12/upeek.c --- strace-4.11/upeek.c 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/upeek.c 2016-02-09 05:08:00.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "ptrace.h" + +int +upeek(int pid, long off, long *res) +{ + long val; + + errno = 0; + val = ptrace(PTRACE_PEEKUSER, (pid_t)pid, (char *) off, 0); + if (val == -1 && errno) { + if (errno != ESRCH) { + perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", pid, off); + } + return -1; + } + *res = val; + return 0; +} diff -Nru strace-4.11/userfaultfd.c strace-4.12/userfaultfd.c --- strace-4.11/userfaultfd.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/userfaultfd.c 2016-05-10 10:54:54.000000000 +0000 @@ -36,3 +36,123 @@ return RVAL_DECODED | RVAL_FD; } + +#ifdef HAVE_LINUX_USERFAULTFD_H +# include +# include + +# include "xlat/uffd_api_flags.h" +# include "xlat/uffd_copy_flags.h" +# include "xlat/uffd_register_ioctl_flags.h" +# include "xlat/uffd_register_mode_flags.h" +# include "xlat/uffd_zeropage_flags.h" + +static void +tprintf_uffdio_range(const struct uffdio_range *range) +{ + tprintf("{start=%#" PRI__x64 ", len=%#" PRI__x64 "}", + range->start, range->len); +} + +int +uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +{ + switch (code) { + case UFFDIO_API: { + struct uffdio_api ua; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &ua)) + return RVAL_DECODED | 1; + /* Features is intended to contain some flags, but + * there aren't any defined yet. + */ + tprintf("{api=%#" PRI__x64 + ", features=%#" PRI__x64, + ua.api, ua.features); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &ua)) { + tprintf(", features.out=%#" PRI__x64 + ", ioctls=", ua.features); + printflags64(uffd_api_flags, ua.ioctls, + "_UFFDIO_???"); + } + tprintf("}"); + } + return 1; + } + + case UFFDIO_COPY: { + struct uffdio_copy uc; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &uc)) + return RVAL_DECODED | 1; + tprintf("{dst=%#" PRI__x64 ", src=%#" PRI__x64 + ", len=%#" PRI__x64 ", mode=", + uc.dst, uc.src, uc.len); + printflags64(uffd_copy_flags, uc.mode, + "UFFDIO_COPY_???"); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &uc)) + tprintf(", copy=%#" PRI__x64, uc.copy); + tprints("}"); + } + return 1; + } + + case UFFDIO_REGISTER: { + struct uffdio_register ur; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &ur)) + return RVAL_DECODED | 1; + tprintf("{range="); + tprintf_uffdio_range(&ur.range); + tprintf(", mode="); + printflags64(uffd_register_mode_flags, ur.mode, + "UFFDIO_REGISTER_MODE_???"); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &ur)) { + tprintf(", ioctls="); + printflags64(uffd_register_ioctl_flags, + ur.ioctls, "UFFDIO_???"); + } + tprints("}"); + } + return 1; + } + + case UFFDIO_UNREGISTER: + case UFFDIO_WAKE: { + struct uffdio_range ura; + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &ura)) + tprintf_uffdio_range(&ura); + return RVAL_DECODED | 1; + } + + case UFFDIO_ZEROPAGE: { + struct uffdio_zeropage uz; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &uz)) + return RVAL_DECODED | 1; + tprintf("{range="); + tprintf_uffdio_range(&uz.range); + tprintf(", mode="); + printflags64(uffd_zeropage_flags, uz.mode, + "UFFDIO_ZEROPAGE_???"); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &uz)) + tprintf(", zeropage=%#" PRI__x64, uz.zeropage); + tprints("}"); + } + return 1; + } + + default: + return RVAL_DECODED; + } +} +#endif /* HAVE_LINUX_USERFAULTFD_H */ diff -Nru strace-4.11/util.c strace-4.12/util.c --- strace-4.11/util.c 2015-11-26 18:25:34.000000000 +0000 +++ strace-4.12/util.c 2016-05-15 14:26:03.000000000 +0000 @@ -121,7 +121,7 @@ } const char * -xlookup(const struct xlat *xlat, const unsigned int val) +xlookup(const struct xlat *xlat, const uint64_t val) { for (; xlat->str != NULL; xlat++) if (xlat->val == val) @@ -132,16 +132,16 @@ static int xlat_bsearch_compare(const void *a, const void *b) { - const unsigned int val1 = (const unsigned long) a; - const unsigned int val2 = ((const struct xlat *) b)->val; + const uint64_t val1 = *(const uint64_t *) a; + const uint64_t val2 = ((const struct xlat *) b)->val; return (val1 > val2) ? 1 : (val1 < val2) ? -1 : 0; } const char * -xlat_search(const struct xlat *xlat, const size_t nmemb, const unsigned int val) +xlat_search(const struct xlat *xlat, const size_t nmemb, const uint64_t val) { const struct xlat *e = - bsearch((const void*) (const unsigned long) val, + bsearch((const void*) &val, xlat, nmemb, sizeof(*xlat), xlat_bsearch_compare); return e ? e->str : NULL; @@ -208,7 +208,7 @@ * Print entry in struct xlat table, if there. */ void -printxvals(const unsigned int val, const char *dflt, const struct xlat *xlat, ...) +printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...) { va_list args; @@ -223,7 +223,7 @@ } } /* No hits -- print raw # instead. */ - tprintf("%#x /* %s */", val, dflt); + tprintf("%#" PRIx64 " /* %s */", val, dflt); va_end(args); } @@ -303,7 +303,7 @@ * return # of flags printed. */ void -addflags(const struct xlat *xlat, int flags) +addflags(const struct xlat *xlat, uint64_t flags) { for (; xlat->str; xlat++) { if (xlat->val && (flags & xlat->val) == xlat->val) { @@ -312,7 +312,7 @@ } } if (flags) { - tprintf("|%#x", flags); + tprintf("|%#" PRIx64, flags); } } @@ -322,7 +322,7 @@ * Return static string. */ const char * -sprintflags(const char *prefix, const struct xlat *xlat, int flags) +sprintflags(const char *prefix, const struct xlat *xlat, uint64_t flags) { static char outstr[1024]; char *outptr; @@ -349,14 +349,14 @@ if (flags) { if (found) *outptr++ = '|'; - outptr += sprintf(outptr, "%#x", flags); + outptr += sprintf(outptr, "%#" PRIx64, flags); } return outstr; } int -printflags(const struct xlat *xlat, int flags, const char *dflt) +printflags64(const struct xlat *xlat, uint64_t flags, const char *dflt) { int n; const char *sep; @@ -378,12 +378,12 @@ if (n) { if (flags) { - tprintf("%s%#x", sep, flags); + tprintf("%s%#" PRIx64, sep, flags); n++; } } else { if (flags) { - tprintf("%#x", flags); + tprintf("%#" PRIx64, flags); if (dflt) tprintf(" /* %s */", dflt); } else { @@ -512,16 +512,14 @@ if (show_fd_path > 1 && strncmp(path, socket_prefix, socket_prefix_len) == 0 && path[path_len - 1] == ']') { - unsigned long inodenr; -#define PROTO_NAME_LEN 32 - char proto_buf[PROTO_NAME_LEN]; - const char *proto = - getfdproto(tcp, fd, proto_buf, PROTO_NAME_LEN); - inodenr = strtoul(path + socket_prefix_len, NULL, 10); - if (!print_sockaddr_by_inode(inodenr, proto)) { - if (proto) - tprintf("%s:[%lu]", proto, inodenr); - else + unsigned long inode = + strtoul(path + socket_prefix_len, NULL, 10); + + if (!print_sockaddr_by_inode_cached(inode)) { + char buf[256]; + const char *proto = + getfdproto(tcp, fd, buf, sizeof(buf)); + if (!print_sockaddr_by_inode(inode, proto)) tprints(path); } } else { @@ -547,7 +545,7 @@ * Returns 0 if QUOTE_0_TERMINATED is set and NUL was seen, 1 otherwise. * Note that if QUOTE_0_TERMINATED is not set, always returns 1. */ -static int +int string_quote(const char *instr, char *outstr, const unsigned int size, const unsigned int style) { @@ -841,12 +839,12 @@ } void -dumpiov(struct tcb *tcp, int len, long addr) +dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) { #if SUPPORTED_PERSONALITIES > 1 union { - struct { u_int32_t base; u_int32_t len; } *iov32; - struct { u_int64_t base; u_int64_t len; } *iov64; + struct { uint32_t base; uint32_t len; } *iov32; + struct { uint64_t base; uint64_t len; } *iov64; } iovu; #define iov iovu.iov64 #define sizeof_iov \ @@ -873,12 +871,16 @@ } if (umoven(tcp, addr, size, iov) >= 0) { for (i = 0; i < len; i++) { + unsigned long iov_len = iov_iov_len(i); + if (iov_len > data_size) + iov_len = data_size; + if (!iov_len) + break; + data_size -= iov_len; /* include the buffer number to make it easy to * match up the trace with the source */ - tprintf(" * %lu bytes in buffer %d\n", - (unsigned long)iov_iov_len(i), i); - dumpstr(tcp, (long) iov_iov_base(i), - iov_iov_len(i)); + tprintf(" * %lu bytes in buffer %d\n", iov_len, i); + dumpstr(tcp, (long) iov_iov_base(i), iov_len); } } free(iov); @@ -1141,37 +1143,6 @@ return 0; } -int -umove_ulong_or_printaddr(struct tcb *tcp, const long addr, unsigned long *ptr) -{ - if (current_wordsize < sizeof(*ptr)) { - uint32_t val32; - int r = umove_or_printaddr(tcp, addr, &val32); - if (!r) - *ptr = (unsigned long) val32; - return r; - } - return umove_or_printaddr(tcp, addr, ptr); -} - -int -umove_ulong_array_or_printaddr(struct tcb *tcp, const long addr, - unsigned long *ptr, size_t n) -{ - if (current_wordsize < sizeof(*ptr)) { - uint32_t ptr32[n]; - int r = umove_or_printaddr(tcp, addr, &ptr32); - if (!r) { - size_t i; - - for (i = 0; i < n; ++i) - ptr[i] = (unsigned long) ptr32[i]; - } - return r; - } - return umoven_or_printaddr(tcp, addr, n * sizeof(*ptr), ptr); -} - /* * Like `umove' but make the additional effort of looking * for a terminating zero byte. @@ -1334,19 +1305,102 @@ return 0; } -int -upeek(int pid, long off, long *res) +/* + * Iteratively fetch and print up to nmemb elements of elem_size size + * from the array that starts at tracee's address start_addr. + * + * Array elements are being fetched to the address specified by elem_buf. + * + * The fetcher callback function specified by umoven_func should follow + * the same semantics as umoven_or_printaddr function. + * + * The printer callback function specified by print_func is expected + * to print something; if it returns false, no more iterations will be made. + * + * The pointer specified by opaque_data is passed to each invocation + * of print_func callback function. + * + * This function prints: + * - "NULL", if start_addr is NULL; + * - "[]", if nmemb is 0; + * - start_addr, if nmemb * elem_size overflows or wraps around; + * - nothing, if the first element cannot be fetched + * (if umoven_func returns non-zero), but it is assumed that + * umoven_func has printed the address it failed to fetch data from; + * - elements of the array, delimited by ", ", with the array itself + * enclosed with [] brackets. + * + * If abbrev(tcp) is true, then + * - the maximum number of elements printed equals to max_strlen; + * - "..." is printed instead of max_strlen+1 element + * and no more iterations will be made. + * + * This function returns true only if + * - umoven_func has been called at least once AND + * - umoven_func has not returned false. + */ +bool +print_array(struct tcb *tcp, + const unsigned long start_addr, + const size_t nmemb, + void *const elem_buf, + const size_t elem_size, + int (*const umoven_func)(struct tcb *, + long, + unsigned int, + void *), + bool (*const print_func)(struct tcb *, + void *elem_buf, + size_t elem_size, + void *opaque_data), + void *const opaque_data) { - long val; + if (!start_addr) { + tprints("NULL"); + return false; + } + + if (!nmemb) { + tprints("[]"); + return false; + } + + const size_t size = nmemb * elem_size; + const unsigned long end_addr = start_addr + size; + + if (end_addr <= start_addr || size / elem_size != nmemb) { + printaddr(start_addr); + return false; + } + + const unsigned long abbrev_end = + (abbrev(tcp) && max_strlen < nmemb) ? + start_addr + elem_size * max_strlen : end_addr; + unsigned long cur; + + for (cur = start_addr; cur < end_addr; cur += elem_size) { + if (cur != start_addr) + tprints(", "); - errno = 0; - val = ptrace(PTRACE_PEEKUSER, (pid_t)pid, (char *) off, 0); - if (val == -1 && errno) { - if (errno != ESRCH) { - perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", pid, off); + if (umoven_func(tcp, cur, elem_size, elem_buf)) + break; + + if (cur == start_addr) + tprints("["); + + if (cur >= abbrev_end) { + tprints("..."); + cur = end_addr; + break; + } + + if (!print_func(tcp, elem_buf, elem_size, opaque_data)) { + cur = end_addr; + break; } - return -1; } - *res = val; - return 0; + if (cur != start_addr) + tprints("]"); + + return cur >= end_addr; } diff -Nru strace-4.11/v4l2.c strace-4.12/v4l2.c --- strace-4.11/v4l2.c 2015-08-26 11:55:05.000000000 +0000 +++ strace-4.12/v4l2.c 2016-05-21 22:53:06.000000000 +0000 @@ -29,10 +29,31 @@ #include "defs.h" +#include DEF_MPERS_TYPE(struct_v4l2_buffer) +#include DEF_MPERS_TYPE(struct_v4l2_create_buffers) +#include DEF_MPERS_TYPE(struct_v4l2_ext_control) +#include DEF_MPERS_TYPE(struct_v4l2_ext_controls) +#include DEF_MPERS_TYPE(struct_v4l2_format) +#include DEF_MPERS_TYPE(struct_v4l2_framebuffer) +#include DEF_MPERS_TYPE(struct_v4l2_input) +#include DEF_MPERS_TYPE(struct_v4l2_standard) + #include -#include +#include #include #include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +#include MPERS_DEFS + /* some historical constants */ #ifndef V4L2_CID_HCENTER #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) @@ -44,58 +65,53 @@ #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) #endif -#include "xlat/v4l2_device_capabilities_flags.h" -#include "xlat/v4l2_buf_types.h" -#include "xlat/v4l2_buf_flags.h" -#include "xlat/v4l2_framesize_types.h" -#include "xlat/v4l2_frameinterval_types.h" -#include "xlat/v4l2_fields.h" -#include "xlat/v4l2_colorspaces.h" -#include "xlat/v4l2_format_description_flags.h" -#include "xlat/v4l2_memories.h" -#include "xlat/v4l2_control_ids.h" -#include "xlat/v4l2_control_types.h" -#include "xlat/v4l2_control_flags.h" -#include "xlat/v4l2_control_classes.h" -#include "xlat/v4l2_streaming_capabilities.h" -#include "xlat/v4l2_capture_modes.h" -#include "xlat/v4l2_input_types.h" - #define FMT_FRACT "%u/%u" #define ARGS_FRACT(x) ((x).numerator), ((x).denominator) -#define FMT_RECT "{left=%i, top=%i, width=%i, height=%i}" +#define FMT_RECT "{left=%d, top=%d, width=%u, height=%u}" #define ARGS_RECT(x) (x).left, (x).top, (x).width, (x).height -static void print_pixelformat(uint32_t fourcc) +static void +print_pixelformat(uint32_t fourcc) { - union { + const union { uint32_t pixelformat; unsigned char cc[sizeof(uint32_t)]; } u = { - .pixelformat = #if WORDS_BIGENDIAN - htole32(fourcc) + .cc = { + (unsigned char) (fourcc >> 24), + (unsigned char) (fourcc >> 16), + (unsigned char) (fourcc >> 8), + (unsigned char) fourcc + } #else - fourcc + .pixelformat = fourcc #endif }; unsigned int i; tprints("v4l2_fourcc("); for (i = 0; i < sizeof(u.cc); ++i) { - unsigned int c = u.cc[i]; + unsigned char c = u.cc[i]; if (i) tprints(", "); - if (c == ' ' || - (c >= '0' && c <= '9') || - (c >= 'A' && c <= 'Z') || - (c >= 'a' && c <= 'z')) { + if (c == '\'' || c == '\\') { char sym[] = { '\'', - u.cc[i], - '\'' + '\\', + c, + '\'', + '\0' + }; + tprints(sym); + } else if (c >= ' ' && c <= 0x7e) { + char sym[] = { + '\'', + c, + '\'', + '\0' }; tprints(sym); } else { @@ -114,588 +130,825 @@ tprints(")"); } -static void print_v4l2_format_fmt(const struct v4l2_format *f) +#include "xlat/v4l2_device_capabilities_flags.h" + +static int +print_v4l2_capability(struct tcb *tcp, const long arg) +{ + struct v4l2_capability caps; + + if (entering(tcp)) + return 0; + tprints(", "); + if (umove_or_printaddr(tcp, arg, &caps)) + return 1; + tprints("{driver="); + print_quoted_string((const char *) caps.driver, + sizeof(caps.driver), QUOTE_0_TERMINATED); + tprints(", card="); + print_quoted_string((const char *) caps.card, + sizeof(caps.card), QUOTE_0_TERMINATED); + tprints(", bus_info="); + print_quoted_string((const char *) caps.bus_info, + sizeof(caps.bus_info), QUOTE_0_TERMINATED); + tprintf(", version=%u.%u.%u, capabilities=", + (caps.version >> 16) & 0xFF, + (caps.version >> 8) & 0xFF, + caps.version & 0xFF); + printflags(v4l2_device_capabilities_flags, caps.capabilities, + "V4L2_CAP_???"); +#ifdef V4L2_CAP_DEVICE_CAPS + tprints(", device_caps="); + printflags(v4l2_device_capabilities_flags, caps.device_caps, + "V4L2_CAP_???"); +#endif + tprints("}"); + return 1; +} + +#include "xlat/v4l2_buf_types.h" +#include "xlat/v4l2_format_description_flags.h" + +static int +print_v4l2_fmtdesc(struct tcb *tcp, const long arg) +{ + struct v4l2_fmtdesc f; + + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &f)) + return RVAL_DECODED | 1; + tprintf("{index=%u, type=", f.index); + printxval(v4l2_buf_types, f.type, "V4L2_BUF_TYPE_???"); + return 0; + } + + if (!syserror(tcp) && !umove(tcp, arg, &f)) { + tprints(", flags="); + printflags(v4l2_format_description_flags, f.flags, + "V4L2_FMT_FLAG_???"); + tprints(", description="); + print_quoted_string((const char *) f.description, + sizeof(f.description), + QUOTE_0_TERMINATED); + tprints(", pixelformat="); + print_pixelformat(f.pixelformat); + } + tprints("}"); + return 1; +} + +#include "xlat/v4l2_fields.h" +#include "xlat/v4l2_colorspaces.h" + +static void +print_v4l2_format_fmt(const char *prefix, const struct_v4l2_format *f) { - tprints("fmt."); switch (f->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: - case V4L2_BUF_TYPE_VIDEO_OUTPUT: { - const struct v4l2_pix_format *pix = &f->fmt.pix; - - tprintf("pix={width=%u, height=%u, pixelformat=", - pix->width, pix->height); - print_pixelformat(pix->pixelformat); + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + tprints(prefix); + tprintf("fmt.pix={width=%u, height=%u, pixelformat=", + f->fmt.pix.width, f->fmt.pix.height); + print_pixelformat(f->fmt.pix.pixelformat); tprints(", field="); - printxval(v4l2_fields, pix->field, "V4L2_FIELD_???"); + printxval(v4l2_fields, f->fmt.pix.field, "V4L2_FIELD_???"); tprintf(", bytesperline=%u, sizeimage=%u, colorspace=", - pix->bytesperline, pix->sizeimage); - printxval(v4l2_colorspaces, pix->colorspace, + f->fmt.pix.bytesperline, f->fmt.pix.sizeimage); + printxval(v4l2_colorspaces, f->fmt.pix.colorspace, "V4L2_COLORSPACE_???"); tprints("}"); break; - } #if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: { - const struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp; unsigned int i, max; - tprintf("pix_mp={width=%u, height=%u, pixelformat=", - pix_mp->width, pix_mp->height); - print_pixelformat(pix_mp->pixelformat); + tprints(prefix); + tprintf("fmt.pix_mp={width=%u, height=%u, pixelformat=", + f->fmt.pix_mp.width, f->fmt.pix_mp.height); + print_pixelformat(f->fmt.pix_mp.pixelformat); tprints(", field="); - printxval(v4l2_fields, pix_mp->field, "V4L2_FIELD_???"); + printxval(v4l2_fields, f->fmt.pix_mp.field, "V4L2_FIELD_???"); tprints(", colorspace="); - printxval(v4l2_colorspaces, pix_mp->colorspace, + printxval(v4l2_colorspaces, f->fmt.pix_mp.colorspace, "V4L2_COLORSPACE_???"); - tprints("plane_fmt=["); - max = pix_mp->num_planes; + tprints(", plane_fmt=["); + max = f->fmt.pix_mp.num_planes; if (max > VIDEO_MAX_PLANES) max = VIDEO_MAX_PLANES; for (i = 0; i < max; i++) { if (i > 0) tprints(", "); tprintf("{sizeimage=%u, bytesperline=%u}", - pix_mp->plane_fmt[i].sizeimage, - pix_mp->plane_fmt[i].bytesperline); + f->fmt.pix_mp.plane_fmt[i].sizeimage, + f->fmt.pix_mp.plane_fmt[i].bytesperline); } - tprintf("], num_planes=%u}", (unsigned) pix_mp->num_planes); + tprintf("], num_planes=%u}", (unsigned) f->fmt.pix_mp.num_planes); break; } #endif /* TODO: Complete this switch statement */ +#if 0 case V4L2_BUF_TYPE_VIDEO_OVERLAY: #if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: #endif - tprints("win={???}"); + tprints(prefix); + tprints("fmt.win={???}"); break; case V4L2_BUF_TYPE_VBI_CAPTURE: case V4L2_BUF_TYPE_VBI_OUTPUT: - tprints("vbi={???}"); + tprints(prefix); + tprints("fmt.vbi={???}"); break; case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - tprints("sliced={???}"); + tprints(prefix); + tprints("fmt.sliced={???}"); break; - default: - tprints("???"); +#if HAVE_DECL_V4L2_BUF_TYPE_SDR_CAPTURE + case V4L2_BUF_TYPE_SDR_CAPTURE: + case V4L2_BUF_TYPE_SDR_OUTPUT: + tprints(prefix); + tprints("fmt.sdr={???}"); break; +#endif +#endif } } -int -v4l2_ioctl(struct tcb *tcp, const unsigned int code, long arg) +static int +print_v4l2_format(struct tcb *tcp, const long arg, const bool is_get) { - if (!verbose(tcp)) - return 0; - - switch (code) { - case VIDIOC_QUERYCAP: /* decode on exit */ { - struct v4l2_capability caps; + struct_v4l2_format f; - if (entering(tcp) || syserror(tcp) || umove(tcp, arg, &caps) < 0) - return 0; - tprints(", {driver="); - print_quoted_string((const char *) caps.driver, - sizeof(caps.driver), QUOTE_0_TERMINATED); - tprints(", card="); - print_quoted_string((const char *) caps.card, - sizeof(caps.card), QUOTE_0_TERMINATED); - tprints(", bus_info="); - print_quoted_string((const char *) caps.bus_info, - sizeof(caps.bus_info), QUOTE_0_TERMINATED); - tprintf(", version=%u.%u.%u, capabilities=", - (caps.version >> 16) & 0xFF, - (caps.version >> 8) & 0xFF, - caps.version & 0xFF); - printflags(v4l2_device_capabilities_flags, caps.capabilities, - "V4L2_CAP_???"); -#ifdef V4L2_CAP_DEVICE_CAPS - tprints(", device_caps="); - printflags(v4l2_device_capabilities_flags, caps.device_caps, - "V4L2_CAP_???"); -#endif + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &f)) + return RVAL_DECODED | 1; + tprints("{type="); + printxval(v4l2_buf_types, f.type, "V4L2_BUF_TYPE_???"); + if (is_get) + return 0; + print_v4l2_format_fmt(", ", &f); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &f)) { + const char *delim = is_get ? ", " : " => "; + print_v4l2_format_fmt(delim, &f); + } tprints("}"); - return 1; } + return 1; +} -#ifdef VIDIOC_ENUM_FRAMESIZES - case VIDIOC_ENUM_FRAMESIZES: /* decode on exit */ { - struct v4l2_frmsizeenum s; +#include "xlat/v4l2_memories.h" - if (entering(tcp) || umove(tcp, arg, &s) < 0) - return 0; - tprintf(", {index=%u, pixel_format=", s.index); - print_pixelformat(s.pixel_format); +static int +print_v4l2_requestbuffers(struct tcb *tcp, const long arg) +{ + struct v4l2_requestbuffers reqbufs; - if (!syserror(tcp)) { - tprints(", type="); - printxval(v4l2_framesize_types, s.type, "V4L2_FRMSIZE_TYPE_???"); - switch (s.type) { - case V4L2_FRMSIZE_TYPE_DISCRETE: - tprintf(", discrete={width=%u, height=%u}", - s.discrete.width, s.discrete.height); - break; - case V4L2_FRMSIZE_TYPE_STEPWISE: - tprintf(", stepwise={min_width=%u, max_width=%u, " - "step_width=%u, min_height=%u, max_height=%u, " - "step_height=%u}", - s.stepwise.min_width, s.stepwise.max_width, - s.stepwise.step_width, s.stepwise.min_height, - s.stepwise.max_height, s.stepwise.step_height); - break; - } - } + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &reqbufs)) + return RVAL_DECODED | 1; + tprintf("{count=%u, type=", reqbufs.count); + printxval(v4l2_buf_types, reqbufs.type, "V4L2_BUF_TYPE_???"); + tprints(", memory="); + printxval(v4l2_memories, reqbufs.memory, "V4L2_MEMORY_???"); tprints("}"); - return 1; + return 0; + } else { + static char outstr[sizeof("{count=}") + sizeof(int) * 3]; + + if (syserror(tcp) || umove(tcp, arg, &reqbufs) < 0) + return 1; + sprintf(outstr, "{count=%u}", reqbufs.count); + tcp->auxstr = outstr; + return 1 + RVAL_STR; } -#endif /* VIDIOC_ENUM_FRAMESIZES */ +} - case VIDIOC_G_FMT: - case VIDIOC_S_FMT: - case VIDIOC_TRY_FMT: { - struct v4l2_format f; +#include "xlat/v4l2_buf_flags.h" - if (umove(tcp, arg, &f) < 0) - return 0; - if (entering(tcp)) { - tprints(", {type="); - printxval(v4l2_buf_types, f.type, "V4L2_BUF_TYPE_???"); - } - if ((entering(tcp) && code != VIDIOC_G_FMT) - || (exiting(tcp) && !syserror(tcp))) { - tprints(exiting(tcp) && code != VIDIOC_G_FMT ? " => " : ", "); - print_v4l2_format_fmt(&f); - } - if (exiting(tcp)) - tprints("}"); - return 1; - } +static int +print_v4l2_buffer(struct tcb *tcp, const unsigned int code, const long arg) +{ + struct_v4l2_buffer b; - case VIDIOC_ENUM_FMT: { - struct v4l2_fmtdesc f; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &b)) + return RVAL_DECODED | 1; + tprints("{type="); + printxval(v4l2_buf_types, b.type, "V4L2_BUF_TYPE_???"); + if (code != VIDIOC_DQBUF) + tprintf(", index=%u", b.index); + } else { + if (!syserror(tcp) && umove(tcp, arg, &b) == 0) { + if (code == VIDIOC_DQBUF) + tprintf(", index=%u", b.index); + tprints(", memory="); + printxval(v4l2_memories, b.memory, "V4L2_MEMORY_???"); - if (entering(tcp) || umove(tcp, arg, &f) < 0) - return 0; + if (b.memory == V4L2_MEMORY_MMAP) { + tprintf(", m.offset=%#x", b.m.offset); + } else if (b.memory == V4L2_MEMORY_USERPTR) { + tprintf(", m.userptr=%#lx", + (unsigned long) b.m.userptr); + } - tprintf(", {index=%u", f.index); - if (!syserror(tcp)) { - tprints(", type="); - printxval(v4l2_buf_types, f.type, "V4L2_BUF_TYPE_???"); - tprints(", flags="); - printflags(v4l2_format_description_flags, f.flags, - "V4L2_FMT_FLAG_???"); - tprints(", description="); - print_quoted_string((const char *) f.description, - sizeof(f.description), - QUOTE_0_TERMINATED); - tprints(", pixelformat="); - print_pixelformat(f.pixelformat); + tprintf(", length=%u, bytesused=%u, flags=", + b.length, b.bytesused); + printflags(v4l2_buf_flags, b.flags, "V4L2_BUF_FLAG_???"); + if (code == VIDIOC_DQBUF) + tprintf(", timestamp = {%ju.%06ju}", + (uintmax_t)b.timestamp.tv_sec, + (uintmax_t)b.timestamp.tv_usec); + tprints(", ..."); } tprints("}"); - return 1; } + return 1; +} - case VIDIOC_G_PARM: - case VIDIOC_S_PARM: { - struct v4l2_streamparm s; +static int +print_v4l2_framebuffer(struct tcb *tcp, const long arg) +{ + struct_v4l2_framebuffer b; - if (entering(tcp) && code == VIDIOC_G_PARM) - return 1; - if (exiting(tcp) && syserror(tcp)) - return code == VIDIOC_S_PARM; - if (umove(tcp, arg, &s) < 0) - return 0; - if (entering(tcp)) { - tprints(", {type="); - printxval(v4l2_buf_types, s.type, "V4L2_BUF_TYPE_???"); - } - - tprints(exiting(tcp) && code == VIDIOC_S_PARM ? " => {" : ", {"); - if (s.type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { - struct v4l2_captureparm *cap = &s.parm.capture; - - tprints("capability="); - printflags(v4l2_streaming_capabilities, - cap->capability, "V4L2_CAP_???"); - - tprints(", capturemode="); - printflags(v4l2_capture_modes, - cap->capturemode, "V4L2_MODE_???"); - - tprintf(", timeperframe=" FMT_FRACT, - ARGS_FRACT(cap->timeperframe)); - - tprintf(", extendedmode=%u, readbuffers=%u", - cap->extendedmode, - cap->readbuffers); - } else - tprints("..."); - tprints("}"); - if (exiting(tcp)) - tprints("}"); - return 1; + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &b)) { + tprintf("{capability=%#x, flags=%#x, base=%#lx}", + b.capability, b.flags, (unsigned long) b.base); } - case VIDIOC_QUERYCTRL: { - struct v4l2_queryctrl c; - - if (umove(tcp, arg, &c) < 0) - return 0; - /* 'id' field must be printed : - * on enter - * on exit if !syserror(tcp) && V4L2_CTRL_FLAG_NEXT_CTRL was set - */ - if (entering(tcp) - || (exiting(tcp) && tcp->auxstr && !syserror(tcp))) { - tprints(exiting(tcp) ? " => " : ", {id="); -#ifdef V4L2_CTRL_FLAG_NEXT_CTRL - tcp->auxstr = (c.id & V4L2_CTRL_FLAG_NEXT_CTRL) ? "" : NULL; - if (tcp->auxstr) { - tprints("V4L2_CTRL_FLAG_NEXT_CTRL|"); - c.id &= ~V4L2_CTRL_FLAG_NEXT_CTRL; - } -#endif - printxval(v4l2_control_ids, c.id, "V4L2_CID_???"); - } - if (exiting(tcp)) { - if (!syserror(tcp)) { - tprints(", type="); - printxval(v4l2_control_types, c.type, - "V4L2_CTRL_TYPE_???"); - tprints(", name="); - print_quoted_string((const char *) c.name, - sizeof(c.name), - QUOTE_0_TERMINATED); - tprintf(", minimum=%i, maximum=%i, step=%i, " - "default_value=%i, flags=", - c.minimum, c.maximum, - c.step, c.default_value); - printflags(v4l2_control_flags, c.flags, - "V4L2_CTRL_FLAG_???"); - } - tprints("}"); - } - return 1; - } + return RVAL_DECODED | 1; +} - case VIDIOC_G_CTRL: - case VIDIOC_S_CTRL: { - struct v4l2_control c; +static int +print_v4l2_buf_type(struct tcb *tcp, const long arg) +{ + int type; - if (entering(tcp) || umove(tcp, arg, &c) < 0) - return 0; - tprints(", {id="); - printxval(v4l2_control_ids, c.id, "V4L2_CID_???"); - if (!syserror(tcp) || code != VIDIOC_G_CTRL) - tprintf(", value=%i", c.value); - tprints("}"); - return 1; + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &type)) { + tprints("["); + printxval(v4l2_buf_types, type, "V4L2_BUF_TYPE_???"); + tprints("]"); } + return RVAL_DECODED | 1; +} -#ifdef VIDIOC_S_EXT_CTRLS - case VIDIOC_S_EXT_CTRLS: - case VIDIOC_TRY_EXT_CTRLS: - case VIDIOC_G_EXT_CTRLS: { - struct v4l2_ext_controls c; - unsigned int n; - bool must_print_values; +#include "xlat/v4l2_streaming_capabilities.h" +#include "xlat/v4l2_capture_modes.h" - if (entering(tcp) && code == VIDIOC_G_EXT_CTRLS) - return 0; - if (exiting(tcp) && syserror(tcp) && code != VIDIOC_G_EXT_CTRLS) - return 0; - must_print_values = ((entering(tcp) && code != VIDIOC_G_EXT_CTRLS) - || (exiting(tcp) && !syserror(tcp))); - if (umove(tcp, arg, &c) < 0) - return 0; - tprints(code != VIDIOC_G_EXT_CTRLS && exiting(tcp) ? " => " : ", "); - tprints("{ctrl_class="); - printxval(v4l2_control_classes, c.ctrl_class, - "V4L2_CTRL_CLASS_???"); - tprintf(", count=%u", c.count); - if (exiting(tcp) && syserror(tcp)) - tprintf(", error_idx=%u", c.error_idx); - tprints(", controls=["); - for (n = 0; n < c.count; ++n) { - struct v4l2_ext_control ctrl; +static int +print_v4l2_streamparm(struct tcb *tcp, const long arg, const bool is_get) +{ + struct v4l2_streamparm s; - if (n > 0) + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &s)) + return RVAL_DECODED | 1; + tprints("{type="); + printxval(v4l2_buf_types, s.type, "V4L2_BUF_TYPE_???"); + switch (s.type) { + case V4L2_BUF_TYPE_VIDEO_CAPTURE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + if (is_get) + return 0; tprints(", "); - if (umove(tcp, (long) (c.controls + n), &ctrl) < 0) break; - if (abbrev(tcp) && n == 2) { - tprints("..."); - break; - } - tprints("{id="); - printxval(v4l2_control_ids, ctrl.id, "V4L2_CID_???"); -# if HAVE_DECL_V4L2_CTRL_TYPE_STRING - tprintf(", size=%u", ctrl.size); - if (ctrl.size > 0) { - if (must_print_values) { - tprints(", string="); - printstr(tcp, (long) ctrl.string, ctrl.size); - } - } else -# endif - { - if (must_print_values) { - tprintf(", value=%i, value64=%lld", ctrl.value, - (long long) ctrl.value64); - } - } + default: + tprints("}"); + return RVAL_DECODED | 1; + } + } else { + if (syserror(tcp) || umove(tcp, arg, &s) < 0) { tprints("}"); + return 1; } - tprints("]}"); - return 1; + tprints(is_get ? ", " : " => "); } -#endif /* VIDIOC_S_EXT_CTRLS */ - case VIDIOC_ENUMSTD: { - struct v4l2_standard s; + if (s.type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { + tprints("parm.capture={capability="); + printflags(v4l2_streaming_capabilities, + s.parm.capture.capability, "V4L2_CAP_???"); - if (umove(tcp, arg, &s) < 0) - return 0; - if (entering(tcp)) - tprintf(", {index=%i", s.index); - else { - if (!syserror(tcp)) { - tprints(", name="); - print_quoted_string((const char *) s.name, - sizeof(s.name), - QUOTE_0_TERMINATED); - tprintf(", frameperiod=" FMT_FRACT, ARGS_FRACT(s.frameperiod)); - tprintf(", framelines=%i", s.framelines); - } - tprints("}"); - } - return 1; + tprints(", capturemode="); + printflags(v4l2_capture_modes, + s.parm.capture.capturemode, "V4L2_MODE_???"); + + tprintf(", timeperframe=" FMT_FRACT, + ARGS_FRACT(s.parm.capture.timeperframe)); + + tprintf(", extendedmode=%u, readbuffers=%u}", + s.parm.capture.extendedmode, + s.parm.capture.readbuffers); + } else { + tprints("parm.output={capability="); + printflags(v4l2_streaming_capabilities, + s.parm.output.capability, "V4L2_CAP_???"); + + tprintf(", outputmode=%u", s.parm.output.outputmode); + + tprintf(", timeperframe=" FMT_FRACT, + ARGS_FRACT(s.parm.output.timeperframe)); + + tprintf(", extendedmode=%u, writebuffers=%u}", + s.parm.output.extendedmode, + s.parm.output.writebuffers); } + if (exiting(tcp)) + tprints("}"); + return 1; +} - case VIDIOC_G_STD: - case VIDIOC_S_STD: { - v4l2_std_id s; +static int +print_v4l2_standard(struct tcb *tcp, const long arg) +{ + struct_v4l2_standard s; - if (code == VIDIOC_G_STD && exiting(tcp) && syserror(tcp)) - return 0; - if (umove(tcp, arg, &s) < 0) - return 0; - if ((code == VIDIOC_S_STD) == entering(tcp)) - tprintf(", std=%#llx", (unsigned long long) s); - return 1; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &s)) + return RVAL_DECODED | 1; + tprintf("{index=%u", s.index); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &s)) { + tprints(", name="); + print_quoted_string((const char *) s.name, + sizeof(s.name), + QUOTE_0_TERMINATED); + tprintf(", frameperiod=" FMT_FRACT, + ARGS_FRACT(s.frameperiod)); + tprintf(", framelines=%d", s.framelines); + } + tprints("}"); } + return 1; +} - case VIDIOC_ENUMINPUT: { - struct v4l2_input i; +#include "xlat/v4l2_input_types.h" - if (entering(tcp) || umove(tcp, arg, &i) < 0) - return 0; - tprintf(", {index=%i", i.index); - if (!syserror(tcp)) { +static int +print_v4l2_input(struct tcb *tcp, const long arg) +{ + struct_v4l2_input i; + + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &i)) + return RVAL_DECODED | 1; + tprintf("{index=%u", i.index); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &i)) { tprints(", name="); print_quoted_string((const char *) i.name, - sizeof(i.name), QUOTE_0_TERMINATED); + sizeof(i.name), + QUOTE_0_TERMINATED); tprints(", type="); printxval(v4l2_input_types, i.type, "V4L2_INPUT_TYPE_???"); } tprints("}"); - return 1; } + return 1; +} - case VIDIOC_G_INPUT: - case VIDIOC_S_INPUT: { - int index; +#include "xlat/v4l2_control_ids.h" - if (entering(tcp) || syserror(tcp) || umove(tcp, arg, &index) < 0) - return 0; +static int +print_v4l2_control(struct tcb *tcp, const long arg, const bool is_get) +{ + struct v4l2_control c; - tprintf(", index=%i", index); - return 1; + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &c)) + return RVAL_DECODED | 1; + tprints("{id="); + printxval(v4l2_control_ids, c.id, "V4L2_CID_???"); + if (!is_get) + tprintf(", value=%d", c.value); + return 0; } -#ifdef VIDIOC_ENUM_FRAMEINTERVALS - case VIDIOC_ENUM_FRAMEINTERVALS: { - struct v4l2_frmivalenum f; + if (!syserror(tcp) && !umove(tcp, arg, &c)) { + tprints(is_get ? ", " : " => "); + tprintf("value=%d", c.value); + } - if (entering(tcp) || umove(tcp, arg, &f) < 0) - return 0; - tprintf(", {index=%i, pixel_format=", f.index); - print_pixelformat(f.pixel_format); - tprintf(", width=%u, height=%u", f.width, f.height); - if (!syserror(tcp)) { - tprints(", type="); - printxval(v4l2_frameinterval_types, f.type, - "V4L2_FRMIVAL_TYPE_???"); - switch (f.type) { - case V4L2_FRMIVAL_TYPE_DISCRETE: - tprintf(", discrete=" FMT_FRACT, - ARGS_FRACT(f.discrete)); - break; - case V4L2_FRMIVAL_TYPE_STEPWISE: - case V4L2_FRMSIZE_TYPE_CONTINUOUS: - tprintf(", stepwise={min=" FMT_FRACT ", max=" - FMT_FRACT ", step=" FMT_FRACT "}", - ARGS_FRACT(f.stepwise.min), - ARGS_FRACT(f.stepwise.max), - ARGS_FRACT(f.stepwise.step)); - break; - } + tprints("}"); + return 1; +} + +#include "xlat/v4l2_control_types.h" +#include "xlat/v4l2_control_flags.h" + +static int +print_v4l2_queryctrl(struct tcb *tcp, const long arg) +{ + struct v4l2_queryctrl c; + + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &c)) + return RVAL_DECODED | 1; + tprints("{id="); + } else { + if (syserror(tcp) || umove(tcp, arg, &c) < 0) { + tprints("}"); + return 1; } - tprints("}"); - return 1; + if (tcp->auxstr) + tprints(" => "); } -#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ - case VIDIOC_CROPCAP: { - struct v4l2_cropcap c; + if (entering(tcp) || tcp->auxstr) { +#ifdef V4L2_CTRL_FLAG_NEXT_CTRL + tcp->auxstr = (c.id & V4L2_CTRL_FLAG_NEXT_CTRL) ? "" : NULL; + if (tcp->auxstr) { + tprints("V4L2_CTRL_FLAG_NEXT_CTRL|"); + c.id &= ~V4L2_CTRL_FLAG_NEXT_CTRL; + } +#endif + printxval(v4l2_control_ids, c.id, "V4L2_CID_???"); + } - if (entering(tcp) || umove(tcp, arg, &c) < 0) - return 0; - tprints(", {type="); - printxval(v4l2_buf_types, c.type, "V4L2_BUF_TYPE_???"); - if (!syserror(tcp)) - tprintf(", bounds=" FMT_RECT ", defrect=" FMT_RECT ", " - "pixelaspect=" FMT_FRACT, ARGS_RECT(c.bounds), - ARGS_RECT(c.defrect), ARGS_FRACT(c.pixelaspect)); + if (exiting(tcp)) { + tprints(", type="); + printxval(v4l2_control_types, c.type, "V4L2_CTRL_TYPE_???"); + tprints(", name="); + print_quoted_string((const char *) c.name, + sizeof(c.name), + QUOTE_0_TERMINATED); + tprintf(", minimum=%d, maximum=%d, step=%d" + ", default_value=%d, flags=", + c.minimum, c.maximum, c.step, c.default_value); + printflags(v4l2_control_flags, c.flags, "V4L2_CTRL_FLAG_???"); tprints("}"); - return 1; } + return 1; +} - case VIDIOC_S_CROP: { - struct v4l2_crop c; +static int +print_v4l2_cropcap(struct tcb *tcp, const long arg) +{ + struct v4l2_cropcap c; - if (exiting(tcp) || umove(tcp, arg, &c) < 0) - return 0; - tprints(", {type="); + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &c)) + return RVAL_DECODED | 1; + tprints("{type="); printxval(v4l2_buf_types, c.type, "V4L2_BUF_TYPE_???"); - tprintf(", c=" FMT_RECT "}", ARGS_RECT(c.c)); - return 1; + return 0; } + if (!syserror(tcp) && !umove(tcp, arg, &c)) { + tprintf(", bounds=" FMT_RECT + ", defrect=" FMT_RECT + ", pixelaspect=" FMT_FRACT, + ARGS_RECT(c.bounds), + ARGS_RECT(c.defrect), + ARGS_FRACT(c.pixelaspect)); + } + tprints("}"); + return 1; +} - case VIDIOC_G_FBUF: - case VIDIOC_S_FBUF: { - struct v4l2_framebuffer b; +static int +print_v4l2_crop(struct tcb *tcp, const long arg, const bool is_get) +{ + struct v4l2_crop c; - if (syserror(tcp) && code == VIDIOC_G_FBUF) - return 0; - if (entering(tcp) || umove(tcp, arg, &b) < 0) + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &c)) + return RVAL_DECODED | 1; + tprints("{type="); + printxval(v4l2_buf_types, c.type, "V4L2_BUF_TYPE_???"); + if (is_get) return 0; - tprintf(", {capability=%x, flags=%x, base=%p}", - b.capability, b.flags, b.base); - return 1; + tprintf(", c=" FMT_RECT, ARGS_RECT(c.c)); + } else { + if (!syserror(tcp) && !umove(tcp, arg, &c)) + tprintf(", c=" FMT_RECT, ARGS_RECT(c.c)); } -#ifdef VIDIOC_CREATE_BUFS - case VIDIOC_CREATE_BUFS: { - struct v4l2_create_buffers b; + tprints("}"); + return RVAL_DECODED | 1; +} - if (exiting(tcp) && syserror(tcp)) - return 1; - if (umove(tcp, arg, &b) < 0) - return 0; - if (entering(tcp)) { - tprintf(", {count=%u, memory=", b.count); - printxval(v4l2_memories, b.memory, "V4L2_MEMORY_???"); - tprints(", format={type="); - printxval(v4l2_buf_types, b.format.type, "V4L2_BUF_TYPE_???"); - tprints(", "); - print_v4l2_format_fmt(&b.format); - tprints("}}"); - return 1; - } else { - static const char fmt[] = "{index=%u, count=%u}"; - static char outstr[sizeof(fmt) + sizeof(int) * 6]; +#ifdef VIDIOC_S_EXT_CTRLS +static bool +print_v4l2_ext_control(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) +{ + const struct_v4l2_ext_control *p = elem_buf; - sprintf(outstr, fmt, b.index, b.count); - tcp->auxstr = outstr; - return 1 + RVAL_STR; - } + tprints("{id="); + printxval(v4l2_control_ids, p->id, "V4L2_CID_???"); +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + tprintf(", size=%u", p->size); + if (p->size > 0) { + tprints(", string="); + printstr(tcp, (long) p->string, p->size); + } else +# endif + tprintf(", value=%d, value64=%lld", p->value, + (long long) p->value64); + tprints("}"); + + return true; +} + +#include "xlat/v4l2_control_classes.h" + +static int +umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr, + const unsigned int len, void *our_addr) +{ + if (!addr) { + tprints("NULL"); + return -1; + } + if (umoven(tcp, addr, len, our_addr) < 0) { + tprintf("%#lx", addr); + return -1; } -#endif /* VIDIOC_CREATE_BUFS */ + return 0; +} - case VIDIOC_REQBUFS: { - struct v4l2_requestbuffers reqbufs; +static int +print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get) +{ + struct_v4l2_ext_controls c; - if (umove(tcp, arg, &reqbufs) < 0) + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &c)) + return RVAL_DECODED | 1; + tprints("{ctrl_class="); + printxval(v4l2_control_classes, c.ctrl_class, + "V4L2_CTRL_CLASS_???"); + tprintf(", count=%u", c.count); + if (!c.count) { + tprints("}"); + return RVAL_DECODED | 1; + } + if (is_get) return 0; - if (entering(tcp)) { - tprintf(", {count=%u, type=", reqbufs.count); - printxval(v4l2_buf_types, reqbufs.type, "V4L2_BUF_TYPE_???"); - tprints(", memory="); - printxval(v4l2_memories, reqbufs.memory, "V4L2_MEMORY_???"); + tprints(", "); + } else { + if (umove(tcp, arg, &c) < 0) { tprints("}"); return 1; - } else if (syserror(tcp)) - return 1; - else { - static char outstr[sizeof("{count=}") + sizeof(int) * 3]; - - sprintf(outstr, "{count=%u}", reqbufs.count); - tcp->auxstr = outstr; - return 1 + RVAL_STR; } + tprints(is_get ? ", " : " => "); } - case VIDIOC_QUERYBUF: - case VIDIOC_QBUF: - case VIDIOC_DQBUF: { - struct v4l2_buffer b; + tprints("controls="); + struct_v4l2_ext_control ctrl; + bool fail = !print_array(tcp, (unsigned long) c.controls, c.count, + &ctrl, sizeof(ctrl), + umoven_or_printaddr_ignore_syserror, + print_v4l2_ext_control, 0); - if (umove(tcp, arg, &b) < 0) - return 0; - if (entering(tcp)) { - tprints(", {type="); - printxval(v4l2_buf_types, b.type, "V4L2_BUF_TYPE_???"); - if (code != VIDIOC_DQBUF) - tprintf(", index=%u", b.index); - } else { - if (!syserror(tcp)) { - if (code == VIDIOC_DQBUF) - tprintf(", index=%u", b.index); - tprints(", memory="); - printxval(v4l2_memories, b.memory, "V4L2_MEMORY_???"); - - if (b.memory == V4L2_MEMORY_MMAP) { - tprintf(", m.offset=%#x", b.m.offset); - } else if (b.memory == V4L2_MEMORY_USERPTR) { - tprintf(", m.userptr=%#lx", b.m.userptr); - } - - tprintf(", length=%u, bytesused=%u, flags=", - b.length, b.bytesused); - printflags(v4l2_buf_flags, b.flags, "V4L2_BUF_FLAG_???"); - if (code == VIDIOC_DQBUF) - tprintf(", timestamp = {%ju.%06ju}", - (uintmax_t)b.timestamp.tv_sec, - (uintmax_t)b.timestamp.tv_usec); - tprints(", ..."); - } - tprints("}"); + if (exiting(tcp) && syserror(tcp)) + tprintf(", error_idx=%u", c.error_idx); + + if (exiting(tcp) || fail) { + tprints("}"); + return RVAL_DECODED | 1; + } + return 1; +} +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES +# include "xlat/v4l2_framesize_types.h" + +static int +print_v4l2_frmsizeenum(struct tcb *tcp, const long arg) +{ + struct v4l2_frmsizeenum s; + + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &s)) + return RVAL_DECODED | 1; + tprintf("{index=%u, pixel_format=", s.index); + print_pixelformat(s.pixel_format); + return 0; + } + + if (!syserror(tcp) && !umove(tcp, arg, &s)) { + tprints(", type="); + printxval(v4l2_framesize_types, s.type, "V4L2_FRMSIZE_TYPE_???"); + switch (s.type) { + case V4L2_FRMSIZE_TYPE_DISCRETE: + tprintf(", discrete={width=%u, height=%u}", + s.discrete.width, s.discrete.height); + break; + case V4L2_FRMSIZE_TYPE_STEPWISE: + tprintf(", stepwise={min_width=%u, max_width=%u, " + "step_width=%u, min_height=%u, max_height=%u, " + "step_height=%u}", + s.stepwise.min_width, s.stepwise.max_width, + s.stepwise.step_width, s.stepwise.min_height, + s.stepwise.max_height, s.stepwise.step_height); + break; } - return 1; } + tprints("}"); + return 1; +} +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS +# include "xlat/v4l2_frameinterval_types.h" - case VIDIOC_STREAMON: - case VIDIOC_STREAMOFF: { - int type; +static int +print_v4l2_frmivalenum(struct tcb *tcp, const long arg) +{ + struct v4l2_frmivalenum f; - if (umove(tcp, arg, &type) < 0) - return 0; - if (entering(tcp)) { - tprints(", "); - printxval(v4l2_buf_types, type, "V4L2_BUF_TYPE_???"); + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &f)) + return RVAL_DECODED | 1; + tprintf("{index=%u, pixel_format=", f.index); + print_pixelformat(f.pixel_format); + tprintf(", width=%u, height=%u", f.width, f.height); + return 0; + } + if (!syserror(tcp) && !umove(tcp, arg, &f)) { + tprints(", type="); + printxval(v4l2_frameinterval_types, f.type, + "V4L2_FRMIVAL_TYPE_???"); + switch (f.type) { + case V4L2_FRMIVAL_TYPE_DISCRETE: + tprintf(", discrete=" FMT_FRACT, + ARGS_FRACT(f.discrete)); + break; + case V4L2_FRMIVAL_TYPE_STEPWISE: + case V4L2_FRMSIZE_TYPE_CONTINUOUS: + tprintf(", stepwise={min=" FMT_FRACT ", max=" + FMT_FRACT ", step=" FMT_FRACT "}", + ARGS_FRACT(f.stepwise.min), + ARGS_FRACT(f.stepwise.max), + ARGS_FRACT(f.stepwise.step)); + break; } - return 1; } + tprints("}"); + return 1; +} +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ - default: /* decode on exit */ +#ifdef VIDIOC_CREATE_BUFS +static int +print_v4l2_create_buffers(struct tcb *tcp, const long arg) +{ + struct_v4l2_create_buffers b; + + if (entering(tcp)) { + tprints(", "); + if (umove_or_printaddr(tcp, arg, &b)) + return RVAL_DECODED | 1; + tprintf("{count=%u, memory=", b.count); + printxval(v4l2_memories, b.memory, "V4L2_MEMORY_???"); + tprints(", format={type="); + printxval(v4l2_buf_types, b.format.type, + "V4L2_BUF_TYPE_???"); + print_v4l2_format_fmt(", ", + (struct_v4l2_format *) &b.format); + tprints("}}"); return 0; + } else { + static const char fmt[] = "{index=%u, count=%u}"; + static char outstr[sizeof(fmt) + sizeof(int) * 6]; + + if (syserror(tcp) || umove(tcp, arg, &b) < 0) + return 1; + sprintf(outstr, fmt, b.index, b.count); + tcp->auxstr = outstr; + return 1 + RVAL_STR; + } +} +#endif /* VIDIOC_CREATE_BUFS */ + +MPERS_PRINTER_DECL(int, v4l2_ioctl, + struct tcb *tcp, const unsigned int code, const long arg) +{ + if (!verbose(tcp)) + return RVAL_DECODED; + + switch (code) { + case VIDIOC_QUERYCAP: /* R */ + return print_v4l2_capability(tcp, arg); + + case VIDIOC_ENUM_FMT: /* RW */ + return print_v4l2_fmtdesc(tcp, arg); + + case VIDIOC_G_FMT: /* RW */ + case VIDIOC_S_FMT: /* RW */ + case VIDIOC_TRY_FMT: /* RW */ + return print_v4l2_format(tcp, arg, code == VIDIOC_G_FMT); + + case VIDIOC_REQBUFS: /* RW */ + return print_v4l2_requestbuffers(tcp, arg); + + case VIDIOC_QUERYBUF: /* RW */ + case VIDIOC_QBUF: /* RW */ + case VIDIOC_DQBUF: /* RW */ + return print_v4l2_buffer(tcp, code, arg); + + case VIDIOC_G_FBUF: /* R */ + if (entering(tcp)) + return 0; + /* fall through */ + case VIDIOC_S_FBUF: /* W */ + return print_v4l2_framebuffer(tcp, arg); + + case VIDIOC_STREAMON: /* W */ + case VIDIOC_STREAMOFF: /* W */ + return print_v4l2_buf_type(tcp, arg); + + case VIDIOC_G_PARM: /* RW */ + case VIDIOC_S_PARM: /* RW */ + return print_v4l2_streamparm(tcp, arg, code == VIDIOC_G_PARM); + + case VIDIOC_G_STD: /* R */ + if (entering(tcp)) + return 0; + /* fall through */ + case VIDIOC_S_STD: /* W */ + tprints(", "); + printnum_int64(tcp, arg, "%#" PRIx64); + return RVAL_DECODED | 1; + + case VIDIOC_ENUMSTD: /* RW */ + return print_v4l2_standard(tcp, arg); + + case VIDIOC_ENUMINPUT: /* RW */ + return print_v4l2_input(tcp, arg); + + case VIDIOC_G_CTRL: /* RW */ + case VIDIOC_S_CTRL: /* RW */ + return print_v4l2_control(tcp, arg, code == VIDIOC_G_CTRL); + + case VIDIOC_QUERYCTRL: /* RW */ + return print_v4l2_queryctrl(tcp, arg); + + case VIDIOC_G_INPUT: /* R */ + if (entering(tcp)) + return 0; + /* fall through */ + case VIDIOC_S_INPUT: /* RW */ + tprints(", "); + printnum_int(tcp, arg, "%u"); + return RVAL_DECODED | 1; + + case VIDIOC_CROPCAP: /* RW */ + return print_v4l2_cropcap(tcp, arg); + + case VIDIOC_G_CROP: /* RW */ + case VIDIOC_S_CROP: /* W */ + return print_v4l2_crop(tcp, arg, code == VIDIOC_G_CROP); + +#ifdef VIDIOC_S_EXT_CTRLS + case VIDIOC_S_EXT_CTRLS: /* RW */ + case VIDIOC_TRY_EXT_CTRLS: /* RW */ + case VIDIOC_G_EXT_CTRLS: /* RW */ + return print_v4l2_ext_controls(tcp, arg, + code == VIDIOC_G_EXT_CTRLS); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + case VIDIOC_ENUM_FRAMESIZES: /* RW */ + return print_v4l2_frmsizeenum(tcp, arg); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + case VIDIOC_ENUM_FRAMEINTERVALS: /* RW */ + return print_v4l2_frmivalenum(tcp, arg); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + case VIDIOC_CREATE_BUFS: /* RW */ + return print_v4l2_create_buffers(tcp, arg); +#endif /* VIDIOC_CREATE_BUFS */ + + default: + return RVAL_DECODED; } } diff -Nru strace-4.11/.version strace-4.12/.version --- strace-4.11/.version 2015-12-21 23:24:36.000000000 +0000 +++ strace-4.12/.version 2016-05-31 11:36:29.000000000 +0000 @@ -1 +1 @@ -4.11 +4.12 diff -Nru strace-4.11/wait.c strace-4.12/wait.c --- strace-4.11/wait.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/wait.c 2016-02-11 03:06:17.000000000 +0000 @@ -117,10 +117,8 @@ } static int -printwaitn(struct tcb *tcp, int n, int bitness) +printwaitn(struct tcb *tcp, void (*const print_rusage)(struct tcb *, long)) { - int status; - if (entering(tcp)) { /* On Linux, kernel-side pid_t is typedef'ed to int * on all arches. Also, glibc-2.8 truncates wait3 and wait4 @@ -131,6 +129,8 @@ int pid = tcp->u_arg[0]; tprintf("%d, ", pid); } else { + int status; + /* status */ if (tcp->u_rval == 0) printaddr(tcp->u_arg[1]); @@ -139,17 +139,11 @@ /* options */ tprints(", "); printflags(wait4_options, tcp->u_arg[2], "W???"); - if (n == 4) { - tprints(", "); + if (print_rusage) { /* usage */ - if (tcp->u_rval > 0) { -#ifdef ALPHA - if (bitness) - printrusage32(tcp, tcp->u_arg[3]); - else -#endif - printrusage(tcp, tcp->u_arg[3]); - } + tprints(", "); + if (tcp->u_rval > 0) + print_rusage(tcp, tcp->u_arg[3]); else printaddr(tcp->u_arg[3]); } @@ -159,18 +153,18 @@ SYS_FUNC(waitpid) { - return printwaitn(tcp, 3, 0); + return printwaitn(tcp, NULL); } SYS_FUNC(wait4) { - return printwaitn(tcp, 4, 0); + return printwaitn(tcp, printrusage); } #ifdef ALPHA SYS_FUNC(osf_wait4) { - return printwaitn(tcp, 4, 1); + return printwaitn(tcp, printrusage32); } #endif @@ -180,18 +174,17 @@ { if (entering(tcp)) { printxval(waitid_types, tcp->u_arg[0], "P_???"); - tprintf(", %ld, ", tcp->u_arg[1]); + int pid = tcp->u_arg[1]; + tprintf(", %d, ", pid); } else { /* siginfo */ printsiginfo_at(tcp, tcp->u_arg[2]); /* options */ tprints(", "); printflags(wait4_options, tcp->u_arg[3], "W???"); - if (tcp->s_ent->nargs > 4) { - /* usage */ - tprints(", "); - printrusage(tcp, tcp->u_arg[4]); - } + /* usage */ + tprints(", "); + printrusage(tcp, tcp->u_arg[4]); } return 0; } diff -Nru strace-4.11/xattr.c strace-4.12/xattr.c --- strace-4.11/xattr.c 2015-12-17 17:56:48.000000000 +0000 +++ strace-4.12/xattr.c 2016-05-10 21:50:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright (c) 2002-2005 Roland McGrath * Copyright (c) 2004 Ulrich Drepper - * Copyright (c) 2005-2015 Dmitry V. Levin + * Copyright (c) 2005-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,54 +35,30 @@ #include "xlat/xattrflags.h" +#ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +#endif + static void print_xattr_val(struct tcb *tcp, unsigned long addr, unsigned long insize, unsigned long size) { - char *buf = NULL; - unsigned int len; + static char buf[XATTR_SIZE_MAX]; tprints(", "); - if (insize == 0) - goto done; - - len = size; - if (size != (unsigned long) len) - goto done; - - if (!len) { - tprintf("\"\", %ld", insize); - return; - } - - if (!verbose(tcp) || (exiting(tcp) && syserror(tcp))) - goto done; - - buf = malloc(len); - if (!buf) - goto done; - - if (umoven(tcp, addr, len, buf) < 0) { - free(buf); - buf = NULL; - goto done; - } - - /* Don't print terminating NUL if there is one. */ - if (buf[len - 1] == '\0') - --len; - -done: - if (buf) { - print_quoted_string(buf, len, 0); - free(buf); - } else { + if (!addr || size > sizeof(buf)) printaddr(addr); + else if (!size || !umoven_or_printaddr(tcp, addr, size, buf)) { + /* Don't print terminating NUL if there is one. */ + if (size && buf[size - 1] == '\0') + --size; + + print_quoted_string(buf, size, 0); } - tprintf(", %ld", insize); + tprintf(", %lu", insize); } SYS_FUNC(setxattr) @@ -134,13 +110,10 @@ static void print_xattr_list(struct tcb *tcp, unsigned long addr, unsigned long size) { - if (syserror(tcp)) { + if (!size || syserror(tcp)) { printaddr(addr); } else { - unsigned long len = - (size < (unsigned long) tcp->u_rval) ? - size : (unsigned long) tcp->u_rval; - printstr(tcp, addr, len); + printstr(tcp, addr, tcp->u_rval); } tprintf(", %lu", size); } diff -Nru strace-4.11/xlat/addrfams.h strace-4.12/xlat/addrfams.h --- strace-4.11/xlat/addrfams.h 2015-12-21 23:23:46.000000000 +0000 +++ strace-4.12/xlat/addrfams.h 2016-05-31 11:35:31.000000000 +0000 @@ -1,4 +1,7 @@ /* Generated by ./xlat/gen.sh from ./xlat/addrfams.in; do not edit. */ +#if !(defined(AF_KCM) || (defined(HAVE_DECL_AF_KCM) && HAVE_DECL_AF_KCM)) +# define AF_KCM 41 +#endif #ifndef IN_MPERS @@ -132,6 +135,7 @@ #if defined(AF_VSOCK) || (defined(HAVE_DECL_AF_VSOCK) && HAVE_DECL_AF_VSOCK) XLAT(AF_VSOCK), #endif + XLAT(AF_KCM), XLAT_END }; diff -Nru strace-4.11/xlat/addrfams.in strace-4.12/xlat/addrfams.in --- strace-4.11/xlat/addrfams.in 2015-09-14 16:00:39.000000000 +0000 +++ strace-4.12/xlat/addrfams.in 2016-05-18 09:26:01.000000000 +0000 @@ -41,3 +41,4 @@ AF_ALG AF_NFC AF_VSOCK +AF_KCM 41 diff -Nru strace-4.11/xlat/blkpg_ops.h strace-4.12/xlat/blkpg_ops.h --- strace-4.11/xlat/blkpg_ops.h 2015-12-21 23:23:45.000000000 +0000 +++ strace-4.12/xlat/blkpg_ops.h 2016-05-31 11:35:31.000000000 +0000 @@ -11,11 +11,13 @@ #ifdef IN_MPERS -# error static const struct xlat blkpg_ops in mpers mode +extern const struct xlat blkpg_ops[]; #else +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) static +# endif const struct xlat blkpg_ops[] = { XLAT(BLKPG_ADD_PARTITION), XLAT(BLKPG_DEL_PARTITION), diff -Nru strace-4.11/xlat/bpf_map_types.h strace-4.12/xlat/bpf_map_types.h --- strace-4.11/xlat/bpf_map_types.h 2015-12-21 23:23:45.000000000 +0000 +++ strace-4.12/xlat/bpf_map_types.h 2016-05-31 11:35:31.000000000 +0000 @@ -14,6 +14,15 @@ #if !(defined(BPF_MAP_TYPE_PERF_EVENT_ARRAY) || (defined(HAVE_DECL_BPF_MAP_TYPE_PERF_EVENT_ARRAY) && HAVE_DECL_BPF_MAP_TYPE_PERF_EVENT_ARRAY)) # define BPF_MAP_TYPE_PERF_EVENT_ARRAY 4 #endif +#if !(defined(BPF_MAP_TYPE_PERCPU_HASH) || (defined(HAVE_DECL_BPF_MAP_TYPE_PERCPU_HASH) && HAVE_DECL_BPF_MAP_TYPE_PERCPU_HASH)) +# define BPF_MAP_TYPE_PERCPU_HASH 5 +#endif +#if !(defined(BPF_MAP_TYPE_PERCPU_ARRAY) || (defined(HAVE_DECL_BPF_MAP_TYPE_PERCPU_ARRAY) && HAVE_DECL_BPF_MAP_TYPE_PERCPU_ARRAY)) +# define BPF_MAP_TYPE_PERCPU_ARRAY 6 +#endif +#if !(defined(BPF_MAP_TYPE_STACK_TRACE) || (defined(HAVE_DECL_BPF_MAP_TYPE_STACK_TRACE) && HAVE_DECL_BPF_MAP_TYPE_STACK_TRACE)) +# define BPF_MAP_TYPE_STACK_TRACE 7 +#endif #ifdef IN_MPERS @@ -28,6 +37,9 @@ XLAT(BPF_MAP_TYPE_ARRAY), XLAT(BPF_MAP_TYPE_PROG_ARRAY), XLAT(BPF_MAP_TYPE_PERF_EVENT_ARRAY), + XLAT(BPF_MAP_TYPE_PERCPU_HASH), + XLAT(BPF_MAP_TYPE_PERCPU_ARRAY), + XLAT(BPF_MAP_TYPE_STACK_TRACE), XLAT_END }; diff -Nru strace-4.11/xlat/bpf_map_types.in strace-4.12/xlat/bpf_map_types.in --- strace-4.11/xlat/bpf_map_types.in 2015-09-14 15:40:17.000000000 +0000 +++ strace-4.12/xlat/bpf_map_types.in 2016-03-29 00:28:11.000000000 +0000 @@ -3,3 +3,6 @@ BPF_MAP_TYPE_ARRAY 2 BPF_MAP_TYPE_PROG_ARRAY 3 BPF_MAP_TYPE_PERF_EVENT_ARRAY 4 +BPF_MAP_TYPE_PERCPU_HASH 5 +BPF_MAP_TYPE_PERCPU_ARRAY 6 +BPF_MAP_TYPE_STACK_TRACE 7 diff -Nru strace-4.11/xlat/btrfs_balance_args.h strace-4.12/xlat/btrfs_balance_args.h --- strace-4.11/xlat/btrfs_balance_args.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_args.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,60 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_balance_args.in; do not edit. */ +#if !(defined(BTRFS_BALANCE_ARGS_PROFILES) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_PROFILES) && HAVE_DECL_BTRFS_BALANCE_ARGS_PROFILES)) +# define BTRFS_BALANCE_ARGS_PROFILES (1ULL << 0) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_USAGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_USAGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_USAGE)) +# define BTRFS_BALANCE_ARGS_USAGE (1ULL << 1) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_DEVID) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_DEVID) && HAVE_DECL_BTRFS_BALANCE_ARGS_DEVID)) +# define BTRFS_BALANCE_ARGS_DEVID (1ULL << 2) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_DRANGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_DRANGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_DRANGE)) +# define BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_VRANGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_VRANGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_VRANGE)) +# define BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_LIMIT) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_LIMIT) && HAVE_DECL_BTRFS_BALANCE_ARGS_LIMIT)) +# define BTRFS_BALANCE_ARGS_LIMIT (1ULL << 5) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_LIMIT_RANGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_LIMIT_RANGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_LIMIT_RANGE)) +# define BTRFS_BALANCE_ARGS_LIMIT_RANGE (1ULL << 6) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_STRIPES_RANGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_STRIPES_RANGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_STRIPES_RANGE)) +# define BTRFS_BALANCE_ARGS_STRIPES_RANGE (1ULL << 7) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_CONVERT) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_CONVERT) && HAVE_DECL_BTRFS_BALANCE_ARGS_CONVERT)) +# define BTRFS_BALANCE_ARGS_CONVERT (1ULL << 8) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_SOFT) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_SOFT) && HAVE_DECL_BTRFS_BALANCE_ARGS_SOFT)) +# define BTRFS_BALANCE_ARGS_SOFT (1ULL << 9) +#endif +#if !(defined(BTRFS_BALANCE_ARGS_USAGE_RANGE) || (defined(HAVE_DECL_BTRFS_BALANCE_ARGS_USAGE_RANGE) && HAVE_DECL_BTRFS_BALANCE_ARGS_USAGE_RANGE)) +# define BTRFS_BALANCE_ARGS_USAGE_RANGE (1ULL << 10) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_balance_args[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_balance_args[] = { + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_PROFILES), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_USAGE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_DEVID), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_DRANGE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_VRANGE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_LIMIT), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_LIMIT_RANGE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_STRIPES_RANGE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_CONVERT), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_SOFT), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ARGS_USAGE_RANGE), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_balance_args.in strace-4.12/xlat/btrfs_balance_args.in --- strace-4.11/xlat/btrfs_balance_args.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_args.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,12 @@ +#val_type uint64_t +BTRFS_BALANCE_ARGS_PROFILES (1ULL << 0) +BTRFS_BALANCE_ARGS_USAGE (1ULL << 1) +BTRFS_BALANCE_ARGS_DEVID (1ULL << 2) +BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) +BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) +BTRFS_BALANCE_ARGS_LIMIT (1ULL << 5) +BTRFS_BALANCE_ARGS_LIMIT_RANGE (1ULL << 6) +BTRFS_BALANCE_ARGS_STRIPES_RANGE (1ULL << 7) +BTRFS_BALANCE_ARGS_CONVERT (1ULL << 8) +BTRFS_BALANCE_ARGS_SOFT (1ULL << 9) +BTRFS_BALANCE_ARGS_USAGE_RANGE (1ULL << 10) diff -Nru strace-4.11/xlat/btrfs_balance_ctl_cmds.h strace-4.12/xlat/btrfs_balance_ctl_cmds.h --- strace-4.11/xlat/btrfs_balance_ctl_cmds.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_ctl_cmds.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,24 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_balance_ctl_cmds.in; do not edit. */ +#if !(defined(BTRFS_BALANCE_CTL_PAUSE) || (defined(HAVE_DECL_BTRFS_BALANCE_CTL_PAUSE) && HAVE_DECL_BTRFS_BALANCE_CTL_PAUSE)) +# define BTRFS_BALANCE_CTL_PAUSE 1 +#endif +#if !(defined(BTRFS_BALANCE_CTL_CANCEL) || (defined(HAVE_DECL_BTRFS_BALANCE_CTL_CANCEL) && HAVE_DECL_BTRFS_BALANCE_CTL_CANCEL)) +# define BTRFS_BALANCE_CTL_CANCEL 2 +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_balance_ctl_cmds[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_balance_ctl_cmds[] = { + XLAT(BTRFS_BALANCE_CTL_PAUSE), + XLAT(BTRFS_BALANCE_CTL_CANCEL), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_balance_ctl_cmds.in strace-4.12/xlat/btrfs_balance_ctl_cmds.in --- strace-4.11/xlat/btrfs_balance_ctl_cmds.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_ctl_cmds.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,2 @@ +BTRFS_BALANCE_CTL_PAUSE 1 +BTRFS_BALANCE_CTL_CANCEL 2 diff -Nru strace-4.11/xlat/btrfs_balance_flags.h strace-4.12/xlat/btrfs_balance_flags.h --- strace-4.11/xlat/btrfs_balance_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,36 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_balance_flags.in; do not edit. */ +#if !(defined(BTRFS_BALANCE_DATA) || (defined(HAVE_DECL_BTRFS_BALANCE_DATA) && HAVE_DECL_BTRFS_BALANCE_DATA)) +# define BTRFS_BALANCE_DATA (1ULL << 0) +#endif +#if !(defined(BTRFS_BALANCE_SYSTEM) || (defined(HAVE_DECL_BTRFS_BALANCE_SYSTEM) && HAVE_DECL_BTRFS_BALANCE_SYSTEM)) +# define BTRFS_BALANCE_SYSTEM (1ULL << 1) +#endif +#if !(defined(BTRFS_BALANCE_METADATA) || (defined(HAVE_DECL_BTRFS_BALANCE_METADATA) && HAVE_DECL_BTRFS_BALANCE_METADATA)) +# define BTRFS_BALANCE_METADATA (1ULL << 2) +#endif +#if !(defined(BTRFS_BALANCE_FORCE) || (defined(HAVE_DECL_BTRFS_BALANCE_FORCE) && HAVE_DECL_BTRFS_BALANCE_FORCE)) +# define BTRFS_BALANCE_FORCE (1ULL << 3) +#endif +#if !(defined(BTRFS_BALANCE_RESUME) || (defined(HAVE_DECL_BTRFS_BALANCE_RESUME) && HAVE_DECL_BTRFS_BALANCE_RESUME)) +# define BTRFS_BALANCE_RESUME (1ULL << 4) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_balance_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_balance_flags[] = { + XLAT_TYPE(uint64_t, BTRFS_BALANCE_DATA), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_SYSTEM), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_METADATA), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_FORCE), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_RESUME), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_balance_flags.in strace-4.12/xlat/btrfs_balance_flags.in --- strace-4.11/xlat/btrfs_balance_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,6 @@ +#val_type uint64_t +BTRFS_BALANCE_DATA (1ULL << 0) +BTRFS_BALANCE_SYSTEM (1ULL << 1) +BTRFS_BALANCE_METADATA (1ULL << 2) +BTRFS_BALANCE_FORCE (1ULL << 3) +BTRFS_BALANCE_RESUME (1ULL << 4) diff -Nru strace-4.11/xlat/btrfs_balance_state.h strace-4.12/xlat/btrfs_balance_state.h --- strace-4.11/xlat/btrfs_balance_state.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_state.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,28 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_balance_state.in; do not edit. */ +#if !(defined(BTRFS_BALANCE_STATE_RUNNING) || (defined(HAVE_DECL_BTRFS_BALANCE_STATE_RUNNING) && HAVE_DECL_BTRFS_BALANCE_STATE_RUNNING)) +# define BTRFS_BALANCE_STATE_RUNNING (1ULL << 0) +#endif +#if !(defined(BTRFS_BALANCE_STATE_PAUSE_REQ) || (defined(HAVE_DECL_BTRFS_BALANCE_STATE_PAUSE_REQ) && HAVE_DECL_BTRFS_BALANCE_STATE_PAUSE_REQ)) +# define BTRFS_BALANCE_STATE_PAUSE_REQ (1ULL << 1) +#endif +#if !(defined(BTRFS_BALANCE_STATE_CANCEL_REQ) || (defined(HAVE_DECL_BTRFS_BALANCE_STATE_CANCEL_REQ) && HAVE_DECL_BTRFS_BALANCE_STATE_CANCEL_REQ)) +# define BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_balance_state[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_balance_state[] = { + XLAT(BTRFS_BALANCE_STATE_RUNNING), + XLAT(BTRFS_BALANCE_STATE_PAUSE_REQ), + XLAT(BTRFS_BALANCE_STATE_CANCEL_REQ), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_balance_state.in strace-4.12/xlat/btrfs_balance_state.in --- strace-4.11/xlat/btrfs_balance_state.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_balance_state.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,3 @@ +BTRFS_BALANCE_STATE_RUNNING (1ULL << 0) +BTRFS_BALANCE_STATE_PAUSE_REQ (1ULL << 1) +BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2) diff -Nru strace-4.11/xlat/btrfs_compress_types.h strace-4.12/xlat/btrfs_compress_types.h --- strace-4.11/xlat/btrfs_compress_types.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_compress_types.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,28 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_compress_types.in; do not edit. */ +#if !(defined(BTRFS_COMPRESS_NONE) || (defined(HAVE_DECL_BTRFS_COMPRESS_NONE) && HAVE_DECL_BTRFS_COMPRESS_NONE)) +# define BTRFS_COMPRESS_NONE 0 +#endif +#if !(defined(BTRFS_COMPRESS_ZLIB) || (defined(HAVE_DECL_BTRFS_COMPRESS_ZLIB) && HAVE_DECL_BTRFS_COMPRESS_ZLIB)) +# define BTRFS_COMPRESS_ZLIB 1 +#endif +#if !(defined(BTRFS_COMPRESS_LZO) || (defined(HAVE_DECL_BTRFS_COMPRESS_LZO) && HAVE_DECL_BTRFS_COMPRESS_LZO)) +# define BTRFS_COMPRESS_LZO 2 +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_compress_types[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_compress_types[] = { + XLAT(BTRFS_COMPRESS_NONE), + XLAT(BTRFS_COMPRESS_ZLIB), + XLAT(BTRFS_COMPRESS_LZO), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_compress_types.in strace-4.12/xlat/btrfs_compress_types.in --- strace-4.11/xlat/btrfs_compress_types.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_compress_types.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,3 @@ +BTRFS_COMPRESS_NONE 0 +BTRFS_COMPRESS_ZLIB 1 +BTRFS_COMPRESS_LZO 2 diff -Nru strace-4.11/xlat/btrfs_defrag_flags.h strace-4.12/xlat/btrfs_defrag_flags.h --- strace-4.11/xlat/btrfs_defrag_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_defrag_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,22 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_defrag_flags.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_defrag_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_defrag_flags[] = { +#if defined(BTRFS_DEFRAG_RANGE_COMPRESS) || (defined(HAVE_DECL_BTRFS_DEFRAG_RANGE_COMPRESS) && HAVE_DECL_BTRFS_DEFRAG_RANGE_COMPRESS) + XLAT_TYPE(uint64_t, BTRFS_DEFRAG_RANGE_COMPRESS), +#endif +#if defined(BTRFS_DEFRAG_RANGE_START_IO) || (defined(HAVE_DECL_BTRFS_DEFRAG_RANGE_START_IO) && HAVE_DECL_BTRFS_DEFRAG_RANGE_START_IO) + XLAT_TYPE(uint64_t, BTRFS_DEFRAG_RANGE_START_IO), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_defrag_flags.in strace-4.12/xlat/btrfs_defrag_flags.in --- strace-4.11/xlat/btrfs_defrag_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_defrag_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,3 @@ +#val_type uint64_t +BTRFS_DEFRAG_RANGE_COMPRESS +BTRFS_DEFRAG_RANGE_START_IO diff -Nru strace-4.11/xlat/btrfs_dev_replace_cmds.h strace-4.12/xlat/btrfs_dev_replace_cmds.h --- strace-4.11/xlat/btrfs_dev_replace_cmds.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_cmds.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,25 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_dev_replace_cmds.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_dev_replace_cmds[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_dev_replace_cmds[] = { +#if defined(BTRFS_IOCTL_DEV_REPLACE_CMD_START) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_START) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_START) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_CMD_START), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_dev_replace_cmds.in strace-4.12/xlat/btrfs_dev_replace_cmds.in --- strace-4.11/xlat/btrfs_dev_replace_cmds.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_cmds.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,4 @@ +#val_type uint64_t +BTRFS_IOCTL_DEV_REPLACE_CMD_START +BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS +BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL diff -Nru strace-4.11/xlat/btrfs_dev_replace_results.h strace-4.12/xlat/btrfs_dev_replace_results.h --- strace-4.11/xlat/btrfs_dev_replace_results.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_results.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,28 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_dev_replace_results.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_dev_replace_results[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_dev_replace_results[] = { +#if defined(BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_dev_replace_results.in strace-4.12/xlat/btrfs_dev_replace_results.in --- strace-4.11/xlat/btrfs_dev_replace_results.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_results.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,5 @@ +#val_type uint64_t +BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR +BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED +BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED +BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS diff -Nru strace-4.11/xlat/btrfs_dev_replace_state.h strace-4.12/xlat/btrfs_dev_replace_state.h --- strace-4.11/xlat/btrfs_dev_replace_state.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_state.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,31 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_dev_replace_state.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_dev_replace_state[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_dev_replace_state[] = { +#if defined(BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED), +#endif +#if defined(BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED) || (defined(HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED) && HAVE_DECL_BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED) + XLAT_TYPE(uint64_t, BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_dev_replace_state.in strace-4.12/xlat/btrfs_dev_replace_state.in --- strace-4.11/xlat/btrfs_dev_replace_state.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_replace_state.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,6 @@ +#val_type uint64_t +BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED +BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED +BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED +BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED +BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED diff -Nru strace-4.11/xlat/btrfs_dev_stats_flags.h strace-4.12/xlat/btrfs_dev_stats_flags.h --- strace-4.11/xlat/btrfs_dev_stats_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_stats_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,19 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_dev_stats_flags.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_dev_stats_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_dev_stats_flags[] = { +#if defined(BTRFS_DEV_STATS_RESET) || (defined(HAVE_DECL_BTRFS_DEV_STATS_RESET) && HAVE_DECL_BTRFS_DEV_STATS_RESET) + XLAT_TYPE(uint64_t, BTRFS_DEV_STATS_RESET), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_dev_stats_flags.in strace-4.12/xlat/btrfs_dev_stats_flags.in --- strace-4.11/xlat/btrfs_dev_stats_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_stats_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,2 @@ +#val_type uint64_t +BTRFS_DEV_STATS_RESET diff -Nru strace-4.11/xlat/btrfs_dev_stats_values.h strace-4.12/xlat/btrfs_dev_stats_values.h --- strace-4.11/xlat/btrfs_dev_stats_values.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_stats_values.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,21 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_dev_stats_values.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_dev_stats_values[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_dev_stats_values[] = { + XLAT_TYPE(uint64_t, BTRFS_DEV_STAT_WRITE_ERRS), + XLAT_TYPE(uint64_t, BTRFS_DEV_STAT_READ_ERRS), + XLAT_TYPE(uint64_t, BTRFS_DEV_STAT_FLUSH_ERRS), + XLAT_TYPE(uint64_t, BTRFS_DEV_STAT_CORRUPTION_ERRS), + XLAT_TYPE(uint64_t, BTRFS_DEV_STAT_GENERATION_ERRS), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_dev_stats_values.in strace-4.12/xlat/btrfs_dev_stats_values.in --- strace-4.11/xlat/btrfs_dev_stats_values.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_dev_stats_values.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,7 @@ +#val_type uint64_t +#unconditional +BTRFS_DEV_STAT_WRITE_ERRS +BTRFS_DEV_STAT_READ_ERRS +BTRFS_DEV_STAT_FLUSH_ERRS +BTRFS_DEV_STAT_CORRUPTION_ERRS +BTRFS_DEV_STAT_GENERATION_ERRS diff -Nru strace-4.11/xlat/btrfs_features_compat.h strace-4.12/xlat/btrfs_features_compat.h --- strace-4.11/xlat/btrfs_features_compat.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_features_compat.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,16 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_features_compat.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_features_compat[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_features_compat[] = { + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_features_compat_ro.h strace-4.12/xlat/btrfs_features_compat_ro.h --- strace-4.11/xlat/btrfs_features_compat_ro.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_features_compat_ro.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,20 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_features_compat_ro.in; do not edit. */ +#if !(defined(BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE) || (defined(HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE) && HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE)) +# define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_features_compat_ro[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_features_compat_ro[] = { + XLAT_TYPE(uint64_t, BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_features_compat_ro.in strace-4.12/xlat/btrfs_features_compat_ro.in --- strace-4.11/xlat/btrfs_features_compat_ro.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_features_compat_ro.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,2 @@ +#val_type uint64_t +BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0) diff -Nru strace-4.11/xlat/btrfs_features_incompat.h strace-4.12/xlat/btrfs_features_incompat.h --- strace-4.11/xlat/btrfs_features_incompat.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_features_incompat.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,56 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_features_incompat.in; do not edit. */ +#if !(defined(BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF)) +# define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL)) +# define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS)) +# define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO)) +# define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2)) +# define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_BIG_METADATA) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_BIG_METADATA) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_BIG_METADATA)) +# define BTRFS_FEATURE_INCOMPAT_BIG_METADATA (1ULL << 5) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF)) +# define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF (1ULL << 6) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_RAID56) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_RAID56) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_RAID56)) +# define BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)) +# define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8) +#endif +#if !(defined(BTRFS_FEATURE_INCOMPAT_NO_HOLES) || (defined(HAVE_DECL_BTRFS_FEATURE_INCOMPAT_NO_HOLES) && HAVE_DECL_BTRFS_FEATURE_INCOMPAT_NO_HOLES)) +# define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_features_incompat[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_features_incompat[] = { + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_BIG_METADATA), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_RAID56), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_INCOMPAT_NO_HOLES), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_features_incompat.in strace-4.12/xlat/btrfs_features_incompat.in --- strace-4.11/xlat/btrfs_features_incompat.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_features_incompat.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,11 @@ +#val_type uint64_t +BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) +BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) +BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) +BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3) +BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4) +BTRFS_FEATURE_INCOMPAT_BIG_METADATA (1ULL << 5) +BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF (1ULL << 6) +BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7) +BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8) +BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9) diff -Nru strace-4.11/xlat/btrfs_key_types.h strace-4.12/xlat/btrfs_key_types.h --- strace-4.11/xlat/btrfs_key_types.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_key_types.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,180 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_key_types.in; do not edit. */ +#if !(defined(BTRFS_INODE_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_INODE_ITEM_KEY) && HAVE_DECL_BTRFS_INODE_ITEM_KEY)) +# define BTRFS_INODE_ITEM_KEY 1 +#endif +#if !(defined(BTRFS_INODE_REF_KEY) || (defined(HAVE_DECL_BTRFS_INODE_REF_KEY) && HAVE_DECL_BTRFS_INODE_REF_KEY)) +# define BTRFS_INODE_REF_KEY 12 +#endif +#if !(defined(BTRFS_INODE_EXTREF_KEY) || (defined(HAVE_DECL_BTRFS_INODE_EXTREF_KEY) && HAVE_DECL_BTRFS_INODE_EXTREF_KEY)) +# define BTRFS_INODE_EXTREF_KEY 13 +#endif +#if !(defined(BTRFS_XATTR_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_XATTR_ITEM_KEY) && HAVE_DECL_BTRFS_XATTR_ITEM_KEY)) +# define BTRFS_XATTR_ITEM_KEY 24 +#endif +#if !(defined(BTRFS_ORPHAN_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_ORPHAN_ITEM_KEY) && HAVE_DECL_BTRFS_ORPHAN_ITEM_KEY)) +# define BTRFS_ORPHAN_ITEM_KEY 48 +#endif +#if !(defined(BTRFS_DIR_LOG_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_DIR_LOG_ITEM_KEY) && HAVE_DECL_BTRFS_DIR_LOG_ITEM_KEY)) +# define BTRFS_DIR_LOG_ITEM_KEY 60 +#endif +#if !(defined(BTRFS_DIR_LOG_INDEX_KEY) || (defined(HAVE_DECL_BTRFS_DIR_LOG_INDEX_KEY) && HAVE_DECL_BTRFS_DIR_LOG_INDEX_KEY)) +# define BTRFS_DIR_LOG_INDEX_KEY 72 +#endif +#if !(defined(BTRFS_DIR_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_DIR_ITEM_KEY) && HAVE_DECL_BTRFS_DIR_ITEM_KEY)) +# define BTRFS_DIR_ITEM_KEY 84 +#endif +#if !(defined(BTRFS_DIR_INDEX_KEY) || (defined(HAVE_DECL_BTRFS_DIR_INDEX_KEY) && HAVE_DECL_BTRFS_DIR_INDEX_KEY)) +# define BTRFS_DIR_INDEX_KEY 96 +#endif +#if !(defined(BTRFS_EXTENT_DATA_KEY) || (defined(HAVE_DECL_BTRFS_EXTENT_DATA_KEY) && HAVE_DECL_BTRFS_EXTENT_DATA_KEY)) +# define BTRFS_EXTENT_DATA_KEY 108 +#endif +#if !(defined(BTRFS_EXTENT_CSUM_KEY) || (defined(HAVE_DECL_BTRFS_EXTENT_CSUM_KEY) && HAVE_DECL_BTRFS_EXTENT_CSUM_KEY)) +# define BTRFS_EXTENT_CSUM_KEY 128 +#endif +#if !(defined(BTRFS_ROOT_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_ROOT_ITEM_KEY) && HAVE_DECL_BTRFS_ROOT_ITEM_KEY)) +# define BTRFS_ROOT_ITEM_KEY 132 +#endif +#if !(defined(BTRFS_ROOT_BACKREF_KEY) || (defined(HAVE_DECL_BTRFS_ROOT_BACKREF_KEY) && HAVE_DECL_BTRFS_ROOT_BACKREF_KEY)) +# define BTRFS_ROOT_BACKREF_KEY 144 +#endif +#if !(defined(BTRFS_ROOT_REF_KEY) || (defined(HAVE_DECL_BTRFS_ROOT_REF_KEY) && HAVE_DECL_BTRFS_ROOT_REF_KEY)) +# define BTRFS_ROOT_REF_KEY 156 +#endif +#if !(defined(BTRFS_EXTENT_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_EXTENT_ITEM_KEY) && HAVE_DECL_BTRFS_EXTENT_ITEM_KEY)) +# define BTRFS_EXTENT_ITEM_KEY 168 +#endif +#if !(defined(BTRFS_METADATA_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_METADATA_ITEM_KEY) && HAVE_DECL_BTRFS_METADATA_ITEM_KEY)) +# define BTRFS_METADATA_ITEM_KEY 169 +#endif +#if !(defined(BTRFS_TREE_BLOCK_REF_KEY) || (defined(HAVE_DECL_BTRFS_TREE_BLOCK_REF_KEY) && HAVE_DECL_BTRFS_TREE_BLOCK_REF_KEY)) +# define BTRFS_TREE_BLOCK_REF_KEY 176 +#endif +#if !(defined(BTRFS_EXTENT_DATA_REF_KEY) || (defined(HAVE_DECL_BTRFS_EXTENT_DATA_REF_KEY) && HAVE_DECL_BTRFS_EXTENT_DATA_REF_KEY)) +# define BTRFS_EXTENT_DATA_REF_KEY 178 +#endif +#if !(defined(BTRFS_EXTENT_REF_V0_KEY) || (defined(HAVE_DECL_BTRFS_EXTENT_REF_V0_KEY) && HAVE_DECL_BTRFS_EXTENT_REF_V0_KEY)) +# define BTRFS_EXTENT_REF_V0_KEY 180 +#endif +#if !(defined(BTRFS_SHARED_BLOCK_REF_KEY) || (defined(HAVE_DECL_BTRFS_SHARED_BLOCK_REF_KEY) && HAVE_DECL_BTRFS_SHARED_BLOCK_REF_KEY)) +# define BTRFS_SHARED_BLOCK_REF_KEY 182 +#endif +#if !(defined(BTRFS_SHARED_DATA_REF_KEY) || (defined(HAVE_DECL_BTRFS_SHARED_DATA_REF_KEY) && HAVE_DECL_BTRFS_SHARED_DATA_REF_KEY)) +# define BTRFS_SHARED_DATA_REF_KEY 184 +#endif +#if !(defined(BTRFS_BLOCK_GROUP_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_ITEM_KEY) && HAVE_DECL_BTRFS_BLOCK_GROUP_ITEM_KEY)) +# define BTRFS_BLOCK_GROUP_ITEM_KEY 192 +#endif +#if !(defined(BTRFS_FREE_SPACE_INFO_KEY) || (defined(HAVE_DECL_BTRFS_FREE_SPACE_INFO_KEY) && HAVE_DECL_BTRFS_FREE_SPACE_INFO_KEY)) +# define BTRFS_FREE_SPACE_INFO_KEY 198 +#endif +#if !(defined(BTRFS_FREE_SPACE_EXTENT_KEY) || (defined(HAVE_DECL_BTRFS_FREE_SPACE_EXTENT_KEY) && HAVE_DECL_BTRFS_FREE_SPACE_EXTENT_KEY)) +# define BTRFS_FREE_SPACE_EXTENT_KEY 199 +#endif +#if !(defined(BTRFS_FREE_SPACE_BITMAP_KEY) || (defined(HAVE_DECL_BTRFS_FREE_SPACE_BITMAP_KEY) && HAVE_DECL_BTRFS_FREE_SPACE_BITMAP_KEY)) +# define BTRFS_FREE_SPACE_BITMAP_KEY 200 +#endif +#if !(defined(BTRFS_DEV_EXTENT_KEY) || (defined(HAVE_DECL_BTRFS_DEV_EXTENT_KEY) && HAVE_DECL_BTRFS_DEV_EXTENT_KEY)) +# define BTRFS_DEV_EXTENT_KEY 204 +#endif +#if !(defined(BTRFS_DEV_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_DEV_ITEM_KEY) && HAVE_DECL_BTRFS_DEV_ITEM_KEY)) +# define BTRFS_DEV_ITEM_KEY 216 +#endif +#if !(defined(BTRFS_CHUNK_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_CHUNK_ITEM_KEY) && HAVE_DECL_BTRFS_CHUNK_ITEM_KEY)) +# define BTRFS_CHUNK_ITEM_KEY 228 +#endif +#if !(defined(BTRFS_QGROUP_STATUS_KEY) || (defined(HAVE_DECL_BTRFS_QGROUP_STATUS_KEY) && HAVE_DECL_BTRFS_QGROUP_STATUS_KEY)) +# define BTRFS_QGROUP_STATUS_KEY 240 +#endif +#if !(defined(BTRFS_QGROUP_INFO_KEY) || (defined(HAVE_DECL_BTRFS_QGROUP_INFO_KEY) && HAVE_DECL_BTRFS_QGROUP_INFO_KEY)) +# define BTRFS_QGROUP_INFO_KEY 242 +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_KEY) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_KEY) && HAVE_DECL_BTRFS_QGROUP_LIMIT_KEY)) +# define BTRFS_QGROUP_LIMIT_KEY 244 +#endif +#if !(defined(BTRFS_QGROUP_RELATION_KEY) || (defined(HAVE_DECL_BTRFS_QGROUP_RELATION_KEY) && HAVE_DECL_BTRFS_QGROUP_RELATION_KEY)) +# define BTRFS_QGROUP_RELATION_KEY 246 +#endif +#if !(defined(BTRFS_BALANCE_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_BALANCE_ITEM_KEY) && HAVE_DECL_BTRFS_BALANCE_ITEM_KEY)) +# define BTRFS_BALANCE_ITEM_KEY 248 +#endif +#if !(defined(BTRFS_TEMPORARY_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_TEMPORARY_ITEM_KEY) && HAVE_DECL_BTRFS_TEMPORARY_ITEM_KEY)) +# define BTRFS_TEMPORARY_ITEM_KEY 248 +#endif +#if !(defined(BTRFS_DEV_STATS_KEY) || (defined(HAVE_DECL_BTRFS_DEV_STATS_KEY) && HAVE_DECL_BTRFS_DEV_STATS_KEY)) +# define BTRFS_DEV_STATS_KEY 249 +#endif +#if !(defined(BTRFS_PERSISTENT_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_PERSISTENT_ITEM_KEY) && HAVE_DECL_BTRFS_PERSISTENT_ITEM_KEY)) +# define BTRFS_PERSISTENT_ITEM_KEY 249 +#endif +#if !(defined(BTRFS_DEV_REPLACE_KEY) || (defined(HAVE_DECL_BTRFS_DEV_REPLACE_KEY) && HAVE_DECL_BTRFS_DEV_REPLACE_KEY)) +# define BTRFS_DEV_REPLACE_KEY 250 +#endif +#if !(defined(BTRFS_UUID_KEY_SUBVOL) || (defined(HAVE_DECL_BTRFS_UUID_KEY_SUBVOL) && HAVE_DECL_BTRFS_UUID_KEY_SUBVOL)) +# define BTRFS_UUID_KEY_SUBVOL 251 +#endif +#if !(defined(BTRFS_UUID_KEY_RECEIVED_SUBVOL) || (defined(HAVE_DECL_BTRFS_UUID_KEY_RECEIVED_SUBVOL) && HAVE_DECL_BTRFS_UUID_KEY_RECEIVED_SUBVOL)) +# define BTRFS_UUID_KEY_RECEIVED_SUBVOL 252 +#endif +#if !(defined(BTRFS_STRING_ITEM_KEY) || (defined(HAVE_DECL_BTRFS_STRING_ITEM_KEY) && HAVE_DECL_BTRFS_STRING_ITEM_KEY)) +# define BTRFS_STRING_ITEM_KEY 253 +#endif +#if !(defined(UINT32_MAX) || (defined(HAVE_DECL_UINT32_MAX) && HAVE_DECL_UINT32_MAX)) +# define UINT32_MAX -1U +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_key_types[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_key_types[] = { + XLAT_TYPE(uint64_t, BTRFS_INODE_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_INODE_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_INODE_EXTREF_KEY), + XLAT_TYPE(uint64_t, BTRFS_XATTR_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_ORPHAN_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_DIR_LOG_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_DIR_LOG_INDEX_KEY), + XLAT_TYPE(uint64_t, BTRFS_DIR_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_DIR_INDEX_KEY), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_DATA_KEY), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_CSUM_KEY), + XLAT_TYPE(uint64_t, BTRFS_ROOT_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_ROOT_BACKREF_KEY), + XLAT_TYPE(uint64_t, BTRFS_ROOT_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_METADATA_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_TREE_BLOCK_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_DATA_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_REF_V0_KEY), + XLAT_TYPE(uint64_t, BTRFS_SHARED_BLOCK_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_SHARED_DATA_REF_KEY), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_FREE_SPACE_INFO_KEY), + XLAT_TYPE(uint64_t, BTRFS_FREE_SPACE_EXTENT_KEY), + XLAT_TYPE(uint64_t, BTRFS_FREE_SPACE_BITMAP_KEY), + XLAT_TYPE(uint64_t, BTRFS_DEV_EXTENT_KEY), + XLAT_TYPE(uint64_t, BTRFS_DEV_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_CHUNK_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_STATUS_KEY), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_INFO_KEY), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_KEY), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_RELATION_KEY), + XLAT_TYPE(uint64_t, BTRFS_BALANCE_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_TEMPORARY_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_DEV_STATS_KEY), + XLAT_TYPE(uint64_t, BTRFS_PERSISTENT_ITEM_KEY), + XLAT_TYPE(uint64_t, BTRFS_DEV_REPLACE_KEY), + XLAT_TYPE(uint64_t, BTRFS_UUID_KEY_SUBVOL), + XLAT_TYPE(uint64_t, BTRFS_UUID_KEY_RECEIVED_SUBVOL), + XLAT_TYPE(uint64_t, BTRFS_STRING_ITEM_KEY), + XLAT_TYPE(uint64_t, UINT32_MAX), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_key_types.in strace-4.12/xlat/btrfs_key_types.in --- strace-4.11/xlat/btrfs_key_types.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_key_types.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,42 @@ +#val_type uint64_t +BTRFS_INODE_ITEM_KEY 1 +BTRFS_INODE_REF_KEY 12 +BTRFS_INODE_EXTREF_KEY 13 +BTRFS_XATTR_ITEM_KEY 24 +BTRFS_ORPHAN_ITEM_KEY 48 +BTRFS_DIR_LOG_ITEM_KEY 60 +BTRFS_DIR_LOG_INDEX_KEY 72 +BTRFS_DIR_ITEM_KEY 84 +BTRFS_DIR_INDEX_KEY 96 +BTRFS_EXTENT_DATA_KEY 108 +BTRFS_EXTENT_CSUM_KEY 128 +BTRFS_ROOT_ITEM_KEY 132 +BTRFS_ROOT_BACKREF_KEY 144 +BTRFS_ROOT_REF_KEY 156 +BTRFS_EXTENT_ITEM_KEY 168 +BTRFS_METADATA_ITEM_KEY 169 +BTRFS_TREE_BLOCK_REF_KEY 176 +BTRFS_EXTENT_DATA_REF_KEY 178 +BTRFS_EXTENT_REF_V0_KEY 180 +BTRFS_SHARED_BLOCK_REF_KEY 182 +BTRFS_SHARED_DATA_REF_KEY 184 +BTRFS_BLOCK_GROUP_ITEM_KEY 192 +BTRFS_FREE_SPACE_INFO_KEY 198 +BTRFS_FREE_SPACE_EXTENT_KEY 199 +BTRFS_FREE_SPACE_BITMAP_KEY 200 +BTRFS_DEV_EXTENT_KEY 204 +BTRFS_DEV_ITEM_KEY 216 +BTRFS_CHUNK_ITEM_KEY 228 +BTRFS_QGROUP_STATUS_KEY 240 +BTRFS_QGROUP_INFO_KEY 242 +BTRFS_QGROUP_LIMIT_KEY 244 +BTRFS_QGROUP_RELATION_KEY 246 +BTRFS_BALANCE_ITEM_KEY 248 +BTRFS_TEMPORARY_ITEM_KEY 248 +BTRFS_DEV_STATS_KEY 249 +BTRFS_PERSISTENT_ITEM_KEY 249 +BTRFS_DEV_REPLACE_KEY 250 +BTRFS_UUID_KEY_SUBVOL 251 +BTRFS_UUID_KEY_RECEIVED_SUBVOL 252 +BTRFS_STRING_ITEM_KEY 253 +UINT32_MAX -1U diff -Nru strace-4.11/xlat/btrfs_qgroup_ctl_cmds.h strace-4.12/xlat/btrfs_qgroup_ctl_cmds.h --- strace-4.11/xlat/btrfs_qgroup_ctl_cmds.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_ctl_cmds.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,25 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_qgroup_ctl_cmds.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_qgroup_ctl_cmds[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_qgroup_ctl_cmds[] = { +#if defined(BTRFS_QUOTA_CTL_ENABLE) || (defined(HAVE_DECL_BTRFS_QUOTA_CTL_ENABLE) && HAVE_DECL_BTRFS_QUOTA_CTL_ENABLE) + XLAT_TYPE(uint64_t, BTRFS_QUOTA_CTL_ENABLE), +#endif +#if defined(BTRFS_QUOTA_CTL_DISABLE) || (defined(HAVE_DECL_BTRFS_QUOTA_CTL_DISABLE) && HAVE_DECL_BTRFS_QUOTA_CTL_DISABLE) + XLAT_TYPE(uint64_t, BTRFS_QUOTA_CTL_DISABLE), +#endif +#if defined(BTRFS_QUOTA_CTL_RESCAN__NOTUSED) || (defined(HAVE_DECL_BTRFS_QUOTA_CTL_RESCAN__NOTUSED) && HAVE_DECL_BTRFS_QUOTA_CTL_RESCAN__NOTUSED) + XLAT_TYPE(uint64_t, BTRFS_QUOTA_CTL_RESCAN__NOTUSED), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_qgroup_ctl_cmds.in strace-4.12/xlat/btrfs_qgroup_ctl_cmds.in --- strace-4.11/xlat/btrfs_qgroup_ctl_cmds.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_ctl_cmds.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,4 @@ +#val_type uint64_t +BTRFS_QUOTA_CTL_ENABLE +BTRFS_QUOTA_CTL_DISABLE +BTRFS_QUOTA_CTL_RESCAN__NOTUSED diff -Nru strace-4.11/xlat/btrfs_qgroup_inherit_flags.h strace-4.12/xlat/btrfs_qgroup_inherit_flags.h --- strace-4.11/xlat/btrfs_qgroup_inherit_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_inherit_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,19 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_qgroup_inherit_flags.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_qgroup_inherit_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_qgroup_inherit_flags[] = { +#if defined(BTRFS_QGROUP_INHERIT_SET_LIMITS) || (defined(HAVE_DECL_BTRFS_QGROUP_INHERIT_SET_LIMITS) && HAVE_DECL_BTRFS_QGROUP_INHERIT_SET_LIMITS) + XLAT_TYPE(uint64_t, BTRFS_QGROUP_INHERIT_SET_LIMITS), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_qgroup_inherit_flags.in strace-4.12/xlat/btrfs_qgroup_inherit_flags.in --- strace-4.11/xlat/btrfs_qgroup_inherit_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_inherit_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,2 @@ +#val_type uint64_t +BTRFS_QGROUP_INHERIT_SET_LIMITS diff -Nru strace-4.11/xlat/btrfs_qgroup_limit_flags.h strace-4.12/xlat/btrfs_qgroup_limit_flags.h --- strace-4.11/xlat/btrfs_qgroup_limit_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_limit_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,40 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_qgroup_limit_flags.in; do not edit. */ +#if !(defined(BTRFS_QGROUP_LIMIT_MAX_RFER) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_MAX_RFER) && HAVE_DECL_BTRFS_QGROUP_LIMIT_MAX_RFER)) +# define BTRFS_QGROUP_LIMIT_MAX_RFER (1ULL << 0) +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_MAX_EXCL) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_MAX_EXCL) && HAVE_DECL_BTRFS_QGROUP_LIMIT_MAX_EXCL)) +# define BTRFS_QGROUP_LIMIT_MAX_EXCL (1ULL << 1) +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_RSV_RFER) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_RSV_RFER) && HAVE_DECL_BTRFS_QGROUP_LIMIT_RSV_RFER)) +# define BTRFS_QGROUP_LIMIT_RSV_RFER (1ULL << 2) +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_RSV_EXCL) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_RSV_EXCL) && HAVE_DECL_BTRFS_QGROUP_LIMIT_RSV_EXCL)) +# define BTRFS_QGROUP_LIMIT_RSV_EXCL (1ULL << 3) +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_RFER_CMPR) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_RFER_CMPR) && HAVE_DECL_BTRFS_QGROUP_LIMIT_RFER_CMPR)) +# define BTRFS_QGROUP_LIMIT_RFER_CMPR (1ULL << 4) +#endif +#if !(defined(BTRFS_QGROUP_LIMIT_EXCL_CMPR) || (defined(HAVE_DECL_BTRFS_QGROUP_LIMIT_EXCL_CMPR) && HAVE_DECL_BTRFS_QGROUP_LIMIT_EXCL_CMPR)) +# define BTRFS_QGROUP_LIMIT_EXCL_CMPR (1ULL << 5) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_qgroup_limit_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_qgroup_limit_flags[] = { + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_MAX_RFER), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_MAX_EXCL), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_RSV_RFER), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_RSV_EXCL), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_RFER_CMPR), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_LIMIT_EXCL_CMPR), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_qgroup_limit_flags.in strace-4.12/xlat/btrfs_qgroup_limit_flags.in --- strace-4.11/xlat/btrfs_qgroup_limit_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_limit_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,7 @@ +#val_type uint64_t +BTRFS_QGROUP_LIMIT_MAX_RFER (1ULL << 0) +BTRFS_QGROUP_LIMIT_MAX_EXCL (1ULL << 1) +BTRFS_QGROUP_LIMIT_RSV_RFER (1ULL << 2) +BTRFS_QGROUP_LIMIT_RSV_EXCL (1ULL << 3) +BTRFS_QGROUP_LIMIT_RFER_CMPR (1ULL << 4) +BTRFS_QGROUP_LIMIT_EXCL_CMPR (1ULL << 5) diff -Nru strace-4.11/xlat/btrfs_qgroup_status_flags.h strace-4.12/xlat/btrfs_qgroup_status_flags.h --- strace-4.11/xlat/btrfs_qgroup_status_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_status_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,24 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_qgroup_status_flags.in; do not edit. */ +#if !(defined(BTRFS_QGROUP_STATUS_FLAG_ON) || (defined(HAVE_DECL_BTRFS_QGROUP_STATUS_FLAG_ON) && HAVE_DECL_BTRFS_QGROUP_STATUS_FLAG_ON)) +# define BTRFS_QGROUP_STATUS_FLAG_ON (1ULL << 0) +#endif +#if !(defined(BTRFS_QGROUP_STATUS_FLAG_RESCAN) || (defined(HAVE_DECL_BTRFS_QGROUP_STATUS_FLAG_RESCAN) && HAVE_DECL_BTRFS_QGROUP_STATUS_FLAG_RESCAN)) +# define BTRFS_QGROUP_STATUS_FLAG_RESCAN (1ULL << 1) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_qgroup_status_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_qgroup_status_flags[] = { + XLAT_TYPE(uint64_t, BTRFS_QGROUP_STATUS_FLAG_ON), + XLAT_TYPE(uint64_t, BTRFS_QGROUP_STATUS_FLAG_RESCAN), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_qgroup_status_flags.in strace-4.12/xlat/btrfs_qgroup_status_flags.in --- strace-4.11/xlat/btrfs_qgroup_status_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_qgroup_status_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,3 @@ +#val_type uint64_t +BTRFS_QGROUP_STATUS_FLAG_ON (1ULL << 0) +BTRFS_QGROUP_STATUS_FLAG_RESCAN (1ULL << 1) diff -Nru strace-4.11/xlat/btrfs_scrub_flags.h strace-4.12/xlat/btrfs_scrub_flags.h --- strace-4.11/xlat/btrfs_scrub_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_scrub_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,20 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_scrub_flags.in; do not edit. */ +#if !(defined(BTRFS_SCRUB_READONLY) || (defined(HAVE_DECL_BTRFS_SCRUB_READONLY) && HAVE_DECL_BTRFS_SCRUB_READONLY)) +# define BTRFS_SCRUB_READONLY 1 +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_scrub_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_scrub_flags[] = { + XLAT_TYPE(uint64_t, BTRFS_SCRUB_READONLY), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_scrub_flags.in strace-4.12/xlat/btrfs_scrub_flags.in --- strace-4.11/xlat/btrfs_scrub_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_scrub_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,2 @@ +#val_type uint64_t +BTRFS_SCRUB_READONLY 1 diff -Nru strace-4.11/xlat/btrfs_send_flags.h strace-4.12/xlat/btrfs_send_flags.h --- strace-4.11/xlat/btrfs_send_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_send_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,28 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_send_flags.in; do not edit. */ +#if !(defined(BTRFS_SEND_FLAG_NO_FILE_DATA) || (defined(HAVE_DECL_BTRFS_SEND_FLAG_NO_FILE_DATA) && HAVE_DECL_BTRFS_SEND_FLAG_NO_FILE_DATA)) +# define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1 +#endif +#if !(defined(BTRFS_SEND_FLAG_OMIT_STREAM_HEADER) || (defined(HAVE_DECL_BTRFS_SEND_FLAG_OMIT_STREAM_HEADER) && HAVE_DECL_BTRFS_SEND_FLAG_OMIT_STREAM_HEADER)) +# define BTRFS_SEND_FLAG_OMIT_STREAM_HEADER 0x2 +#endif +#if !(defined(BTRFS_SEND_FLAG_OMIT_END_CMD) || (defined(HAVE_DECL_BTRFS_SEND_FLAG_OMIT_END_CMD) && HAVE_DECL_BTRFS_SEND_FLAG_OMIT_END_CMD)) +# define BTRFS_SEND_FLAG_OMIT_END_CMD 0x4 +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_send_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_send_flags[] = { + XLAT(BTRFS_SEND_FLAG_NO_FILE_DATA), + XLAT(BTRFS_SEND_FLAG_OMIT_STREAM_HEADER), + XLAT(BTRFS_SEND_FLAG_OMIT_END_CMD), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_send_flags.in strace-4.12/xlat/btrfs_send_flags.in --- strace-4.11/xlat/btrfs_send_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_send_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,3 @@ +BTRFS_SEND_FLAG_NO_FILE_DATA 0x1 +BTRFS_SEND_FLAG_OMIT_STREAM_HEADER 0x2 +BTRFS_SEND_FLAG_OMIT_END_CMD 0x4 diff -Nru strace-4.11/xlat/btrfs_snap_flags_v2.h strace-4.12/xlat/btrfs_snap_flags_v2.h --- strace-4.11/xlat/btrfs_snap_flags_v2.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_snap_flags_v2.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,25 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_snap_flags_v2.in; do not edit. */ + +#ifdef IN_MPERS + +extern const struct xlat btrfs_snap_flags_v2[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_snap_flags_v2[] = { +#if defined(BTRFS_SUBVOL_CREATE_ASYNC) || (defined(HAVE_DECL_BTRFS_SUBVOL_CREATE_ASYNC) && HAVE_DECL_BTRFS_SUBVOL_CREATE_ASYNC) + XLAT_TYPE(uint64_t, BTRFS_SUBVOL_CREATE_ASYNC), +#endif +#if defined(BTRFS_SUBVOL_RDONLY) || (defined(HAVE_DECL_BTRFS_SUBVOL_RDONLY) && HAVE_DECL_BTRFS_SUBVOL_RDONLY) + XLAT_TYPE(uint64_t, BTRFS_SUBVOL_RDONLY), +#endif +#if defined(BTRFS_SUBVOL_QGROUP_INHERIT) || (defined(HAVE_DECL_BTRFS_SUBVOL_QGROUP_INHERIT) && HAVE_DECL_BTRFS_SUBVOL_QGROUP_INHERIT) + XLAT_TYPE(uint64_t, BTRFS_SUBVOL_QGROUP_INHERIT), +#endif + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_snap_flags_v2.in strace-4.12/xlat/btrfs_snap_flags_v2.in --- strace-4.11/xlat/btrfs_snap_flags_v2.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_snap_flags_v2.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,4 @@ +#val_type uint64_t +BTRFS_SUBVOL_CREATE_ASYNC +BTRFS_SUBVOL_RDONLY +BTRFS_SUBVOL_QGROUP_INHERIT diff -Nru strace-4.11/xlat/btrfs_space_info_flags.h strace-4.12/xlat/btrfs_space_info_flags.h --- strace-4.11/xlat/btrfs_space_info_flags.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_space_info_flags.h 2016-05-31 11:35:32.000000000 +0000 @@ -0,0 +1,60 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_space_info_flags.in; do not edit. */ +#if !(defined(BTRFS_BLOCK_GROUP_DATA) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_DATA) && HAVE_DECL_BTRFS_BLOCK_GROUP_DATA)) +# define BTRFS_BLOCK_GROUP_DATA (1ULL << 0) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_SYSTEM) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_SYSTEM) && HAVE_DECL_BTRFS_BLOCK_GROUP_SYSTEM)) +# define BTRFS_BLOCK_GROUP_SYSTEM (1ULL << 1) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_METADATA) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_METADATA) && HAVE_DECL_BTRFS_BLOCK_GROUP_METADATA)) +# define BTRFS_BLOCK_GROUP_METADATA (1ULL << 2) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_RAID0) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_RAID0) && HAVE_DECL_BTRFS_BLOCK_GROUP_RAID0)) +# define BTRFS_BLOCK_GROUP_RAID0 (1ULL << 3) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_RAID1) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_RAID1) && HAVE_DECL_BTRFS_BLOCK_GROUP_RAID1)) +# define BTRFS_BLOCK_GROUP_RAID1 (1ULL << 4) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_DUP) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_DUP) && HAVE_DECL_BTRFS_BLOCK_GROUP_DUP)) +# define BTRFS_BLOCK_GROUP_DUP (1ULL << 5) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_RAID10) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_RAID10) && HAVE_DECL_BTRFS_BLOCK_GROUP_RAID10)) +# define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_RAID5) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_RAID5) && HAVE_DECL_BTRFS_BLOCK_GROUP_RAID5)) +# define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7) +#endif +#if !(defined(BTRFS_BLOCK_GROUP_RAID6) || (defined(HAVE_DECL_BTRFS_BLOCK_GROUP_RAID6) && HAVE_DECL_BTRFS_BLOCK_GROUP_RAID6)) +# define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) +#endif +#if !(defined(BTRFS_AVAIL_ALLOC_BIT_SINGLE) || (defined(HAVE_DECL_BTRFS_AVAIL_ALLOC_BIT_SINGLE) && HAVE_DECL_BTRFS_AVAIL_ALLOC_BIT_SINGLE)) +# define BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48) +#endif +#if !(defined(BTRFS_SPACE_INFO_GLOBAL_RSV) || (defined(HAVE_DECL_BTRFS_SPACE_INFO_GLOBAL_RSV) && HAVE_DECL_BTRFS_SPACE_INFO_GLOBAL_RSV)) +# define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49) +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_space_info_flags[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_space_info_flags[] = { + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_DATA), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_SYSTEM), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_METADATA), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_RAID0), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_RAID1), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_DUP), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_RAID10), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_RAID5), + XLAT_TYPE(uint64_t, BTRFS_BLOCK_GROUP_RAID6), + XLAT_TYPE(uint64_t, BTRFS_AVAIL_ALLOC_BIT_SINGLE), + XLAT_TYPE(uint64_t, BTRFS_SPACE_INFO_GLOBAL_RSV), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_space_info_flags.in strace-4.12/xlat/btrfs_space_info_flags.in --- strace-4.11/xlat/btrfs_space_info_flags.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_space_info_flags.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,12 @@ +#val_type uint64_t +BTRFS_BLOCK_GROUP_DATA (1ULL << 0) +BTRFS_BLOCK_GROUP_SYSTEM (1ULL << 1) +BTRFS_BLOCK_GROUP_METADATA (1ULL << 2) +BTRFS_BLOCK_GROUP_RAID0 (1ULL << 3) +BTRFS_BLOCK_GROUP_RAID1 (1ULL << 4) +BTRFS_BLOCK_GROUP_DUP (1ULL << 5) +BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6) +BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7) +BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) +BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48) +BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49) diff -Nru strace-4.11/xlat/btrfs_tree_objectids.h strace-4.12/xlat/btrfs_tree_objectids.h --- strace-4.11/xlat/btrfs_tree_objectids.h 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_tree_objectids.h 2016-05-31 11:35:33.000000000 +0000 @@ -0,0 +1,68 @@ +/* Generated by ./xlat/gen.sh from ./xlat/btrfs_tree_objectids.in; do not edit. */ +#if !(defined(BTRFS_ROOT_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_ROOT_TREE_OBJECTID) && HAVE_DECL_BTRFS_ROOT_TREE_OBJECTID)) +# define BTRFS_ROOT_TREE_OBJECTID 1ULL +#endif +#if !(defined(BTRFS_EXTENT_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_EXTENT_TREE_OBJECTID) && HAVE_DECL_BTRFS_EXTENT_TREE_OBJECTID)) +# define BTRFS_EXTENT_TREE_OBJECTID 2ULL +#endif +#if !(defined(BTRFS_CHUNK_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_CHUNK_TREE_OBJECTID) && HAVE_DECL_BTRFS_CHUNK_TREE_OBJECTID)) +# define BTRFS_CHUNK_TREE_OBJECTID 3ULL +#endif +#if !(defined(BTRFS_DEV_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_DEV_TREE_OBJECTID) && HAVE_DECL_BTRFS_DEV_TREE_OBJECTID)) +# define BTRFS_DEV_TREE_OBJECTID 4ULL +#endif +#if !(defined(BTRFS_FS_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_FS_TREE_OBJECTID) && HAVE_DECL_BTRFS_FS_TREE_OBJECTID)) +# define BTRFS_FS_TREE_OBJECTID 5ULL +#endif +#if !(defined(BTRFS_ROOT_TREE_DIR_OBJECTID) || (defined(HAVE_DECL_BTRFS_ROOT_TREE_DIR_OBJECTID) && HAVE_DECL_BTRFS_ROOT_TREE_DIR_OBJECTID)) +# define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL +#endif +#if !(defined(BTRFS_CSUM_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_CSUM_TREE_OBJECTID) && HAVE_DECL_BTRFS_CSUM_TREE_OBJECTID)) +# define BTRFS_CSUM_TREE_OBJECTID 7ULL +#endif +#if !(defined(BTRFS_QUOTA_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_QUOTA_TREE_OBJECTID) && HAVE_DECL_BTRFS_QUOTA_TREE_OBJECTID)) +# define BTRFS_QUOTA_TREE_OBJECTID 8ULL +#endif +#if !(defined(BTRFS_UUID_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_UUID_TREE_OBJECTID) && HAVE_DECL_BTRFS_UUID_TREE_OBJECTID)) +# define BTRFS_UUID_TREE_OBJECTID 9ULL +#endif +#if !(defined(BTRFS_FREE_SPACE_TREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_FREE_SPACE_TREE_OBJECTID) && HAVE_DECL_BTRFS_FREE_SPACE_TREE_OBJECTID)) +# define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL +#endif +#if !(defined(BTRFS_FIRST_FREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_FIRST_FREE_OBJECTID) && HAVE_DECL_BTRFS_FIRST_FREE_OBJECTID)) +# define BTRFS_FIRST_FREE_OBJECTID 256ULL +#endif +#if !(defined(BTRFS_LAST_FREE_OBJECTID) || (defined(HAVE_DECL_BTRFS_LAST_FREE_OBJECTID) && HAVE_DECL_BTRFS_LAST_FREE_OBJECTID)) +# define BTRFS_LAST_FREE_OBJECTID -256ULL +#endif +#if !(defined(UINT64_MAX) || (defined(HAVE_DECL_UINT64_MAX) && HAVE_DECL_UINT64_MAX)) +# define UINT64_MAX -1ULL +#endif + +#ifdef IN_MPERS + +extern const struct xlat btrfs_tree_objectids[]; + +#else + +# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) +static +# endif +const struct xlat btrfs_tree_objectids[] = { + XLAT_TYPE(uint64_t, BTRFS_ROOT_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_EXTENT_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_CHUNK_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_DEV_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_FS_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_ROOT_TREE_DIR_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_CSUM_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_QUOTA_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_UUID_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_FREE_SPACE_TREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_FIRST_FREE_OBJECTID), + XLAT_TYPE(uint64_t, BTRFS_LAST_FREE_OBJECTID), + XLAT_TYPE(uint64_t, UINT64_MAX), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff -Nru strace-4.11/xlat/btrfs_tree_objectids.in strace-4.12/xlat/btrfs_tree_objectids.in --- strace-4.11/xlat/btrfs_tree_objectids.in 1970-01-01 00:00:00.000000000 +0000 +++ strace-4.12/xlat/btrfs_tree_objectids.in 2016-05-24 14:52:27.000000000 +0000 @@ -0,0 +1,14 @@ +#val_type uint64_t +BTRFS_ROOT_TREE_OBJECTID 1ULL +BTRFS_EXTENT_TREE_OBJECTID 2ULL +BTRFS_CHUNK_TREE_OBJECTID 3ULL +BTRFS_DEV_TREE_OBJECTID 4ULL +BTRFS_FS_TREE_OBJECTID 5ULL +BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL +BTRFS_CSUM_TREE_OBJECTID 7ULL +BTRFS_QUOTA_TREE_OBJECTID 8ULL +BTRFS_UUID_TREE_OBJECTID 9ULL +BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL +BTRFS_FIRST_FREE_OBJECTID 256ULL +BTRFS_LAST_FREE_OBJECTID -256ULL +UINT64_MAX -1ULL diff -Nru strace-4.11/xlat/cap_mask0.h strace-4.12/xlat/cap_mask0.h --- strace-4.11/xlat/cap_mask0.h 2015-12-21 23:23:46.000000000 +0000 +++ strace-4.12/xlat/cap_mask0.h 2016-05-31 11:35:33.000000000 +0000 @@ -8,38 +8,38 @@ static const struct xlat cap_mask0[] = { - { 1< + +struct xlat { + uint64_t val; + const char *str; +}; + +# define XLAT(val) { (unsigned)(val), #val } +# define XLAT_PAIR(val, str) { (unsigned)(val), str } +# define XLAT_TYPE(type, val) { (type)(val), #val } +# define XLAT_TYPE_PAIR(type, val, str) { (type)(val), str } +# define XLAT_END { 0, 0 } + +#endif