Have the script call itself prefixed by unshare. This won't prevent
clashing test case contents, but at least leave the host netns alone.
Signed-off-by: Phil Sutter <phil@nwl.cc>
return $rc
}
+netns=true
+for arg in "$@"; do
+ [[ "$arg" == "--no-netns" ]] && netns=false
+done
+if $netns; then
+ exec unshare -n $0 --no-netns "$@"
+fi
+
testcases=""
while [ -n "$1" ]; do
case "$1" in
test_json=true
shift
;;
+ --no-netns)
+ shift
+ ;;
-H|--host)
nft=nft
shift