summaryrefslogtreecommitdiff
path: root/tests/ioctl_evdev.c
Commit message (Collapse)AuthorAgeFilesLines
* Use loop initial declarationsDmitry V. Levin2021-11-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This make the code easier to read. * src/bpf.c (decode_attr_extra_data): Use "for" loop initial declarations. * src/count.c (call_summary): Likewise. * src/dm.c (dm_decode_dm_target_spec, dm_decode_dm_name_list, dm_decode_dm_target_versions): Likewise. * src/dyxlat.c (dyxlat_free, dyxlat_add_pair): Likewise. * src/filter_qualify.c (parse_poke_token): Likewise. * src/filter_seccomp.c (check_seccomp_order_tracer): Likewise. * src/ipc.c (SYS_FUNC(ipc)): Likewise. * src/kexec.c (print_seg): Likewise. * src/kvm.c (kvm_vcpu_info_free): Likewise. * src/linux/alpha/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/linux/arc/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/linux/bfin/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/linux/ia64/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/linux/metag/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/linux/microblaze/get_syscall_args.c (arch_get_syscall_args): Likewise. * src/mmap_notify.c (mmap_notify_report): Likewise. * src/mmsghdr.c (dumpiov_in_mmsghdr): Likewise. * src/nlattr.c (decode_nlattr): Likewise. * src/number_set.c (clear_number_set_array, invert_number_set_array): Likewise. * src/pathtrace.c (pathmatch, pathtrace_match_set): Likewise. * src/poll.c (decode_poll_exiting): Likewise. * src/signal.c (sprintsigmask_n): Likewise. * src/sockaddr.c (print_sockaddr_data_ll): Likewise. * src/socketutils.c (unix_parse_response, get_proto_by_name, get_sockaddr_by_inode_uncached, genl_parse_families_response): Likewise. * src/strace.c (expand_tcbtab, alloctcb, droptcb, startup_attach, redirect_standard_fds, cleanup): Likewise. * src/syscall.c (decode_socket_subcall, decode_ipc_subcall): Likewise. * src/term.c (decode_termio): Likewise. * src/util.c (dumpiov_upto): Likewise. * src/v4l2.c (print_pixelformat): Likewise. * tests/add_key.c (main): Likewise. * tests/attach-f-p.c (main): Likewise. * tests/btrfs.c (max_flags_plus_one, btrfs_print_qgroup_inherit, btrfs_test_subvol_ioctls, btrfs_print_tree_search_buf, btrfs_test_space_info_ioctl, btrfs_test_ino_path_ioctls, btrfs_test_get_dev_stats_ioctl, btrfs_test_read_ioctls): Likewise. * tests/count-f.c (thread, process, main): Likewise. * tests/fanotify_init.c (main): Likewise. * tests/fanotify_mark.c (main): Likewise. * tests/file_handle.c (main): Likewise. * tests/fill_memory.c (fill_memory_ex, fill_memory16_ex, fill_memory32_ex): Likewise. * tests/filter-unavailable.c (process, main): Likewise. * tests/futex.c (invalid_op, main): Likewise. * tests/get_mempolicy.c (print_nodes): Likewise. * tests/group_req.c (main): Likewise. * tests/hexdump_strdup.c (hexdump_memdup): Likewise. * tests/hexquote_strndup.c (hexquote_strndup): Likewise. * tests/inet-cmsg.c (print_opts, main): Likewise. * tests/init_delete_module.h (print_str): Likewise. * tests/ioctl_block.c (main): Likewise. * tests/ioctl_dm.c (main): Likewise. * tests/ioctl_evdev.c (main): Likewise. * tests/ioctl_v4l2.c (init_v4l2_format, dprint_ioctl_v4l2): Likewise. * tests/ip_mreq.c (main): Likewise. * tests/ipc.c (main): Likewise. * tests/kcmp.c (main): Likewise. * tests/kexec_file_load.c (main): Likewise. * tests/kexec_load.c (main): Likewise. * tests/keyctl.c (do_keyctl, main): Likewise. * tests/ksysent.c (main): Likewise. * tests/list_sigaction_signum.c (main): Likewise. * tests/mincore.c (print_mincore): Likewise. * tests/mmsg_name.c (test_mmsg_name): Likewise. * tests/move_pages.c (print_page_array, print_node_array, print_status_array): Likewise. * tests/mq_sendrecv.c (printstr, dumpstr): Likewise. * tests/msg_control.c (print_fds, test_scm_rights3, test_sol_socket, print_ip_opts, test_ip_opts): Likewise. * tests/netlink_protocol.c (send_query): Likewise. * tests/nlattr.c (test_nlattr): Likewise. * tests/nlattr_ifla_linkinfo.c (TEST_UNKNOWN_TUNNELS): Likewise. * tests/nlattr_rtmsg.c (print_quoted_hex_ellipsis): Likewise. * tests/perf_event_open.c (main): Likewise. * tests/perf_event_open_nonverbose.c (main): Likewise. * tests/pkey_alloc.c (main): Likewise. * tests/pkey_free.c (main): Likewise. * tests/pkey_mprotect.c (main): Likewise. * tests/poll.c (print_pollfd_array_entering, print_pollfd_array_exiting): Likewise. * tests/prctl-arg2-intptr.c (main): Likewise. * tests/prctl-name.c (main): Likewise. * tests/pread64-pwrite64.c (dump_str, print_hex, test_dump, main): Likewise. * tests/preadv.c (print_iov, print_iovec): Likewise. * tests/print_quoted_string.c (print_quoted_memory_ex, print_quoted_hex): Likewise. * tests/process_vm_readv_writev.c (print_iov): Likewise. * tests/pwritev.c (print_iovec, main): Likewise. * tests/qual_fault.c (main): Likewise. * tests/qual_signal.c (main): Likewise. * tests/read-write.c (dump_str_ex, print_hex, test_dump, main): Likewise. * tests/readahead.c (main): Likewise. * tests/redirect-fds.c (main): Likewise. * tests/request_key.c (main): Likewise. * tests/rt_sigsuspend.c (iterate): Likewise. * tests/s390_pci_mmio_read_write.c (main): Likewise. * tests/s390_runtime_instr.c (main): Likewise. * tests/seccomp-filter-v.c (main): Likewise. * tests/seccomp_get_action_avail.c (main): Likewise. * tests/set_mempolicy.c (print_nodes): Likewise. * tests/setfsugid.c (main): Likewise. * tests/setns.c (main): Likewise. * tests/setresugid.c (main): Likewise. * tests/setreugid.c (main): Likewise. * tests/setugid.c (main): Likewise. * tests/socketcall.c (main): Likewise. * tests/sockopt-sol_netlink.c (main): Likewise. * tests/test_nlattr.h (print_sockfd): Likewise. * tests/test_printpath.c (test_printpath_at, test_printpath): Likewise. * tests/test_printstrn.c (test_printstrn_at, test_efault, test_printstrn): Likewise. * tests/unix-pair-send-recv.c (transpose): Likewise. * tests/unix-pair-sendto-recvfrom.c (transpose): Likewise. * tests/unshare.c (main): Likewise. * tests/xchownx.c (main): Likewise.
* Update copyright headersDmitry V. Levin2021-02-161-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* Fix preprocessor indentationDmitry V. Levin2021-02-161-3/+3
| | | | | | | | | Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$' src tests) |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done
* evdev: switch to use bundled <linux/input.h>Dmitry V. Levin2021-02-061-74/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/types/evdev.h: Remove. * src/xlat/evdev_ioctl_cmds.in: Likewise. * bundled/linux/include/uapi/linux/input.h: New file, copied from headers_install'ed Linux kernel v5.11-rc6. * bundled/linux/include/uapi/linux/input-event-codes.h: Likewise. * bundled/Makefile.am (EXTRA_DIST): Add them. * src/evdev.c: Compile unconditionally, do not include "types/evdev.h" and "xlat/evdev_ioctl_cmds.h", assume all <linux/input.h> constants, structures and their fields are available, remove fallback definitions for constants, replace all struct_input_* with corresponding struct input_*. * src/evdev_mpers.c: Compile unconditionally. * src/ioctl.c (ioctl_decode) [!HAVE_LINUX_INPUT_H]: Remove. * src/xlat/evdev_abs.in: Add #unconditional, remove fallback definitions. * src/xlat/evdev_autorepeat.in: Likewise. * src/xlat/evdev_ev.in: Likewise. * src/xlat/evdev_ff_status.in: Likewise. * src/xlat/evdev_ff_types.in: Likewise. * src/xlat/evdev_keycode.in: Likewise. * src/xlat/evdev_leds.in: Likewise. * src/xlat/evdev_misc.in: Likewise. * src/xlat/evdev_mtslots.in: Likewise. * src/xlat/evdev_prop.in: Likewise. * src/xlat/evdev_relative_axes.in: Likewise. * src/xlat/evdev_snd.in: Likewise. * src/xlat/evdev_switch.in: Likewise. * tests/ioctl.c: Include <linux/input.h> unconditionally, assume EVIOCGBIT and EV_KEY are defined there. * tests/ioctl_evdev.c: Compile unconditionally, assume all <linux/input.h> constants are available, remove fallback definitions for constants. * tests/ioctl_evdev-success.c: Likewise.
* Change my email addressDmitry V. Levin2020-12-311-1/+1
|
* Update copyright headersDmitry V. Levin2020-08-031-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* evdev_mpers: use print_fields.h macrosDmitry V. Levin2020-07-131-1/+1
| | | | | | | * evdev_mpers.c: Include "print_fields.h". (decode_envelope, ff_effect_ioctl): Use PRINT_FIELD_* macros from print_fields.h. * tests/ioctl_evdev.c (print_ffe_common): Update expected output.
* evdev: fix formatting of struct input_keymap_entry.scancodeDmitry V. Levin2020-07-081-1/+1
| | | | | * evdev.c (keycode_V2_ioctl): Use PRINT_FIELD_X_ARRAY. * tests/ioctl_evdev.c (main): Update expected output.
* Update copyright headersDmitry V. Levin2019-09-251-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* Handle xlat verbosity in evdev bitset printingEugene Syromyatnikov2019-09-241-31/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defs.h (print_xint32_array_member, print_xint64_array_member): New function declarations. (print_xlong_array_member): New static inline function. * util.c (print_xint32_array_member, print_xint64_array_member): New functions. * evdev.c (decode_bitset): Handle xlat verbosity option. * tests/ioctl_evdev-Xabbrev.c: New file. * tests/ioctl_evdev-Xraw.c: Likewise. * tests/ioctl_evdev-Xverbose.c: Likewise. * tests/ioctl_evdev-success-Xabbrev.c: Likewise. * tests/ioctl_evdev-success-Xraw.c: Likewise. * tests/ioctl_evdev-success-Xverbose.c: Likewise. * tests/ioctl_evdev-success-v-Xabbrev.c: Likewise. * tests/ioctl_evdev-success-v-Xraw.c: Likewise. * tests/ioctl_evdev-success-v-Xverbose.c: Likewise. * tests/ioctl_evdev-v-Xabbrev.c: Likewise. * tests/ioctl_evdev-v-Xraw.c: Likewise. * tests/ioctl_evdev-v-Xverbose.c: Likewise. * tests/ioctl_evdev-success.c (test_evdev, print_getbit, main): Update expected output. * tests/ioctl_evdev.c (UNK_CMD): New macro. (print_ffe_common, main): Update expected output. * tests/Makefile.am (check_PROGRAMS): Add ioctl_evdev-success-Xabbrev, ioctl_evdev-success-Xraw, ioctl_evdev-success-Xverbose, ioctl_evdev-success-v-Xabbrev, ioctl_evdev-success-v-Xraw, and ioctl_evdev-success-v-Xverbose. * tests/gen_tests.in (ioctl_evdev-Xabbrev, ioctl_evdev-Xraw, ioctl_evdev-Xverbose, ioctl_evdev-v-Xabbrev, ioctl_evdev-v-Xraw, ioctl_evdev-v-Xverbose, ioctl_evdev-success-Xabbrev, ioctl_evdev-success-Xraw, ioctl_evdev-success-Xverbose, ioctl_evdev-success-v-Xabbrev, ioctl_evdev-success-v-Xraw, ioctl_evdev-success-v-Xverbose tests): New entries. (ioctl_evdev, ioctl_evdev-v): Add alignment option. * tests/pure_executables.list: Add ioctl_evdev-Xabbrev, ioctl_evdev-Xraw, ioctl_evdev-Xverbose, ioctl_evdev-v-Xabbrev, ioctl_evdev-v-Xraw, ioctl_evdev-v-Xverbose. * tests/.gitignore: Likewise.
* Fix preprocessor indentationDmitry V. Levin2018-12-301-5/+5
| | | | | | | | | Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done
* tests: change the license to GPL-2.0-or-laterDmitry V. Levin2018-12-101-21/+1
| | | | | strace test suite is now provided under the terms of the GNU General Public License version 2 or later, see tests/COPYING for more details.
* tests: enhance test coverage of evdev ioctlZhibin Li2018-08-191-0/+1
| | | | * tests/ioctl_evdev.c (main): Test EVIOCGMTSLOTS(8) command.
* evdev: fix decoding of EVIOCGBIT(0, ...)Zhibin Li2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | There is a comment in drivers/input/evdev.c which says: /* EV_SYN==0 is EV_CNT, _not_ SYN_CNT, see EVIOCGBIT */ That is, EVIOCGBIT(0, ...) should return a bit mask with supported event types instead of SYN_* event codes. * defs.h (evdev_ev): New prototype. * evdev.c: Include "xlat/evdev_ev.h" and remove "xlat/evdev_sync.h". (bit_ioctl) <case EV_SYN>: Replace EV_SYN with 0, use evdev_ev with XT_SORTED in decode_bitset invocation instead. * ioctl.c: Do not include "xlat/evdev_ev.h". (evdev_decode_number): Print nr == 0x20 as "0" instead of "EV_SYN". * tests/ioctl_evdev.c (main): Use 0 instead of EV_SYN in EVIOCGBIT output. * xlat/evdev_sync.in: Remove. Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org> Fixes: v4.10~89 "Add decoding for evdev ioctls"
* Update copyright headersDmitry V. Levin2018-06-141-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* tests: add more evdev ioctl checksEugene Syromyatnikov2018-04-251-2/+25
| | | | | | | tests/ioctl_evdev.c (TEST_NULL_ARG_EX): Rename from TEST_NULL_ARG, add str argument, print it instead of #cmd. (TEST_NULL_ARG): Implement as a TEST_NULL_ARG_EX wrapper. (main): Add checks for EVIOCSABS and EVIOCGBIT ioctls.
* evdev: decode EV_SW unconditionallyEugene Syromyatnikov2018-04-251-2/+4
| | | | | | * evdev.c (bit_ioctl): Remove [EV_SW] check. * tests/ioctl_evdev.c [!EV_SW] (EV_SW): Define. (main): Remove [EV_SW] check.
* Fix macros encosure in a do/while loopDmitry V. Levin2017-06-171-3/+5
| | | | | | | | Enclose macros with multiple statements and macros starting with "if" statement in a do/while loop. Do not enclose single statement macros in a do/while loop. Reported by kernel's checkpatch.pl script.
* Add copyright headersEugene Syromyatnikov2017-05-221-0/+1
|
* tests: use TAIL_ALLOC_OBJECT_CONST_PTRDmitry V. Levin2017-03-161-3/+3
| | | | | | | | | Automatically convert tests to use TAIL_ALLOC_OBJECT_CONST_PTR macro with the following sed expression: sed -ri \ 's/^([[:space:]]*)(([^*]+[[:alnum:]_])( \*)?) *\*( *const )?([^ =]+) = tail_alloc\(sizeof\((\2|\*\6)\)\);/\1TAIL_ALLOC_OBJECT_CONST_PTR(\2, \6);/' \ tests/*.c
* tests: replace init_magic with fill_memoryDmitry V. Levin2017-01-051-13/+3
| | | | | | | | | | | | Use the same fill_memory/fill_memory_ex interface in all affected tests. * tests/ioctl_block.c (init_magic): Remove. (main): Replace init_magic with fill_memory. * tests/ioctl_evdev.c: Likewise. * tests/ioctl_v4l2.c: Likewise. * tests/ioctl_mtd.c (magic, init_magic): Remove. (main): Replace init_magic with fill_memory. * tests/ioctl_rtc.c: Likewise.
* tests: add more checks of unknown ioctl command formattingEugene Syromyatnikov2017-01-041-0/+4
| | | | | | | | | * tests/ioctl.c (main): Additional check for unknown ioctl command decoding. * tests/ioctl_evdev.c (main): Likewise. * tests/ioctl_dm.c: Include <linux/ioctl.h> for _IOC_SIZE and _IOC_NR. (main) <dummy_dm_ioctl1, dummy_dm_ioctl2, dummy_dm_arg>: New constants. Add more checks for unknown command formatting.
* ioctl: do not print explicit 0x prefix and do not specify minimum widthEugene Syromyatnikov2017-01-041-4/+4
| | | | | | | | | | | | | | Specifying output width for size argument is rather misleading - it can be up to 14 bits in size. The use of explicit "0x" prefix is discouraged because 0x0 looks ugly. Usage of width specification along with alternate form flag leads to inconsistent output for 0. Let's use just plain %#x qualifiers instead. * ioctl.c (ioctl_print_code): Change printf qualifiers for ioctl command type, number and size to "%#x". * tests/ioctl.c (main): Update expected test output. * tests/ioctl_dm.c (main): Likewise. * tests/ioctl_evdev.c (main): Likewise.
* tests: fix "constant is too large" compilation warningsEugene Syromyatnikov2016-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alarm.c: In function 'main': alarm.c:41: warning: integer constant is too large for 'long' type aio.c: In function 'main': aio.c:162: warning: integer constant is too large for 'long' type btrfs.c: In function 'btrfs_test_sync_ioctls': btrfs.c:202: warning: integer constant is too large for 'long' type btrfs.c: In function 'btrfs_test_subvol_ioctls': btrfs.c:289: warning: integer constant is too large for 'long' type btrfs.c:290: warning: integer constant is too large for 'long' type dup2.c: In function 'main': dup2.c:12: warning: integer constant is too large for 'long' type dup2.c:13: warning: integer constant is too large for 'long' type dup3.c: In function 'main': dup3.c:13: warning: integer constant is too large for 'long' type dup3.c:14: warning: integer constant is too large for 'long' type epoll_create.c: In function 'main': epoll_create.c:12: warning: integer constant is too large for 'long' type epoll_ctl.c: In function 'invoke_syscall': epoll_ctl.c:14: warning: integer constant is too large for 'long' type faccessat.c: In function 'main': faccessat.c:13: warning: integer constant is too large for 'long' type fchdir.c: In function 'main': fchdir.c:12: warning: integer constant is too large for 'long' type struct_flock.c: In function 'invoke_test_syscall': struct_flock.c:48: warning: integer constant is too large for 'long' type struct_flock.c: In function 'test_flock_einval': struct_flock.c:58: warning: integer constant is too large for 'long' type struct_flock.c:59: warning: integer constant is too large for 'long' type fcntl64.c: In function 'test_flock64_einval': fcntl64.c:44: warning: integer constant is too large for 'long' type fcntl64.c:45: warning: integer constant is too large for 'long' type fcntl.c: In function 'test_flock64_einval': fcntl.c:44: warning: integer constant is too large for 'long' type fcntl.c:45: warning: integer constant is too large for 'long' type fdatasync.c: In function 'main': fdatasync.c:12: warning: integer constant is too large for 'long' type flock.c: In function 'main': flock.c:13: warning: integer constant is too large for 'long' type xstatx.c: In function 'main': xstatx.c:255: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:290: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatx.c:294: warning: integer constant is too large for 'long' type xstatfsx.c: In function 'main': xstatfsx.c:113: warning: integer constant is too large for 'long' type fsync.c: In function 'main': fsync.c:12: warning: integer constant is too large for 'long' type ftruncate64.c: In function 'main': ftruncate64.c:39: warning: integer constant is too large for 'long' type futimesat.c: In function 'main': futimesat.c:52: warning: integer constant is too large for 'long' type futimesat.c:59: warning: integer constant is too large for 'long' type get_mempolicy.c: In function 'main': get_mempolicy.c:83: warning: integer constant is too large for 'long' type get_mempolicy.c:84: warning: integer constant is too large for 'long' type get_mempolicy.c:85: warning: integer constant is too large for 'long' type get_mempolicy.c:86: warning: integer constant is too large for 'long' type getdents.c: In function 'main': getdents.c:109: warning: integer constant is too large for 'long' type getdents.c:110: warning: integer constant is too large for 'long' type getdents.c:114: warning: integer constant is too large for 'long' type getdents64.c: In function 'main': getdents64.c:114: warning: integer constant is too large for 'long' type getdents64.c:115: warning: integer constant is too large for 'long' type getdents64.c:119: warning: integer constant is too large for 'long' type xgetrlimit.c: In function 'main': xgetrlimit.c:71: warning: integer constant is too large for 'long' type ioctl_block.c:44: warning: integer constant is too large for 'long' type ioctl_block.c: In function 'main': ioctl_block.c:136: warning: integer constant is too large for 'long' type ioctl_block.c:137: warning: integer constant is too large for 'long' type ioctl_block.c:161: warning: integer constant is too large for 'long' type ioctl_block.c:170: warning: integer constant is too large for 'long' type ioctl_block.c:171: warning: integer constant is too large for 'long' type ioctl_evdev.c:42: warning: integer constant is too large for 'long' type ioctl_mtd.c:46: warning: integer constant is too large for 'long' type ioctl_rtc.c:40: warning: integer constant is too large for 'long' type ioperm.c: In function 'main': ioperm.c:12: warning: integer constant is too large for 'long' type ioctl_v4l2.c: In function 'main': ioctl_v4l2.c:409: warning: integer constant is too large for 'long' type ipc.c: In function 'ipc_call': ipc.c:52: warning: integer constant is too large for 'long' type kill.c: In function 'main': kill.c:59: warning: integer constant is too large for 'long' type kill.c:62: warning: integer constant is too large for 'long' type kill.c:63: warning: integer constant is too large for 'long' type kill.c:68: warning: integer constant is too large for 'long' type linkat.c: In function 'main': linkat.c:14: warning: integer constant is too large for 'long' type linkat.c:15: warning: integer constant is too large for 'long' type mbind.c: In function 'main': mbind.c:41: warning: integer constant is too large for 'long' type mbind.c:43: warning: integer constant is too large for 'long' type mbind.c:44: warning: integer constant is too large for 'long' type migrate_pages.c: In function 'main': migrate_pages.c:41: warning: integer constant is too large for 'long' type In file included from mkdirat.c:10: umode_t.c: In function 'test_syscall': umode_t.c:47: warning: integer constant is too large for 'long' type mknod.c: In function 'call_mknod': mknod.c:16: warning: integer constant is too large for 'long' type mknod.c: In function 'main': mknod.c:23: warning: integer constant is too large for 'long' type mknod.c:49: warning: integer constant is too large for 'long' type mknod.c:56: warning: integer constant is too large for 'long' type mknodat.c:12: warning: integer constant is too large for 'long' type mknodat.c: In function 'call_mknodat': mknodat.c:17: warning: integer constant is too large for 'long' type mknodat.c: In function 'main': mknodat.c:24: warning: integer constant is too large for 'long' type mknodat.c:50: warning: integer constant is too large for 'long' type mknodat.c:57: warning: integer constant is too large for 'long' type mmap.c: In function 'main': mmap.c:51: warning: integer constant is too large for 'long' type move_pages.c: In function 'print_stat_pages': move_pages.c:139: warning: integer constant is too large for 'long' type move_pages.c: In function 'print_move_pages': move_pages.c:166: warning: integer constant is too large for 'long' type move_pages.c: In function 'main': move_pages.c:188: warning: integer constant is too large for 'long' type mq_sendrecv.c: In function 'main': mq_sendrecv.c:238: warning: integer constant is too large for 'long' type mq_sendrecv.c:401: warning: integer constant is too large for 'long' type mq_sendrecv.c:403: warning: integer constant is too large for 'long' type nsyscalls.c: In function 'test_syscall': nsyscalls.c:64: warning: integer constant is too large for 'long' type nsyscalls.c:65: warning: integer constant is too large for 'long' type nsyscalls.c:66: warning: integer constant is too large for 'long' type nsyscalls.c:67: warning: integer constant is too large for 'long' type nsyscalls.c:68: warning: integer constant is too large for 'long' type nsyscalls.c:69: warning: integer constant is too large for 'long' type preadv-pwritev.c: In function 'main': preadv-pwritev.c:162: warning: comparison between signed and unsigned prlimit64.c: In function 'main': prlimit64.c:65: warning: integer constant is too large for 'long' type prlimit64.c:70: warning: integer constant is too large for 'long' type remap_file_pages.c: In function 'main': remap_file_pages.c:42: warning: integer constant is too large for 'long' type remap_file_pages.c:43: warning: integer constant is too large for 'long' type remap_file_pages.c:45: warning: integer constant is too large for 'long' type renameat.c: In function 'main': renameat.c:15: warning: integer constant is too large for 'long' type renameat.c:16: warning: integer constant is too large for 'long' type rt_sigqueueinfo.c: In function 'main': rt_sigqueueinfo.c:41: warning: integer constant is too large for 'long' type rt_tgsigqueueinfo.c: In function 'k_tgsigqueueinfo': rt_tgsigqueueinfo.c:45: warning: integer constant is too large for 'long' type rt_tgsigqueueinfo.c:46: warning: integer constant is too large for 'long' type rt_tgsigqueueinfo.c:47: warning: integer constant is too large for 'long' type rt_tgsigqueueinfo.c: In function 'main': rt_tgsigqueueinfo.c:67: warning: integer constant is too large for 'long' type sendfile.c: In function 'main': sendfile.c:110: warning: integer constant is too large for 'long' type sendfile64.c: In function 'main': sendfile64.c:100: warning: integer constant is too large for 'long' type set_mempolicy.c: In function 'main': set_mempolicy.c:129: warning: integer constant is too large for 'long' type set_mempolicy.c:130: warning: integer constant is too large for 'long' type setrlimit.c: In function 'main': setrlimit.c:44: warning: integer constant is too large for 'long' type socketcall.c: In function 'test_socketcall': socketcall.c:58: warning: integer constant is too large for 'long' type splice.c: In function 'main': splice.c:41: warning: integer constant is too large for 'long' type splice.c:42: warning: integer constant is too large for 'long' type splice.c:45: warning: integer constant is too large for 'long' type splice.c:46: warning: integer constant is too large for 'long' type symlinkat.c: In function 'main': symlinkat.c:12: warning: integer constant is too large for 'long' type sync_file_range.c: In function 'main': sync_file_range.c:42: warning: integer constant is too large for 'long' type sync_file_range.c:43: warning: integer constant is too large for 'long' type syslog.c: In function 'main': syslog.c:14: warning: integer constant is too large for 'long' type tee.c: In function 'main': tee.c:41: warning: integer constant is too large for 'long' type tee.c:42: warning: integer constant is too large for 'long' type timer_create.c: In function 'main': timer_create.c:52: warning: integer constant is too large for 'long' type timer_create.c:84: warning: integer constant is too large for 'long' type timer_create.c:85: warning: integer constant is too large for 'long' type truncate64.c: In function 'main': truncate64.c:41: warning: integer constant is too large for 'long' type xgetrlimit.c: In function 'main': xgetrlimit.c:71: warning: integer constant is too large for 'long' type umode_t.c: In function 'test_syscall': umode_t.c:46: warning: integer constant is too large for 'long' type unlinkat.c: In function 'main': unlinkat.c:13: warning: integer constant is too large for 'long' type waitpid.c: In function 'main': waitpid.c:43: warning: integer constant is too large for 'long' type waitid.c: In function 'poison': waitid.c:141: warning: integer constant is too large for 'long' type xetpriority.c: In function 'main': xetpriority.c:15: warning: integer constant is too large for 'long' type xetpriority.c:19: warning: integer constant is too large for 'long' type xetpriority.c:20: warning: integer constant is too large for 'long' type xetpgid.c: In function 'main': xetpgid.c:43: warning: integer constant is too large for 'long' type xetpgid.c:47: warning: integer constant is too large for 'long' type xetpgid.c:48: warning: integer constant is too large for 'long' type (SLES 11SP4, i386) * tests/alarm.c (main): Add proper suffix to integer constant. * tests/aio.c (main): Likewise. * tests/btrfs.c (btrfs_test_sync_ioctls, btrfs_test_subvol_ioctls): Likewise. * tests/dup2.c (main): Likewise. * tests/dup3.c (main): Likewise. * tests/epoll_create.c (main): Likewise. * tests/epoll_ctl.c (invoke_syscall): Likewise. * tests/faccessat.c (main): Likewise. * tests/fchdir.c (main): Likewise. * tests/fcntl.c (test_flock64_einval): Likewise. * tests/fcntl64.c (test_flock64_einval): Likewise. * tests/fdatasync.c (main): Likewise. * tests/flock.c (main): Likewise. * tests/fstat64.c (SAMPLE_SIZE): Likewise. * tests/fstat.c (SAMPLE_SIZE): Likewise. * tests/fsync.c (main): Likewise. * tests/ftruncate64.c (main): Likewise. * tests/futimesat.c (main): Likewise. * tests/get_mempolicy.c (main): Likewise. * tests/getdents.c (main): Likewise. * tests/getdents64.c (main): Likewise. * tests/ioctl_block.c (lmagic, main): Likewise. * tests/ioctl_evdev.c (lmagic): Likewise. * tests/ioctl_mtd.c (lmagic): Likewise. * tests/ioctl_rtc.c (lmagic): Likewise. * tests/ioctl_v4l2.c (main): Likewise. * tests/ioperm.c (main): Likewise. * tests/ipc.c (ipc_call): Likewise. * tests/kill.c (main): Likewise. * tests/linkat.c (main): Likewise. * tests/lstat64.c (SAMPLE_SIZE): Likewise. * tests/lstat.c (SAMPLE_SIZE): Likewise. * tests/mbind.c (main): Likewise. * tests/migrate_pages.c (main): Likewise. * tests/mkdirat.c (TEST_SYSCALL_PREFIX_ARGS): Likewise. * tests/mknod.c (call_mknod, main): Likewise. * tests/mknodat.c (fd, call_mknodat, main): Likewise. * tests/mmap.c (main): Likewise. * tests/move_pages.c (print_stat_pages, print_move_pages): Likewise. * tests/mq_sendrecv.c (main): Likewise. * tests/nsyscalls.c (test_syscall): Likewise. * tests/prlimit64.c (main): Likewise. * tests/remap_file_pages.c (main): Likewise. * tests/renameat.c (main): Likewise. * tests/rt_sigqueueinfo.c (main): Likewise. * tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo, main): Likewise. * tests/sendfile.c (main): Likewise. * tests/sendfile64.c (main): Likewise. * tests/set_mempolicy.c (main): Likewise. * tests/setrlimit.c (main): Likewise. * tests/socketcall.c (test_socketcall): Likewise. * tests/splice.c (main): Likewise. * tests/stat64.c (SAMPLE_SIZE): Likewise. * tests/stat.c (SAMPLE_SIZE): Likewise. * tests/struct_flock.c (invoke_test_syscall, test_flock_einval): Likewise. * tests/symlinkat.c (main): Likewise. * tests/sync_file_range.c (main): Likewise. * tests/syslog.c (main): Likewise. * tests/tee.c (main): Likewise. * tests/timer_create.c (main): Likewise. * tests/truncate64.c (main): Likewise. * tests/umode_t.c (test_syscall): Likewise. * tests/unlinkat.c (main): Likewise. * tests/waitid.c (main): Likewise. * tests/waitpid.c (main): Likewise. * tests/xetpgid.c (main): Likewise. * tests/xetpriority.c (main): Likewise. * tests/xgetrlimit.c (main): Likewise. * tests/xstatfsx.c (main) [CHECK_ODD_SIZE]: Likewise. * tests/xstatx.c (main): Likewise.
* tests: use VERBOSE macro in ioctl_evdev and ioctl_evdev-v testsDmitry V. Levin2016-09-261-7/+7
| | | | | | * tests/ioctl_evdev-v.c (VERBOSE_IOCTL): Remove. (VERBOSE): Define to 1. * tests/ioctl_evdev.c: Check VERBOSE instead of VERBOSE_IOCTL.
* tests/ioctl_evdev.c: fix typo in commentDmitry V. Levin2016-06-141-1/+1
|
* tests/ioctl_evdev.c: check EVIOCGUNIQ decodingDmitry V. Levin2016-05-281-0/+1
| | | | * tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding.
* tests: check decoding of EVIOC* ioctlsDmitry V. Levin2016-05-281-0/+283
* 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.