diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-04 13:32:51 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-04 13:32:51 +0000 |
commit | f57ec73d4e082ce4b3e24e2a3fb2c40c7fe6335b (patch) | |
tree | c13472d6baa12a26b2427a040b642a7524fa6aa2 /iptables/tests/shell/run-tests.sh | |
parent | 39315d2eb3c5b314fcdcb6b1f078fddf85ed762f (diff) | |
parent | 88a3f66954a066bb1852c1f30c000bb455d86f72 (diff) | |
download | iptables-f57ec73d4e082ce4b3e24e2a3fb2c40c7fe6335b.tar.gz |
Snap for 11173240 from 88a3f66954a066bb1852c1f30c000bb455d86f72 to mainline-sdkext-releaseaml_sdk_341410000android14-mainline-sdkext-release
Change-Id: I7370df511c777b024d128e38824ba95ee61056c3
Diffstat (limited to 'iptables/tests/shell/run-tests.sh')
-rwxr-xr-x | iptables/tests/shell/run-tests.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/iptables/tests/shell/run-tests.sh b/iptables/tests/shell/run-tests.sh index 65c37adb..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 @@ -122,7 +124,8 @@ EOF if [ "$VALGRIND" == "y" ]; then tmpd=$(mktemp -d) msg_info "writing valgrind logs to $tmpd" - chmod a+rx $tmpd + # let nobody write logs, too (././testcases/iptables/0008-unprivileged_0) + chmod 777 $tmpd printscript "$XTABLES_NFT_MULTI" "$tmpd" >${tmpd}/xtables-nft-multi printscript "$XTABLES_LEGACY_MULTI" "$tmpd" >${tmpd}/xtables-legacy-multi trap "rm ${tmpd}/xtables-*-multi" EXIT @@ -195,4 +198,4 @@ failed=$((legacy_fail+failed)) msg_info "combined results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))" -exit 0 +exit -$failed |