4a329a0677
* tests/qual_fault-syscall.test: New test. * tests/qual_inject-error-signal-syscall.test: Likewise. * tests/qual_inject-retval-syscall.test: Likewise. * tests/qual_inject-signal-syscall.test: Likewise. * tests/Makefile.am (MISC_TESTS): Add them. * tests/qual_fault-syntax.test: Add checks for inject=SET:syscall= expression syntax. * tests/qual_inject-syntax.test: Likewise. * tests/qual_fault.test: Append $suffix to -e fault arguments, override $NAME with $name_override if the latter is set. * tests/qual_inject-error-signal.test: Append $suffix to -e inject arguments, override $NAME with $name_override if the latter is set. * tests/qual_inject-retval.test: Likewise. * tests/qual_inject-signal.test: Likewise.
24 lines
397 B
Bash
Executable File
24 lines
397 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check success injection.
|
|
|
|
. "${srcdir=.}/scno_tampering.sh"
|
|
|
|
: ${suffix=}
|
|
[ -z "${name_override-}" ] || NAME="$name_override"
|
|
|
|
check_injection()
|
|
{
|
|
local syscall rval
|
|
|
|
syscall=chdir
|
|
rval="$1"; shift
|
|
|
|
run_strace -a12 -e$syscall -einject="$syscall:retval=$rval$suffix" "$@" \
|
|
../qual_inject-retval "$rval" > "$EXP"
|
|
match_diff "$LOG" "$EXP"
|
|
}
|
|
|
|
check_injection 0
|
|
check_injection 42
|