Dmitry V. Levin
a93e2de99e
* tests/clone_parent.c: New file. * tests/clone_ptrace.c: Likewise. * tests/clone_parent.test: New test. * tests/clone_ptrace.test: Likewise. * tests/.gitignore: Add clone_parent and clone_ptrace. * tests/Makefile.am (check_PROGRAMS): Likewise. (MISC_TESTS): Add clone_parent.test and clone_ptrace.test.
18 lines
410 B
Bash
Executable File
18 lines
410 B
Bash
Executable File
#!/bin/sh -efu
|
|
# Check handling of CLONE_PTRACE'ed processes.
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
run_prog > /dev/null 3>&1
|
|
args="-e trace=none $args"
|
|
> "$LOG" || fail_ "failed to write $LOG"
|
|
|
|
$STRACE -o "$LOG" $args > "$EXP" 2> "$OUT"-err 3> "$EXP"-err || {
|
|
msg="$STRACE $args failed with code $?"
|
|
cat "$OUT"-err "$LOG" >&2
|
|
fail_ "$msg"
|
|
}
|
|
|
|
cat "$OUT"-err >&2
|
|
match_diff "$LOG" "$EXP"
|
|
match_diff "$OUT"-err "$EXP"-err
|