From nobody Thu Nov 14 03:25:08 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 4Xpls12l3Xz5d1QR; Thu, 14 Nov 2024 03:25:09 +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 4Xpls06dM7z4HB6; Thu, 14 Nov 2024 03:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554708; 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=sx7HcIJoJ4eDmCAooj2o5GOwuj98r47p44CgiWUiKP0=; b=lZU8E7YGqUvHrIpyFW2okoX2PYo8RKKwONGrzZkHyWeFIB9GqLBR79rXpn99m2JA4TKHgr 99+UqeVihUGcRgG68AYxjrdCx1UOdXD1LDuJ7TiSUc9HTQkfwKRQPOlpMo+QDXAhmPod/F SAzOD/aFwik4G1XZbcHbWhtIAlC4B60EZn4MY/jHlyFb4CZ1MHNURCMMgiPe8snYWRbB4/ +qR10Vboe5eaZBuRJfGNfnvy0FlAJkwUSwE5kKC37yVxVCHKw8MzhlqXjQgJxoCLQjUTd5 DlWj9vs5B/YWYfHxomAm3FIe/QYCBHm8WxrrKgPhOzpXYCRoybi0aarsVWJhgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731554708; 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=sx7HcIJoJ4eDmCAooj2o5GOwuj98r47p44CgiWUiKP0=; b=AcJBSnY0Y0WrrFDVeSwvy8SEnnaKGuJingPvmMpYyxp39b8DBdMInUf7om+4SeJkFRV7EK 0/YhhWQ0oyVIxxTNHz5dcKhPYIHRz6VFgWsQX7EhKML7mQbxQzoM35/KV4U64SfJN5Cwe5 l54Xc+30MkDuvJmn2jm33lIT4nFe+4jSYacCITRElyqLBnEIHYnmQTTgwknVTSLXs95HEW 1DnRFYLTGaIFK6sa0bphC4k8WvPiN/pGqclF1fuzlyF3dZpDEPE4gb6Z1rpRvavDVnqbvV CUpc++7uKwN7MkqAHFto4jTKpokSDbGsZWQgAQogyHNrpRjKN8KYn8/1WjIA0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731554708; a=rsa-sha256; cv=none; b=Fzdb6BjJz2SeOKopZ6KsQTucC7N7b7RMH7nj0csldtSl+EDJu1/X5hkbCzmo1mbyTJl5Mr s2Ox7Vd32FDF9rEyp8VLBcfDy2ABb7AJQxiEljAlgqBV5DFzB0Kjz7f3ICU7g0wHKXGtFA gHf6sfHQHSG7lAYQkEtDB9nLFOjYlR1mscqEB1Fx5QgtlTva8tTcUAvhN+iVKzHz9K+NpJ E03WJ69ul9V+bgbe23t0ZyJxn6yaOGgCKj2DtYmCu2C9hoOURJWRhucEnRqYn1M698ySZq o/L4vbKvZaqaAAyTpOXSm6/Yi9fqc1R+uc7qJMEG+usZs5jNvaFRlEPnpC7wcw== 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 4Xpls06BKDzM93; Thu, 14 Nov 2024 03:25:08 +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 4AE3P8du025006; Thu, 14 Nov 2024 03:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE3P8ka025003; Thu, 14 Nov 2024 03:25:08 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:25:08 GMT Message-Id: <202411140325.4AE3P8ka025003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5d24286be13a - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d24286be13a0553fd8a2024c9f4a83d33649085 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5d24286be13a0553fd8a2024c9f4a83d33649085 commit 5d24286be13a0553fd8a2024c9f4a83d33649085 Author: Jose Luis Duran AuthorDate: 2024-11-05 03:00:38 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-14 03:23:33 +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 (cherry picked from commit 5797a03fe8a7c3355a727aaaea803ee1f42d106b) --- 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]: