aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@gmail.com>2023-10-11 13:57:11 +0000
committerMark Johnston <markj@FreeBSD.org>2023-10-11 17:48:28 +0000
commit4efaf43c6fa76e0daa1ed5ea535d863f15415bf4 (patch)
treed36a99bb2d829e68c7faea781bb3c8f8250a3d6a
parentb86e4812cce88920cb592bd3b8571572373dbb9c (diff)
downloadsrc-4efaf43c6fa76e0daa1ed5ea535d863f15415bf4.tar.gz
src-4efaf43c6fa76e0daa1ed5ea535d863f15415bf4.zip
ping: Require root user for pytests
atf_python may use vnet jails for creating an isolated test environment. Mark these tests that require root user privileges. Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863
-rw-r--r--sbin/ping/tests/test_ping.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py
index 645940a62cb6..900fbf45d52d 100644
--- a/sbin/ping/tests/test_ping.py
+++ b/sbin/ping/tests/test_ping.py
@@ -723,6 +723,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2
]
@pytest.mark.parametrize("expected", testdata)
+ @pytest.mark.require_user("root")
def test_ping(self, expected):
"""Test ping"""
ping = subprocess.run(
@@ -751,6 +752,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2
]
@pytest.mark.parametrize("expected", ping46_testdata)
+ @pytest.mark.require_user("root")
def test_ping_46(self, expected):
"""Test ping -4/ping -6"""
for version in [4, 6]: