aboutsummaryrefslogtreecommitdiff
path: root/tests/atf_python/sys
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2023-02-09 14:31:34 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2023-02-09 14:49:27 +0000
commit6332ef8941999b0c074d1ece0e1e108447c70b98 (patch)
tree1368de67f276cfc623ca739e24f8e72ab6e7bae9 /tests/atf_python/sys
parent5a5436eb5d960b9e243f8196147c6a51ca4f9dee (diff)
Diffstat (limited to 'tests/atf_python/sys')
-rw-r--r--tests/atf_python/sys/net/vnet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py
index 1f61269ffe6c..c0e0a24f6687 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -329,6 +329,7 @@ class ObjectsMap(NamedTuple):
class VnetTestTemplate(BaseTest):
+ NEED_ROOT: bool = True
TOPOLOGY = {}
def _get_vnet_handler(self, vnet_alias: str):
@@ -374,6 +375,7 @@ class VnetTestTemplate(BaseTest):
# Do unbuffered stdout for children
# so the logs are present if the child hangs
sys.stdout.reconfigure(line_buffering=True)
+ self.drop_privileges()
handler(vnet)
def setup_topology(self, topo: Dict, topology_id: str):
@@ -465,6 +467,7 @@ class VnetTestTemplate(BaseTest):
# Save state for the main handler
self.iface_map = obj_map.iface_map
self.vnet_map = obj_map.vnet_map
+ self.drop_privileges()
def cleanup(self, test_id: str):
# pytest test id: file::class::test_name