# Exit status list
# shellcheck disable=SC2034
+EXIT_FAILURE=1
+# shellcheck disable=SC2034
EXIT_SKIP_TEST=77
# The list of the environment variables that tinc injects into the scripts it calls.
fi
}
+# Executes whatever is passed to it, checking that the resulting exit code is equal to the first argument.
+expect_code() {
+ expected=$1
+ shift
+
+ code=0
+ "$@" || code=$?
+
+ if [ $code != "$expected" ]; then
+ bail "wrong exit code $code, expected $expected"
+ fi
+}
+
# Runs its arguments with timeout(1) or gtimeout(1) if either are installed.
# Usage: try_limit_time 10 command --with --args
if type timeout >/dev/null; then