• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh -efu
2
3# Check decoding of successful PERF_EVENT_IOC_{ID,QUERY_BPF} ioctls.
4
5. "${srcdir=.}/scno_tampering.sh"
6
7: ${IOCTL_INJECT_START=256}
8: ${IOCTL_INJECT_RETVAL=42}
9
10run_prog
11run_strace -a35 -e trace=ioctl \
12	-e inject=ioctl:retval="${IOCTL_INJECT_RETVAL}":when="${IOCTL_INJECT_START}+" \
13	../ioctl_perf-success "${IOCTL_INJECT_START}" "${IOCTL_INJECT_RETVAL}" > "$EXP"
14grep -v '^ioctl([012][,<]' < "$LOG" > "$OUT"
15match_diff "$OUT" "$EXP"
16