]> granicus.if.org Git - strace/commit
tests: test evdev bitset decoding more thoroughly
authorEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 12 Jul 2019 12:31:44 +0000 (14:31 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 13 Jul 2019 11:48:01 +0000 (11:48 +0000)
commitcdd8206af74fcb961f0179e21eacf5d55d23f0ac
tree5e49ffa8770c6f1d904e5abfc3d8145f9f13f671
parent96194ed74158f0b9976fae43a910ad14eaea141e
tests: test evdev bitset decoding more thoroughly

* tests/ioctl_evdev-success-v.test: Inject various values.
* tests/ioctl_evdev-success.test: Likewise.
* tests/ioctl_evdev-success.c (NUM_WORDS): New macro.
(struct evdev_check): Constify arg_ptr and print_arg args.
(invoke_test_syscall, test_evdev, print_input_absinfo, print_input_id,
print_mtslots): Add const qualifiers.
(print_getbit): Add const qualifiers, rewrite to expect trailing NULL
in the string array instead of leading string count.
(main): Set size for ev_more, ev_less, ev_zero arrays; replace leading
count element in ev_more_str, ev_less_str, ev_zero_str with trailing
NULL; replace ev_more_str and ev_less_str with ev_more_str_2/ev_less_str_2
and ev_more_str_3/ev_less_str_3 that differ by presence of flags that reside
beyond first two bytes; add static and const qualifiers where possible;
add key/key_sts_8/key_str_16 values; update a to provide either ev_more_str_2
or ev_more_str_3 and either key_str_8 or key_str_16 depending on inject_retval
value.
tests/ioctl_evdev-success-v.test
tests/ioctl_evdev-success.c
tests/ioctl_evdev-success.test