strace/tests/dup2.test
Fei Jie ab917ae5af tests: add dup.test, dup2.test, and dup3.test
* tests/dup.c: New file.
* tests/dup.test: New test.
* tests/dup2.c: New file.
* tests/dup2.test: New test.
* tests/dup3.c: New file.
* tests/dup3.test: New test.
* tests/.gitignore: Add dup, dup2, and dup3.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add dup.test, dup2.test, and dup3.test.
2016-03-10 02:41:31 +00:00

12 lines
180 B
Bash
Executable File

#!/bin/sh
# Check dup2 syscall decoding.
. "${srcdir=.}/init.sh"
run_prog > /dev/null
OUT="$LOG.out"
run_strace -edup2 -a13 $args > "$OUT"
match_diff "$LOG" "$OUT"
rm -f "$OUT"