You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
452 B
16 lines
452 B
#!/bin/sh -efu
|
|
|
|
# Check decoding of successful PERF_EVENT_IOC_{ID,QUERY_BPF} ioctls.
|
|
|
|
. "${srcdir=.}/scno_tampering.sh"
|
|
|
|
: ${IOCTL_INJECT_START=256}
|
|
: ${IOCTL_INJECT_RETVAL=42}
|
|
|
|
run_prog
|
|
run_strace -a35 -e trace=ioctl \
|
|
-e inject=ioctl:retval="${IOCTL_INJECT_RETVAL}":when="${IOCTL_INJECT_START}+" \
|
|
../ioctl_perf-success "${IOCTL_INJECT_START}" "${IOCTL_INJECT_RETVAL}" > "$EXP"
|
|
grep -v '^ioctl([012][,<]' < "$LOG" > "$OUT"
|
|
match_diff "$OUT" "$EXP"
|