From nobody Tue Nov 05 03:20:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XjDB45P3Gz5cwDs; Tue, 05 Nov 2024 03:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjDB43Z1Dz487d; Tue, 5 Nov 2024 03:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730776844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htWL6vTcBpMLIikay8Bm8SrbnBQsMm5zFcYLFDdoR3Y=; b=QqE/C5pKhF6GFHK1DDcuGFag0uHG6Epj3cexOzqKvBZNp4lJpolqJdCHxLT6F+h6xfrT+1 weHWt1jwJAc8YxDoJo6dkoY/BRA94Qjr+IbXAEjFfMSETYKKe0206eWnbfUwodqB9a5Aps WAVo5suY5v8N9rBdAVjBIx93dnY4hZtqJC6qdvsEVIoubhFMmegCC8SQqCcjP1P/1NoXhB DmCeQQ5sYpYwL2DX2dX4t7koFsc/EPzEJ6gLVe9uhxBWjqzpaGESZ9BisRxEW3PqUJWkct OnbgEkENiN3/rMSQ+eEM85pmkyeSOpOXko+uMRV+rhPQ4+sq3de6GmSkGjbXqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730776844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htWL6vTcBpMLIikay8Bm8SrbnBQsMm5zFcYLFDdoR3Y=; b=gNMBQEUuXRUGV/TmL/PTYsMcUQKOu9oxvbcpADb65MZ/8qLJt0shcQKxmLzDnd27RjJi1m pF/CeWU+AJmgXma6u0KWm1+310QL+jtnKXFqapcwSxxEmS90FM+48yQoVKctlO5Z/wR1wf 3ZFZlPkQSWru0RFHfble2UG8LyeHxJTPsKyWUgQiEXW8wDXlp9rEgTVDMmTjgITEQ6O8Kb DTNrQg2ONiuVbt7FG1n66KRF2BOUewWTUyuh1ON+gfIBblDeVjWNHPqNXW4Eye7GDJ7MBM tLjlKK/2A8THSIprTk7As7SayjNbH2wbRScO3yNHfLhLXOQlspM5dEDOWLnFMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730776844; a=rsa-sha256; cv=none; b=Tbcj9oBCXWcRFmlXopEQCVVe/fMo7PMlrZEA7rxhEK98pxVUF48CnkthZD7uer/nPOfKMF 2cyt7Ec6/EFB9IY1RGQa6UcYmGibaBxTkrH3+pniucrNzegHAlKWGfazBrNYBPx2lBoMkq 5RIKc6Gs7ZtAHYccaFgvPDVnIhJU6Ctri9p1gI4eedGzNiVuhV1HqsEriNw70QUYcQkxyt BfAubH6y+5Cx1oZanYBcZtvWSwDqCXw7HZrfCLKTo/1sHJMl0fk3a08ZoC1FU5kxys4gVq iZO7/fM1Z79+UhFMwmjxYbpNp3/pspBwJkw+gj+C8iVZoHQnDwa7oMdXqG7NNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XjDB42LY7z1093; Tue, 5 Nov 2024 03:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A53KiIn048080; Tue, 5 Nov 2024 03:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A53Kiah048077; Tue, 5 Nov 2024 03:20:44 GMT (envelope-from git) Date: Tue, 5 Nov 2024 03:20:44 GMT Message-Id: <202411050320.4A53Kiah048077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 5797a03fe8a7 - main - ping tests: Run tests unprivileged inside a vnet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5797a03fe8a7c3355a727aaaea803ee1f42d106b Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5797a03fe8a7c3355a727aaaea803ee1f42d106b commit 5797a03fe8a7c3355a727aaaea803ee1f42d106b Author: Jose Luis Duran AuthorDate: 2024-11-05 03:00:38 +0000 Commit: Jose Luis Duran 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]: