Date: Tue, 5 Nov 2024 03:20:44 GMT From: Jose Luis Duran <jlduran@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5797a03fe8a7 - main - ping tests: Run tests unprivileged inside a vnet Message-ID: <202411050320.4A53Kiah048077@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5797a03fe8a7c3355a727aaaea803ee1f42d106b commit 5797a03fe8a7c3355a727aaaea803ee1f42d106b Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2024-11-05 03:00:38 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2024-11-05 03:07:32 +0000 ping tests: Run tests unprivileged inside a vnet In order to create vnet jails, atf_python needs root privileges. However, once the vnet is created, its privileges inside the vnet can be demoted, as these tests should not require root in order to pass. Reviewed by: markj Approved by: emaste (mentor) Fixes: 4efaf43c6fa7 ("ping: Require root user for pytests") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42175 --- sbin/ping/tests/test_ping.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 93b42d7d53bd..3f9a3aecf924 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -724,6 +724,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 @pytest.mark.parametrize("expected", testdata) @pytest.mark.require_user("root") + @pytest.mark.require_user("unprivileged") def test_ping(self, expected): """Test ping""" ping = subprocess.run( @@ -753,6 +754,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 @pytest.mark.parametrize("expected", ping46_testdata) @pytest.mark.require_user("root") + @pytest.mark.require_user("unprivileged") def test_ping_46(self, expected): """Test ping -4/ping -6""" for version in [4, 6]:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411050320.4A53Kiah048077>