summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/engine.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tracing/rtla/tests/engine.sh')
-rw-r--r--tools/tracing/rtla/tests/engine.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/tracing/rtla/tests/engine.sh b/tools/tracing/rtla/tests/engine.sh
index b1697b3e3f52..f2616a8e4179 100644
--- a/tools/tracing/rtla/tests/engine.sh
+++ b/tools/tracing/rtla/tests/engine.sh
@@ -39,6 +39,7 @@ reset_osnoise() {
}
check() {
+ expected_exitcode=${3:-0}
# Simple check: run rtla with given arguments and test exit code.
# If TEST_COUNT is set, run the test. Otherwise, just count.
ctr=$(($ctr + 1))
@@ -49,7 +50,7 @@ check() {
# Run rtla; in case of failure, include its output as comment
# in the test results.
result=$(stdbuf -oL $TIMEOUT "$RTLA" $2 2>&1); exitcode=$?
- if [ $exitcode -eq 0 ]
+ if [ $exitcode -eq $expected_exitcode ]
then
echo "ok $ctr - $1"
else
@@ -68,12 +69,14 @@ check_with_osnoise_options() {
# Save original arguments
arg1=$1
arg2=$2
+ arg3=$3
# Apply osnoise options (if not dry run)
if [ -n "$TEST_COUNT" ]
then
[ "$NO_RESET_OSNOISE" == 1 ] || reset_osnoise
shift
+ shift
while shift
do
[ "$1" == "" ] && continue
@@ -84,7 +87,7 @@ check_with_osnoise_options() {
done
fi
- NO_RESET_OSNOISE=1 check "$arg1" "$arg2"
+ NO_RESET_OSNOISE=1 check "$arg1" "$arg2" "$arg3"
}
set_timeout() {