From nobody Fri Jul 19 21:50:04 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 4WQjyj1yF7z5QRgd; Fri, 19 Jul 2024 21:50:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQjyh3zzLz4TsL; Fri, 19 Jul 2024 21:50:20 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=rlibby@gmail.com Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-52e97e5a84bso3016238e87.2; Fri, 19 Jul 2024 14:50:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721425818; x=1722030618; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYH+OX0pk68BkCJWcbW2AMuQzc0ej9L/3ejjo6jLtS0=; b=Wxvis4Oj8vKtKS/zDZQxazH7oEaJN+X9ulANuN4IUt/1w10sBM8r9Ycjz/mKUYalLY SVYxz70kPuMZLTElr/Je/7Ld4C/9AhzJEMoN9BGsw0VohyvvApZJgIWZaYVwolDxF37+ ZL6m3m/HvBQM0K5bd3BZtJV4tB9mIK1s0bqYp3KUSO2KQQneAZvSeBVuhNjlTxra8Jnh vwr91Xtrt3HQIk4uiGYzq9h3s/6AWlEoynfPH3zn3mbJrsXh3S5XTou5ZzZiOkWU4+KW SPvOmpO/2X/nF1yxqeRwnqp4jZjp/feFSLlw+MgjX/Bg50toC47n/kmrVJTgGJPzxml0 Yb5A== X-Forwarded-Encrypted: i=1; AJvYcCVRcxVcgiACIOm5tXlcIAbNVnKp3AIdF/+lVOyR8somX7tEOUvRD9pSiRB/OeEBZRPGXrewxmeDyP+9H/rKu7fDZ71a6LrwjSDfHv4dqJe9Ilr2dNjKr+HqZlqHKRU4jDAHsPFFN/V96bnM2pdst0oTDQ== X-Gm-Message-State: AOJu0YwOyacrcBvcBM3OgpzYgSqyvlqlWD1040J0tra61GSItd2/L+Yl C4vtpN3gfmg4Jtm/AN8Kk8bFZ+82i/Omy5SrvH7j2AEj5Le57hQEBaQ3i4Ju X-Google-Smtp-Source: AGHT+IELMbcICJ+zZqzoOznvCuT1xuDeoMFvrJ5rbNO0IG1PaENv6e6NLLYjiLfPswtvtIVZzSrXvg== X-Received: by 2002:a05:6512:1597:b0:52e:9921:6dff with SMTP id 2adb3069b0e04-52ee53b7b7dmr7313664e87.26.1721425817435; Fri, 19 Jul 2024 14:50:17 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ef5571ba1sm304554e87.199.2024.07.19.14.50.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jul 2024 14:50:16 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2eea8ea8bb0so45316451fa.1; Fri, 19 Jul 2024 14:50:16 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX4YiYMdzApC3x8QaRd3EaAoGL/2UskpHMOSU/NyI5QBpjqcKPBcX63d3XU1FXFNc/eX30jrp3PMwo2uFN0xo+JggCq3bfEFRvDr5C2jnfiJjmXH/sCAv/XEm0vojel6PuQOuGYxpkwjSos+x5niOvx1w== X-Received: by 2002:a2e:84ca:0:b0:2ee:8f3d:e68d with SMTP id 38308e7fff4ca-2ef1685d099mr7546321fa.44.1721425816630; Fri, 19 Jul 2024 14:50:16 -0700 (PDT) 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 References: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> In-Reply-To: <202407181319.46IDJdBj055008@gitrepo.freebsd.org> From: Ryan Libby Date: Fri, 19 Jul 2024 14:50:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 257e70f1d5ee - main - kyua: Add FreeBSD Jail execution environment support To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.92)[-0.924]; NEURAL_SPAM_SHORT(0.65)[0.654]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.54:from,209.85.208.169:received]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[rlibby]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.54:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4WQjyh3zzLz4TsL On Thu, Jul 18, 2024 at 6:19=E2=80=AFAM Mark Johnston w= rote: > > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D257e70f1d5ee61037c8c59b116= 538d3b6b1427a2 > > commit 257e70f1d5ee61037c8c59b116538d3b6b1427a2 > Author: Igor Ostapenko > AuthorDate: 2024-07-16 18:41:12 +0000 > Commit: Mark Johnston > CommitDate: 2024-07-18 13:18:28 +0000 > > kyua: Add FreeBSD Jail execution environment support > > A new Kyua concept is added -- "execution environment". A test can be > configured to be run within a specific environment. The test case > lifecycle is extended respectively: > - execenv init (creates a jail or does nothing for default > execenv=3D"host") > - test exec > - cleanup exec (optional) > - execenv cleanup (removes a jail or does nothing for default > execenv=3D"host") > > The following new functionality is provided, from bottom to top: > > 1 ATF based tests > > - The new "execenv" metadata property can be set to explicitly ask fo= r > an execution environment: "host" or "jail". If it's not defined, as > all existing tests do, then it implicitly means "host". > > - The new "execenv.jail.params" metadata property can be optionally > defined to ask Kyua to use specific jail(8) parameters during creat= ion > of a temporary jail. An example is "vnet allow.raw_sockets". > > Kyua implicitly adds "children.max" to "execenv_jail_params" > parameters with the maximum possible value. A test case can overrid= e > it. > > 2 Kyuafile > > - The same new metadata properties can be defined on Kyuafile level: > "execenv" and "execenv_jail_params". > > - Note that historically ATF uses dotted style of metadata naming, wh= ile > Kyua uses underscore style. Hence "execenv.jail.params" vs. > "execenv_jail_params". > > 3 kyua.conf, kyua CLI > > - The new "execenvs" engine configuration variable can be set to a li= st > of execution environments to run only tests designed for. Tests of = not > listed environments are skipped. > > - By default, this variable lists all execution environments supporte= d > by a Kyua binary, e.g. execenvs=3D"host jail". > > - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" > parameter. For example, "kyua -v execenvs=3Dhost test" will run onl= y > host-based tests and skip jail-based ones. > > - Current value of this variable can be examined with "kyua config". > > [markj] This feature has not landed upstream yet. > See the discussion in https://github.com/freebsd/kyua/pull/224 . > Having the ability to automatically jail tests allows many network te= sts > to run in parallel, giving a drastic speedup. So, let's import the > feature and start using it in main. > > Signed-off-by: Igor Ostapenko > Reviewed by: markj, kp > Tested by: markj, kp > MFC after: 3 months > Differential Revision: https://reviews.freebsd.org/D45865 > --- > contrib/kyua/AUTHORS | 1 + > contrib/kyua/cli/cmd_config_test.cpp | 12 +- > contrib/kyua/doc/kyua.conf.5.in | 13 +- > contrib/kyua/doc/kyuafile.5.in | 103 +++++++- > contrib/kyua/drivers/report_junit_test.cpp | 8 + > contrib/kyua/engine/atf.cpp | 11 +- > contrib/kyua/engine/atf_list.cpp | 4 + > contrib/kyua/engine/config.cpp | 18 ++ > contrib/kyua/engine/execenv/execenv.cpp | 74 ++++++ > contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++++ > contrib/kyua/engine/execenv/execenv_host.cpp | 52 ++++ > contrib/kyua/engine/execenv/execenv_host.hpp | 63 +++++ > contrib/kyua/engine/plain.cpp | 7 +- > contrib/kyua/engine/requirements.cpp | 33 +++ > contrib/kyua/engine/scheduler.cpp | 274 ++++++++++++++++= ++- > contrib/kyua/engine/scheduler.hpp | 1 + > contrib/kyua/engine/tap.cpp | 7 +- > contrib/kyua/examples/kyua.conf | 3 + > contrib/kyua/integration/cmd_config_test.sh | 2 + > contrib/kyua/integration/cmd_report_junit_test.sh | 8 + > contrib/kyua/integration/cmd_report_test.sh | 2 + > contrib/kyua/main.cpp | 3 + > contrib/kyua/model/metadata.cpp | 76 ++++++ > contrib/kyua/model/metadata.hpp | 5 + > contrib/kyua/model/metadata_test.cpp | 8 +- > contrib/kyua/model/test_case_test.cpp | 3 +- > contrib/kyua/model/test_program_test.cpp | 13 +- > contrib/kyua/os/freebsd/execenv_jail.cpp | 78 ++++++ > contrib/kyua/os/freebsd/execenv_jail.hpp | 65 +++++ > contrib/kyua/os/freebsd/execenv_jail_manager.cpp | 63 +++++ > contrib/kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ > contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 ++++++ > contrib/kyua/os/freebsd/main.cpp | 54 ++++ > contrib/kyua/os/freebsd/main.hpp | 41 +++ > contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++= ++++++ > contrib/kyua/os/freebsd/utils/jail.hpp | 64 +++++ > contrib/kyua/utils/config/nodes.ipp | 9 +- > contrib/kyua/utils/process/executor.cpp | 42 +++ > contrib/kyua/utils/process/executor.hpp | 1 + > usr.bin/kyua/Makefile | 15 +- > 40 files changed, 1792 insertions(+), 28 deletions(-) > This broke the gcc build: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc13_build/1307/ With several instances of error: 'noreturn' function does return [-Werror] From my meta files: gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_atf.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/atf.cpp:199:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_atf.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/atf.cpp:230:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_plain.o.meta:/usr/src= /freebsd/contrib/kyua/engine/plain.cpp:113:1: error: 'noreturn' function does return [-Werror] gcc13/usr/src/freebsd/amd64.amd64/usr.bin/kyua/engine_tap.o.meta:/usr/src/f= reebsd/contrib/kyua/engine/tap.cpp:160:1: error: 'noreturn' function does return [-Werror] I'm unsure if [[noreturn]] on a virtual method is defined in the way that this code apparently expects. Ryan