add strace bundled test cases
This commit is contained in:
30
test/strace/strace-bundle/init.sh
Normal file
30
test/strace/strace-bundle/init.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
ME_="${0##*/}"
|
||||
|
||||
warn_() { printf >&2 '%s\n' "$*"; }
|
||||
fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
|
||||
skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }
|
||||
framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; }
|
||||
framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; }
|
||||
|
||||
check_prog()
|
||||
{
|
||||
type "$@" > /dev/null 2>&1 ||
|
||||
framework_skip_ "$* is not available"
|
||||
}
|
||||
|
||||
check_strace()
|
||||
{
|
||||
STRACE=${*:-strace}
|
||||
$STRACE -V > /dev/null ||
|
||||
framework_failure_ "$STRACE is not available"
|
||||
}
|
||||
|
||||
timeout_duration=60
|
||||
check_timeout()
|
||||
{
|
||||
TIMEOUT="timeout -s 9 $timeout_duration"
|
||||
$TIMEOUT true > /dev/null 2>&1 ||
|
||||
TIMEOUT=
|
||||
}
|
||||
Reference in New Issue
Block a user