From nobody Wed Sep 25 08:50:39 2024 X-Original-To: dev-commits-doc-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 4XD9Rg33QDz5XBN6 for ; Wed, 25 Sep 2024 08:50:39 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XD9Rg2SVKz4SLC; Wed, 25 Sep 2024 08:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727254239; 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=PjC7tsuZubpcIWIwjrQr56NJxDpDHKqLs09oA4ScB0c=; b=GiqEwmsJTu4/3y0iI3dPIONkJTEh5QgOO4p9noPbSRtjyB0dydVSKh+6b28T5PkbAWeAla 7l2lqAhWaTgmXkE1kAD2Pi2LUfyWAUhd4GwV6WtA25exkAAXl/wS6p81WJg/o5xN0AjQJV zqPH/l8sjIYTITZ6GdvZ8+FAIfTbUirO5a7nWYuWmZeL0nv7a9hm6I+JJTSsxLwWIumOQB erjRYfcNE5FVrU20xLuT6FdMexn5qaq5JQ7hvcIFwc14ubGE0pzOtPxM9TulIt7ho9XN18 YdI4RLLGkiK4yjyRj8CT+geA9lIK+NWn/4ytGBCBWIOw023HdN7cZs0v+GcXGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727254239; a=rsa-sha256; cv=none; b=neDyn/PGxnje/nGfFVBbqtSjEclx40e4Rr4ZW6+2sRVrpoxCvujbjfB/o+ZIcjzqEiB8FB qnkb7oixxb8bLSYwWLNhEN3eRZ7P0RSnN1fMM75iq1exIVZVliQimLQBAhs5VA6bAklRXl V64I1R22HrkfCLs8b5BPZRuV5YDywp9wVFDrQeUXbDBAPONroB78y9mx2oA9tUL2g/E3i6 tlYkYThmqoVXX+fSvAmS7/EDPkXW+H/8sB2uh7XGRc9avmFmnkNdLRzWt74ic1s24ySN7K X7BKzER2r9oZnbj0jgdhhi5R49O0+0wYCyVjZb8LO+8v/QQoFbyBQQ4wWaKO1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727254239; 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=PjC7tsuZubpcIWIwjrQr56NJxDpDHKqLs09oA4ScB0c=; b=CJHFdvmdPG3Ll3pdUMzLMApONlzCn2a4Jhm6gqGd4su4DuBsL6Zd91OrcyLwQPskFNRP7a QJsZniZvo//SLgmrYMfNSxq+skVCsYC7GcIQAh/SvqbGax5Pd0xtiO2BVpVn5NAYnOsP/u ItQCjArjaKzKeViPSYh9xU3SO8OghRw9GymZeyL6L/Gu0LIDbw1e76WVfXd/W0LzSIysry Yp6m2Tw/rODWa+onZqwPBe2sPVMntk1Pt6oeKg23XSLnuaRfwao85wa/XuR9ECQB/nYaqb gwZcOeE/MtTO5vciPO/sUE0p0MHa4RSjAxIFcVGtHNNKVA31K87x5m8W1XNLag== 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 4XD9Rg21c6z1503; Wed, 25 Sep 2024 08:50:39 +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 48P8odGH093566; Wed, 25 Sep 2024 08:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48P8odOo093563; Wed, 25 Sep 2024 08:50:39 GMT (envelope-from git) Date: Wed, 25 Sep 2024 08:50:39 GMT Message-Id: <202409250850.48P8odOo093563@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Igor Ostapenko Subject: git: 28a0d0b9dc - main - Status/2024Q3/kyua.adoc: Add report List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28a0d0b9dc6ea00555896f9d091e0de8abe1d7f7 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/doc/commit/?id=28a0d0b9dc6ea00555896f9d091e0de8abe1d7f7 commit 28a0d0b9dc6ea00555896f9d091e0de8abe1d7f7 Author: Igor Ostapenko AuthorDate: 2024-09-25 08:44:55 +0000 Commit: Igor Ostapenko CommitDate: 2024-09-25 08:44:55 +0000 Status/2024Q3/kyua.adoc: Add report Reviewed by: pauamma_gundo.com, salvadore, kp, markj Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D46688 --- .../en/status/report-2024-07-2024-09/kyua.adoc | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/website/content/en/status/report-2024-07-2024-09/kyua.adoc b/website/content/en/status/report-2024-07-2024-09/kyua.adoc new file mode 100644 index 0000000000..42e3f42ee3 --- /dev/null +++ b/website/content/en/status/report-2024-07-2024-09/kyua.adoc @@ -0,0 +1,40 @@ +=== Kyua Jail Support + +Contact: Igor Ostapenko + +The FreeBSD test suite is executed by the man:kyua[1] utility. +Kyua supports parallel execution of tests with `kyua -v parallelism= test`, however many network tests leverage man:jail[8] features like man:VNET[9] and have conflicts with jail naming and network configuration. +As a result they are marked with the `is_exclusive=true` metadata property to prevent them from running at the same time and interfering with each other. +It creates a dilemma when a project aims to increase test coverage, but the accumulation of exclusive tests proportionally increases the time required to run them. +This, in turn, affects the development process from multiple angles. + +Kyua has recently got a change in 15-CURRENT to support a new concept called "execution environment". +By default, tests run in the so-called "host" execution environment, where they are executed as before. +A test can opt-in to use a brand new execution environment, the "jail" one. +In this case, kyua creates a jail before running the test, and then executes the test within the jail. +That opens up the opportunity to run more tests in parallel due to the extra isolation provided by the jail concept itself, and specifically by the VNET. +It depends on hardware and configuration, but there are reports that having the same environment [.filename]#netpfil/pf# tests can be run around 4 times faster -- a few minutes instead of half an hour. + +The following Makefile change is a quick demo of how [.filename]#netpfil/pf# tests were switched to run in parallel with jail execution environment: + + -# Tests reuse jail names and so cannot run in parallel. + -TEST_METADATA+= is_exclusive=true + +# Allow tests to run in parallel in their own jails + +TEST_METADATA+= execenv="jail" + +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" + +More details: + +* The key commit with detailed description: link:https://cgit.freebsd.org/src/commit/?id=257e70f1d5ee61037c8c59b116538d3b6b1427a2[257e70f1d5ee61037c8c59b116538d3b6b1427a2] +* The man pages covering the "execenv" feature: man:kyuafile[5], man:kyua.conf[5] + +This change also brings new sysctl read-only variables, which expose more details about current jail, and may be generally useful: + +* `security.jail.children.max: Maximum number of child jails` +* `security.jail.children.cur: Current number of child jails` + +A hint: the `sysctl -n security.jail.children.cur` run from `prison0` provides the number of all jails in the system. + +Further improvements to Kyua, such as requirements definition and automatic resolution, are currently in the design phase. +Potentially new metadata properties like `required_klds` and `required_pkgs` provide a clue to these topics. +Please contact Igor to discuss ideas and use cases that can help shape these upcoming Kyua enhancements.