e286b9cbc0
* tests/ioctl_evdev-success.c: New file. * tests/ioctl_evdev-success-v.c: Likewise. * tests/ioctl_evdev-success.test: New test. * tests/ioctl_evdev-success-v.test: Likewise. * tests/.gitignore: Add ioctl_evdev-success and ioctl_evdev-success-v. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add the two tests mentioned above.
14 lines
381 B
Bash
Executable File
14 lines
381 B
Bash
Executable File
#!/bin/sh -efu
|
|
|
|
. "${srcdir=.}/scno_tampering.sh"
|
|
|
|
: ${IOCTL_INJECT_START=256}
|
|
: ${IOCTL_INJECT_RETVAL=8}
|
|
|
|
run_prog
|
|
run_strace -a16 -e trace=ioctl \
|
|
-e inject=ioctl:retval="${IOCTL_INJECT_RETVAL}":when="${IOCTL_INJECT_START}+" \
|
|
../ioctl_evdev-success "${IOCTL_INJECT_START}" "${IOCTL_INJECT_RETVAL}"> "$EXP"
|
|
grep -v '^ioctl([012][,<]' < "$LOG" > "$OUT"
|
|
match_diff "$OUT" "$EXP"
|