From nobody Sun Oct 5 20:51:49 2025 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 4cfvhk3ZWvz6BfPs; Sun, 05 Oct 2025 20:51:50 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfvhk0pX7z3wFP; Sun, 05 Oct 2025 20:51:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759697510; 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=POoV+NAKVtOtuakRvqGg0qjbfGc0S+Hd1n0RX++TNrc=; b=wpqmGWxjqZ2jt6+5O6RkDt3DMNNlWKBD96QyAI1hctQ7uUGru/TcE9VyWspT6JunGz8wWi vW7QSaDmxUSXGZfrjuHo11pnuKxaK8zaOTBbdkmR6AloWsT3Amzc8s9EEj1sw3vzUVs7TR /DZQGqNzeLyyu7TMZJ8z+UEuq76PrwTdG8o6LDrWu4zELgSRcfRpN9QN1Fs5SgmcI4Mx4E lkItobTs8Qhk7RkC6dIvujEAlmKpywJc48pEycMncpq5vpafzAGqfxuXnGWjF8URZ54xVd C+HDlaU0wOkdTXHjkSpZwCe1dk6XlMYCfW/V2aLFbTxfRsrrRcETyiXB9K5oCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759697510; 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=POoV+NAKVtOtuakRvqGg0qjbfGc0S+Hd1n0RX++TNrc=; b=Xcy/LzNFuNBCaLGt9XaxJwwau1E9W3TQSSKEPZ26GP417VZIYhGtFGPNm8r7UgB87aopZK Ko0Gwf9U+YoJBBHYNpDJFmhro3C3x5HsI9zZf68bk7r5IjCBuuAjsfDw/oLUQSURv+nx/J O1Vq870rup7cZfGTvDl3SXlC8nyH/RXhNAuOHysIyTsUBf3p4B2+RMX9yIx3o6FCH7HsLD 9KbGBD2FLIgSvBwiFiMNL1aexGhiPiMjNCGHzA6CshQ24kAGntsDKYpz+LTf5QtmXRdpG9 S6Mbsd5tEFwUUhyK+4SfyuHG67mB1yFQ6ozH9QUqDE6UyKFI5TfSc6j7cuhChg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759697510; a=rsa-sha256; cv=none; b=Hwv7V+n0bjinQrIEyNLBbk5lvJqX8N33g/p+4uJRUE+aJKBrCh2ZehpYGL30X45nAhoaan +Fm0IGeOgIxCXHUsv4IVP54R2taoDCFNE6IKxf9BCPZgaOHr2Agd+7NV5juZJSA43J4DL4 3o2KP5caFW5/4wCBEF0V4HGMDRGrx49s208e29lqpDlsyJbcO6ViSzL5QFAKxcafoOuAsh QcLYk8EDSSSPRdWRU+Nq4rBb6rp1YiBuSHmR5edW5jI/UcUB5rP4UK6VPWq1oE/STmt2Ax IaxpYraZ5GrJhSMAARmEZI0aMml7/x+wRcCcWA3MKLCGDsR4n+p5+nqIWaZY2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cfvhk05rQzD5Z; Sun, 05 Oct 2025 20:51:50 +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 595KpnKI040016; Sun, 5 Oct 2025 20:51:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595Kpngg040013; Sun, 5 Oct 2025 20:51:49 GMT (envelope-from git) Date: Sun, 5 Oct 2025 20:51:49 GMT Message-Id: <202510052051.595Kpngg040013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4c7dba0c93fc - stable/15 - atf_python: allow test scripts to pass jail options 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4c7dba0c93fcec7f7db5d8a1aa8b98be07caff71 Auto-Submitted: auto-generated The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7dba0c93fcec7f7db5d8a1aa8b98be07caff71 commit 4c7dba0c93fcec7f7db5d8a1aa8b98be07caff71 Author: Kristof Provost AuthorDate: 2025-09-27 14:38:19 +0000 Commit: Kristof Provost CommitDate: 2025-10-05 20:47:34 +0000 atf_python: allow test scripts to pass jail options Test scripts based on atf_python can now pass jail command options via the 'opts' key in the 'vnetX' key of TOPOLOGY. Reviewed by: melifaro MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52761 (cherry picked from commit 2213e158886f72f45f288c94069a9a40c4f334ed) --- tests/atf_python/sys/net/vnet.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index c96eb5d671fc..f75a3eaa693e 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -283,14 +283,15 @@ class VnetFactory(object): time.sleep(0.1) return not_matched - def create_vnet(self, vnet_alias: str, ifaces: List[VnetInterface]): + def create_vnet(self, vnet_alias: str, ifaces: List[VnetInterface], opts: List[str]): vnet_name = "pytest:{}".format(convert_test_name(self.topology_id)) if self._vnets: # add number to distinguish jails vnet_name = "{}_{}".format(vnet_name, len(self._vnets) + 1) iface_cmds = " ".join(["vnet.interface={}".format(i.name) for i in ifaces]) - cmd = "/usr/sbin/jail -i -c name={} persist vnet {}".format( - vnet_name, iface_cmds + opt_cmds = " ".join(["{}".format(i) for i in opts]) + cmd = "/usr/sbin/jail -i -c name={} persist vnet {} {}".format( + vnet_name, iface_cmds, opt_cmds ) jid = 0 try: @@ -421,7 +422,10 @@ class VnetTestTemplate(BaseTest): idx = len(iface_map[iface_alias].vnet_aliases) iface_map[iface_alias].vnet_aliases.append(obj_name) vnet_ifaces.append(iface_map[iface_alias].ifaces[idx]) - vnet = vnet_factory.create_vnet(obj_name, vnet_ifaces) + opts = [] + if "opts" in obj_data: + opts = obj_data["opts"] + vnet = vnet_factory.create_vnet(obj_name, vnet_ifaces, opts) vnet_map[obj_name] = vnet # Allow reference to VNETs as attributes setattr(self, obj_name, vnet)