summaryrefslogtreecommitdiffstats
path: root/tests/py/nft-test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/nft-test.py')
-rwxr-xr-xtests/py/nft-test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index 01ee6c98..e7b5e01e 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -1022,6 +1022,8 @@ def execute_cmd(cmd, filename, lineno, stdout_log=False, debug=False):
if debug_option:
print(cmd)
+ log_file.flush()
+
if debug:
debug_old = nftables.get_debug()
nftables.set_debug(debug)
@@ -1394,6 +1396,12 @@ def main():
# Change working directory to repository root
os.chdir(TESTS_PATH + "/../..")
+ try:
+ import unshare
+ unshare.unshare(unshare.CLONE_NEWNET)
+ except:
+ print_warning("cannot run in own namespace, connectivity might break")
+
check_lib_path = True
if args.library is None:
if args.host: