strace/tests/ioctl_loop-v.test
JingPiao Chen 3127a6a275 tests: check decoding of LOOP_* ioctls
* tests/ioctl_loop.c: New file.
* tests/ioctl_loop-v.c: Likewise.
* tests/ioctl_loop.test: New test.
* tests/ioctl_loop-v.test: Likewise.
* tests/.gitignore: Add ioctl_loop and ioctl_loop-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add ioctl_loop.test and ioctl_loop-v.test.

Co-authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2017-01-04 19:59:27 +00:00

13 lines
254 B
Bash
Executable File

#!/bin/sh
# Check non-abbreviated decoding of LOOP_* ioctls.
. "${srcdir=.}/init.sh"
run_prog > /dev/null
run_strace -a22 -v -eioctl $args > "$EXP"
check_prog grep
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"
rm -f "$EXP" "$OUT"