summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xiptables-test.py2
-rwxr-xr-xiptables/tests/shell/run-tests.sh4
-rwxr-xr-xxlate-test.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/iptables-test.py b/iptables-test.py
index dc031c2b..de1e1e95 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -579,7 +579,7 @@ def main():
if os.getuid() != 0:
print("You need to be root to run this, sorry", file=sys.stderr)
- return
+ return 77
if not args.netns and not args.no_netns and not spawn_netns():
print("Cannot run in own namespace, connectivity might break",
diff --git a/iptables/tests/shell/run-tests.sh b/iptables/tests/shell/run-tests.sh
index 7a80af34..11256905 100755
--- a/iptables/tests/shell/run-tests.sh
+++ b/iptables/tests/shell/run-tests.sh
@@ -21,7 +21,6 @@ EOF
msg_error() {
echo "E: $1 ..." >&2
- exit 1
}
msg_warn() {
@@ -34,10 +33,12 @@ msg_info() {
if [ "$(id -u)" != "0" ] ; then
msg_error "this requires root!"
+ exit 77
fi
if [ ! -d "$TESTDIR" ] ; then
msg_error "missing testdir $TESTDIR"
+ exit 99
fi
# support matching repeated pattern in SINGLE check below
@@ -76,6 +77,7 @@ while [ -n "$1" ]; do
;;
*)
msg_error "unknown parameter '$1'"
+ exit 99
;;
esac
done
diff --git a/xlate-test.py b/xlate-test.py
index 4f037ef6..4cb1401b 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -250,7 +250,7 @@ def main():
tests, passed, failed, errors = run_test(args.test, payload)
except IOError:
print(red("Error: ") + "test file does not exist", file=sys.stderr)
- return -1
+ return 99
else:
files, tests, passed, failed, errors = load_test_files()