From nobody Mon Nov 23 00:49:11 2026 X-Original-To: dev-commits-src-branches@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 4jXnPz4lk2z71PVM for ; Mon, 23 Nov 2026 00:49:11 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnPz3fXsz4XlY for ; Mon, 23 Nov 2026 00:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795394951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5hqtZHWOKy8kT+eZnkqN6EsvnE89PYDwgUsbljqriBw=; b=D7RB0EvxxWAn7PfSSGPiZLgI7Tbw0zusH4wVzr8Pk7LXgYFRdx4G6ADwA7PW7QN2s4FvZd liio2N/iX4zbX43eoWIlNxKbdJ/7Z6EgZpb4p9KGBWoRBaPXQ1YeKv6n1hrhiv4YfoW7bd q8OZI9kK/x/zs3saEvr4Ru1FXZds81nKcfq9WIeU91lGVpxZ6HwcuRDNFOLKoA5q70rIsU AlxoCJ09XDzEwjbEEDu0JrhQ5SFuiZ6HVZ5BguAq6lH08NoZGMuA5N8hTmKBx11Ie8HfL6 SmgSrH/9lNelaLsEYV/Gl0u0Vjrm/ypwqKgazCOyPT2a/Fv681BTtiVFQ0VorA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394951; b=TFgGLMhXc1UaeoaQnF/o0xGjpcxOUKJ2FTHOjjKl/MTVE5cG3ueBVXOcs/RQ2GgM5sDXZE WnhYvRZtsqWrPf92F3xl2if0L+cXzFaw3jUZUdd+ugP6eGo9WCjKJtQbo4TzV2y9AYWspr kYXfYYV81Aw6oCsuivupq8YhhafFrCMj5J3BCHhEUpgRU/8tZQ4U8ANVZn4PRbT5dgAcag WCTSnBPxvv3Vo+YYyyOPtd7Rz8YdbcAEf+HfHSMUeWA8942StxK61VvQ+3yd0fUVimcToQ AC3UwLkOybVBRKw6IDzMqd0TK91lRmquq6fLvPpxBxboi200pn3RP1XhK9aMkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795394951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5hqtZHWOKy8kT+eZnkqN6EsvnE89PYDwgUsbljqriBw=; b=b7YVD6MvpNicegFHN6q5RQb5+OAqaYzvU41z7j0+AU6SXh5UqKuZlJNCNrlK+0cH6X0h/D tU4D/3ZXwtrMz6T0O+LSEBlRSAOPOdYKSdEVwSRwxTJM3zpVKglXFHK5l9+dhx0suHcOFi 2dI499ZrRRFwmS/wVG4J16JvC33+HcxubV+cjtopZY8Bhy+IH2FOpSY+LyPm5lUZyMQwym lslUTcyq0/xA+x2Fb91im5kWx/DWEHCcakVwe0C95rPgvEWoP6mL9xTxs7RYbbUUaWDUTB gW8g5y/zBAOpIAbXVMyA3TZreYBE1QO/Ge3/7Xj1sFGE7VBDRFvLWbOfvWsUrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnPz3JzfzRkh for ; Mon, 23 Nov 2026 00:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fc95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 00:49:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Vinicius Ferrao From: Rick Macklem Subject: git: 00c640349654 - stable/15 - xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes() List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 00c640349654063dd729b1af85def3b6159c9bc2 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 00:49:11 +0000 Message-Id: <6b038d87.1fc95.3b14e3d8@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=00c640349654063dd729b1af85def3b6159c9bc2 commit 00c640349654063dd729b1af85def3b6159c9bc2 Author: Vinicius Ferrao AuthorDate: 2026-11-05 23:58:56 +0000 Commit: Rick Macklem CommitDate: 2026-11-23 00:45:41 +0000 xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes() The xdrmbuf_getlong() function failed to check for the return value from xdrmbuf_getbytes(). This could have resulted in a failure during NFS RPC message processing. (cherry picked from commit cf59649539e653db8285996af2b161be9693a49d) --- sys/xdr/xdr_mbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c index 6cb72f8fe1b4..27ff71848574 100644 --- a/sys/xdr/xdr_mbuf.c +++ b/sys/xdr/xdr_mbuf.c @@ -151,7 +151,8 @@ xdrmbuf_getlong(XDR *xdrs, long *lp) if (p) { t = *p; } else { - xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t)); + if (!xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t))) + return (FALSE); } *lp = ntohl(t); From nobody Mon Nov 23 00:50:22 2026 X-Original-To: dev-commits-src-branches@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 4jXnRM46csz71PN2 for ; Mon, 23 Nov 2026 00:50:23 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnRM0snCz4Y8V for ; Mon, 23 Nov 2026 00:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795395023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vO+kD8UZD9sX32UdmqbJHaCUFZAfkWwqwqcVYPr8Fw=; b=dpAKdzr0jeOAGc6k/Xq9HzbCYilFCH362YLKsBVAJn1Dfn3qdwrIhCKBUQ6C6tRztsdxmP B4UcRM/WSj3kMXMTrwTI7/Dx2+IUhyr1amisG/DiECh+lkKapuoondHohHiUSclgFW42ly vIhFQsqsS3mtQlkvoXGg/ZnrawLZeOLDuCl5EDVL7Z+UvCWnYAOLYoTaxF6h7VDgmdkmfm oZXEvCBopYph2ICW0SZKo2FmQkW4pK/dXU4ld6RM6S4viycgqhxM3X2ttbd+A+4NJEd08R JmyyhSjjkdYZE/otviN4L87k9ICstGgwoY9o3/aRZzYI/iL2T+b2bKRwD4BnIw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795395023; b=i3540BpW3OkgP2QrAXcNlCazmhZPHm+3zuWBro6DvJvu0u3vWBqz6POeA0Us98G8ugEB6n dm9Sra4Yn2lxrZ6Dd5BNHkYHhK7zj+EtbCcAPY827VHU6NRa1tC9/Iysj5UPPHau3op7WG kjay2WSC7wgDbqZXcnQt/rpZtkcrQ25ZLb5tFn02NBc5YEqgZG7NF/BwiOI9tsIQm2ucmR K5G4EwW8ctolzgDkkeDwAT5p0W6CjYsNASEoTWX7dVQx2lyx6zDZOvPmoYhbaqr25DJCpY uFuziFMKI7XLZjAOpvHvRWaBC7vTjwHj/55WaX6aA9KZnc9rEZe0Za1CvRO0og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795395023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vO+kD8UZD9sX32UdmqbJHaCUFZAfkWwqwqcVYPr8Fw=; b=ICVJlketaUwqLU6sy7WDOwRcLI5swPMQW7pI5v3CWa4naeXBFGcT8WQ4WPAN0siDzPQyev 3cPfQICeqZPWomZmvdBaXrOBBY607NeR2zzURvRnG10mTmJrc0dFz1RexL6lJcbf4+Dh16 8vfkxTd3GKnbms343UC2CBK0cceNxntDWUYjWcjQLhaL0LQItWosut1ezFP2kg3hgDLWKF 2WMgZlM88bGx6DpGi2r2Le+p8RLlAxJKQoo0gJ+/AYppdOYNCSOVEVp0aORHGisY3V9C2Q vWyEQafc9ywq+KWhTFs/k9x3dE9b7m9fatkR/8ROLu2lW8BzO9kp8D40LlC1Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnRL4H9dzRb1 for ; Mon, 23 Nov 2026 00:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 17cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 00:50:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Osvaldo Janeri Filho From: Rick Macklem Subject: git: 0ecd86d21057 - stable/15 - rpc.tlsservd.c: Check the malloc return List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0ecd86d21057f7a0089359d8f2753be1f2ba1e15 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 00:50:22 +0000 Message-Id: <6b038dce.17cf.4998b1b@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0ecd86d21057f7a0089359d8f2753be1f2ba1e15 commit 0ecd86d21057f7a0089359d8f2753be1f2ba1e15 Author: Osvaldo Janeri Filho AuthorDate: 2026-10-31 03:04:10 +0000 Commit: Rick Macklem CommitDate: 2026-11-23 00:48:39 +0000 rpc.tlsservd.c: Check the malloc return The NULL return is used by the following memcpy() call. Fail the request instead. Unlikely to happen in practice, since the rpc.tlsservd daemon runs as root and does not allocate a lot or memory. (cherry picked from commit 6d705f2bf17f2c221ffd0d9b0824ba0fb429392e) --- usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c index fb0501b2db4c..40dbb7c4ff2b 100644 --- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c +++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c @@ -365,6 +365,8 @@ rpctlssd_connect_2_svc(struct rpctlssd_connect_arg *argp, assert(rqstp->rq_xprt == xprt); ctx = malloc(sizeof(*ctx)); + if (ctx == NULL) + return (FALSE); memcpy(&ctx->arg, argp, sizeof(ctx->arg)); ctx->xid = *(uint32_t *)pthread_getspecific(xidkey); From nobody Mon Nov 23 00:54:38 2026 X-Original-To: dev-commits-src-branches@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 4jXnXG3Lgmz71Q71 for ; Mon, 23 Nov 2026 00:54:38 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnXG1Knbz4YHt for ; Mon, 23 Nov 2026 00:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795395278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KVb3iW/Q+aGc7tv4jHPxyuP6YN5EcUHFB0ojByAZBJg=; b=ITrDgsR6ZpXs4LQ+uLI4/4pkaXRSVrynWzWL60Pu4dPsEXXcYtGOZFkB7jCimqc+XDUW97 XT1jOVvC9z/qgGnezAq5lP3PxzwJDtCQmayULAm9+44sMQVn0SQB+QEXduTq7M60pTk3hW qVwtzsP6j5fBXrw0Qu0VexQ30KN68pnHj7UbcWBsWOwMhdOvbUBgmML0obj0SGzn25ceUi jk7Ao7a7RxsrU7wh7OlBm2+SAq+CmeeAiwcDgJM7pLkI/3bxjoFSs+uMb3QGmHqKbwJTAs pnk/Qs5paKmiZU8oSNveEUyJhzgGvs/LWOg0K23OzrB3BFAdS4KK32wzsygutA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795395278; b=wzVMsXOVePJr4TNa4ESirdWlheIpKszmwh6ho6S5fa0PYLj6BYkBc752CBHfBRmxkllgIN dqd3z1B0nbSpnxrqmtzbRy8zW4V/yUbFKjF9GUT9dMuLwHw+uliNZhbcjkSG8MD728AXt4 DluKpcKG6g9BFZNjJkRov4nBKlsnwGjhtl+Z5lMScOgY5SzVBZu9Gu91ImBp6zj9OVNvAB dVztf5Yvx0Vb8644kleQu3xlPZwKMV48Yil2drQaEVluxnasVd2HHHkfnbxc9qLEHJ4+dp vZuH02rvQEJAibi3v5Pa86mJM43E5C4sO+MC7xKFEz7epvrMiaCgwePJbm/ghg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795395278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KVb3iW/Q+aGc7tv4jHPxyuP6YN5EcUHFB0ojByAZBJg=; b=IQ/fQWUx9wE+iBbNeQbHHcR02LfzZ6jYj3ULh13Wa+jh/UO0rj5GCbhOaZlaMyJfI7MAEI XYP6wdTF6YOvrgyJcD2grx5pkpycMMp9xrbd3QRSTkuEH1M2Gc1VY5/pGsUyhZQ0BoeCCj iMWwbJGELKxFSUPQwQ3leArTeN0j2ArnDcKvFqwuVScDsqbZpnKsUimT/7t0fAE2Oc8VO7 8OpjKJnTmn1qUZcgO5rqcPEbIH47EAJFCUV3zALY8fpy+eXxNbjKV5j9QfOnRQZYWAoQ1f LcSutAzQVSPc/Rg3nBxng14yR82HIjBh9kcmL5lvdcb+aHHeiwi5RdljKucojA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnXG0yFdzS1B for ; Mon, 23 Nov 2026 00:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 17da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 00:54:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Vinicius Ferrao From: Rick Macklem Subject: git: 9c766ce61064 - stable/14 - xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes() List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c766ce61064ad6e2968ba918dcdb80b2c6d1a75 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 00:54:38 +0000 Message-Id: <6b038ece.17da.7423a0e7@gitrepo.freebsd.org> The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9c766ce61064ad6e2968ba918dcdb80b2c6d1a75 commit 9c766ce61064ad6e2968ba918dcdb80b2c6d1a75 Author: Vinicius Ferrao AuthorDate: 2026-11-05 23:58:56 +0000 Commit: Rick Macklem CommitDate: 2026-11-23 00:52:52 +0000 xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes() The xdrmbuf_getlong() function failed to check for the return value from xdrmbuf_getbytes(). This could have resulted in a failure during NFS RPC message processing. (cherry picked from commit cf59649539e653db8285996af2b161be9693a49d) --- sys/xdr/xdr_mbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c index 99fdeef8fe23..611036db1032 100644 --- a/sys/xdr/xdr_mbuf.c +++ b/sys/xdr/xdr_mbuf.c @@ -148,7 +148,8 @@ xdrmbuf_getlong(XDR *xdrs, long *lp) if (p) { t = *p; } else { - xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t)); + if (!xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t))) + return (FALSE); } *lp = ntohl(t); From nobody Mon Nov 23 01:18:34 2026 X-Original-To: dev-commits-src-branches@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 4jXp3t4thHz71TWd for ; Mon, 23 Nov 2026 01:18:34 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3t4XCSz4bmZ for ; Mon, 23 Nov 2026 01:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396714; 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=anSfb6uw06KGfT9W15FyHVPmGPSzWjLUysSWoIJ79JE=; b=ioEotcbO1y9c/vKO77XkZrYNKpTrDf9IAx6akQA8EJB92K6F4QeUGF/x+3rpN5VHQ7Rdbu ebIw5XC3Q44ogWUrgy5oVr4oJ9p3JUNyilgcb92R412CY+vHb3DGSEjo8HlKUnp1dCUJGp +OrFAfXq8mzBt2OmFWPDTBZc2kdZPXW9N+C8FFhA78TuY917P/wT3dcgnRxWnB8ZvMDm2+ 5hyMXIfRQ6fgPo26CWFvbJa7jtgcIgzrwPvcNe+m7QJHhiDM6Ng++OqMFahc1KA35f2FRJ O8V3Hl+6xlt/xrX1BFiKhibY5Wg5z4DJG88rRqTSGHzLfDIw7TMdkizATWeknA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396714; b=o0JE1hDd4T5/zgz0XKpOrOaT/E2sqDGVlDg1I5q+kd00M2hNksyCE4MRMTFeMd9LjiIJlo 0blWTh9wRRjeZloveWvWdLQ6bUA0xzXjyxNXyDdXbQSx/yXaXxZ6aAi21cpUn+a6yUx32u sX2JECWkUsda1xQJXvMgZwb7jjw7XREQ+oDltA1209L3ZcFmGwuh0cLASBEFF+zWvdI4/e OAoU8jYm3+5lhkTzgsDTmX81N2Rrlp3Nqz+8dXR87E+KYQ6hko82MTCwiDefffel57HsME JnQlYLu/UiJSG5HefYJbz1ftnvaOJ00/oqXrKZm0bRVf26vkUkew5hZl//uvVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396714; 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=anSfb6uw06KGfT9W15FyHVPmGPSzWjLUysSWoIJ79JE=; b=fubxIyv9knPZF7nzQ3JATEUllZC1lVkiv3gmTAc5FNXZZCxP/7BtMWKdqhyhb/rhwS8Spr zdZVBjC2t0h4ZqMAaHSWk3uSQvXhx6Mne1rVUpIzcLfLgprsRaMuPZuY5edlW99pJpMLT2 VA4HO4twPHmfmbYuB83Ypxffe5ZN7xCzlvKht6+XKWMHfPPkghvKEbuOQfb5ynv4kg5fpw fhGZ28FoDpz8O8e6067lmBf7UWwQvzzGXAGneIft3y/51HMd1koa8oYFt/FSGwFn+yacBj xFG+CEnGS3VRpPW7HkzbJVxhd/pvM8o3D0ZPwCZbDO5zvZaQUFiT/qd8uDg7ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3t3nYXzSGy for ; Mon, 23 Nov 2026 01:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: ff3af1fa23d1 - stable/15 - contrib/kyua: update to 0.15.0 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff3af1fa23d16817003aef81aaa5157711077afc Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:34 +0000 Message-Id: <6b03946a.25fe.78e8c644@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ff3af1fa23d16817003aef81aaa5157711077afc commit ff3af1fa23d16817003aef81aaa5157711077afc Author: Enji Cooper AuthorDate: 2026-10-07 17:50:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:39 +0000 contrib/kyua: update to 0.15.0 This new release contains multiple feature updates and bugfixes. Please see the release notes mentioned in the merge commit for more details. MFC after: 1 month Merge commit '144afd05f8a2300361ec30c1c2020e4022ddd943' Conflicts: contrib/kyua/cli/cmd_debug.cpp contrib/kyua/doc/kyua-debug.1.in contrib/kyua/doc/kyuafile.5.in contrib/kyua/engine/config.cpp contrib/kyua/engine/execenv/execenv.cpp contrib/kyua/engine/execenv/execenv.hpp contrib/kyua/engine/execenv/execenv_host.hpp contrib/kyua/engine/requirements.cpp contrib/kyua/engine/requirements.hpp contrib/kyua/engine/scheduler.cpp contrib/kyua/model/metadata.cpp contrib/kyua/os/freebsd/execenv_jail.hpp contrib/kyua/os/freebsd/execenv_jail_stub.cpp contrib/kyua/os/freebsd/main.cpp contrib/kyua/os/freebsd/reqs_checker_kmods.cpp contrib/kyua/os/freebsd/utils/jail.hpp contrib/kyua/utils/fs/directory.cpp contrib/kyua/utils/process/executor.cpp (cherry picked from commit eb8f69902f7de8012a31a85db2f88a54584f81af) --- contrib/kyua/.cirrus.yml | 25 - contrib/kyua/.gitignore | 23 - contrib/kyua/.travis.yml | 49 -- contrib/kyua/Doxyfile.in | 1 - contrib/kyua/FREEBSD-Xlist | 12 + contrib/kyua/INSTALL.md | 268 ------ contrib/kyua/Makefile.am | 186 ---- contrib/kyua/{NEWS.md => NEWS} | 163 +++- contrib/kyua/README.md | 33 +- contrib/kyua/admin/.gitignore | 6 - contrib/kyua/admin/Makefile.am.inc | 41 - contrib/kyua/admin/build-bintray-dist.sh | 131 --- contrib/kyua/admin/check-api-docs.awk | 72 -- contrib/kyua/admin/check-style-common.awk | 79 -- contrib/kyua/admin/check-style-cpp.awk | 87 -- contrib/kyua/admin/check-style-make.awk | 71 -- contrib/kyua/admin/check-style-man.awk | 71 -- contrib/kyua/admin/check-style-shell.awk | 95 -- contrib/kyua/admin/check-style.sh | 170 ---- contrib/kyua/admin/clean-all.sh | 90 -- contrib/kyua/admin/travis-build.sh | 98 --- contrib/kyua/admin/travis-install-deps.sh | 83 -- contrib/kyua/bootstrap/.gitignore | 4 - contrib/kyua/bootstrap/Kyuafile | 5 - contrib/kyua/bootstrap/Makefile.am.inc | 90 -- contrib/kyua/bootstrap/plain_helpers.cpp | 141 --- contrib/kyua/bootstrap/testsuite.at | 200 ----- contrib/kyua/cli/Makefile.am.inc | 123 --- contrib/kyua/cli/cmd_debug.cpp | 7 +- contrib/kyua/cli/main.cpp | 4 + contrib/kyua/config.h | 139 +++ contrib/kyua/configure.ac | 173 ---- contrib/kyua/doc/.gitignore | 14 - contrib/kyua/doc/Makefile.am.inc | 152 ---- contrib/kyua/doc/kyua-about.1.in | 2 +- contrib/kyua/doc/kyua-config.1.in | 2 +- contrib/kyua/doc/kyua-db-exec.1.in | 2 +- contrib/kyua/doc/kyua-db-migrate.1.in | 2 +- contrib/kyua/doc/kyua-debug.1.in | 4 +- contrib/kyua/doc/kyua-help.1.in | 2 +- contrib/kyua/doc/kyua-list.1.in | 2 +- contrib/kyua/doc/kyua-report-html.1.in | 2 +- contrib/kyua/doc/kyua-report-junit.1.in | 2 +- contrib/kyua/doc/kyua-report.1.in | 2 +- contrib/kyua/doc/kyua-test.1.in | 2 +- contrib/kyua/doc/kyua.1.in | 6 +- contrib/kyua/doc/kyua.conf.5.in | 2 +- contrib/kyua/doc/kyuafile.5.in | 18 +- contrib/kyua/drivers/Makefile.am.inc | 72 -- contrib/kyua/engine/Kyuafile | 3 + contrib/kyua/engine/Makefile.am.inc | 155 ---- contrib/kyua/engine/atf.hpp | 21 +- contrib/kyua/engine/atf_result.cpp | 16 +- contrib/kyua/engine/atf_result_test.cpp | 7 +- contrib/kyua/engine/atf_test.cpp | 2 +- contrib/kyua/engine/config.cpp | 4 +- contrib/kyua/engine/execenv/execenv.cpp | 3 - contrib/kyua/engine/execenv/execenv.hpp | 6 +- contrib/kyua/engine/execenv/execenv_fwd.hpp | 44 + contrib/kyua/engine/execenv/execenv_host.hpp | 2 +- contrib/kyua/engine/googletest.cpp | 219 +++++ contrib/kyua/engine/googletest.hpp | 68 ++ contrib/kyua/engine/googletest_helpers.cpp | 330 +++++++ contrib/kyua/engine/googletest_list.cpp | 111 +++ .../atf_helpers.cpp => engine/googletest_list.hpp} | 49 +- contrib/kyua/engine/googletest_list_test.cpp | 208 +++++ contrib/kyua/engine/googletest_result.cpp | 528 ++++++++++++ contrib/kyua/engine/googletest_result.hpp | 111 +++ contrib/kyua/engine/googletest_result_fwd.hpp | 43 + contrib/kyua/engine/googletest_result_test.cpp | 427 +++++++++ contrib/kyua/engine/googletest_test.cpp | 361 ++++++++ contrib/kyua/engine/kyuafile.hpp | 5 - contrib/kyua/engine/kyuafile_test.cpp | 10 +- contrib/kyua/engine/plain.hpp | 13 +- contrib/kyua/engine/requirements.cpp | 4 +- contrib/kyua/engine/requirements.hpp | 4 +- contrib/kyua/engine/scheduler.cpp | 4 +- contrib/kyua/engine/scheduler.hpp | 26 +- contrib/kyua/engine/scheduler_test.cpp | 24 +- contrib/kyua/engine/tap.hpp | 13 +- contrib/kyua/examples/Makefile.am.inc | 45 - contrib/kyua/integration/Makefile.am.inc | 150 ---- contrib/kyua/integration/cmd_about_test.sh | 2 +- contrib/kyua/integration/cmd_report_test.sh | 2 +- contrib/kyua/integration/cmd_test_test.sh | 4 +- contrib/kyua/integration/helpers/.gitignore | 11 - contrib/kyua/integration/helpers/Makefile.am.inc | 90 -- contrib/kyua/integration/utils.sh | 34 +- contrib/kyua/m4/ax_cxx_compile_stdcxx.m4 | 951 --------------------- contrib/kyua/m4/compiler-features.m4 | 122 --- contrib/kyua/m4/compiler-flags.m4 | 169 ---- contrib/kyua/m4/developer-mode.m4 | 112 --- contrib/kyua/m4/doxygen.m4 | 62 -- contrib/kyua/m4/fs.m4 | 125 --- contrib/kyua/m4/getopt.m4 | 213 ----- contrib/kyua/m4/memory.m4 | 122 --- contrib/kyua/m4/signals.m4 | 92 -- contrib/kyua/m4/uname.m4 | 63 -- contrib/kyua/misc/Makefile.am.inc | 32 - contrib/kyua/model/Makefile.am.inc | 89 -- contrib/kyua/model/README | 11 - contrib/kyua/model/metadata.cpp | 4 +- contrib/kyua/os/freebsd/execenv_jail.hpp | 2 +- contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 2 +- contrib/kyua/os/freebsd/reqs_checker_kmods.cpp | 2 +- contrib/kyua/os/freebsd/utils/jail.hpp | 7 +- contrib/kyua/store/Makefile.am.inc | 145 ---- contrib/kyua/store/write_transaction_test.cpp | 2 +- contrib/kyua/utils/.gitignore | 2 - contrib/kyua/utils/Makefile.am.inc | 133 --- contrib/kyua/utils/cmdline/Makefile.am.inc | 96 --- contrib/kyua/utils/config/Makefile.am.inc | 87 -- contrib/kyua/utils/config/nodes.cpp | 20 +- contrib/kyua/utils/config/nodes.hpp | 2 + contrib/kyua/utils/config/nodes_test.cpp | 15 +- contrib/kyua/utils/defs.hpp.in | 15 +- contrib/kyua/utils/format/Makefile.am.inc | 59 -- contrib/kyua/utils/fs/Makefile.am.inc | 84 -- contrib/kyua/utils/fs/directory.cpp | 13 +- contrib/kyua/utils/fs/operations.cpp | 120 +-- contrib/kyua/utils/logging/Makefile.am.inc | 53 -- contrib/kyua/utils/process/.gitignore | 1 - contrib/kyua/utils/process/Kyuafile | 1 - contrib/kyua/utils/process/Makefile.am.inc | 118 --- contrib/kyua/utils/process/child.hpp | 4 +- contrib/kyua/utils/process/child_test.cpp | 2 +- contrib/kyua/utils/process/executor.cpp | 2 + contrib/kyua/utils/process/executor_pid_test.cpp | 208 ----- contrib/kyua/utils/process/executor_test.cpp | 23 +- contrib/kyua/utils/process/isolation.cpp | 2 +- contrib/kyua/utils/process/operations.cpp | 3 +- contrib/kyua/utils/process/operations.hpp | 6 +- contrib/kyua/utils/process/operations_test.cpp | 4 +- contrib/kyua/utils/sanity.hpp | 4 +- contrib/kyua/utils/signals/Makefile.am.inc | 73 -- contrib/kyua/utils/signals/misc_test.cpp | 2 +- contrib/kyua/utils/sqlite/Makefile.am.inc | 82 -- contrib/kyua/utils/sqlite/database.hpp | 1 + contrib/kyua/utils/sqlite/test_utils.hpp | 4 +- contrib/kyua/utils/stacktrace.cpp | 2 +- contrib/kyua/utils/stacktrace_test.cpp | 9 +- contrib/kyua/utils/test_utils.ipp | 2 +- contrib/kyua/utils/text/Makefile.am.inc | 74 -- contrib/kyua/utils/text/operations.ipp | 1 + contrib/kyua/utils/text/regex.cpp | 4 +- contrib/kyua/utils/text/regex.hpp | 1 + 146 files changed, 3003 insertions(+), 6843 deletions(-) diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml deleted file mode 100644 index 855693b34fa1..000000000000 --- a/contrib/kyua/.cirrus.yml +++ /dev/null @@ -1,25 +0,0 @@ -env: - ARCH: amd64 - -task: - matrix: - - name: 14.0-RELEASE - freebsd_instance: - image_family: freebsd-14-0 - - name: 14.0-STABLE - freebsd_instance: - image_family: freebsd-14-0-snap - - name: 13.2-RELEASE - freebsd_instance: - image_family: freebsd-13-2 - - name: 13.2-STABLE - freebsd_instance: - image_family: freebsd-13-2-snap - env: - DO: distcheck - install_script: - - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf - - ASSUME_ALWAYS_YES=yes pkg bootstrap -f - - pkg install -y autoconf automake atf lutok pkgconf sqlite3 - script: - - ./admin/travis-build.sh diff --git a/contrib/kyua/.gitignore b/contrib/kyua/.gitignore deleted file mode 100644 index d7f1a180d6fb..000000000000 --- a/contrib/kyua/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -*.a -*.o -*_helpers -*_inttest -*_test -*~ - -.deps -.dirstamp -Doxyfile -Makefile -Makefile.in -aclocal.m4 -api-docs -autom4te.cache -config.h -config.h.in -config.log -config.status -configure -kyua -local-kyua -stamp-h1 diff --git a/contrib/kyua/.travis.yml b/contrib/kyua/.travis.yml deleted file mode 100644 index 619dceaf3d2d..000000000000 --- a/contrib/kyua/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: cpp -sudo: required - -before_install: - - ./admin/travis-install-deps.sh - -matrix: - include: - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=no - - os: linux - dist: xenial - compiler: gcc - env: ARCH=amd64 DO=distcheck AS_ROOT=no - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=apidocs - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=style - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=no - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=yes - # TODO(ngie): reenable i386; the libraries were not available in the - # Ubuntu Xenial x86_64 docker image. - #- os: linux - # dist: xenial - # compiler: clang - # env: ARCH=i386 DO=distcheck AS_ROOT=no - #- os: linux - # dist: xenial - # compiler: gcc - # env: ARCH=i386 DO=distcheck AS_ROOT=no - -script: - - ./admin/travis-build.sh - -notifications: - email: - - kyua-log@googlegroups.com diff --git a/contrib/kyua/Doxyfile.in b/contrib/kyua/Doxyfile.in index e28d82f8999a..ac1dbf3398b6 100644 --- a/contrib/kyua/Doxyfile.in +++ b/contrib/kyua/Doxyfile.in @@ -45,7 +45,6 @@ JAVADOC_AUTOBRIEF = YES MACRO_EXPANSION = YES OUTPUT_DIRECTORY = @top_builddir@/api-docs OUTPUT_LANGUAGE = English -PREDEFINED += "KYUA_DEFS_NORETURN=" PREDEFINED += "KYUA_DEFS_FORMAT_PRINTF(x, y)=" PROJECT_NAME = "@PACKAGE_NAME@" PROJECT_NUMBER = @VERSION@ diff --git a/contrib/kyua/FREEBSD-Xlist b/contrib/kyua/FREEBSD-Xlist new file mode 100644 index 000000000000..06fef93a4024 --- /dev/null +++ b/contrib/kyua/FREEBSD-Xlist @@ -0,0 +1,12 @@ +*/*/Makefile* +*/Makefile* +*/*.m4 +*/*.pc.in +INSTALL.md +Makefile* +aclocal.m4 +admin/ +config.h.in +bootstrap/ +configure* +m4/ diff --git a/contrib/kyua/INSTALL.md b/contrib/kyua/INSTALL.md deleted file mode 100644 index d3dcab49cb74..000000000000 --- a/contrib/kyua/INSTALL.md +++ /dev/null @@ -1,268 +0,0 @@ -Installation instructions -========================= - -Kyua uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as -its build system. These are used only when compiling the application -from the source code package. If you want to install Kyua from a binary -package, you do not need to read this document. - -For the impatient: - - $ ./configure - $ make - $ make check - Gain root privileges - # make install - Drop root privileges - $ make installcheck - -Or alternatively, install as a regular user into your home directory: - - $ ./configure --prefix ~/local - $ make - $ make check - $ make install - $ make installcheck - - -Dependencies ------------- - -To build and use Kyua successfully you need: - -* A standards-compliant C and C++ complier. -* Lutok 0.4. -* pkg-config. -* SQLite 3.6.22. - -To build the Kyua tests, you optionally need: - -* The Automated Testing Framework (ATF), version 0.15 or greater. This - is required if you want to create a distribution file. - -If you are building Kyua from the code on the repository, you will also -need the following tools: - -* GNU Autoconf. -* GNU Automake. -* GNU Libtool. - - -Regenerating the build system ------------------------------ - -This is not necessary if you are building from a formal release -distribution file. - -On the other hand, if you are building Kyua from code extracted from the -repository, you must first regenerate the files used by the build -system. You will also need to do this if you modify `configure.ac`, -`Makefile.am` or any of the other build system files. To do this, simply -run: - - $ autoreconf -i -s - -If ATF is installed in a different prefix than Autoconf, you will also -need to tell autoreconf where the ATF M4 macros are located. Otherwise, -the configure script will be incomplete and will show confusing syntax -errors mentioning, for example, `ATF_CHECK_SH`. To fix this, you have -to run autoreconf in the following manner, replacing `` with -the appropriate path: - - $ autoreconf -i -s -I /share/aclocal - - -General build procedure ------------------------ - -To build and install the source package, you must follow these steps: - -1. Configure the sources to adapt to your operating system. This is - done using the `configure` script located on the sources' top - directory, and it is usually invoked without arguments unless you - want to change the installation prefix. More details on this - procedure are given on a later section. - -2. Build the sources to generate the binaries and scripts. Simply run - `make` on the sources' top directory after configuring them. No - problems should arise. - -3. Check that the built programs work by running `make check`. You do - not need to be root to do this, but if you are not, some checks will - be skipped. - -4. Install the program by running `make install`. You may need to - become root to issue this step. - -5. Issue any manual installation steps that may be required. These are - described later in their own section. - -6. Check that the installed programs work by running `make - installcheck`. You do not need to be root to do this, but if you are - not, some checks will be skipped. - - -Configuration flags -------------------- - -The most common, standard flags given to `configure` are: - -* `--prefix=directory`: - **Possible values:** Any path. - **Default:** `/usr/local`. - - Specifies where the program (binaries and all associated files) will - be installed. - -* `--sysconfdir=directory`: - **Possible values:** Any path. - **Default:** `/usr/local/etc`. - - Specifies where the installed programs will look for configuration - files. `/kyua` will be appended to the given path unless - `KYUA_CONFSUBDIR` is redefined as explained later on. - -* `--help`: - - Shows information about all available flags and exits immediately, - without running any configuration tasks. - -The following environment variables are specific to Kyua's `configure` -script: - -* `GDB`: - **Possible values:** empty, absolute path to GNU GDB. - **Default:** empty. - - Specifies the path to the GNU GDB binary that Kyua will use to gather a - stack trace of a crashing test program. If empty, the configure script - will try to find a suitable binary for you and, if not found, Kyua will - attempt to do the search at run time. - -* `KYUA_ARCHITECTURE`: - **Possible values:** name of a CPU architecture (e.g. `x86_64`, `powerpc`). - **Default:** autodetected; typically the output of `uname -p`. - - Specifies the name of the CPU architecture on which Kyua will run. - This value is used at run-time to determine tests that are not - applicable to the host system. - -* `KYUA_CONFSUBDIR`: - **Possible values:** empty, a relative path. - **Default:** `kyua`. - - Specifies the subdirectory of the configuration directory (given by - the `--sysconfdir` argument) under which Kyua will search for its - configuration files. - -* `KYUA_CONFIG_FILE_FOR_CHECK`: - **Possible values:** none, an absolute path to an existing file. - **Default:** none. - - Specifies the `kyua.conf` configuration file to use when running any - of the `check`, `installcheck` or `distcheck` targets on this source - tree. This setting is exclusively used to customize the test runs of - Kyua itself and has no effect whatsoever on the built product. - -* `KYUA_MACHINE`: - **Possible values:** name of a machine type (e.g. `amd64`, `macppc`). - **Default:** autodetected; typically the output of `uname -m`. - - Specifies the name of the machine type on which Kyua will run. This - value is used at run-time to determine tests that are not applicable - to the host system. - -* `KYUA_TMPDIR`: - **Possible values:** an absolute path to a temporary directory. - **Default:** `/tmp`. - - Specifies the path that Kyua will use to create temporary directories - in by default. - -The following flags are specific to Kyua's `configure` script: - -* `--enable-developer`: - **Possible values:** `yes`, `no`. - **Default:** `yes` in Git `HEAD` builds; `no` in formal releases. - - Enables several features useful for development, such as the inclusion - of debugging symbols in all objects or the enforcement of compilation - warnings. - - The compiler will be executed with an exhaustive collection of warning - detection features regardless of the value of this flag. However, such - warnings are only fatal when `--enable-developer` is `yes`. - -* `--with-atf`: - **Possible values:** `yes`, `no`, `auto`. - **Default:** `auto`. - - Enables usage of ATF to build (and later install) the tests. - - Setting this to `yes` causes the configure script to look for ATF - unconditionally and abort if not found. Setting this to `auto` lets - configure perform the best decision based on availability of ATF. - Setting this to `no` explicitly disables ATF usage. - - When support for tests is enabled, the build process will generate the - test programs and will later install them into the tests tree. - Running `make check` or `make installcheck` from within the source - directory will cause these tests to be run with Kyua. - -* `--with-doxygen`: - **Possible values:** `yes`, `no`, `auto` or a path. - **Default:** `auto`. - - Enables usage of Doxygen to generate documentation for internal APIs. - This documentation is *not* installed and is only provided to help the - developer of this package. Therefore, enabling or disabling Doxygen - causes absolutely no differences on the files installed by this - package. - - Setting this to `yes` causes the configure script to look for Doxygen - unconditionally and abort if not found. Setting this to `auto` lets - configure perform the best decision based on availability of Doxygen. - Setting this to `no` explicitly disables Doxygen usage. And, lastly, - setting this to a path forces configure to use a specific Doxygen - binary, which must exist. - - -Post-installation steps ------------------------ - -Copy the `Kyuafile.top` file installed in the examples directory to the -root of your tests hierarchy and name it `Kyuafile`. For example: - - # cp /usr/local/share/kyua/examples/Kyuafile.top \ - /usr/local/tests/Kyuafile - -This will allow you to simply go into `/usr/tests` and run the tests -from there. - - -Run the tests! --------------- - -Lastly, after a successful installation, you should periodically run the -tests from the final location to ensure things remain stable. Do so as -follows: - - $ cd /usr/local/kyua && kyua test - -The following configuration variables are specific to the 'kyua' test -suite and can be given to Kyua with arguments of the form -`-v test_suites.kyua.=`: - -* `run_coredump_tests`: - **Possible values:** `true` or `false`. - **Default:** `true`. - - Avoids running tests that crash subprocesses on purpose to make them - dump core. Such tests are particularly slow on macOS, and it is - sometimes handy to disable them for quicker development iteration. - -If you see any tests fail, do not hesitate to report them in: - - https://github.com/jmmv/kyua/issues/ - -Thank you! diff --git a/contrib/kyua/Makefile.am b/contrib/kyua/Makefile.am deleted file mode 100644 index d7f3cd27e73b..000000000000 --- a/contrib/kyua/Makefile.am +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright 2010 The Kyua Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Google Inc. nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ACLOCAL_AMFLAGS = -I m4 - -CHECK_BOOTSTRAP_DEPS = -CHECK_KYUA_DEPS = -CHECK_LOCAL = -CLEAN_TARGETS = -DIST_HOOKS = -PHONY_TARGETS = -CLEANFILES = - -EXTRA_DIST = -noinst_DATA = -noinst_LIBRARIES = -noinst_SCRIPTS = - -doc_DATA = AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE NEWS.md -noinst_DATA += INSTALL.md README.md -EXTRA_DIST += $(doc_DATA) INSTALL.md README.md - -if WITH_ATF -tests_topdir = $(pkgtestsdir) - -tests_top_DATA = Kyuafile -EXTRA_DIST += $(tests_top_DATA) -endif - -include admin/Makefile.am.inc -include bootstrap/Makefile.am.inc -include cli/Makefile.am.inc -include doc/Makefile.am.inc -include drivers/Makefile.am.inc -include engine/Makefile.am.inc -include examples/Makefile.am.inc -include integration/Makefile.am.inc -include misc/Makefile.am.inc -include model/Makefile.am.inc -include store/Makefile.am.inc -include utils/Makefile.am.inc - -bin_PROGRAMS = kyua -kyua_SOURCES = main.cpp -kyua_CXXFLAGS = $(CLI_CFLAGS) $(ENGINE_CFLAGS) $(UTILS_CFLAGS) -kyua_LDADD = $(CLI_LIBS) $(ENGINE_LIBS) $(UTILS_LIBS) - -CHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \ - KYUA_DOCDIR="$(abs_top_srcdir)" \ - KYUA_EXAMPLESDIR="$(abs_top_srcdir)/examples" \ - KYUA_MISCDIR="$(abs_top_srcdir)/misc" \ - KYUA_STOREDIR="$(abs_top_srcdir)/store" \ - KYUA_STORETESTDATADIR="$(abs_top_srcdir)/store" \ - PATH="$(abs_top_builddir):$${PATH}" -INSTALLCHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \ - PATH="$(prefix)/bin:$${PATH}" - -# Generate local-kyua, a wrapper shell script to run the just-built 'kyua' -# binary by pointing it to the possibly not-yet-installed data files in the -# build tree. -noinst_SCRIPTS += local-kyua -CLEANFILES += local-kyua local-kyua.tmp -local-kyua: Makefile - $(AM_V_GEN)echo '#!/bin/sh' >local-kyua.tmp; \ - echo 'env $(CHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT)' \ - '"$(abs_top_builddir)/kyua" \ - --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' \ - "$${@}"' >>local-kyua.tmp; \ - chmod +x local-kyua.tmp; \ - mv -f local-kyua.tmp local-kyua - -if WITH_ATF -CHECK_LOCAL += dump-ulimits check-kyua -PHONY_TARGETS += check-kyua -check-kyua: $(CHECK_KYUA_DEPS) - @failed=no; \ - ./local-kyua test \ - --kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' \ - || failed=yes; \ - if [ "$${failed}" = yes ]; then \ - ./local-kyua report --results-file='$(abs_top_srcdir)' \ - --verbose --results-filter=broken,failed; \ - exit 1; \ - fi - -installcheck-local: dump-ulimits installcheck-kyua -PHONY_TARGETS += installcheck-kyua -installcheck-kyua: - @failed=no; \ - cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \ - kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' test \ - || failed=yes; \ - if [ "$${failed}" = yes ]; then \ - cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) \ - $(TESTS_ENVIRONMENT) \ - kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' report \ - --verbose --results-filter=broken,failed; \ - exit 1; \ - fi - -# TODO(jmmv): kyua should probably be recording this information itself as part -# of the execution context, just as we record environment variables. -PHONY_TARGETS += dump-ulimits -dump-ulimits: - @echo "Resource limits:" - @{ \ - ulimit -a | sed -e 's,$$, (soft),'; \ - ulimit -a -H | sed -e 's,$$, (hard),'; \ - } | sort | sed -e 's,^, ,' - @echo -else -DIST_HOOKS += forbid-dist -PHONY_TARGETS += forbid-dist -forbid-dist: - @echo "Sorry; cannot make dist without atf." - @false -endif -check-local: $(CHECK_LOCAL) - -if WITH_DOXYGEN -# Runs doxygen on the source tree and validates the contents of the docstrings. -# We do not do this by default, even if doxygen has been enabled, because this -# step takes a long time. Instead, we just rely on a Travis CI build to catch -# inconsistencies. -PHONY_TARGETS += check-api-docs -check-api-docs: api-docs/api-docs.tag - @$(AWK) -f $(srcdir)/admin/check-api-docs.awk api-docs/doxygen.out - -api-docs/api-docs.tag: $(builddir)/Doxyfile $(SOURCES) - @$(MKDIR_P) api-docs - @rm -f api-docs/doxygen.out api-docs/doxygen.out.tmp - $(AM_V_GEN)$(DOXYGEN) $(builddir)/Doxyfile \ - >api-docs/doxygen.out.tmp 2>&1 && \ - mv api-docs/doxygen.out.tmp api-docs/doxygen.out - -CLEAN_TARGETS += clean-api-docs -clean-api-docs: - rm -rf api-docs -endif - -# Replace Automake's builtin check-news functionality so that we can validate -# the NEWS.md file instead of NEWS. -DIST_HOOKS += check-news -PHONY_TARGETS += check-news -check-news: - @case "$$(sed 15q "$(srcdir)/NEWS.md")" in \ - *"$(VERSION)"*) : ;; \ - *) \ - echo "NEWS.md not updated; not releasing" 1>&2; \ - exit 1 \ - ;; \ - esac - -clean-local: $(CLEAN_TARGETS) -dist-hook: $(DIST_HOOKS) - -PHONY_TARGETS += clean-all -clean-all: - GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh - -.PHONY: $(PHONY_TARGETS) diff --git a/contrib/kyua/NEWS.md b/contrib/kyua/NEWS similarity index 85% rename from contrib/kyua/NEWS.md rename to contrib/kyua/NEWS index 304cfe94695a..c794e6e60092 100644 --- a/contrib/kyua/NEWS.md +++ b/contrib/kyua/NEWS @@ -1,17 +1,119 @@ -Major changes between releases -============================== +# Major changes between releases +## Changes in version 0.15.0 -Changes in version 0.14 ------------------------ +**Released on 2026/10/07.** -**NOT RELEASED YET; STILL UNDER DEVELOPMENT.** +### Bugfixes -* Explicitly require C++11 language features when compiling Kyua. +* #265: Null cleanups +* #271: kyua: Try harder to delete directories. +* #300: Implement utils::config::positive_int_node::deep_copy +### Developer Workflow Changes -Changes in version 0.13 ------------------------ +* #254: Add initial GitHub Actions support for kyua +* #288: [CI] remove legacy CI scripts and files +* #291: Remove Travis CI config +* #298: Add sanitizers and code coverage support +* #301: Add FreeBSD CI support via vmactions +* #305: Automate uploading release assets + +### Feature Enhancements + +* #203: Add GoogleTest support +* #230: Do not count skipped as passed in test cmd +* #260: Support require.diskspace ATF metadata +* #261: Pass unprivileged user config prop to ATF using all known names +* #266: Add "kyua debug -p" option +* #270: Add required_kmods metadata +* #272: Make "test" command actually report about workdir cleanup issues +* #273: Make "debug -p" skip writing stdout/stderr to tmp files +* #277: kyua-debug: Add -P option +* #290: Require C++-20 in order to build kyua +* #307: Upstream multiple items from FreeBSD + +### Documentation + +* #258: kyuafile.5: Add ATF metadata mapping reference +* #275: kyua manuals: Correct --results-file short form +* #279: docs: Standardize document description tone + +### Miscellaneous + +* #264: Switch from std::auto_ptr<> to std::unique_ptr<> +* #269: Fix cmd_about_test:topic__version test case +* #297: Reduce overall lutok dependency +* #312: Replace KYUA_ATTRIBUTE_{NORETURN,UNUSED}} with C++ attributes +* #318: utils::fs: remove umount(8) support + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.14.1...kyua-0.15.0 + +## Changes in version 0.14.1 + +**Released on March 29th, 2025.** + +* Issue #263: fix release tarball by relying on `make dist`. + +* Document ATF to Kyua mappings for metadata properties. + +* Support `require.diskspace` ATF metadata property. + +* Support backwards compatible `unprivileged_user` metadata property for ease + of use dealing with ATF vs Kyua. + +* Fix building from source by tracking `utils/process/Kyuafile.in` and + `engine/execenv/execenv_fwd.hpp` with automake. + +## Changes in version 0.14 + +**Released on December 31st, 2024.** + +* Replace `--with-atf` with `--enable-atf`. The latter must be specified + to enable ATF support and the Kyua tests by proxy. + +* Require newer versions of ATF (0.21) and Lutok (0.5). This is being done + as part of a multi-phase deprecation of pre-C++11 environments. + +* Vendor the ATF m4 files from the freebsd/atf repo. + +* Translate `is_exclusive` metadata to its ATF counterpart. + +* Issue #236: fix accidental test forkbomb in specific user environments + with `integration` tests by avoiding infinite recursion calling kyua. + +* Fix the build on Ubuntu 24.04. + +- execenv support added. This FreeBSD-specific feature allows tests to be + executed in jails. + +* Issue #169: Remove deprecated `readdir_r` use. + +* Fix build issue on more recent versions of MacOS. + +* Fix build issue on IllumOS. + +* Fix issues with PID reuse in testcases. + +* Escape characters captured from stderr and stdout in HTML output. + +* `integration/cmd_report_test:verbose`: fix regular expression used in + tests which would break in certain user environments. + +* Add Cirrus CI support for testing Kyua on FreeBSD. + +* Remove `UTILS_UNUSED_PARAM` macro. + +* Fix document rendering with newer versions of doxygen. + +* Issue #152: explicitly require C++11 language features when compiling Kyua. + Remove `std::shared_ptr` compatibility header, `utils/shared_ptr.hpp`. + +* Fix `igor` and `mandoc -Tlint` reported issues with generated manpages. + +* Issue #167: fix typos in kyua(1) manpage. + +## Changes in version 0.13 **Released on August 26th, 2016.** @@ -36,8 +138,7 @@ Changes in version 0.13 timers to control test deadlines. -Changes in version 0.12 ------------------------ +## Changes in version 0.12 **Released on November 22nd, 2015.** @@ -129,8 +230,7 @@ parallelization possibilities. Markdown for better formatting online. -Changes in version 0.11 ------------------------ +## Changes in version 0.11 **Released on October 23rd, 2014.** @@ -211,8 +311,7 @@ Changes in version 0.11 examples. -Changes in version 0.10 ------------------------ +## Changes in version 0.10 **Experimental version released on August 14th, 2014.** @@ -232,8 +331,7 @@ Changes in version 0.10 prevent triggering a core dump that made the test fail in some platforms. -Changes in kyua-cli version 0.9 -------------------------------- +## Changes in kyua-cli version 0.9 **Experimental version released on August 8th, 2014.** @@ -276,8 +374,7 @@ Changes in more detail: files. -Changes in kyua-testers version 0.3 ------------------------------------ +## Changes in kyua-testers version 0.3 **Experimental version released on August 8th, 2014.** @@ -293,8 +390,7 @@ Changes in kyua-testers version 0.3 handle test programs that report a pass but exit with a non-zero code. *** 10874 LINES SKIPPED *** From nobody Mon Nov 23 01:18:35 2026 X-Original-To: dev-commits-src-branches@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 4jXp3v5qH5z71TS1 for ; Mon, 23 Nov 2026 01:18:35 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3v4ZMYz4bv7 for ; Mon, 23 Nov 2026 01:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396715; 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=RQ9VVOOSkgPu/F/mKjDLviLTINv7RWJoGlKQuL0Jw+M=; b=MMIzZMnVB6KA0o/Ij9Y2V/lZd7m3Wwg52TP4NGmizabngiZvHwacl3EXBVcMSQCqxdBbJO Q1GU4Q+nETIXoamWF0Mi7XSSc/cttWOnHG1TkKdpYBKjDhhu4eKkokvGmLqEO38gnjRtK+ AskHB3gieyOJNC1BvfbeWNN3Y4kKQyXvvBVqXUjrQYPkh/UsnKEAnrXW2tF+L3u7BQGeZp 8wyf7aQkAkoMB/GCfnvtXUS8bd7MjgDS9+ikplGMnnZBi8apXKzhU6mS+3m3rsqTMz+ior 3aW1g3//yZtJ173N81ak7pu0pbn/xYmmYrUnqTo1C9Hj1fl+kFibsIAm2HgRng== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396715; b=uOuoi73o5r8HJ8S0pADT9AQgNpA5ojoQ+wWVGdXO9vVncE8RYAEwouJ4kYD69UW41F2vie MGSS1hmDej6BJef8azQD/lVbGNBIkI31qXG/si44yvLDz+WkoBYoz1mIkxNwaLq3VDqnBV Ojtl+cr86dGMOwrN659JTLqTLjTKNER5lcZcOKksQvoFyg6tdjKgPv4qKTrpGKlpDCLwsi JfOmS/ngoW3jmBO625zl8AiPlRj3kpM+gDFWwiYrej5Up5X0ryg9X4JPLJR3iRiKDDsrrH ms/s6mYWjytPFJWD1vY3osW4deORWBwcXGgY6twH6aSg8IzzS4mBbb4PWIIyCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396715; 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=RQ9VVOOSkgPu/F/mKjDLviLTINv7RWJoGlKQuL0Jw+M=; b=FsRWzYtyHz4w5uxeWJS4Fl/WMA7iFRGZv3NWyEKkaQdmyONm/y6vxoKMXBt4ylaP6EKkU+ 3ZUxZtH5ITKmSZN3RQbYYvBAFgzV30WlvTp66bSSwVR/38ILAs5Wjsy8SL6S+vyM7f4PDJ rcHQEnOkAFbdGviwN5bJiXekOup4SrUujSrFgbDEH+C0jKAIszC5QJpxa6XcvyDjUa3iHS cDY9n3cXokJeRspRRoxE49/TdYrU7CuvgnjvER/fExiH6dCQS8BWyxlRn29V4/LAjkinUa Yzi2WRmH2JnJyxTEp+fwPgv5y0HG3xsJ7mLjpfzGYh3ip56l6BbWq6Z88QhLGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3v3h5lzSYc for ; Mon, 23 Nov 2026 01:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: fd5c67bde707 - stable/15 - contrib/kyua: commit Makefile changes for version update List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fd5c67bde70740a3d9a409205e11e78d82f207fc Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:35 +0000 Message-Id: <6b03946b.2d4e.988b549@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=fd5c67bde70740a3d9a409205e11e78d82f207fc commit fd5c67bde70740a3d9a409205e11e78d82f207fc Author: Enji Cooper AuthorDate: 2026-10-07 17:55:21 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:39 +0000 contrib/kyua: commit Makefile changes for version update This was accidentally missed in the version update. MFC after: 1 month Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0") (cherry picked from commit b836604e126d5b3d0d3dee5da6c4168d3ec43fea) --- usr.bin/kyua/Makefile | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 82a2b0d03821..192a4e68734a 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -5,7 +5,6 @@ KYUA_DOCDIR= /usr/share/doc/kyua KYUA_EGDIR= /usr/share/examples/kyua KYUA_MISCDIR= /usr/share/kyua/misc KYUA_STOREDIR= /usr/share/kyua/store -KYUA_VERSION= 0.13 KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} @@ -15,6 +14,7 @@ PROG_CXX= kyua SRCS= main.cpp LIBADD= lutok sqlite3 util +.PATH: ${KYUA_SRCDIR}/doc MAN= kyua-about.1 \ kyua-config.1 \ kyua-db-exec.1 \ @@ -44,10 +44,6 @@ CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ -DKYUA_PLATFORM=\"${MACHINE}\" \ -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ - -DPACKAGE=\"kyua\" \ - -DPACKAGE_NAME=\"Kyua\" \ - -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ - -DVERSION=\"${KYUA_VERSION}\" CXXWARNFLAGS.gcc+= -Wno-free-nonheap-object @@ -120,6 +116,9 @@ SRCS+= engine/atf.cpp \ engine/config.cpp \ engine/exceptions.cpp \ engine/filters.cpp \ + engine/googletest.cpp \ + engine/googletest_list.cpp \ + engine/googletest_result.cpp \ engine/kyuafile.cpp \ engine/plain.cpp \ engine/requirements.cpp \ @@ -205,20 +204,4 @@ STOREDIR= ${KYUA_STOREDIR} STORETAGS= package=tests .PATH: ${KYUA_SRCDIR}/store -CLEANFILES+= ${MAN} -.PATH: ${KYUA_SRCDIR}/doc -.for man in ${MAN} -${man}: ${man}.in - sh ${KYUA_SRCDIR}/doc/manbuild.sh \ - -v "CONFDIR=${KYUA_CONFDIR}" \ - -v "DOCDIR=${KYUA_DOCDIR}" \ - -v "EGDIR=${KYUA_EGDIR}" \ - -v "MISCDIR=${KYUA_MISCDIR}" \ - -v "PACKAGE=kyua" \ - -v "STOREDIR=${KYUA_STOREDIR}" \ - -v "TESTSDIR=${TESTSBASE}" \ - -v "VERSION=${KYUA_VERSION}" \ - ${.ALLSRC} ${.TARGET} -.endfor - .include From nobody Mon Nov 23 01:18:36 2026 X-Original-To: dev-commits-src-branches@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 4jXp3x1cgTz71TPV for ; Mon, 23 Nov 2026 01:18:37 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3w4f7Jz4bmj for ; Mon, 23 Nov 2026 01:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396716; 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=jEyF9sgfPoYcP5LoIAX7MRAmGFMHLrbkTbu1I6/t4ck=; b=ZGbjSTLXdKJHETctP2VDFDlzaHYK6HpoQLbHCMGhuoIBhiMTjSAUPgWFBOw7W09b7roz4P 7AfPe7r0oJWKQDOlkwlcm6SYw373chlIL6Ih91Az9feNLvzDsLA+808MouF5rc1zMXb3V3 zmhTtHPdUZLrkHil5jVEtMRhtPb08qkjwOOcCzbP+n2kvCCPB5Y2DwH/nogI1BY6l9jYYd 0YVgWjJzGFxHrovPSdalY50+64sz51LPBRjMb2uQfuNymv/HzXGyLXGdsvqn7jz9l12U0B F6pBZNS8j+0nWd2/mD4Oserd2gu/Zos0bHDOaxm9zYAWPbYMj+fhme47ZFieow== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396716; b=DrvEak/zTk3qYBn8Na+3QsmiFyjGlBrVOsp4nC5zA3OKNRNDnyhZQo3jJPDsJMQeZWXXu7 glZPaArSwdTM6wNi1ohU2W2cCIzCCLAuSaQT0fTmAicAFCHgxY5Zd4VIfVqE6c1+Ke0cis OlJkTcaKsMBhiifDTIHCfdz4v0kUJAFcmd7Ao5ZByWEngGOayqVaxoSvyED7AzjY/7p0fJ LqjZGig0N26DHqB1ZFE141o5oQPbVJ9VvxxwmoLeLw/6pjM/O0vYs4zSHLzZzMPSVMtDXx DIazeLc6VAccY53hQSzED5vWW672NcDKkXngn8tH5cWOusfIVj7L2yQm+VVQRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396716; 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=jEyF9sgfPoYcP5LoIAX7MRAmGFMHLrbkTbu1I6/t4ck=; b=dHNH0gwgvYliOQDdsLq6JYwYZ/W2VF45xCpc5MmVp4MMQ31OL4mYH8GVbK8S1eYj9AJrv4 sx/lDZR14w/VkJFawcgLP9bgA4DnKEAklp9xsie5g5DPLqp4kPwCBjulk0QPS1EYvil3jc GtRiTzwo7NMRUDH9JFxI/UCzq0c0JIfnOX7MhLz0KYC7498cH+bU5RQaud8HICog3itevt npu+l+i9xK9k1HIIbT12Pf4//Cfbv0vVrxxKisu7ojDjMnXfUN0mXeM3A37M3k0hdKcd1N vgWXUmQOcb+D1kA9viTyyEsLfASDTkZ4qGh4zdgMKHwerd+MTRPrRsVvV8EGbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3w4CDQzSYd for ; Mon, 23 Nov 2026 01:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 5b6a6588388d - stable/15 - contrib/kyua: commit generated files List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5b6a6588388dee241f5ffe84c768887cc9ae4eb6 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:36 +0000 Message-Id: <6b03946c.1dee.5e2419bd@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5b6a6588388dee241f5ffe84c768887cc9ae4eb6 commit 5b6a6588388dee241f5ffe84c768887cc9ae4eb6 Author: Enji Cooper AuthorDate: 2026-10-07 18:04:21 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:39 +0000 contrib/kyua: commit generated files MFC after: 1 month Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0") (cherry picked from commit 26eb328b52c3ec0ff79c8914b1993dfad03a0a7d) --- contrib/kyua/doc/kyua-about.1 | 95 ++++++ contrib/kyua/doc/kyua-config.1 | 59 ++++ contrib/kyua/doc/kyua-db-exec.1 | 199 ++++++++++++ contrib/kyua/doc/kyua-db-migrate.1 | 182 +++++++++++ contrib/kyua/doc/kyua-debug.1 | 417 +++++++++++++++++++++++++ contrib/kyua/doc/kyua-help.1 | 64 ++++ contrib/kyua/doc/kyua-list.1 | 232 ++++++++++++++ contrib/kyua/doc/kyua-report-html.1 | 253 +++++++++++++++ contrib/kyua/doc/kyua-report-junit.1 | 237 +++++++++++++++ contrib/kyua/doc/kyua-report.1 | 307 +++++++++++++++++++ contrib/kyua/doc/kyua-test.1 | 498 ++++++++++++++++++++++++++++++ contrib/kyua/doc/kyua.1 | 405 ++++++++++++++++++++++++ contrib/kyua/doc/kyua.conf.5 | 150 +++++++++ contrib/kyua/doc/kyuafile.5 | 574 +++++++++++++++++++++++++++++++++++ 14 files changed, 3672 insertions(+) diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1 new file mode 100644 index 000000000000..ba3041f14447 --- /dev/null +++ b/contrib/kyua/doc/kyua-about.1 @@ -0,0 +1,95 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd May 20, 2015 +.Dt KYUA-ABOUT 1 +.Os +.Sh NAME +.Nm "kyua about" +.Nd show detailed authors, license, and version information +.Sh SYNOPSIS +.Nm +.Op Ar authors | license | version +.Sh DESCRIPTION +The +.Sq about +command provides generic information about the +.Xr kyua 1 +tool. +In the default synopsis form (no arguments), the information printed +includes: +.Bl -enum +.It +The name of the package, which is +.Sq kyua . +.It +The version number, which is +.Sq 0.15.0 . +.It +License information. +.It +Authors information. +.It +A link to the project web site. +.El +.Pp +You can customize the information printed by this command by specifying +the desired topic as the single argument to the command. +This can be one of: +.Bl -tag -width authorsXX +.It Ar authors +Displays the list of authors and contributors only. +.It Ar license +Displays the license information and the list of copyrights. +.It Ar version +Displays the package name and the version number in a format that is +compatible with the output of GNU tools that support a +.Fl -version +flag. +Use this whenever you have to query the version number of the package. +.El +.Sh FILES +The following files are read by the +.Nm +command: +.Bl -tag -width XX +.It Pa /usr/share/doc/kyua/AUTHORS +List of authors (aka copyright holders). +.It Pa /usr/share/doc/kyua/CONTRIBUTORS +List of contributors (aka individuals that have contributed to the project). +.It Pa /usr/share/doc/kyua/LICENSE +License information. +.El +.Sh EXIT STATUS +The +.Nm +command always returns 0. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-config.1 b/contrib/kyua/doc/kyua-config.1 new file mode 100644 index 000000000000..ae08ad9e013a --- /dev/null +++ b/contrib/kyua/doc/kyua-config.1 @@ -0,0 +1,59 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd September 9, 2012 +.Dt KYUA-CONFIG 1 +.Os +.Sh NAME +.Nm "kyua config" +.Nd inspect the values of the loaded configuration +.Sh SYNOPSIS +.Nm +.Op Ar variable1 .. variableN +.Sh DESCRIPTION +The +.Nm +command provides a way to list all defined configuration variables and +their current values. +.Pp +This command is intended to help you in resolving the values of the +configuration variables without having to scan over configuration files. +.Pp +In the default synopsis form (no arguments), the command prints all +configuration variables. +If any arguments are provided, the command will only print the +requested variables. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if any of the specified configuration +variables does not exist. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-db-exec.1 b/contrib/kyua/doc/kyua-db-exec.1 new file mode 100644 index 000000000000..8769ac534aa3 --- /dev/null +++ b/contrib/kyua/doc/kyua-db-exec.1 @@ -0,0 +1,199 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-EXEC 1 +.Os +.Sh NAME +.Nm "kyua db-exec" +.Nd execute a SQL statement in a results file +.Sh SYNOPSIS +.Nm +.Op Fl -no-headers +.Op Fl -results-file Ar file +.Ar statement +.Sh DESCRIPTION +The +.Nm +command provides a way to execute an arbitrary SQL statement within the +database. +This command is mostly intended to aid in debugging, but can also be used to +extract information from the database when the current interfaces do not +provide the desired functionality. +.Pp +The input database must exist. +It makes no sense to use +.Nm +on a nonexistent or empty database. +.Pp +The +.Nm +command takes one or more arguments, all of which are concatenated to form +a single SQL statement. +Once the statement is executed, +.Nm +prints the resulting table on the screen, if any. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -no-headers +Avoids printing the headers of the table in the output of the command. +.It Fl -results-file Ar path , Fl r Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the SQL statement is invalid or fails +to run. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 , +.Xr kyua-test 1 diff --git a/contrib/kyua/doc/kyua-db-migrate.1 b/contrib/kyua/doc/kyua-db-migrate.1 new file mode 100644 index 000000000000..177dd0795d10 --- /dev/null +++ b/contrib/kyua/doc/kyua-db-migrate.1 @@ -0,0 +1,182 @@ +.\" Copyright 2013 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-MIGRATE 1 +.Os +.Sh NAME +.Nm "kyua db-migrate" +.Nd upgrade the schema of an existing results file +.Sh SYNOPSIS +.Nm +.Op Fl -results-file Ar file +.Sh DESCRIPTION +The +.Nm +command migrates the schema of an existing database to the latest +version implemented in +.Xr kyua 1 . +.Pp +This operation is not reversible. +However, a backup of the database is created in the same directory where the +database lives. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -results-file Ar path , Fl r Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the migration fails. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-debug.1 b/contrib/kyua/doc/kyua-debug.1 new file mode 100644 index 000000000000..760cf097a349 --- /dev/null +++ b/contrib/kyua/doc/kyua-debug.1 @@ -0,0 +1,417 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd April 18, 2026 +.Dt KYUA-DEBUG 1 +.Os +.Sh NAME +.Nm "kyua debug" +.Nd execute a single test case with facilities for debugging +.Sh SYNOPSIS +.Nm +.Op Fl -build-root Ar path +.Op Fl -kyuafile Ar file +.Op Fl -pause-before-cleanup-upon-fail +.Op Fl -pause-before-cleanup +.Op Fl -stdout Ar path +.Op Fl -stderr Ar path +.Ar test_case +.Sh DESCRIPTION +The +.Nm +command provides a mechanism to execute a single test case bypassing some +of the Kyua infrastructure and allowing the user to poke into the execution +behavior of the test. +.Pp +The test case to run is selected by providing a test filter, described below in +.Sx Test filters , +that matches a single test case. +The test case is executed and its result is printed as the last line of the +output of the tool. +.Pp +The test executed by +.Nm +is run under a controlled environment as described in +.Sx Test isolation . +.Pp +At the moment, the +.Nm +command allows the following aspects of a test case execution to be +tweaked: +.Bl -bullet +.It +Redirection of the test case's stdout and stderr to the console (the +default) or to arbitrary files. +See the +.Fl -stdout +and +.Fl -stderr +options below. +.El +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -build-root Ar path +Specifies the build root in which to find the test programs referenced +by the Kyuafile, if different from the Kyuafile's directory. +See +.Sx Build directories +below for more information. +.It Fl -kyuafile Ar file , Fl k Ar file +Specifies the Kyuafile to process. +Defaults to +.Pa Kyuafile +file in the current directory. +.It Fl -pause-before-cleanup-upon-fail , Fl p +Causes Kyua to pause right before the test cleanup routine is invoked if the +test fails. +When paused, Kyua waits for input on stdin, and any key press resumes +execution. +.sp +This can be useful for debugging system or end-to-end tests +which alter the system by creating artifacts such as files, network +interfaces, routing entries, firewall configuration, containers, etc. +This flag makes it possible to preserve such artifacts immediately after a test +failure, simplifying debugging. +Otherwise, these artifacts would be removed by the test cleanup routine or +by Kyua built-in cleanup mechanism. +.It Fl -pause-before-cleanup , Fl P +The unconditional variant of the previous option. +This can be helpful for reproducing the infrastructure or fixture of a passing +test for further development or additional analysis. +.It Fl -stderr Ar path +Specifies the file to which to send the standard error of the test +program's body. +The default is +.Pa /dev/stderr , +which is a special character device that redirects the output to +standard error on the console. +.It Fl -stdout Ar path +Specifies the file to which to send the standard output of the test +program's body. +The default is +.Pa /dev/stdout , +which is a special character device that redirects the output to +standard output on the console. +.El +.Pp +For example, consider the following Kyua session: +.Bd -literal -offset indent +$ kyua test +kernel/fs:mkdir -> passed +kernel/fs:rmdir -> failed: Invalid argument + +1/2 passed (1 failed) +.Ed +.Pp +At this point, we do not have a lot of information regarding the +failure of the +.Sq kernel/fs:rmdir +test. +We can run this test through the +.Nm +command to inspect its output a bit closer, hoping that the test case is +kind enough to log its progress: +.Bd -literal -offset indent +$ kyua debug kernel/fs:rmdir +Trying rmdir('foo') +Trying rmdir(NULL) +kernel/fs:rmdir -> failed: Invalid argument +.Ed +.Pp +Luckily, the offending test case was printing status lines as it +progressed, so we could see the last attempted call and we can know match +the failure message to the problem. +.Ss Build directories +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Em Build directories +(or object directories, target directories, product directories, etc.) is +the concept that allows a developer to keep the source tree clean from +build products by asking the build system to place such build products +under a separate subtree. +.Pp +Most build systems today support build directories. +For example, the GNU Automake/Autoconf build system exposes such concept when +invoked as follows: +.Bd -literal -offset indent +$ cd my-project-1.0 +$ mkdir build +$ cd build +$ ../configure +$ make +.Ed +.Pp +Under such invocation, all the results of the build are left in the +.Pa my-project-1.0/build/ +subdirectory while maintaining the contents of +.Pa my-project-1.0/ +intact. +.Pp +Because build directories are an integral part of most build systems, and +because they are a tool that developers use frequently, +.Nm +supports build directories too. +This manifests in the form of +.Nm +being able to run tests from build directories while reading the (often +immutable) test suite definition from the source tree. +.Pp +One important property of build directories is that they follow (or need to +follow) the exact same layout as the source tree. +For example, consider the following directory listings: +.Bd -literal -offset indent +src/Kyuafile +src/bin/ls/ +src/bin/ls/Kyuafile +src/bin/ls/ls.c +src/bin/ls/ls_test.c +src/sbin/su/ +src/sbin/su/Kyuafile +src/sbin/su/su.c +src/sbin/su/su_test.c + +obj/bin/ls/ +obj/bin/ls/ls* +obj/bin/ls/ls_test* +obj/sbin/su/ +obj/sbin/su/su* +obj/sbin/su/su_test* +.Ed +.Pp +Note how the directory layout within +.Pa src/ +matches that of +.Pa obj/ . +The +.Pa src/ +directory contains only source files and the definition of the test suite +(the Kyuafiles), while the +.Pa obj/ +directory contains only the binaries generated during a build. +.Pp +All commands that deal with the workspace support the +.Fl -build-root Ar path +option. +When this option is provided, the directory specified by the +option is considered to be the root of the build directory. +For example, considering our previous fake tree layout, we could invoke +.Nm +as any of the following: +.Bd -literal -offset indent +$ kyua debug --kyuafile=src/Kyuafile --build-root=obj +$ cd src && kyua debug --build-root=../obj +.Ed +.Ss Test filters +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +A +.Em test filter +is a string that is used to match test cases or test programs in a test suite. +Filters have the following form: +.Bd -literal -offset indent +test_program_name[:test_case_name] +.Ed +.Pp +Where +.Sq test_program_name +is the name of a test program or a subdirectory in the test suite, and +.Sq test_case_name +is the name of a test case. +.Ss Test isolation +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The test programs and test cases run by +.Nm +are all executed in a deterministic environment. +This known, clean environment serves to make the test execution as +reproducible as possible and also to prevent clashes between tests that may, +for example, create auxiliary files with overlapping names. +.Pp +For plain test programs and for TAP test programs, the whole test program +is run under a single instance of the environment described in this page. +For ATF test programs (see +.Xr atf 7 ) , +each individual test case +.Em and +test cleanup routine are executed in separate environments. +.Bl -tag -width XX +.It Process space +Each test is executed in an independent processes. +Corollary: the test can do whatever it wants to the current process (such +as modify global variables) without having to undo such changes. +.It Session and process group +The test is executed in its own session and its own process group. +There is no controlling terminal attached to the session. +.Pp +Should the test spawn any children, the children should maintain the same +session and process group. +Modifying any of these settings prevents +.Nm +from being able to kill any stray subprocess as part of the cleanup phase. +If modifying these settings is necessary, or if any subprocess started by +the test decides to use a different process group or session, it is the +responsibility of the test to ensure those subprocesses are forcibly +terminated during cleanup. +.It Work directory +The test is executed in a temporary directory automatically created by the +runtime engine. +Corollary: the test can write to its current directory +without needing to clean any files and/or directories it creates. +The runtime engine takes care to recursively delete the temporary directories +after the execution of a test case. +Any file systems mounted within the temporary directory are also unmounted. +.It Home directory +The +.Va HOME +environment variable is set to the absolute path of the work directory. +.It Umask +The value of the umask is set to 0022. +.It Environment +The +.Va LANG , +.Va LC_ALL , +.Va LC_COLLATE , +.Va LC_CTYPE , +.Va LC_MESSAGES , +.Va LC_MONETARY , +.Va LC_NUMERIC +and +.Va LC_TIME +variables are unset. +.Pp +The +.Va TZ +variable is set to +.Sq UTC . +.Pp +The +.Va TMPDIR +variable is set to the absolute path of the work directory. *** 2802 LINES SKIPPED *** From nobody Mon Nov 23 01:18:37 2026 X-Original-To: dev-commits-src-branches@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 4jXp3y3bBFz71TPW for ; Mon, 23 Nov 2026 01:18:38 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3x5yxFz4bps for ; Mon, 23 Nov 2026 01:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396717; 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=cf16ZMubgfvLnSHVH1V1pHFfY9MYi75+2Y4zt6sv0gY=; b=yB0QQPFOIwOy+ifCTFQNPjvGDn28fVkepkOIpzBKfiw7W7KQKNPbBeFgRd0WtyIVUto4kD Di7FkSGLt4ipHuQNtVRrnudwwgHP/NmtR1ZaPFWQnReI2zjZXHcU+ImAKOiH0KnEEfuTVg YOO2ZJfnd9KHDJuTIOBennn0wHMRfZkKBYVB+g0oMxOXDb25SYv3HhYwJr+0XZ0uEE+0GH +kIxRYOl7u/07XFTahTwGfOJ+XeU9hJDd1xUY7cNuPkR2Q7BuYe57G+hmCoEoZ+ZmYzsbW KfCeyl1eS8SoVCJYImS/clxYpKInUDyF5fDsqTIRAJPD//xnnMa4zScVm6vAtw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396717; b=L4NjyxRsbK3ZhyzNflLUcI9LsIp1Ugh8IyR+Tbr5gtxBrg6gSU4ObmNShTDyyxz77sZSwu JCvhhvPqN15GGGcq6kpssZyLVuTPSCxWyXB/6ycKNky/WtQVmZrgbIrtPcemloYDL9II4q VYgWi8w2TNj9ecUmEasDccW5Acp0Rx93ZdCoxPmNMpLrSfiA/eHbS/snZZqhsjxZA0Ckwk Oaqn2x9uUW7GvwrPiIH5H4muuUhUb97DLRHWrDRtKmmUQQwqweHdHKjmUHijylK3SH1t7w s+cTOURKA/Y1qhDJ98uxwk2AhZO29TydqEFfyIWQZoHvFovgPzkwOAsJutDgQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396717; 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=cf16ZMubgfvLnSHVH1V1pHFfY9MYi75+2Y4zt6sv0gY=; b=aID+nybAusxSuGKX1cgAdJ3HeJNxdNtO1mL2s9StSOIfZtfXE8foZzcy58AOJU9sPO9en1 poV4iTdGHPvUBpUPPAh+VpgDzh9Nse0xa0bhmcDzMs+X8/koX8DVKCeZprSQdn6GPZF1WU kDuu4eGTt5kUiJA/ke7qpdXE63PXeLySEbkw27sQgVWdxg6Re9REh4PfzcjJYCZCo1ggyX 2mdGZCNNQmv/KJuFaeaWF52Qrgw4jfqS0YtFnP3GuXA4hoj+/TljLZuIPJ2Dw19Grrkbsg fezJ38OwtYChW8K6eEMPK2hNn5iuKJKLda0HFcwJD9sLFC3dD0UqQFcmhVSyIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3x4lYdzSbW for ; Mon, 23 Nov 2026 01:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ea9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a657b45bed31 - stable/15 - contrib/kyua: update to 0.15.1 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a657b45bed31f1755d1fd7337094550f3b94991b Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:37 +0000 Message-Id: <6b03946d.2ea9.3512c628@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a657b45bed31f1755d1fd7337094550f3b94991b commit a657b45bed31f1755d1fd7337094550f3b94991b Author: Enji Cooper AuthorDate: 2026-10-28 22:02:27 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 contrib/kyua: update to 0.15.1 This new release contains multiple bugfixes. Please see the release notes mentioned in the merge commit for more details. MFC after: 2 weeks Merge commit '3e05143b80d1537cdd51a5dcf742da31f400507e' (cherry picked from commit b68969979d6b590247290b4fe26212d201c3ad96) --- contrib/kyua/NEWS | 19 +++ contrib/kyua/README.md | 4 +- contrib/kyua/config.h | 6 +- contrib/kyua/doc/kyua-about.1 | 2 +- contrib/kyua/drivers/debug_test.cpp | 3 + contrib/kyua/drivers/run_tests.cpp | 3 + contrib/kyua/engine/atf_test.cpp | 1 + contrib/kyua/engine/googletest.cpp | 27 +--- contrib/kyua/engine/googletest_helpers.cpp | 27 +--- contrib/kyua/engine/googletest_list.cpp | 27 +--- contrib/kyua/engine/googletest_list_test.cpp | 27 +--- contrib/kyua/engine/googletest_result.cpp | 195 +++++++++++++++++-------- contrib/kyua/engine/googletest_result.hpp | 31 +--- contrib/kyua/engine/googletest_result_test.cpp | 141 ++++++++++++++---- contrib/kyua/engine/googletest_test.cpp | 28 +--- contrib/kyua/engine/plain_test.cpp | 1 + contrib/kyua/engine/scanner_test.cpp | 1 + contrib/kyua/engine/scheduler_test.cpp | 11 ++ contrib/kyua/engine/tap_test.cpp | 1 + contrib/kyua/utils/config/nodes.cpp | 6 +- contrib/kyua/utils/config/tree.cpp | 11 +- contrib/kyua/utils/sqlite/test_utils.hpp | 4 +- 22 files changed, 316 insertions(+), 260 deletions(-) diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS index c794e6e60092..50a2c8257370 100644 --- a/contrib/kyua/NEWS +++ b/contrib/kyua/NEWS @@ -1,5 +1,24 @@ # Major changes between releases +## Changes in version 0.15.1 + +**Released on 2026/10/25.** + +### Bugfixes + +* #324: googletest: fix "failed without a reason" scenario +* #328: utils::sqlite: restore static on test helpers +* #330: Address a number of issues with the GoogleTest parser +* #331: GoogleTest: licensing and style cleanup +* #332: model/metadata: source code cleanup post-748e27bb +* #339: Guard dynamic_cast results before dereferencing + +### Developer Workflow Changes + +* #338: add 30 minutes timeout for Distcheck step of CI + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.0...kyua-0.15.1 + ## Changes in version 0.15.0 **Released on 2026/10/07.** diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md index e42d6da35377..b8b54d0413de 100644 --- a/contrib/kyua/README.md +++ b/contrib/kyua/README.md @@ -27,9 +27,9 @@ This is not an official Google product. ## Download -The latest version of Kyua is 0.14.1 and was released on March 29th, 2025. +The latest version of Kyua is 0.15.0 and was released on October 7th, 2026. -Download: [kyua-0.14.1](../../releases/tag/kyua-0.14.1). +Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0). See the [release notes](NEWS) for information about the changes in this and all previous releases. diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index d2e8728dde38..eba9c9cb1448 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -119,7 +119,7 @@ #define PACKAGE_NAME "Kyua" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Kyua 0.15.0" +#define PACKAGE_STRING "Kyua 0.15.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "kyua" @@ -128,7 +128,7 @@ #define PACKAGE_URL "https://github.com/freebsd/kyua/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.15.0" +#define PACKAGE_VERSION "0.15.1" /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -136,4 +136,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.15.0" +#define VERSION "0.15.1" diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1 index ba3041f14447..c914fa33374e 100644 --- a/contrib/kyua/doc/kyua-about.1 +++ b/contrib/kyua/doc/kyua-about.1 @@ -48,7 +48,7 @@ The name of the package, which is .Sq kyua . .It The version number, which is -.Sq 0.15.0 . +.Sq 0.15.1 . .It License information. .It diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp index 6bd3d4dc0731..2e0e56d22f46 100644 --- a/contrib/kyua/drivers/debug_test.cpp +++ b/contrib/kyua/drivers/debug_test.cpp @@ -42,6 +42,7 @@ #include "utils/format/macros.hpp" #include "utils/fs/auto_cleaners.hpp" #include "utils/optional.ipp" +#include "utils/sanity.hpp" namespace config = utils::config; namespace fs = utils::fs; @@ -103,6 +104,8 @@ drivers::debug_test::drive(engine::debugger_ptr debugger, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + if (test_result_handle == nullptr) + UNREACHABLE_MSG("Expected a test result handle from the scheduler"); const model::test_result test_result = test_result_handle->test_result(); result_handle->cleanup(); diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp index d92940005242..e8ee03385184 100644 --- a/contrib/kyua/drivers/run_tests.cpp +++ b/contrib/kyua/drivers/run_tests.cpp @@ -50,6 +50,7 @@ #include "utils/noncopyable.hpp" #include "utils/optional.ipp" #include "utils/passwd.hpp" +#include "utils/sanity.hpp" #include "utils/text/operations.ipp" namespace config = utils::config; @@ -202,6 +203,8 @@ finish_test(scheduler::result_handle_ptr result_handle, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + if (test_result_handle == nullptr) + UNREACHABLE_MSG("Expected a test result handle from the scheduler"); put_test_result(test_case_id, *test_result_handle, tx); diff --git a/contrib/kyua/engine/atf_test.cpp b/contrib/kyua/engine/atf_test.cpp index 5f9b8c59663e..6c3f1cf03b06 100644 --- a/contrib/kyua/engine/atf_test.cpp +++ b/contrib/kyua/engine/atf_test.cpp @@ -150,6 +150,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/googletest.cpp b/contrib/kyua/engine/googletest.cpp index e050410ba1f5..37d979585718 100644 --- a/contrib/kyua/engine/googletest.cpp +++ b/contrib/kyua/engine/googletest.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest.hpp" diff --git a/contrib/kyua/engine/googletest_helpers.cpp b/contrib/kyua/engine/googletest_helpers.cpp index 129a08a89b7c..1a57fa0e977e 100644 --- a/contrib/kyua/engine/googletest_helpers.cpp +++ b/contrib/kyua/engine/googletest_helpers.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause extern "C" { #include diff --git a/contrib/kyua/engine/googletest_list.cpp b/contrib/kyua/engine/googletest_list.cpp index f231cb9e7021..6c006687fe49 100644 --- a/contrib/kyua/engine/googletest_list.cpp +++ b/contrib/kyua/engine/googletest_list.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_list.hpp" diff --git a/contrib/kyua/engine/googletest_list_test.cpp b/contrib/kyua/engine/googletest_list_test.cpp index 5052c2f133ad..d5e9545b15ba 100644 --- a/contrib/kyua/engine/googletest_list_test.cpp +++ b/contrib/kyua/engine/googletest_list_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_list.hpp" diff --git a/contrib/kyua/engine/googletest_result.cpp b/contrib/kyua/engine/googletest_result.cpp index a1fc1f72da4d..9616fc292b86 100644 --- a/contrib/kyua/engine/googletest_result.cpp +++ b/contrib/kyua/engine/googletest_result.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_result.hpp" @@ -53,21 +30,46 @@ using utils::optional; namespace { -/// Internal string for specifying invalid output. -const std::string invalid_output_message = "invalid output"; - /// Regular expression for disabled tests line. const std::regex disabled_re( R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE" ); +/// Regular expression for buggy skipped message output. Should be resolved via +/// google/googletest#5098 . +const std::regex global_env_buggy_skip_prefix_re( + R"RE(.+: Skipped\n)RE" +); + +/// Regular expression for starting sentinel for Global test environment. +const std::regex global_env_context_start_re( + R"(\[\-+\][[:space:]]+Global test environment set-up)" +); + +/// Regular expression for ending sentinel for Global test environment. +const std::regex global_env_context_end_re( + R"(\[\-+\][[:space:]]+Global test environment tear-down)" +); + +// CHECK_STYLE_DISABLE + +/// Regular expression for setup or teardown fixtures that fail for test +/// suites. +/// +/// This only applies to the failure result type, not the other ones. +const std::regex suite_setup_or_teardown_failure_re( + R"RE(\[[[:space:]]+FAILED[[:space:]]+\][[:space:]]+[^:]+:[[:space:]]SetUpTestSuite or TearDownTestSuite)RE" +); + +// CHECK_STYLE_ENABLE + /// Regular expression for starting sentinel of results block. -const std::regex starting_sentinel_re( - R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)" +const std::regex test_context_start_re( + R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[^[:space:]]+)" ); /// Regular expression for ending sentinel of results block. -const std::regex ending_sentinel_re( +const std::regex test_context_end_re( R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE" ); @@ -89,10 +91,13 @@ parse_without_reason(const std::string& status, const std::string& rest) if (status == "skipped") return engine::googletest_result(engine::googletest_result::skipped); - else { - INV(status == "successful"); + else if (status == "successful") return engine::googletest_result(engine::googletest_result::successful); - } + else if (status == "failed") + return engine::googletest_result(engine::googletest_result::failed); + else + return engine::googletest_result(engine::googletest_result::broken, + F("bad status: '%s'; output was:\n%s") % status % rest); } @@ -121,8 +126,10 @@ parse_with_reason(const std::string& status, const std::string& rest) return googletest_result(googletest_result::failed, rest); else if (status == "skipped") return googletest_result(googletest_result::skipped, rest); + else if (status == "successful") + return googletest_result(googletest_result::successful, rest); else - PRE_MSG(false, "Unexpected status"); + PRE_MSG(false, F("Unexpected status: %s") % status); } @@ -178,6 +185,9 @@ engine::googletest_result::googletest_result( /// have a bug), and thus why they are reported as broken instead of just failed /// (which is a legitimate result for a test case). /// +/// TODO(ngie): replace ad hoc output format parsing with a structured file +/// format, e.g., JSON or XML. +/// /// \param input The stream to read from. /// /// \return A generic representation of the result of the test case. @@ -187,6 +197,7 @@ engine::googletest_result engine::googletest_result::parse(std::istream& input) { std::vector lines; + std::string all_context; do { std::string line; @@ -194,50 +205,107 @@ engine::googletest_result::parse(std::istream& input) if (!input.eof()) line.push_back('\n'); lines.push_back(line); + all_context += line; } while (input.good()); - bool capture_context = false; - bool valid_output = false; std::string context, status; + bool capture_immediate_context = false; + bool global_env_message_start_seen = false; + bool valid_output = false; for (auto& line: lines) { + // FIXME: drop the line-by-line parsing and just use multiline regular + // expressions with associated matching or just bite the bullet and + // switch to a structured format like JSON or XML. std::smatch matches; - if (regex_search(line, matches, disabled_re)) { + if (std::regex_search(line, global_env_context_start_re)) { + global_env_message_start_seen = true; + // Issue 326: it's a common pattern for folks to use GoogleTest + // Environments to run checks and skip entire test suites if + // preconditions aren't met. We need to start capturing the context + // in this block, just in case no testcases are run. + // + // In the event test output is found later on, the context will be + // reset by design. + capture_immediate_context = true; + context = ""; + continue; + } + + if (std::regex_search(line, matches, disabled_re)) { context = matches[1]; status = "disabled"; valid_output = true; break; } - if (regex_search(line, matches, starting_sentinel_re)) { - capture_context = true; + + if (!global_env_message_start_seen) { + continue; + } + + if (std::regex_search(line, test_context_start_re)) { + capture_immediate_context = true; + // (Re)set the context to ensure that the test result information + // doesn't show up in the context parsed by kyua. context = ""; continue; } - if (regex_search(line, matches, ending_sentinel_re)) { + if (std::regex_search(line, matches, test_context_end_re)) { std::string googletest_res = matches[1]; + if (googletest_res == "OK") { - context = ""; status = "successful"; } else if (googletest_res == "FAILED") { status = "failed"; } else { - INV(googletest_res == "SKIPPED"); + INV_MSG(googletest_res == "SKIPPED", + F("expected SKIPPED; got %s") % googletest_res); status = "skipped"; } - capture_context = false; + capture_immediate_context = false; + } + if (std::regex_search(line, global_env_context_end_re)) { + capture_immediate_context = false; valid_output = true; + // Keep scanning in case, in case we run into + // `suite_setup_or_teardown_failure_re`. } - if (capture_context) { + + if (std::regex_search(line, suite_setup_or_teardown_failure_re)) { + // Any failure context should get printed out earlier on, but in + // the event it isn't, just dump the whole test output for sanity's + // sake/debuggability. + if (context.empty()) { + context = \ + F("kyua: could not 'summarize' failure context; " + "see full process output for more details:\n\n%s") % + all_context; + } + status = "failed"; + } + + if (capture_immediate_context) { context += line; } } + if (!valid_output) { - context = invalid_output_message; + context = googletest_invalid_output_message; status = "broken"; + } else { + // See Issue 326 comments. + if (std::regex_search(context, global_env_buggy_skip_prefix_re)) { + // It is easier to replace the existing string instead of + // extracting the multiline match. + context = std::regex_replace(context, + global_env_buggy_skip_prefix_re, ""); + status = "skipped"; + } } if (status == "skipped" && context.empty()) - context = bogus_googletest_skipped_nul_message; + context = googletest_bogus_skipped_nul_message; + if (context.empty()) return parse_without_reason(status, context); else @@ -388,18 +456,21 @@ engine::googletest_result::apply(const optional< process::status >& status) model::test_result engine::googletest_result::externalize(void) const { + + // FIXME(ngie,#323): some of these test result types may require a reason, and thus the + // `.get()` -> `.get_default("")` change might be a bug. switch (_type) { case googletest_result::broken: - return model::test_result(model::test_result_broken, _reason.get()); + return model::test_result(model::test_result_broken, _reason.get_default("")); case googletest_result::disabled: - return model::test_result(model::test_result_skipped, _reason.get()); + return model::test_result(model::test_result_skipped, _reason.get_default("")); case googletest_result::failed: - return model::test_result(model::test_result_failed, _reason.get()); + return model::test_result(model::test_result_failed, _reason.get_default("")); case googletest_result::skipped: - return model::test_result(model::test_result_skipped, _reason.get()); + return model::test_result(model::test_result_skipped, _reason.get_default("")); case googletest_result::successful: return model::test_result(model::test_result_passed); @@ -486,16 +557,16 @@ engine::calculate_googletest_result( googletest_result result(googletest_result::broken, "Unknown result"); try { result = googletest_result::load(results_file); - /// atf_result.cpp handles this by side-effect by setting a broken - /// result with "", which results in a std::runtime_error throw from - /// atf_result::parse(..). googletest_result::parse doesn't do that and - /// instead returns a broken result with a reason of - /// `invalid_output_message`, so that case needs to be tested for after - /// the fact to make sure the reason why `invalid_output_message` was - /// because of a program that crashed or failed. + // atf_result.cpp handles this by side-effect by setting a broken + // result with "", which results in a std::runtime_error throw from + // atf_result::parse(..). googletest_result::parse doesn't do that and + // instead returns a broken result with a reason of + // `googletest_invalid_output_message`, so that case needs to be + // tested for after the fact to confirm whether or not program crashed + // or failed. if (result.type() == googletest_result::broken && body_status) { const optional< std::string >& reason = result.reason(); - if (reason && reason.get() == invalid_output_message) { + if (reason && reason.get() == googletest_invalid_output_message) { result = googletest_result( googletest_result::broken, F("Error: Premature exit. Test case %s") % @@ -506,11 +577,11 @@ engine::calculate_googletest_result( if (body_status) result = googletest_result(googletest_result::broken, F("Error: %s. Test case %s") % - error.what() % + error.what() % format_status(body_status.get())); - else { + else { // The test case timed out. apply() handles this case later. - } + } } catch (const std::runtime_error& error) { if (body_status) result = googletest_result( diff --git a/contrib/kyua/engine/googletest_result.hpp b/contrib/kyua/engine/googletest_result.hpp index 325995be3221..f296ea701203 100644 --- a/contrib/kyua/engine/googletest_result.hpp +++ b/contrib/kyua/engine/googletest_result.hpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause /// \file engine/googletest_result.hpp /// Functions and types to process the results of googletest-based test cases. @@ -99,11 +76,13 @@ model::test_result calculate_googletest_result( const utils::optional< utils::process::status >&, const utils::fs::path&); +/// Internal string for specifying invalid output. +const std::string googletest_invalid_output_message = "invalid output"; /// A bogus identifier for nul reasons provided by the test writer. /// /// TODO: Support nul messages with skipped results in the schema, etc. -const std::string bogus_googletest_skipped_nul_message = "\n"; +const std::string googletest_bogus_skipped_nul_message = "\n"; } // namespace engine diff --git a/contrib/kyua/engine/googletest_result_test.cpp b/contrib/kyua/engine/googletest_result_test.cpp index 90bc2cc62b7d..0398a11359ee 100644 --- a/contrib/kyua/engine/googletest_result_test.cpp +++ b/contrib/kyua/engine/googletest_result_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_result.hpp" @@ -96,7 +73,8 @@ parse_ok_test(const engine::googletest_result::types& exp_type, PARSE(broken, - engine::googletest_result::broken, "invalid output", + engine::googletest_result::broken, + engine::googletest_invalid_output_message.c_str(), "invalid input"); const char disabled_context[] = ( @@ -150,6 +128,71 @@ PARSE(failed, engine::googletest_result::failed, failed_context, failed_message); +// CHECK_STYLE_DISABLE +#if 0 +const char failed_parameterized_context[] = ( +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +); +#else +const char failed_parameterized_context[] = ( +"kyua: could not 'summarize' failure context; see full process output for more details:\n" +"\n" +"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n" +"[ RUN ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[ OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n" +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +"[ FAILED ] 0 tests, listed below:\n" +"\n" +" 0 FAILED TESTS\n" +"[ FAILED ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n" +"\n" +" 1 FAILED TEST SUITE\n" +); +#endif + +const char failed_parameterized_message[] = ( +"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n" +"[ RUN ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[ OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n" +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +"[ FAILED ] 0 tests, listed below:\n" +"\n" +" 0 FAILED TESTS\n" +"[ FAILED ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n" +"\n" +" 1 FAILED TEST SUITE\n" +); +// CHECK_STYLE_ENABLE + +PARSE(failed_parameterized, + engine::googletest_result::failed, failed_parameterized_context, + failed_parameterized_message); + const char skipped_message[] = ( "Note: Google Test filter = SkipTest.DoesSkip\n" "[==========] Running 1 test from 1 test suite.\n" @@ -168,7 +211,7 @@ const char skipped_message[] = ( PARSE(skipped, engine::googletest_result::skipped, - engine::bogus_googletest_skipped_nul_message.c_str(), + engine::googletest_bogus_skipped_nul_message.c_str(), skipped_message ); @@ -197,6 +240,36 @@ PARSE(skipped_with_reason, engine::googletest_result::skipped, skipped_with_reason_context, skipped_with_reason_message); +// Issue 326: test suites built against 0.18.0 which skip in +// `Environment::SetUp` misreport tests passing instead of being skipped. +// +// https://github.com/google/googletest/issues/4653 +const char skipped_from_environment_with_buggy_output_context[] = ( +"current user is not allowed to mount\n" +"\n" +"current user is not allowed to mount\n" +"\n" +); + +const char skipped_from_environment_with_buggy_output_message[] = ( +"Note: Google Test filter = Setattr.eacces\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"/usr/src/tests/sys/fs/fusefs/utils.cc:95: Skipped\n" +"current user is not allowed to mount\n" +"\n" +"current user is not allowed to mount\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +); + +PARSE(skipped_from_environment_with_buggy_output, + engine::googletest_result::skipped, + skipped_from_environment_with_buggy_output_context, + skipped_from_environment_with_buggy_output_message); + const char successful_message[] = ( "Note: Google Test filter = PassFailTest.Passes\n" "[==========] Running 1 test from 1 test case.\n" @@ -251,7 +324,11 @@ PARSE(successful_parameterized, engine::googletest_result::successful, NULL, successful_parameterized_message); -const char successful_message_with_reason[] = ( +const char successful_with_reason_context[] = ( +"This is a reason\n" +); + +const char successful_with_reason_message[] = ( "Note: Google Test filter = PassFailTest.PassesWithReason\n" "[==========] Running 1 test from 1 test suite.\n" "[----------] Global test environment set-up.\n" @@ -267,8 +344,9 @@ const char successful_message_with_reason[] = ( ); PARSE(successful_with_reason, - engine::googletest_result::successful, NULL, - successful_message_with_reason); + engine::googletest_result::successful, + successful_with_reason_context, + successful_with_reason_message); ATF_TEST_CASE_WITHOUT_HEAD(googletest_result__load__ok); ATF_TEST_CASE_BODY(googletest_result__load__ok) @@ -403,7 +481,10 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, googletest_result__parse__broken); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__disabled); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed); + ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed_parameterized); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped); + ATF_ADD_TEST_CASE(tcs, + googletest_result__parse__skipped_from_environment_with_buggy_output); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped_with_reason); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful2); diff --git a/contrib/kyua/engine/googletest_test.cpp b/contrib/kyua/engine/googletest_test.cpp index 3af4d6801e70..0e74dc80ce6a 100644 --- a/contrib/kyua/engine/googletest_test.cpp +++ b/contrib/kyua/engine/googletest_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest.hpp" @@ -146,6 +123,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/plain_test.cpp b/contrib/kyua/engine/plain_test.cpp index cc3326e4c581..b9c81747bd2c 100644 --- a/contrib/kyua/engine/plain_test.cpp +++ b/contrib/kyua/engine/plain_test.cpp @@ -99,6 +99,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/scanner_test.cpp b/contrib/kyua/engine/scanner_test.cpp index f79717eca49e..6d8aba1ac2e0 100644 --- a/contrib/kyua/engine/scanner_test.cpp +++ b/contrib/kyua/engine/scanner_test.cpp @@ -327,6 +327,7 @@ ATF_TEST_CASE_BODY(scanner__no_filters__verify_lazy_loads) iter != results.end(); ++iter) { const mock_test_program* mock_program = dynamic_cast< const mock_test_program* >((*iter).first.get()); + ATF_REQUIRE(mock_program != nullptr); ATF_REQUIRE_EQ(1, mock_program->num_calls()); } } diff --git a/contrib/kyua/engine/scheduler_test.cpp b/contrib/kyua/engine/scheduler_test.cpp index 93e7627f291a..ed7d23ccc0fa 100644 --- a/contrib/kyua/engine/scheduler_test.cpp +++ b/contrib/kyua/engine/scheduler_test.cpp @@ -577,6 +577,7 @@ ATF_TEST_CASE_BODY(integration__run_one) const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid()); *** 171 LINES SKIPPED *** From nobody Mon Nov 23 01:18:38 2026 X-Original-To: dev-commits-src-branches@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 4jXp3z3Gpyz71TSC for ; Mon, 23 Nov 2026 01:18: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3y5Pyhz4bkC for ; Mon, 23 Nov 2026 01:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396718; 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=UtZUZOay4Q6R+YzBBj/ej0rBQ+5UetzFC/BNt6c9bNI=; b=iCFQRWBALGCOj4upwYS7Qo1ma0WzrcptcN/+xV4WxtjiGtfb4+nnRV61P/cGyjqHS6DWRk J71OCmYltvlLwYPJfAIFNiNDwb852aszsLo6OuTgX73FiAsrayNb7k503r2qkcmNeMvaY9 4ki1bX2Ik/nsYhWP9COHDKZfHGH0bxeIiFpIy89syQgjzlVFdTRlRGNHEycwKDnSUzMLXc FfFkOz7ABz8qE1oE9g3yVO1QFfdkVenLHW2JTmyWyM6K7iW+FzCaZ2Fh5DdY4IbAh7TtDa 7XEbSA8Zxn5dvIeB8yfppUY8xag+ZmZ9p0+CIdiSDk9Hk5RSSsKBmNGPjXWwFw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396718; b=xJMosJB29m+ZV6yv4Se1BBcmM8UTwsCL633+U+QsXReElcdPwDJynu5FLdsCAxluqbL9JV bLrK8daNmPheJke6RU5oLKDxz7cg3zmWMtNxopIyyTXHNNYSyraU2S/BCpW3MWqNMMgIVV 4iPzp2ZOJjA0RP80biKZvebrWXq8mMGGSz9pG7fsOwSh1fA/bcNnDEq8iS6N2L4vO/CxBC yko8uiGFzQF1IlVceIE4DCC4pUTTiqJRhto5JIirJqAFEZtBVnuUX1vVjJdaJcduqkb9dM WNw1r96lv93Z3NpwmYqkvgiVJFmFVtn5QbeYKRUdKkXU6HkDF8Dqvuka3OjnaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396718; 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=UtZUZOay4Q6R+YzBBj/ej0rBQ+5UetzFC/BNt6c9bNI=; b=bzF1GQSa0hnt6b21o0N+yqXdSAyTtmju91QKuVVFvYCtFxMMyHSxKSAaYxD9TVpYgJLVEu hFQME+HOrpKBDbYj758q012/rEiWEACWvPrm2TBsYaIV5Qf/6qwVmbSk3ll3i8cyr0xlJO dKs6pdOXuqehbuuY+fPTFtxpi6tCCZ42N1ToULJFE1G0bbIJX1bMDi8KvBicWzPWSX6efd +qLKZubmonbpOqiws3jSa6TlvmBhvNe9Hjlfjlr7oR2+LHBQTTJkSLfif3PxTBr0jJKR9Z kG1N5Jpo6Tli+AZUOM8BtKBwzj50vwuiG8WqHBHhI+TbdsAEnfRYQ5BWK6fY6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3y51w3zSYf for ; Mon, 23 Nov 2026 01:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: d43321455c1d - stable/15 - [tests] switch GoogleTest tests to `googletest` interface List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d43321455c1d227764b54a9c68e04daf7fcaaf77 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:38 +0000 Message-Id: <6b03946e.38a3.6c05203a@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d43321455c1d227764b54a9c68e04daf7fcaaf77 commit d43321455c1d227764b54a9c68e04daf7fcaaf77 Author: Enji Cooper AuthorDate: 2026-10-07 18:53:15 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 [tests] switch GoogleTest tests to `googletest` interface The new `googletest` kyua test interface--added in 0.15.0 and fixed in 0.15.1--allows tests to be executed and handled in a more fine-grained manner than the way it was prior to this commit. This change deletes the `capsicum-test` ATF wrapper script, `functional.sh`, and all supporting logic in `googletest.test.mk` as well as this change makes that logic unnecessary. MFC after: 1 month MFC with: b68969979d6b ("contrib/kyua: update to 0.15.1") (cherry picked from commit 3fb03fb35b20d259e0a3a07fc48f2ecc3c5da6e8) --- share/mk/googletest.test.mk | 11 +------- tests/sys/capsicum/Makefile | 1 - tests/sys/capsicum/functional.sh | 60 ---------------------------------------- 3 files changed, 1 insertion(+), 71 deletions(-) diff --git a/share/mk/googletest.test.mk b/share/mk/googletest.test.mk index 026f6dcacce3..b21576112a78 100644 --- a/share/mk/googletest.test.mk +++ b/share/mk/googletest.test.mk @@ -6,10 +6,6 @@ # GoogleTest is a C++ test framework, thus, it does not describe/articulate how # to write tests in other languages, e.g., C or shell, unlike the ATF, plain, # and TAP raw test interfaces. -# -# For now this is a thin wrapper around the `plain` test interface, but in the -# future this will rely on a newer version of kyua which will integrate in -# GoogleTest support. .if !target(____) .error googletest.test.mk cannot be included directly. @@ -34,13 +30,8 @@ BINDIR.${_T}= ${TESTSDIR} CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS} MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.cc -.if !empty(GTESTS_WRAPPER_SH.${_T}) -# A stopgap/workaround to let kyua execute test case one by one -ATF_TESTS_SH+= ${GTESTS_WRAPPER_SH.${_T}} -.else _TESTS+= ${_T} -TEST_INTERFACE.${_T}= plain -.endif +TEST_INTERFACE.${_T}= googletest .endfor .endif diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index a8f72d399af9..788fa9f9394c 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -10,7 +10,6 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no GTESTS+= capsicum-test -GTESTS_WRAPPER_SH.capsicum-test= functional # This test script runs the same test suite twice, once as root and once as an # unprivileged user. Serialize them since some tests access global namespaces, # e.g., mqueuefs, and can trample on each other. diff --git a/tests/sys/capsicum/functional.sh b/tests/sys/capsicum/functional.sh deleted file mode 100755 index 8d4a7eef2dec..000000000000 --- a/tests/sys/capsicum/functional.sh +++ /dev/null @@ -1,60 +0,0 @@ -#- -# SPDX-License-Identifier: BSD-2-Clause -# -# Copyright (c) 2020 The FreeBSD Foundation -# -# This software was developed by Li-Wen Hsu -# under sponsorship from the FreeBSD Foundation. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -CAPSICUM_TEST_BIN=capsicum-test - -atf_test_case "test_root" -test_root_head() { - - atf_set descr 'Run capsicum-test as root' - atf_set require.user root -} - -test_root_body() { - atf_check -s exit:0 -o match:PASSED -e ignore \ - "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u tests)" -} - -atf_test_case "test_unprivileged" -test_unprivileged_head() { - - atf_set descr 'Run capsicum-test as an unprivileged user' - atf_set require.user unprivileged -} - -test_unprivileged_body() { - atf_check -s exit:0 -o match:PASSED -e ignore \ - "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u)" -} - -atf_init_test_cases() { - atf_add_test_case test_root - atf_add_test_case test_unprivileged -} From nobody Mon Nov 23 01:18:39 2026 X-Original-To: dev-commits-src-branches@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 4jXp4011vqz71TWs for ; Mon, 23 Nov 2026 01:18:40 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3z5zc2z4bvk for ; Mon, 23 Nov 2026 01:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396719; 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=KyDY67m2tq7lcFX3awfO9rsk7hA4OXpf/eVm75b5/s0=; b=diWZt7kihE17PAeDFQRMLguTQw1ut+1O7tFsXkk15x0PFJ0yx7RrOnESbAk0iQJyv4WXIb eahQEaK8lB8E/Qe0HxpPNdG6swbAqutpEzZuOER9daiAqFhOBKeeHLaZ3TgD8qvaI/C4c+ BN1oMXW/pn0G/LeITJZmVtY5XsFEl9QRG21wZ5NDHZOy3Wnq+ZB1+1MP7u7NIO4LNN1uU7 YElmd6O4l1Ci1IzjOdLEqLX0cWVccnJWAvIj1G0uLqkeYLVcQcZfBNfQL+RGF2fHiBZbEf fNA2N+BHvSGJEtvI7n7x12M6Sa5PK3Eu2xeQS8Pvn6nTeifmpdz+pEAPd9cHeQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396719; b=Vd1VICDV14Nun9BwyJzd7hxZkgTmSBPWLoQtx/adIPVJCadx4ow0Ge7BxlDT73X+NCZ1l0 VqWINDIHGcUow/P9m7iB5Z1uD9zEbGpeKXjVCfjwTSYpknplXnV96bh7EVtDq3o+q5N0JY rmgVnsvkLLePvpdKq3vKJs3hkspluKJPIFltQ4gUnSlXJw/MbO76d2i/mpUPy4D/Uau8vj Mo+vvdOXcuqKMkdWUGr10KVOA6twvIfP3JZeTNuJImWormpAuyDoyELdGPZjyiczApXF/n 25VO970W2ElYn9xfGduFuJwyph4AIqofDpSitJKdTQAurqp0EqzPltBTR+dFpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396719; 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=KyDY67m2tq7lcFX3awfO9rsk7hA4OXpf/eVm75b5/s0=; b=i7wQjtfmuhKF1/i50eI0Y9VNIyjt2pGyOurP3CnHXjj3HMaS7co11/pPKAVmahLR1yBrsp bWIE9qEhAzXvYcWWAkIYCxU9tNeFrhF6yvJ94CBO0A3F6pVKD9nt0E0sfxu9WHRrzlKoDi HUnWNMmT0JNsvZs1Q1TmH6jNFMYoOTPaXv9NKh0A8VpafG1ScPmDHLi+1mB9kAOo21IG0Q wElkLGbShNMVmljiFqEmC7OS3S/KniY8Vau96MH5yQ3V8veHIFSrSDzyKKBrQyjunyI90k u+wTMi2lusMbrwBYUfgwzmcrbzJP3cB725bbwQRsuu6/Mym0zkpVm0zYfwY/yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3z5QXWzSYg for ; Mon, 23 Nov 2026 01:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c99a199c0f54 - stable/15 - GoogleTest: run several tests as plain C++ tests List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c99a199c0f54515b79f8beee26f42f51701d982f Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:39 +0000 Message-Id: <6b03946f.2f8f.789d798d@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c99a199c0f54515b79f8beee26f42f51701d982f commit c99a199c0f54515b79f8beee26f42f51701d982f Author: Enji Cooper AuthorDate: 2026-10-09 21:33:50 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 GoogleTest: run several tests as plain C++ tests Some of the tests provided by GoogleTest don't play well with the kyua GoogleTest engine available in 0.15.0, in part because they test edgecases that the kyua GoogleTest engine does not expect or handle gracefully. Treat the tests as plain C++ tests to keep parity (result-wise) before switching the testcase type from `plain` (what it is today under the covers) to `googletest`. MFC after: 1 month MFC with: 3fb03fb35b20 ("[tests] switch GoogleTest tests to ...") (cherry picked from commit eecc84de3572d1ee6caac1fa14dd3140c9601c9c) --- lib/googletest/tests/gmock/Makefile | 3 ++- lib/googletest/tests/gtest/Makefile | 21 ++++++++++++++------- lib/googletest/tests/gtest_main/Makefile | 17 ++++++++++++----- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile index 493567100630..6ac12d2814d4 100644 --- a/lib/googletest/tests/gmock/Makefile +++ b/lib/googletest/tests/gmock/Makefile @@ -2,7 +2,8 @@ .PATH: ${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test -GTESTS+= gmock_stress_test +# This doesn't work with the googletest engine in kyua 0.15.0. +PLAIN_TESTS_CXX+= gmock_stress_test LIBADD+= pthread gtest gmock diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile index 5834ca788985..691dd5ce25ff 100644 --- a/lib/googletest/tests/gtest/Makefile +++ b/lib/googletest/tests/gtest/Makefile @@ -2,14 +2,21 @@ .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test -GTESTS+= gtest_environment_test -GTESTS+= gtest_no_test_unittest -GTESTS+= googletest-param-test-test GTESTS+= gtest_premature_exit_test -GTESTS+= gtest_repeat_test -GTESTS+= gtest_stress_test -GTESTS+= gtest_throw_on_failure_ex_test -GTESTS+= gtest-unittest-api_test +# These test scenarios are't handled properly with the googletest engine in +# kyua 0.15.0. +PLAIN_TESTS_CXX+= gtest_environment_test +PLAIN_TESTS_CXX+= gtest_no_test_unittest +PLAIN_TESTS_CXX+= gtest_throw_on_failure_ex_test + +# NOTE: these tests rely on testing by side-effect with global variables/state +# used in multiple testcases. +# +# Running this plain C++ tests gets around that problem. +PLAIN_TESTS_CXX+= googletest-param-test-test +PLAIN_TESTS_CXX+= gtest_repeat_test +PLAIN_TESTS_CXX+= gtest_stress_test +PLAIN_TESTS_CXX+= gtest-unittest-api_test CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile index de9bc2f4a78a..517ec804692a 100644 --- a/lib/googletest/tests/gtest_main/Makefile +++ b/lib/googletest/tests/gtest_main/Makefile @@ -3,8 +3,6 @@ .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test GTESTS+= googletest-death-test-test -GTESTS+= googletest-filepath-test -GTESTS+= googletest-listener-test GTESTS+= googletest-message-test GTESTS+= googletest-options-test GTESTS+= googletest-port-test @@ -14,10 +12,19 @@ GTESTS+= gtest-typed-test_test GTESTS+= gtest_main_unittest GTESTS+= gtest_pred_impl_unittest GTESTS+= gtest_prod_test -GTESTS+= gtest_skip_test -GTESTS+= gtest_skip_in_environment_setup_test GTESTS+= gtest_sole_header_test -GTESTS+= gtest_unittest + +# Crashes when listing testcases using googletest engine in kyua 0.15.0 +# (probably test bugs). +PLAIN_TESTS_CXX+= googletest-filepath-test +PLAIN_TESTS_CXX+= googletest-listener-test +# These test scearios don't work with the googletest engine in kyua 0.15.0. +PLAIN_TESTS_CXX+= gtest_skip_in_environment_setup_test +PLAIN_TESTS_CXX+= gtest_skip_test +# Some of the test scenarios show up as "skipped", when in reality they're just +# testing skipped functionality. Don't inflate the testcase numbers +# unnecessarily as it can serve to confuse downstream users. +PLAIN_TESTS_CXX+= gtest_unittest CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} From nobody Mon Nov 23 01:18:40 2026 X-Original-To: dev-commits-src-branches@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 4jXp4127gjz71THV for ; Mon, 23 Nov 2026 01:18:41 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4070hsz4bn1 for ; Mon, 23 Nov 2026 01:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396721; 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=DbnMWgYJiIhA5jQHlkYfOoZs/J5pg4TMcpym6IOfWf4=; b=tVHCuG+8QrRKcSHDG1NhRRffmP+kWYJpgeWGQ3je6CGUSs5tdMlyDQxYeT7etXeFS8ro9b EmQ0hcJabZSmZ2SwfE7NwwSIpTx/+hNzMqVp4tuOq9VZXKiq/0/KN19IMb++XEEKdatxWN Xir/5+iq7+W2wF5GbDyZxYyZZOexsCmaT+q5ma7X8xxTWcAkyrZBjwVunuRGhcrjklWjdm +cfv+wHurwicG2riuO2IgeiPck+LZl1cqy0KgkkoICqxcZJ56P5rDUDuDbV8IHYKTBs39y ts8SCU+D1kEl7gwyuAmzVcgezAeInaGWm+ybyt3cySyVy8dQU/I5Ua5dsu7JyA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396721; b=gLn5wgsBQctGSz9PjD7dFVO0AakLiryoK+6t3ytFXIrsZxhZ7hzkEMy9f/OrkItaSVtAdd wYniifn/Z+gGvZO7zEjJT1H8NyUE1Cv8ttXee10uqBd5sZIUA5Q/PHAFPvOo/HKhrHe/np MurAQyHN4hibAFHvNEKsxaAooTxWF5+quifO7+JGQA0BLatyKoDSO0wZDTqMo+lyysMTti awv3Snm19Vu5DmVanjYeOJZOHVmUBQwq7dsdpHYaUCFDNAgU5kdhTTmDToHLFf8oe8lGcb xhexcSr5LeTJTUKOZ3shfHrIydNG8DrlA7BdhqyhyDQQ/Vw4KTWTsA4GUW8Mvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396721; 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=DbnMWgYJiIhA5jQHlkYfOoZs/J5pg4TMcpym6IOfWf4=; b=Se8nX/vptfKmfBxEoHzdG73x97z24ogcoRZnm32wccaKuxi0XkrmM5RmTA+GIgEPvGVKer UytCAgtmCJTR3i6+VB2faGnAEM7gJPvVXNCzzFsNj01a6Nf/eib/uLaMN15mSsLtLfw5d9 gEUnt17ooYlhTZlKtb4kb5D9NUZEOoPN+Q3t4rmv5VKFFuixSFb5ce/VXd57Y/rLGNd5pM pMY3XxSr++vL0iaaGbJdyb8+RcHnImBppknfO/LiQgFfrvh8/ZvSfPCWemj5gePpCMLoI3 56B3IFxB0DSMINO4vWL50a3/RUFYesDL5RqMTZhT6P8zF5lrAevxBFoh45ktzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp405njVzSYk for ; Mon, 23 Nov 2026 01:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c07ae9b28fca - stable/15 - tests/sys/capsicum: restore test coverage with root user List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c07ae9b28fca411d25d01c21ba9312f55b32b437 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:40 +0000 Message-Id: <6b039470.30f6.5db99141@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c07ae9b28fca411d25d01c21ba9312f55b32b437 commit c07ae9b28fca411d25d01c21ba9312f55b32b437 Author: Enji Cooper AuthorDate: 2026-11-10 01:55:45 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 tests/sys/capsicum: restore test coverage with root user This change builds capsicum_test and installs/runs it as an unprivileged user ("tests" in vanilla FreeBSD) and root. This required adjusting logic in the Makefile in order to build two binaries with the same sources and running them as separate binaries. Moreover, in order to restore coverage and ensure that some tests which require `other_uid` (typically specified via `-u` on the CLI with the test program) don't fail, become the "tests" user when run as root. This technically doesn't honor unprivileged_user property in kyua.conf: the property needs to be passed via a command-line parameter to the test program. MFC after: 1 week Reported by: markj Fixes: 3fb03fb35b20 ("[tests] switch GoogleTest tests ...") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61066 (cherry picked from commit 58e5c5cac1e7c8c99a6e7f8846b655afed05b74f) --- tests/sys/capsicum/Makefile | 27 ++++++++++++++++++--------- tests/sys/capsicum/capsicum-test-main.cc | 24 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 788fa9f9394c..ddd6eadcfc0e 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -9,14 +9,11 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no -GTESTS+= capsicum-test -# This test script runs the same test suite twice, once as root and once as an -# unprivileged user. Serialize them since some tests access global namespaces, -# e.g., mqueuefs, and can trample on each other. -TEST_METADATA.functional+= is_exclusive="true" -TEST_METADATA.functional+= required_kmods="mqueuefs" +GTESTS+= capsicum-test_privileged +GTESTS+= capsicum-test_unprivileged -SRCS.capsicum-test+= \ +# SRCS required for `capsicum-test*`. +SRCS.capsicum-test= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ @@ -36,8 +33,20 @@ SRCS.capsicum-test+= \ overhead.cc \ rename.cc -LIBADD.capsicum-test+= gtest pthread procstat -TEST_METADATA.capsicum-test= required_user="unprivileged" +.for gtest in ${GTESTS} +SRCS.${gtest}= ${SRCS.capsicum-test} + +LIBADD.${gtest}+= gtest pthread procstat + +# This test script runs the same test suite twice, once as root and once as an +# unprivileged user. Serialize them since some tests access global namespaces, +# e.g., mqueuefs, and can trample on each other. +TEST_METADATA.${gtest}+= is_exclusive="true" +TEST_METADATA.${gtest}+= required_kmods="mqueuefs" +.endfor + +TEST_METADATA.capsicum-test_privileged+= required_user="root" +TEST_METADATA.capsicum-test_unprivileged+= required_user="unprivileged" .for p in mini-me mini-me.noexec mini-me.setuid PROGS+= $p diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc index 2a2c75000039..308c121a0281 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -136,6 +136,30 @@ int main(int argc, char* argv[]) { } } + // Last ditch effort to get an unprivileged user on the fly from /etc/passwd + // for testcases that need it. + // + // This must be done this way because the typical way of handling this (via + // the `-u` argument) isn't supported yet with kyua: + // https://github.com/freebsd/kyua/issues/354 . + // + // IMPORTANT: + // - this doesn't honor `unprivileged_user` in `kyua.conf`. + // - this doesn't fail because doing that could break all testing on systems + // where the `tests` user isn't available. + if (other_uid == 0) { + const char *test_user = "tests"; + + struct passwd *test_user_entry = getpwnam(test_user); + + if (test_user_entry) { + other_uid = test_user_entry->pw_uid; + } else { + std::cerr << "Failed to get entry for " << test_user << ", errno=" << errno << "; some tests may fail" << std::endl; + } + + } + testing::AddGlobalTestEnvironment(new SetupEnvironment()); return RUN_ALL_TESTS(); } From nobody Mon Nov 23 01:18:42 2026 X-Original-To: dev-commits-src-branches@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 4jXp4320Ccz71TWy for ; Mon, 23 Nov 2026 01:18:43 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp426wvxz4bsP for ; Mon, 23 Nov 2026 01:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396723; 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=bRuL6+Fy7rrj277VT9rZs1mOkHQrJHncIB+tD1H783M=; b=Q4nuoiOoXrC8HlTfxK5bTlyliQ+SSXk3rjZZQGNhTrrvrwJ9DGopCCYfbCcY5IiHLPklcE MsVvHg7VJ9JlclPCupcRnPPr8xIG+VHCYDRqXEq9D5uTMKRO/7P9/lbpSYkziCL7D8Fvur l1jICJOZLeJ22egDllC2cS3nxdbedANldRYtjH2d+nmT4KYHIUEEOKnT/guE0V7XVc8d3n ij31lZUQU+JUl2Np3S3wrN82p+gBNNsxs5ybgjpvYlwoYzuB7nUhpkFzjBd1ObZyaDMxxF FlLKlsJ4GbC1KG4FBtnWMDtXzHpRQFXrPmx6NQ1JJ/YnaEA3DE8XN0VZ4tVMFA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396723; b=KxP9D88MnFVPtxdcc5EyrEN66AiVPKDEMfDlmwIvaZOsoR+qLvkMPDltsmVK3S+oo3JRCz CxqMpUpHEuOvI/7yWU3OmMoiDe0SGBWvW8mipY5s6ZwowvLu2liErr1iSd+Fv7HycGyiiu cv8hxga4lJptQnMFVV6CKCpUll8aLvYvOChJFzeemQplYisMxxAzpp0B20QXiDksEgRttA uvuQ7srfs1JPW14ZTi6E4dK4f35vVFPmvyYfrRJ28Do5tNYHtPAl8ZqHuZLlrOfvxJDROA FFxwqgFhmEIGLhuTHpmZERFF/bqsp7qQIteut7OvPBCjcLCjundorfDlB7Lm9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396723; 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=bRuL6+Fy7rrj277VT9rZs1mOkHQrJHncIB+tD1H783M=; b=W1Zojr3InVxqzA4DeHphnctsKALcywud+rGL+5Y3taVFwuqliZB2zZE3z09y/SXSOmqqMG qqSiGHPOZn1cX5RVcwZefZ9LcOcUfrZBmaieO8XCYJBdaT09t/DUhXs07h1B8oYRkSbJYc KBC2HhGQTvfRe2wlCB6p2P1GGAQ5RdfPtbalQldjC9zwMAVvjGPqPNoQ0BZiK2Vkntp5Fk t8qmyblHvqjIQwU3iTov5lJoFS0ScyJQlqwOiuyxH1OVCttQ5rvnwi6ft3fgU6sZxiWd6/ 28GGjuP/vbqF23Z9Xgg+VmFyWAs68Rc67Tzkg9PDHNoEFZZL8wmf/Q41jp6EIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp426VMKzSpM for ; Mon, 23 Nov 2026 01:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ee7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: da540afdf40e - stable/15 - capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: da540afdf40eebd457e036934705643d6c33e55f Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:42 +0000 Message-Id: <6b039472.1ee7.22604c9d@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=da540afdf40eebd457e036934705643d6c33e55f commit da540afdf40eebd457e036934705643d6c33e55f Author: Enji Cooper AuthorDate: 2026-11-10 02:05:33 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again 04c4b2084eb9 accidentally added some changes from another WIP commit into that diff. Instead of wholesale reverting the change, just revert the part that's currently broken (`HAVE_SEND_RECV_MMSG`). While some of the related tests pass, one of the testcases (`capmode.cc:AllowedMmsgSendRecv`) doesn't currently pass. Revert the change to make the CI run more green again. MFC after: 1 week Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean") (cherry picked from commit 71eddb44d7dfa60e43f77c90b51bd091f0693f85) --- tests/sys/capsicum/capsicum-freebsd.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h index 82ee9cf9d91c..ea14dd76a505 100644 --- a/tests/sys/capsicum/capsicum-freebsd.h +++ b/tests/sys/capsicum/capsicum-freebsd.h @@ -49,6 +49,10 @@ __END_DECLS #define CAP_FROM_PEELOFF #define HAVE_PIPE2 + +/* capmode.cc:AllowedMmsgSendRecv: the tests don't pass on FreeBSD (yet?). */ +#if 0 #define HAVE_SEND_RECV_MMSG +#endif #endif /*__CAPSICUM_FREEBSD_H__*/ From nobody Mon Nov 23 01:18:41 2026 X-Original-To: dev-commits-src-branches@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 4jXp421KdLz71TTw for ; Mon, 23 Nov 2026 01:18:42 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp416hP1z4bsF for ; Mon, 23 Nov 2026 01:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396722; 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=Ha1aEWCxrPNDkwqRNP0Wc9OfG7aPpHoo6OQvBX/njwk=; b=amx8KQ/LwdsijWQE20W5qUI5Ol2lpwNRHBdKR87HQRHGwDcEaEOBnr/qEy7+Iz51YP8gIX g/Ru3GsaQ5FjFy7m5E0dkJb4ktEiC+Q2C4dZljXE9tkZqVtegWV7gOel6BIAwDCNM9gddh yQSOVCjz0QM13g1jAY1OtSbhXPn8lIiTgU9QqeFKpk7yaLPUlAnTCj/sUsfRtZvX0cyRjc j/VQ7i1oKHO6YGgIL6mce2BO06dts7uMTfvgGFgu1EN08naLVAcSPS0iVDfCebvcbJhHrV RwGQ/Ri1+bCpIxHV6aeG/CmttQvzTTfY6u8cpAny/NbOeTSAxStGCd4hQzkTCg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396722; b=P80FoMfM0sJCQsy4/WZPlAiaUL3TNvGqNSANEWwyJIN0/uSUxSCjHrl8e3x8a9s3lwEfcR uGq8gSYtcs48ZxibpJQoOsn5VkdYk0EEkgFH2O1rfPL8sKsYjM9BSyoAECypBoaqMAdaWP a4R4MyIEzeHHrceWdljcI85PuzufnHqra6vEdgx61Tf7mTE3/WzGelINwpL3YuKR7ObzQc HdJNz5Bjc+pM9vywPQGkimkyMb+4JrbnM2gSHB1Kc6e0Cb1eKU6OrSqwv6WDIUHnjYV6HY WSGgfxRf81akyU5KqRoi9gpLn5bx8btqRmTgrku8NE/P/aoALYzg53QuA6BFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396722; 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=Ha1aEWCxrPNDkwqRNP0Wc9OfG7aPpHoo6OQvBX/njwk=; b=wdYYXfh91qnTxc0tqI20012Lq26gws7iEc7fMgDoTciZYBFKfRJCHcSzp/tboHkXvPXT6Q 0N0+WfbGRQ2ZDrDjpKiCH9YZI+/J2uavmEJyuP4A1x9qwtRRCN8UqGLFKZgfryctNMy+Dv iS2Q+O9c6G70mFlHUHWZyLkBLBxC8KxBn8D9C8XCXi2gcQ6Vn2AIZ/rQouCBSc+5H/9sO5 hkjQLKXeZWvZNeBPvKtF48NEBvn98I/3nMReStKyr/9/NWOY60Dq2aGAxGSdwoaJM7gy28 hSUzKGRa0+64bWYOvj85v3RPPsMKxnLjSCVU+7suKohHJycRFgodmJAA2dcHoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp416G7YzSbZ for ; Mon, 23 Nov 2026 01:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f93 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 0c2d403b0a2d - stable/15 - capsicum-test: make the code WARNS=6 clean List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c2d403b0a2d0bcf729ec413d16ee84f01c5c807 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:41 +0000 Message-Id: <6b039471.2f93.6bf34e66@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2d403b0a2d0bcf729ec413d16ee84f01c5c807 commit 0c2d403b0a2d0bcf729ec413d16ee84f01c5c807 Author: Enji Cooper AuthorDate: 2026-11-10 01:52:55 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 capsicum-test: make the code WARNS=6 clean Make the code WARNS=6 clean by doing the following: - Renaming variables (-Wshadow). - Use memcpy instead of assigning the result of CMSG_DATA to a variable (-Wcast-align). - Wrap some macros with do-while(0) to avoid variable collisions (-Wshadow). - Push one of the TRACE statements up by 1 layer to avoid a collision between 2 calls of TRACE via the same overarching macro. This was needed in order for the code to build properly with D61066, since the code was not compiling with WARNS set to 3 at the testcase level. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61080 (cherry picked from commit 04c4b2084eb93fc2374dbb89f343f3941585a640) --- tests/sys/capsicum/capability-fd.cc | 10 +++-- tests/sys/capsicum/capmode.cc | 2 +- tests/sys/capsicum/capsicum-freebsd.h | 15 +++---- tests/sys/capsicum/capsicum-test-main.cc | 8 +++- tests/sys/capsicum/capsicum-test.h | 36 +++++++++++----- tests/sys/capsicum/fexecve.cc | 12 +++--- tests/sys/capsicum/procdesc.cc | 6 ++- tests/sys/capsicum/sctp.cc | 30 +++++++------- tests/sys/capsicum/socket.cc | 70 ++++++++++++++++---------------- 9 files changed, 107 insertions(+), 82 deletions(-) diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc index a9e4d30ac4b9..d79f3e4be917 100644 --- a/tests/sys/capsicum/capability-fd.cc +++ b/tests/sys/capsicum/capability-fd.cc @@ -974,6 +974,8 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { pid_t child = fork(); if (child == 0) { + int child_cap_fd; + // Child: enter cap mode EXPECT_OK(cap_enter()); // Child: send startup notification @@ -984,16 +986,16 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { EXPECT_OK(rc); EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen); cmptr = CMSG_FIRSTHDR(&mh); - int cap_fd = *(int*)CMSG_DATA(cmptr); + memcpy(&child_cap_fd, CMSG_DATA(cmptr), sizeof(child_cap_fd)); EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len); cmptr = CMSG_NXTHDR(&mh, cmptr); EXPECT_TRUE(cmptr == NULL); // Child: confirm we can do the right operations on the capability cap_rights_t rights; - EXPECT_OK(cap_rights_get(cap_fd, &rights)); + EXPECT_OK(cap_rights_get(child_cap_fd, &rights)); EXPECT_RIGHTS_EQ(&r_rs, &rights); - TryReadWrite(cap_fd); + TryReadWrite(child_cap_fd); // Child: acknowledge that we have received and tested the file descriptor SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_FD_RECEIVED); @@ -1024,7 +1026,7 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CMSG_LEN(sizeof(int)); - *(int *)CMSG_DATA(cmptr) = cap_fd; + memcpy(CMSG_DATA(cmptr), &cap_fd, sizeof(cap_fd)); buffer1[0] = 0; iov[0].iov_len = 1; int rc = sendmsg(sock_fds[1], &mh, 0); diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc index fdc572f11b5b..4cf6f24420e3 100644 --- a/tests/sys/capsicum/capmode.cc +++ b/tests/sys/capsicum/capmode.cc @@ -158,7 +158,7 @@ FORK_TEST_F(WithFiles, AllowedSocketSyscalls) { if (rc < 0) { EXPECT_EQ(EAGAIN, errno); } - char ch; + char ch = 'a'; EXPECT_OK(write(fd_file_, &ch, sizeof(ch))); // These calls will fail for lack of e.g. a proper name to send to, diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h index 9cb3149a05a4..82ee9cf9d91c 100644 --- a/tests/sys/capsicum/capsicum-freebsd.h +++ b/tests/sys/capsicum/capsicum-freebsd.h @@ -4,15 +4,15 @@ * FreeBSD Capsicum Functionality. ************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif +#include + +__BEGIN_DECLS /* FreeBSD definitions. */ -#include #include #include #include +#include #define AT_SYSCALLS_IN_CAPMODE #define HAVE_CAP_RIGHTS_GET @@ -27,9 +27,7 @@ typedef unsigned long cap_ioctl_t; #define HAVE_OPENAT_INTERMEDIATE_DOTDOT -#ifdef __cplusplus -} -#endif +__END_DECLS // Use fexecve_() in tests to allow Linux variant to bypass glibc version. #define fexecve_(F, A, E) fexecve(F, A, E) @@ -50,4 +48,7 @@ typedef unsigned long cap_ioctl_t; // FreeBSD generates a capability from sctp_peeloff(cap_fd,...). #define CAP_FROM_PEELOFF +#define HAVE_PIPE2 +#define HAVE_SEND_RECV_MMSG + #endif /*__CAPSICUM_FREEBSD_H__*/ diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc index 308c121a0281..a39e192aa385 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -75,12 +75,16 @@ std::string capsicum_test_bindir; // Adds a directory to $PATH. static void AddDirectoryToPath(const char *dir) { char *new_path, *old_path; + int rc [[maybe_unused]]; old_path = getenv("PATH"); assert(old_path); - assert(asprintf(&new_path, "%s:%s", dir, old_path) > 0); - assert(setenv("PATH", new_path, 1) == 0); + rc = asprintf(&new_path, "%s:%s", dir, old_path); + assert(rc != -1); + rc = setenv("PATH", new_path, 1); + assert(rc == 0); + free(new_path); } int main(int argc, char* argv[]) { diff --git a/tests/sys/capsicum/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h index 7433814b31c8..5503a7ef260f 100644 --- a/tests/sys/capsicum/capsicum-test.h +++ b/tests/sys/capsicum/capsicum-test.h @@ -67,7 +67,7 @@ const char *TmpFile(const char *pathname); // Implemented as a macro to allow access to the test case instance's // HasFailure() method, which is reported as the forked process's // exit status. -#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) \ +#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) do { \ pid_t pid = force_nofork ? 0 : fork(); \ if (pid == 0) { \ INNERCODE; \ @@ -95,10 +95,13 @@ const char *TmpFile(const char *pathname); strerror(errno), errno); \ ADD_FAILURE() << "Failed to wait for child"; \ } else { \ - int rc = WIFEXITED(status) ? WEXITSTATUS(status) : -1; \ - EXPECT_EQ(0, rc); \ + int exit_status = \ + WIFEXITED(status) ? WEXITSTATUS(status) : -1; \ + EXPECT_EQ(0, exit_status); \ } \ - } + } \ +} while (0) + #define _RUN_FORKED_MEM(THIS, TESTFN, TESTCASENAME, TESTNAME) \ _RUN_FORKED(MaybeRunWithThread(THIS, &TESTFN), TESTCASENAME, TESTNAME); #define _RUN_FORKED_FN(TESTFN, TESTCASENAME, TESTNAME) \ @@ -137,15 +140,28 @@ const char *TmpFile(const char *pathname); // Emit errno information on failure #define EXPECT_OK(v) EXPECT_LE(0, v) << " errno " << errno << " " << strerror(errno) -// Expect a syscall to fail with the given error. -#define EXPECT_SYSCALL_FAIL(E, C) \ +// Expect a syscall to fail with the given error (inner). +// +// This is required because unfortunately googletest "computes" trace variables +// using line numbers instead of another unique ID and 2 calls to +// `SCOPED_TRACE(..)` via the same macro results in `-Wshadow`-related compiler +// errors: https://github.com/google/googletest/issues/5143 +#define EXPECT_SYSCALL_FAIL_NO_TRACE(E, C) \ do { \ - SCOPED_TRACE(#C); \ EXPECT_GT(0, C); \ EXPECT_EQ(E, errno) << "expected '" << strerror(E) \ << "' but got '" << strerror(errno) << "'"; \ } while (0) +// Expect a syscall to fail with the given error (with tracing). +// +// See the comment above (for `EXPECT_SYSCALL_FAIL_NO_TRACE`). +#define EXPECT_SYSCALL_FAIL(E, C) \ + do { \ + SCOPED_TRACE(#C); \ + EXPECT_SYSCALL_FAIL_NO_TRACE((E), (C)); \ + } while (0) + // Expect a syscall to fail with anything other than the given error. #define EXPECT_SYSCALL_FAIL_NOT(E, C) \ do { \ @@ -169,9 +185,9 @@ const char *TmpFile(const char *pathname); SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \ const int result = openat((fd), (path), (flags)); \ if (((flags) & O_BENEATH) == O_BENEATH) { \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_O_BENEATH, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_O_BENEATH, result); \ } else { \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \ } \ if (result >= 0) { close(result); } \ } while (0) @@ -180,7 +196,7 @@ const char *TmpFile(const char *pathname); do { \ SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \ const int result = openat((fd), (path), (flags)); \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \ if (result >= 0) { close(result); } \ } while (0) #endif diff --git a/tests/sys/capsicum/fexecve.cc b/tests/sys/capsicum/fexecve.cc index 86df2af06388..6ff5a657c35a 100644 --- a/tests/sys/capsicum/fexecve.cc +++ b/tests/sys/capsicum/fexecve.cc @@ -32,9 +32,9 @@ class Execve : public ::testing::Test { if (exec_fd_ < 0) { fprintf(stderr, "Error! Failed to open %s\n", exec_prog_.c_str()); } - argv_checkroot_[0] = (char*)exec_prog_.c_str(); - argv_fail_[0] = (char*)exec_prog_.c_str(); - argv_pass_[0] = (char*)exec_prog_.c_str(); + argv_checkroot_[0] = __DECONST(char*, exec_prog_.c_str()); + argv_fail_[0] = __DECONST(char*, exec_prog_.c_str()); + argv_pass_[0] = __DECONST(char*, exec_prog_.c_str()); } ~Execve() { if (exec_fd_ >= 0) { @@ -43,9 +43,9 @@ class Execve : public ::testing::Test { } } protected: - char* argv_checkroot_[3] = {nullptr, (char*)"--checkroot", nullptr}; - char* argv_fail_[3] = {nullptr, (char*)"--fail", nullptr}; - char* argv_pass_[3] = {nullptr, (char*)"--pass", nullptr}; + char* argv_checkroot_[3] = {nullptr, __DECONST(char*, "--checkroot"), nullptr}; + char* argv_fail_[3] = {nullptr, __DECONST(char*, "--fail"), nullptr}; + char* argv_pass_[3] = {nullptr, __DECONST(char*, "--pass"), nullptr}; std::string exec_prog_, exec_prog_noexec_, exec_prog_setuid_; int exec_fd_; }; diff --git a/tests/sys/capsicum/procdesc.cc b/tests/sys/capsicum/procdesc.cc index f25324e4efc7..c92edaf4b695 100644 --- a/tests/sys/capsicum/procdesc.cc +++ b/tests/sys/capsicum/procdesc.cc @@ -983,6 +983,8 @@ TEST_F(PipePdfork, PassProcessDescriptor) { if (verbose) fprintf(stderr, "[%d] about to fork()\n", getpid_()); pid_t child2 = fork(); if (child2 == 0) { + int pd; + // Child: close our copy of the original process descriptor. close(pd_); SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_STARTED); @@ -992,7 +994,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) { EXPECT_OK(rc); EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen); cmptr = CMSG_FIRSTHDR(&mh); - int pd = *(int*)CMSG_DATA(cmptr); + memcpy(&pd, CMSG_DATA(cmptr), sizeof(pd)); EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len); cmptr = CMSG_NXTHDR(&mh, cmptr); EXPECT_TRUE(cmptr == NULL); @@ -1024,7 +1026,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) { cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CMSG_LEN(sizeof(int)); - *(int *)CMSG_DATA(cmptr) = pd_; + memcpy(CMSG_DATA(cmptr), &pd_, sizeof(pd_)); buffer1[0] = 0; iov[0].iov_len = 1; if (verbose) fprintf(stderr, "[%d] send process descriptor %d on socket\n", getpid_(), pd_); diff --git a/tests/sys/capsicum/sctp.cc b/tests/sys/capsicum/sctp.cc index aa84653c5b2a..a36a242f8c9b 100644 --- a/tests/sys/capsicum/sctp.cc +++ b/tests/sys/capsicum/sctp.cc @@ -92,13 +92,13 @@ TEST(Sctp, Socket) { addr.sin_family = AF_INET; addr.sin_port = htons(0); addr.sin_addr.s_addr = htonl(INADDR_ANY); - socklen_t len = sizeof(addr); + socklen_t addr_len = sizeof(addr); // Can only bind the fully-capable socket. - EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, len)); - EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, len)); + EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, addr_len)); + EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, addr_len)); - EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &len)); + EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &addr_len)); int port = ntohs(addr.sin_port); // Now we know the port involved, fork off children to run clients. @@ -128,43 +128,43 @@ TEST(Sctp, Socket) { EXPECT_OK(listen(cap_sock_all, 3)); // Can only do socket operations on the fully-capable socket. - len = sizeof(addr); - EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &len)); + addr_len = sizeof(addr); + EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &addr_len)); struct sctp_event_subscribe events; memset(&events, 0, sizeof(events)); events.sctp_association_event = 1; events.sctp_data_io_event = 1; EXPECT_NOTCAPABLE(setsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events))); - len = sizeof(events); - EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &len)); + socklen_t eventslen = sizeof(events); + EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen)); memset(&events, 0, sizeof(events)); events.sctp_association_event = 1; events.sctp_data_io_event = 1; EXPECT_OK(setsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events))); - len = sizeof(events); - EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &len)); + eventslen = sizeof(events); + EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen)); - len = sizeof(addr); + addr_len = sizeof(addr); memset(&addr, 0, sizeof(addr)); - EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &len)); + EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &addr_len)); EXPECT_EQ(AF_INET, addr.sin_family); EXPECT_EQ(htons(port), addr.sin_port); struct sockaddr_in client_addr; - socklen_t addr_len = sizeof(client_addr); + socklen_t client_addr_len = sizeof(client_addr); unsigned char buffer[1024]; struct sctp_sndrcvinfo sri; memset(&sri, 0, sizeof(sri)); int flags = 0; EXPECT_NOTCAPABLE(sctp_recvmsg(cap_sock_wo, buffer, sizeof(buffer), - (struct sockaddr*)&client_addr, &addr_len, + (struct sockaddr*)&client_addr, &client_addr_len, &sri, &flags)); while (true) { retry: memset(&sri, 0, sizeof(sri)); int len = sctp_recvmsg(cap_sock_rw, buffer, sizeof(buffer), - (struct sockaddr*)&client_addr, &addr_len, + (struct sockaddr*)&client_addr, &client_addr_len, &sri, &flags); if (len < 0 && errno == EAGAIN) goto retry; EXPECT_OK(len); diff --git a/tests/sys/capsicum/socket.cc b/tests/sys/capsicum/socket.cc index 5bb7e9d3e180..ff21d3020a83 100644 --- a/tests/sys/capsicum/socket.cc +++ b/tests/sys/capsicum/socket.cc @@ -166,26 +166,26 @@ TEST(Socket, TCP) { AWAIT_INT_MESSAGE(pipefds[1], MSG_PARENT_CHILD_SHOULD_RUN); // Create sockets - int sock = socket(AF_INET, SOCK_STREAM, 0); - EXPECT_OK(sock); - if (sock < 0) return; - int cap_sock_rw = dup(sock); - EXPECT_OK(cap_sock_rw); - EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw)); - int cap_sock_all = dup(sock); - EXPECT_OK(cap_sock_all); - EXPECT_OK(cap_rights_limit(cap_sock_all, &r_all)); - close(sock); + int child_sock = socket(AF_INET, SOCK_STREAM, 0); + EXPECT_OK(child_sock); + if (child_sock < 0) return; + int child_cap_sock_rw = dup(child_sock); + EXPECT_OK(child_cap_sock_rw); + EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw)); + int child_cap_sock_all = dup(child_sock); + EXPECT_OK(child_cap_sock_all); + EXPECT_OK(cap_rights_limit(child_cap_sock_all, &r_all)); + close(child_sock); // Connect socket - struct sockaddr_in addr; - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); // Pick unused port - addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - socklen_t len = sizeof(addr); - EXPECT_NOTCAPABLE(connect_(cap_sock_rw, (struct sockaddr *)&addr, len)); - EXPECT_OK(connect_(cap_sock_all, (struct sockaddr *)&addr, len)); + struct sockaddr_in child_addr; + memset(&child_addr, 0, sizeof(child_addr)); + child_addr.sin_family = AF_INET; + child_addr.sin_port = htons(port); // Pick unused port + child_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + socklen_t child_addr_len = sizeof(child_addr); + EXPECT_NOTCAPABLE(connect_(child_cap_sock_rw, (struct sockaddr *)&child_addr, child_addr_len)); + EXPECT_OK(connect_(child_cap_sock_all, (struct sockaddr *)&child_addr, child_addr_len)); exit(HasFailure()); } @@ -291,15 +291,15 @@ TEST(Socket, UDP) { pid_t child = fork(); if (child == 0) { - int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - EXPECT_OK(sock); - int cap_sock_rw = dup(sock); - EXPECT_OK(cap_sock_rw); - EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw)); - int cap_sock_connect = dup(sock); + int child_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + EXPECT_OK(child_sock); + int child_cap_sock_rw = dup(child_sock); + EXPECT_OK(child_cap_sock_rw); + EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw)); + int cap_sock_connect = dup(child_sock); EXPECT_OK(cap_sock_connect); EXPECT_OK(cap_rights_limit(cap_sock_connect, &r_connect)); - close(sock); + close(child_sock); // Can only sendmsg(2) to an address over a socket with CAP_CONNECT. unsigned char buffer[256]; @@ -313,25 +313,25 @@ TEST(Socket, UDP) { mh.msg_iov = &iov; mh.msg_iovlen = 1; - struct sockaddr_in addr; - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - mh.msg_name = &addr; - mh.msg_namelen = sizeof(addr); + struct sockaddr_in child_addr; + memset(&child_addr, 0, sizeof(child_addr)); + child_addr.sin_family = AF_INET; + child_addr.sin_port = htons(port); + child_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + mh.msg_name = &child_addr; + mh.msg_namelen = sizeof(child_addr); - EXPECT_NOTCAPABLE(sendmsg(cap_sock_rw, &mh, 0)); + EXPECT_NOTCAPABLE(sendmsg(child_cap_sock_rw, &mh, 0)); EXPECT_OK(sendmsg(cap_sock_connect, &mh, 0)); #ifdef HAVE_SEND_RECV_MMSG struct mmsghdr mv; memset(&mv, 0, sizeof(mv)); memcpy(&mv.msg_hdr, &mh, sizeof(struct msghdr)); - EXPECT_NOTCAPABLE(sendmmsg(cap_sock_rw, &mv, 1, 0)); + EXPECT_NOTCAPABLE(sendmmsg(child_cap_sock_rw, &mv, 1, 0)); EXPECT_OK(sendmmsg(cap_sock_connect, &mv, 1, 0)); #endif - close(cap_sock_rw); + close(child_cap_sock_rw); close(cap_sock_connect); exit(HasFailure()); } From nobody Mon Nov 23 01:18:43 2026 X-Original-To: dev-commits-src-branches@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 4jXp446ZXxz71TfW for ; Mon, 23 Nov 2026 01:18: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4403lfz4byL for ; Mon, 23 Nov 2026 01:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396724; 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=6QZuznel/qYxSBzWBnR6eQDq43z+g7UaLgB0HoVyF0c=; b=fRE5BMArygwIc0zlofuK5yw0n80t6THtWzn4MG9irhQIE5XEZFSzAvhpVmf89uejcSCHNr Rh5xRiXa/x6BecqPqHCGuDPQNf1sLOI1uA1+n4xWIs7ZZz8liCxgATP4XteDOrFzi+GGep 8EQqLTq11r/8uZ8wjYmzD6n2VgEPF1A/NpWfnkzo0Pko+eFIPNjKBk8WW++g8VQlLqi0+U WC3t8tlknV1lePiuUEMSbXSaVmqXEWit+xjD8z5CFidXXmDlsM+xKfntqzRG3QvSwpLKIe kA4yS3KD1oQZP3UG/Sg4GWF6+i235DNUfLY9j4R+25WJ73FaTP1AZNn/KCUBbQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396724; b=Sc6ADoaEBNwC5AN3mEjocQiuFrYrXJzoW/807xrDrsnliXxGTepJ7/+T/vV74/Mb9CbABS GVLnX9Fjq4chUozZsT7dAqLteuYzQucaRT02Pjnh82Mz2i+l09JqrzNfQEKnSh+HgxlOvj itiIR05gk5U7nGRbkbuWYLyTwpkHDOQhWbSv2avJI50h04p5NR8g8hydUsDzigrAU3piBE 86tB9B2GTI5tZAKNVcj6W+MmmXRRmdQSA3CTIGueHQJTJDkVtJiakWc7lLJOU+lPsupUb7 MU5uf+qCMT6BaDR0wodSaio/pqil8G1us8Kdvv4uMKj1vtvXXssLe1ETF+3S+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396724; 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=6QZuznel/qYxSBzWBnR6eQDq43z+g7UaLgB0HoVyF0c=; b=sxysSXrX3D2d3764YuRHm2CzDPN6WBeRbrmh/8S4Iu+//vawWjnhhfKo4kyhDULIFN29QV YsDhW+LJqbUxkIaCOFR++K5iN9QzQu724pporv8K7sjebF+ZdiNCMTF9fOM8rEv9/9OpMC fLoR3C5U/pKDqqcL7HjNFpT2VyQC9yyhSIR2s9frKKMgPxpOVZR162VeKfAdpUgscx0gb2 bSBqzo6eLxyBuGYl9h/Htn2Mstrd/mH3RcOmExeCpXELRLnKBsCqSIomllERaspXDn8JSq UIPUBbBJhbjBmdorvJY9bq8hSM4pxTmVKEMQL5tSBnVRhKjNCwkchFcz+mAwaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp436r4DzSYm for ; Mon, 23 Nov 2026 01:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2eaf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 349720311347 - stable/15 - tests/sys/capsicum: Fix -Wshadow issue with `fd_set` List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34972031134731b95b9c5dc5fe200e1236f3ad1c Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:43 +0000 Message-Id: <6b039473.2eaf.5f0e141@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=34972031134731b95b9c5dc5fe200e1236f3ad1c commit 34972031134731b95b9c5dc5fe200e1236f3ad1c Author: Enji Cooper AuthorDate: 2026-11-10 05:17:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:40 +0000 tests/sys/capsicum: Fix -Wshadow issue with `fd_set` `fd_set` is defined in `sys/select.h`, and prior to this change, was in fcntl.cc as well. This change renames `fd_set` to `fd_set_` to avoid the name collision. MFC after: 1 week Reported by: gcc 14 Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean") (cherry picked from commit a479301abb2c7b384f574fcc641e502f70654835) --- tests/sys/capsicum/fcntl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/capsicum/fcntl.cc b/tests/sys/capsicum/fcntl.cc index 1ae33c2e051e..a9349b153cdc 100644 --- a/tests/sys/capsicum/fcntl.cc +++ b/tests/sys/capsicum/fcntl.cc @@ -332,17 +332,17 @@ TEST(Fcntl, FLSubRights) { // Check operations that need CAP_FCNTL with specific subrights. int fd_get = dup(fd); - int fd_set = dup(fd); + int fd_set_ = dup(fd); EXPECT_OK(cap_fcntls_limit(fd_get, CAP_FCNTL_GETFL)); - EXPECT_OK(cap_fcntls_limit(fd_set, CAP_FCNTL_SETFL)); + EXPECT_OK(cap_fcntls_limit(fd_set_, CAP_FCNTL_SETFL)); fd_flag = fcntl(fd_get, F_GETFL, 0); EXPECT_OK(fd_flag); - EXPECT_NOTCAPABLE(fcntl(fd_set, F_GETFL, 0)); - EXPECT_OK(fcntl(fd_set, F_SETFL, fd_flag)); + EXPECT_NOTCAPABLE(fcntl(fd_set_, F_GETFL, 0)); + EXPECT_OK(fcntl(fd_set_, F_SETFL, fd_flag)); EXPECT_NOTCAPABLE(fcntl(fd_get, F_SETFL, fd_flag)); close(fd_get); - close(fd_set); + close(fd_set_); // Check operations that need CAP_FCNTL with no subrights => ENOTCAPABLE. EXPECT_OK(cap_fcntls_limit(fd, 0)); From nobody Mon Nov 23 01:18:45 2026 X-Original-To: dev-commits-src-branches@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 4jXp454P94z71Tc7 for ; Mon, 23 Nov 2026 01:18:45 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp450PLCz4bwY for ; Mon, 23 Nov 2026 01:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yG9fiUd/7ioNdwGYEPKSbEjmFxDXCwGvRk9uUl5WB74=; b=q0wYesZqbOtwCHQfxMZW7Ek2z1PokQ1fHMnEOmW4zN5RFd4wdYgcMUtp2XhmNKmKDvQ9SD ihBZhM/VLtHuc1/ome0prmnc81ozi6dv/h+jgHEBotTaZAQ/x9eIuOrRSbPHbEQBVI+MAa 1dsTohmN2wy7AL+5tJcbMVowasC0xELrjE6ukOmMPlrKrkS5icQOUwBGJVPK4m+tw6ETZx eEr9hjHFZI2AXFHwRHve7CQw/QMx/g4i/CdVgjagcaymXCuF9V8yXCb5VIjy6UXlf6A/JB btP38o2q/w5GrXo5FSiqVduoXINPVZyXh0BIWWQvtc787YOG0nfHd5XlpTlzjA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396725; b=U6Ae6PKNJBgmIkEhyeT6HCJv8qqxtohjZCQQN7UK5CtGg5TaYaxOto+AlZm9V08PoHMFP9 XGoGZOdULEXdikVkC4zZtk43heMFPGPmBFbxW2QA6ZhMktVavhL/JPEV1+jPUhMxZ5HTIG 80izNuXMU3Cua3TdLYdlvSS0W4qakKBQIKk1veCpJlODIq1orGlwY1iXT/+cgTDraUR28i 3g4SDMQNGtQoIHuasIx5mPnUFSADJxEi5Iph1fotOqAfO7A67GAKGG/xANGNB15bp/HJNZ p8bKEqfIe3N6P6wNs8n6k7tQvTr+DmcK2f3ll51oEgzz3TS03JyCajngE91DYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yG9fiUd/7ioNdwGYEPKSbEjmFxDXCwGvRk9uUl5WB74=; b=VApxC0AF1C9zXcQtj4Giq1qhhE7/ab7P/vsbh+4UyeZz5QLC+Pfv3r7UYFytTL4H2NhsOO OkLnzEGJB4Jf1rVFQV6dt0wdCo3m0eqUqXgE59qPzSp0tEqq2m5IexmYI0bxvOwbOL8RqO FGp3ZosCX2AimzDBpHQZm0pxB5RR0IyaCC/jGSCbM0yDVauO2kiRdaaf9CPdE54J+Q0p6f 98TGvjcpAjFx4k3imWLvBZWBWeYrBM1t1zKoqk8DS9As0msUdAo9eZikQvSZne9dX1+NYN tGN1EqkW+boAuVWewVVicqdIHr82emk0MLKmtHjb+f5hvzaU+fmxyX4FX0WC8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4503tTzSh5 for ; Mon, 23 Nov 2026 01:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3782 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 22ba656e3a8a - stable/15 - kyua: Fixes after vendor merge List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 22ba656e3a8a376cee93fbb2e7d1da1a935a749e Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:45 +0000 Message-Id: <6b039475.3782.d23026e@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=22ba656e3a8a376cee93fbb2e7d1da1a935a749e commit 22ba656e3a8a376cee93fbb2e7d1da1a935a749e Author: Igor Ostapenko AuthorDate: 2026-10-18 17:22:55 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 kyua: Fixes after vendor merge Reviewed by: ngie MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D60446 (cherry picked from commit af238d55d313a4a99fe9a3492755eb152b17bca0) --- contrib/kyua/cli/cmd_debug.cpp | 4 ++-- contrib/kyua/doc/kyuafile.5 | 1 + contrib/kyua/doc/kyuafile.5.in | 1 + contrib/kyua/engine/scheduler.cpp | 4 ++-- contrib/kyua/model/metadata.cpp | 47 ++++++++++++++++++++++++++------------- contrib/kyua/os/freebsd/main.cpp | 16 ++++++++----- 6 files changed, 47 insertions(+), 26 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index f5e48572407e..f43be8fe85f2 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -155,14 +155,14 @@ public: _ui->out("The test failed and paused right before its cleanup " "routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } } else if (_cmdline.has_option(pause_before_cleanup_option .long_name())) { _ui->out("The test paused right before its cleanup routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } }; diff --git a/contrib/kyua/doc/kyuafile.5 b/contrib/kyua/doc/kyuafile.5 index 1990e7bba3a3..d26312dd0d18 100644 --- a/contrib/kyua/doc/kyuafile.5 +++ b/contrib/kyua/doc/kyuafile.5 @@ -311,6 +311,7 @@ Supported platforms: .Pp ATF: .Va require.kmods +(appends to the list declared at the Kyuafile level instead of overwriting it) .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index ae4b8ebfa3fe..9485ed187814 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -311,6 +311,7 @@ Supported platforms: .Pp ATF: .Va require.kmods +(appends to the list declared at the Kyuafile level instead of overwriting it) .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index 6e19a1598f8c..d04fc1dfbd3d 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1653,8 +1653,8 @@ scheduler::generate_config(const config::tree& user_config, if (user_config.is_set("unprivileged_user")) { const passwd::user& user = user_config.lookup< engine::user_node >("unprivileged_user"); - // The property is duplicated using both ATF and Kyua naming styles - // for better UX. + // The property is duplicated using both ATF and Kyua naming styles + // for better UX. props["unprivileged-user"] = user.name; props["unprivileged_user"] = user.name; } diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp index 8bb071163c10..51a7b03e4599 100644 --- a/contrib/kyua/model/metadata.cpp +++ b/contrib/kyua/model/metadata.cpp @@ -255,8 +255,8 @@ init_tree(config::tree& tree) tree.define< config::strings_set_node >("required_configs"); tree.define< bytes_node >("required_disk_space"); tree.define< paths_set_node >("required_files"); - tree.define< bytes_node >("required_memory"); tree.define< config::strings_set_node >("required_kmods"); + tree.define< bytes_node >("required_memory"); tree.define< paths_set_node >("required_programs"); tree.define< user_node >("required_user"); tree.define< delta_node >("timeout"); @@ -282,8 +282,8 @@ set_defaults(config::tree& tree) model::strings_set()); tree.set< bytes_node >("required_disk_space", units::bytes(0)); tree.set< paths_set_node >("required_files", model::paths_set()); - tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< config::strings_set_node >("required_kmods", model::strings_set()); + tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< paths_set_node >("required_programs", model::paths_set()); tree.set< user_node >("required_user", ""); // TODO(jmmv): We shouldn't be setting a default timeout like this. See @@ -585,20 +585,6 @@ model::metadata::required_files(void) const } -/// Returns the amount of memory required by the test. -/// -/// \return Number of bytes, or 0 if this does not apply. -const units::bytes& -model::metadata::required_memory(void) const -{ - if (_pimpl->props.is_set("required_memory")) { - return _pimpl->props.lookup< bytes_node >("required_memory"); - } else { - return get_defaults().lookup< bytes_node >("required_memory"); - } -} - - /// Returns the list of kernel modules needed by the test. /// /// \return Set of kernel module names. @@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const } +/// Returns the amount of memory required by the test. +/// +/// \return Number of bytes, or 0 if this does not apply. +const units::bytes& +model::metadata::required_memory(void) const +{ + if (_pimpl->props.is_set("required_memory")) { + return _pimpl->props.lookup< bytes_node >("required_memory"); + } else { + return get_defaults().lookup< bytes_node >("required_memory"); + } +} + + /// Returns the list of programs needed by the test. /// /// \return Set of paths. @@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files) } +/// Sets the list of required kernel modules. +/// +/// \param vars Set of kernel module names. +/// +/// \return A reference to this builder. +/// +/// \throw model::error If the value is invalid. +model::metadata_builder& +model::metadata_builder::set_required_kmods(const model::strings_set& kmods) +{ + set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods); + return *this; +} + + /// Sets the amount of memory required by the test. /// /// \param bytes Number of bytes. diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 700284b64b78..1fe4fca8cae4 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -34,7 +34,12 @@ #include "engine/requirements.hpp" #include "os/freebsd/reqs_checker_kmods.hpp" +#include "engine/prepare/prepare.hpp" +#include "os/freebsd/prepare_kmods.hpp" + namespace execenv = engine::execenv; +namespace prepare = engine::prepare; + /// FreeBSD related features initialization. /// @@ -50,15 +55,14 @@ int freebsd::main(const int, const char* const* const) { execenv::register_execenv( - std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager()) - ); + std::make_shared()); #ifdef __FreeBSD__ engine::register_reqs_checker( - std::shared_ptr< engine::reqs_checker >( - new freebsd::reqs_checker_kmods() - ) - ); + std::make_shared()); + + prepare::register_handler( + std::make_shared()); #endif return 0; From nobody Mon Nov 23 01:18:46 2026 X-Original-To: dev-commits-src-branches@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 4jXp464vQSz71TVK for ; Mon, 23 Nov 2026 01:18:46 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp461FQ7z4c44 for ; Mon, 23 Nov 2026 01:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396726; 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=4kJFA4zP9IikrdIM/bcmqP3Pg5ob1TzTGxWybXu78n8=; b=TwzWahGljBKCVWpq6w4nBPWbCcDGCX95mZx6jga49Dm8MNvCol4msImOtily6HCyJcuoQY 3JN7oln620HhsvlY+xA6AGbKYlq9TBQPxvu0QWiY6yiBav1jvASU8OkqPZTdtUL3MVYojk A3sF4xy505zsxX9ib+c6vSS5cEWVaaHM7w+O1C7fDatlfVf6A7Kso2wtXF1dYXvW4J+2B+ AIuBiDG5N0Z+0YVIaotCQpyxFduRExPfeKNHvTQWGs66IqcUBLFiMH22pOiNsktRMRDraS 7W9U/q88fqaGfJJ8P0KdaOq7SWMYyoak/GqMcmquRwsgEQZYaB6ZRyh/IyNYbQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396726; b=j1wS02OteI/EEh1EuHLrcHGm8yVLy5MauM3cGQpxOtiAr8jZWPIOzJ2ZKym6X8ada6Wcvv 5cUS3FDl222SWAhUiDRLBUU4NXuWjXJbXbg5KoLeiVCEPMP3MXJQn0nbzAOgeaEZKNlF9v GJw1++B7GvkzgeGqEzrIIxCb7gl5+ha84nolhLQ+38FaHC8UHNGla810T5RVjxW9M/LXbz NVJ8N/x87IMCsZgwjw/RCo21mhzp2yWAqjoJtrfIXkjPVD5FlOdBWN153u8EyP1WvPU8rC ueeNHPxVNu+wOXkfJpDe9kdOo3Fqc1OCTfN/oejqvydhiDwk+zSN+yrTiHA0bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396726; 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=4kJFA4zP9IikrdIM/bcmqP3Pg5ob1TzTGxWybXu78n8=; b=vUW43yEZpbtBfbNNebhnAvQ/Yqguq1J4nLLhqXWWD4yIDyaAp3n45nvMoXXuOFzXob7jId P57uu6pb6o0yWL0NcUyabLE87y8j7f8Ldb7KblZdz/QrWWySEZ4hWGQ9xpuYZkCNQs/RN+ VCSA3deGpYNoFhIu2PrELbMcG/hDItF9uyhj/2pbbJvZBIWrWofqyOYAZ8CmgXw8NK2VRo hAAsAcmW9Cj7vbC6lEApA0WrjZydAOrFKJ9jOigaZ6zV1q5VaADIgUW4bhHXVg2ustB+AB uD1ZZ2MiAIKmScWMRflnAP3KYZ8RaYYsM2P2MCo5omZJfzTCrqe7LdLTQ4shsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp460VvgzSYn for ; Mon, 23 Nov 2026 01:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3787 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 77c26601e625 - stable/15 - contrib/kyua: update to 0.15.2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 77c26601e6255c515e0d0d1c21b1b0e8d617d16a Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:46 +0000 Message-Id: <6b039476.3787.39c4b792@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=77c26601e6255c515e0d0d1c21b1b0e8d617d16a commit 77c26601e6255c515e0d0d1c21b1b0e8d617d16a Author: Enji Cooper AuthorDate: 2026-11-19 07:02:06 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 contrib/kyua: update to 0.15.2 This change contains a few bugfixes to the test executor. MFC after: 1 week Merge commit 'dab80d5deaf7d998d587b99f7941890237960638' (cherry picked from commit c16da33701d07751bbe6871ad39582006d5281fc) --- contrib/kyua/NEWS | 18 ++ contrib/kyua/README.md | 4 +- contrib/kyua/config.h | 3 + contrib/kyua/utils/Kyuafile | 1 - contrib/kyua/utils/auto_array.hpp | 102 ---------- contrib/kyua/utils/auto_array.ipp | 227 ---------------------- contrib/kyua/utils/auto_array_fwd.hpp | 43 ---- contrib/kyua/utils/auto_array_test.cpp | 312 ------------------------------ contrib/kyua/utils/cmdline/parser.cpp | 16 +- contrib/kyua/utils/datetime.cpp | 88 +++++++++ contrib/kyua/utils/datetime.hpp | 28 +++ contrib/kyua/utils/datetime_fwd.hpp | 1 + contrib/kyua/utils/datetime_test.cpp | 117 +++++++++++ contrib/kyua/utils/fs/operations.cpp | 16 +- contrib/kyua/utils/process/systembuf.cpp | 7 +- contrib/kyua/utils/signals/timer.cpp | 75 +++++-- contrib/kyua/utils/signals/timer.hpp | 8 +- contrib/kyua/utils/signals/timer_test.cpp | 111 +++++++++-- contrib/kyua/utils/text/regex.cpp | 33 ++-- contrib/kyua/utils/text/templates.cpp | 2 +- 20 files changed, 442 insertions(+), 770 deletions(-) diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS index 50a2c8257370..3b7099fc6dbd 100644 --- a/contrib/kyua/NEWS +++ b/contrib/kyua/NEWS @@ -1,5 +1,23 @@ # Major changes between releases +## Changes in version 0.15.2 + +**Released on 2026/11/19.** + +### Bugfixes + +* #345: Use monotonic time for timer deadlines +* #352: Get rid of utils::auto_array +* #355: Use absolute deadlines in some timer activation tests +* #357: Fix UB related to iterator lifetime in text templates +* #360: fix(ci): update LLVM toolchains on macOS and Ubuntu + +### Developer Workflow Changes + +* #361: Port over dev workflow items from ATF project (commit-check, pre-commit) + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.1...kyua-0.15.2 + ## Changes in version 0.15.1 **Released on 2026/10/25.** diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md index b8b54d0413de..a5bc8db0509b 100644 --- a/contrib/kyua/README.md +++ b/contrib/kyua/README.md @@ -27,9 +27,9 @@ This is not an official Google product. ## Download -The latest version of Kyua is 0.15.0 and was released on October 7th, 2026. +The latest version of Kyua is 0.15.1 and was released on October 25th, 2026. -Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0). +Download: [kyua-0.15.1](../../releases/tag/kyua-0.15.1). See the [release notes](NEWS) for information about the changes in this and all previous releases. diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index eba9c9cb1448..cccfe36ae3a2 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -4,6 +4,9 @@ /* Define to the optind value to reset getopt processing */ #define GETOPT_OPTIND_RESET_VALUE 1 +/* Define to 1 if you have the 'clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + /* define if the compiler supports basic C++20 syntax */ #define HAVE_CXX20 1 diff --git a/contrib/kyua/utils/Kyuafile b/contrib/kyua/utils/Kyuafile index 042ad77a3fe4..4955349f2ac9 100644 --- a/contrib/kyua/utils/Kyuafile +++ b/contrib/kyua/utils/Kyuafile @@ -2,7 +2,6 @@ syntax(2) test_suite("kyua") -atf_test_program{name="auto_array_test"} atf_test_program{name="datetime_test"} atf_test_program{name="env_test"} atf_test_program{name="memory_test"} diff --git a/contrib/kyua/utils/auto_array.hpp b/contrib/kyua/utils/auto_array.hpp deleted file mode 100644 index 93b3e20223cf..000000000000 --- a/contrib/kyua/utils/auto_array.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/// \file utils/auto_array.hpp -/// Provides the utils::auto_array class. -/// -/// The class is provided as a separate module on its own to minimize -/// header-inclusion side-effects. - -#if !defined(UTILS_AUTO_ARRAY_HPP) -#define UTILS_AUTO_ARRAY_HPP - -#include "utils/auto_array_fwd.hpp" - -#include - -namespace utils { - - -namespace detail { - - -/// Wrapper class to provide reference semantics for utils::auto_array. -/// -/// This class is internally used, for example, to allow returning a -/// utils::auto_array from a function. -template< class T > -class auto_array_ref { - /// Internal pointer to the dynamically-allocated array. - T* _ptr; - - template< class > friend class utils::auto_array; - -public: - explicit auto_array_ref(T*); -}; - - -} // namespace detail - - -/// A simple smart pointer for arrays providing strict ownership semantics. -/// -/// This class is the counterpart of std::unique_ptr for arrays. The semantics of -/// the API of this class are the same as those of std::unique_ptr. -/// -/// The wrapped pointer must be NULL or must have been allocated using operator -/// new[]. -template< class T > -class auto_array { - /// Internal pointer to the dynamically-allocated array. - T* _ptr; - -public: - auto_array(T* = NULL) throw(); - auto_array(auto_array< T >&) throw(); - auto_array(detail::auto_array_ref< T >) throw(); - ~auto_array(void) throw(); - - T* get(void) throw(); - const T* get(void) const throw(); - - T* release(void) throw(); - void reset(T* = NULL) throw(); - - auto_array< T >& operator=(auto_array< T >&) throw(); - auto_array< T >& operator=(detail::auto_array_ref< T >) throw(); - T& operator[](int) throw(); - const T& operator[](int) const throw(); - operator detail::auto_array_ref< T >(void) throw(); -}; - - -} // namespace utils - - -#endif // !defined(UTILS_AUTO_ARRAY_HPP) diff --git a/contrib/kyua/utils/auto_array.ipp b/contrib/kyua/utils/auto_array.ipp deleted file mode 100644 index fd29311def8c..000000000000 --- a/contrib/kyua/utils/auto_array.ipp +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#if !defined(UTILS_AUTO_ARRAY_IPP) -#define UTILS_AUTO_ARRAY_IPP - -#include "utils/auto_array.hpp" - -namespace utils { - - -namespace detail { - - -/// Constructs a new auto_array_ref from a pointer. -/// -/// \param ptr The pointer to wrap. -template< class T > inline -auto_array_ref< T >::auto_array_ref(T* ptr) : - _ptr(ptr) -{ -} - - -} // namespace detail - - -/// Constructs a new auto_array from a given pointer. -/// -/// This grabs ownership of the pointer unless it is NULL. -/// -/// \param ptr The pointer to wrap. If not NULL, the memory pointed to must -/// have been allocated with operator new[]. -template< class T > inline -auto_array< T >::auto_array(T* ptr) throw() : - _ptr(ptr) -{ -} - - -/// Constructs a copy of an auto_array. -/// -/// \param ptr The pointer to copy from. This pointer is invalidated and the -/// new copy grabs ownership of the object pointed to. -template< class T > inline -auto_array< T >::auto_array(auto_array< T >& ptr) throw() : - _ptr(ptr.release()) -{ -} - - -/// Constructs a new auto_array form a reference. -/// -/// Internal function used to construct a new auto_array from an object -/// returned, for example, from a function. -/// -/// \param ref The reference. -template< class T > inline -auto_array< T >::auto_array(detail::auto_array_ref< T > ref) throw() : - _ptr(ref._ptr) -{ -} - - -/// Destructor for auto_array objects. -template< class T > inline -auto_array< T >::~auto_array(void) throw() -{ - if (_ptr != NULL) - delete [] _ptr; -} - - -/// Gets the value of the wrapped pointer without releasing ownership. -/// -/// \return The raw mutable pointer. -template< class T > inline -T* -auto_array< T >::get(void) throw() -{ - return _ptr; -} - - -/// Gets the value of the wrapped pointer without releasing ownership. -/// -/// \return The raw immutable pointer. -template< class T > inline -const T* -auto_array< T >::get(void) const throw() -{ - return _ptr; -} - - -/// Gets the value of the wrapped pointer and releases ownership. -/// -/// \return The raw mutable pointer. -template< class T > inline -T* -auto_array< T >::release(void) throw() -{ - T* ptr = _ptr; - _ptr = NULL; - return ptr; -} - - -/// Changes the value of the wrapped pointer. -/// -/// If the auto_array was pointing to an array, such array is released and the -/// wrapped pointer is replaced with the new pointer provided. -/// -/// \param ptr The pointer to use as a replacement; may be NULL. -template< class T > inline -void -auto_array< T >::reset(T* ptr) throw() -{ - if (_ptr != NULL) - delete [] _ptr; - _ptr = ptr; -} - - -/// Assignment operator. -/// -/// \param ptr The object to copy from. This is invalidated after the copy. -/// \return A reference to the auto_array object itself. -template< class T > inline -auto_array< T >& -auto_array< T >::operator=(auto_array< T >& ptr) throw() -{ - reset(ptr.release()); - return *this; -} - - -/// Internal assignment operator for function returns. -/// -/// \param ref The reference object to copy from. -/// \return A reference to the auto_array object itself. -template< class T > inline -auto_array< T >& -auto_array< T >::operator=(detail::auto_array_ref< T > ref) throw() -{ - if (_ptr != ref._ptr) { - delete [] _ptr; - _ptr = ref._ptr; - } - return *this; -} - - -/// Subscript operator to access the array by position. -/// -/// This does not perform any bounds checking, in particular because auto_array -/// does not know the size of the arrays pointed to by it. -/// -/// \param pos The position to access, indexed from zero. -/// -/// \return A mutable reference to the element at the specified position. -template< class T > inline -T& -auto_array< T >::operator[](int pos) throw() -{ - return _ptr[pos]; -} - - -/// Subscript operator to access the array by position. -/// -/// This does not perform any bounds checking, in particular because auto_array -/// does not know the size of the arrays pointed to by it. -/// -/// \param pos The position to access, indexed from zero. -/// -/// \return An immutable reference to the element at the specified position. -template< class T > inline -const T& -auto_array< T >::operator[](int pos) const throw() -{ - return _ptr[pos]; -} - - -/// Internal conversion to a reference wrapper. -/// -/// This is used internally to support returning auto_array objects from -/// functions. The auto_array is invalidated when used. -/// -/// \return A new detail::auto_array_ref object holding the pointer. -template< class T > inline -auto_array< T >::operator detail::auto_array_ref< T >(void) throw() -{ - return detail::auto_array_ref< T >(release()); -} - - -} // namespace utils - - -#endif // !defined(UTILS_AUTO_ARRAY_IPP) diff --git a/contrib/kyua/utils/auto_array_fwd.hpp b/contrib/kyua/utils/auto_array_fwd.hpp deleted file mode 100644 index e1522a25bf7d..000000000000 --- a/contrib/kyua/utils/auto_array_fwd.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/// \file utils/auto_array_fwd.hpp -/// Forward declarations for utils/auto_array.hpp - -#if !defined(UTILS_AUTO_ARRAY_FWD_HPP) -#define UTILS_AUTO_ARRAY_FWD_HPP - -namespace utils { - - -template< class > class auto_array; - - -} // namespace utils - -#endif // !defined(UTILS_AUTO_ARRAY_FWD_HPP) diff --git a/contrib/kyua/utils/auto_array_test.cpp b/contrib/kyua/utils/auto_array_test.cpp deleted file mode 100644 index 041eb65863ba..000000000000 --- a/contrib/kyua/utils/auto_array_test.cpp +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "utils/auto_array.ipp" - -extern "C" { -#include -} - -#include - -#include - -#include "utils/defs.hpp" - -using utils::auto_array; - - -namespace { - - -/// Mock class to capture calls to the new and delete operators. -class test_array { -public: - /// User-settable cookie to disambiguate instances of this class. - int m_value; - - /// The current balance of existing test_array instances. - static ssize_t m_nblocks; - - /// Captures invalid calls to new on an array. - /// - /// \return Nothing; this always fails the test case. - void* - operator new(const size_t /* size */) - { - ATF_FAIL("New called but should have been new[]"); - return new int(5); - } - - /// Obtains memory for a new instance and increments m_nblocks. - /// - /// \param size The amount of memory to allocate, in bytes. - /// - /// \return A pointer to the allocated memory. - /// - /// \throw std::bad_alloc If the memory cannot be allocated. - void* - operator new[](const size_t size) - { - void* mem = ::operator new(size); - m_nblocks++; - std::cout << "Allocated 'test_array' object " << mem << "\n"; - return mem; - } - - /// Captures invalid calls to delete on an array. - /// - /// \return Nothing; this always fails the test case. - void - operator delete(void* /* mem */) - { - ATF_FAIL("Delete called but should have been delete[]"); - } - - /// Deletes a previously allocated array and decrements m_nblocks. - /// - /// \param mem The pointer to the memory to be deleted. - void - operator delete[](void* mem) - { - std::cout << "Releasing 'test_array' object " << mem << "\n"; - if (m_nblocks == 0) - ATF_FAIL("Unbalanced delete[]"); - m_nblocks--; - ::operator delete(mem); - } -}; - - -ssize_t test_array::m_nblocks = 0; - - -} // anonymous namespace - - -ATF_TEST_CASE(scope); -ATF_TEST_CASE_HEAD(scope) -{ - set_md_var("descr", "Tests the automatic scope handling in the " - "auto_array smart pointer class"); -} -ATF_TEST_CASE_BODY(scope) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(copy); -ATF_TEST_CASE_HEAD(copy) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' copy " - "constructor"); -} -ATF_TEST_CASE_BODY(copy) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2(t1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(copy_ref); -ATF_TEST_CASE_HEAD(copy_ref) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' copy " - "constructor through the auxiliary ref object"); -} -ATF_TEST_CASE_BODY(copy_ref) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(get); -ATF_TEST_CASE_HEAD(get) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' get " - "method"); -} -ATF_TEST_CASE_BODY(get) -{ - test_array* ta = new test_array[10]; - auto_array< test_array > t(ta); - ATF_REQUIRE_EQ(t.get(), ta); -} - - -ATF_TEST_CASE(release); -ATF_TEST_CASE_HEAD(release) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' release " - "method"); -} -ATF_TEST_CASE_BODY(release) -{ - test_array* ta1 = new test_array[10]; - { - auto_array< test_array > t(ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - test_array* ta2 = t.release(); - ATF_REQUIRE_EQ(ta2, ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - delete [] ta1; -} - - -ATF_TEST_CASE(reset); -ATF_TEST_CASE_HEAD(reset) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' reset " - "method"); -} -ATF_TEST_CASE_BODY(reset) -{ - test_array* ta1 = new test_array[10]; - test_array* ta2 = new test_array[10]; - ATF_REQUIRE_EQ(test_array::m_nblocks, 2); - - { - auto_array< test_array > t(ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 2); - t.reset(ta2); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - t.reset(); - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(assign); -ATF_TEST_CASE_HEAD(assign) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' " - "assignment operator"); -} -ATF_TEST_CASE_BODY(assign) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2; - t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(assign_ref); -ATF_TEST_CASE_HEAD(assign_ref) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' " - "assignment operator through the auxiliary ref " - "object"); -} -ATF_TEST_CASE_BODY(assign_ref) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2; - t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(access); -ATF_TEST_CASE_HEAD(access) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' access " - "operator"); -} -ATF_TEST_CASE_BODY(access) -{ - auto_array< test_array > t(new test_array[10]); - - for (int i = 0; i < 10; i++) - t[i].m_value = i * 2; - - for (int i = 0; i < 10; i++) - ATF_REQUIRE_EQ(t[i].m_value, i * 2); -} - - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, scope); - ATF_ADD_TEST_CASE(tcs, copy); - ATF_ADD_TEST_CASE(tcs, copy_ref); - ATF_ADD_TEST_CASE(tcs, get); - ATF_ADD_TEST_CASE(tcs, release); - ATF_ADD_TEST_CASE(tcs, reset); - ATF_ADD_TEST_CASE(tcs, assign); - ATF_ADD_TEST_CASE(tcs, assign_ref); - ATF_ADD_TEST_CASE(tcs, access); -} diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp index 29dd4612f6ad..32fb14c25e97 100644 --- a/contrib/kyua/utils/cmdline/parser.cpp +++ b/contrib/kyua/utils/cmdline/parser.cpp @@ -39,8 +39,8 @@ extern "C" { #include #include #include +#include -#include "utils/auto_array.ipp" #include "utils/cmdline/exceptions.hpp" #include "utils/cmdline/options.hpp" #include "utils/format/macros.hpp" @@ -61,7 +61,7 @@ struct getopt_data : utils::noncopyable { std::string short_options; /// Representation of the long options as expected by getopt_long(3). - utils::auto_array< ::option > long_options; + std::vector< ::option > long_options; /// Auto-generated identifiers to be able to parse long options. std::map< int, const cmdline::base_option* > ids; @@ -78,7 +78,7 @@ options_to_getopt_data(const cmdline::options_vector& options, getopt_data& data) { data.short_options.clear(); - data.long_options.reset(new ::option[options.size() + 1]); + data.long_options.resize(options.size() + 1); int cur_id = 512; @@ -189,7 +189,7 @@ find_option_name(const getopt_data& data, const int getopt_optopt, const char ch = static_cast< char >(getopt_optopt); return F("-%s") % ch; } else { - for (const ::option* opt = &data.long_options[0]; opt->name != NULL; + for (const ::option* opt = data.long_options.data(); opt->name != NULL; opt++) { if (opt->val == getopt_optopt) return F("--%s") % opt->name; @@ -284,11 +284,11 @@ cmdline::parse(const cmdline::args_vector& args, { PRE_MSG(args.size() >= 1, "No progname or command name found"); - utils::auto_array< const char* > argv(new const char*[args.size() + 1]); + std::vector< const char* > argv(args.size() + 1); for (args_vector::size_type i = 0; i < args.size(); i++) argv[i] = args[i].c_str(); - argv[args.size()] = NULL; - return parse(static_cast< int >(args.size()), argv.get(), options); + argv.back() = nullptr; + return parse(static_cast< int >(args.size()), argv.data(), options); } @@ -342,7 +342,7 @@ cmdline::parse(const int argc, const char* const* argv, while ((ch = ::getopt_long(mutable_argc, mutable_argv, ("+:" + data.short_options).c_str(), - data.long_options.get(), NULL)) != -1) { + data.long_options.data(), NULL)) != -1) { if (ch == ':' ) { const std::string name = find_option_name( data, ::optopt, mutable_argv, ::optind); diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp index 174d830031d2..62101637b3b9 100644 --- a/contrib/kyua/utils/datetime.cpp +++ b/contrib/kyua/utils/datetime.cpp @@ -612,3 +612,91 @@ datetime::operator<<(std::ostream& output, const timestamp& object) { return (output << object.to_microseconds() << "us"); } + + +/// Constructs a monotonic time point measured in microseconds. +/// +/// \param useconds Microseconds since the monotonic clock's origin. +datetime::monotonic_timestamp::monotonic_timestamp(const int64_t useconds) : + _useconds(useconds) +{ +} + + +/// Constructs a monotonic time point from a count of microseconds. +/// +/// \param useconds Microseconds since the monotonic clock's origin. +/// +/// \return A new monotonic time point. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::from_microseconds(const int64_t useconds) +{ + return monotonic_timestamp(useconds); +} + + +/// Constructs a time point representing the current monotonic time. +/// +/// The monotonic clock is independent of calendar clock adjustments. +/// +/// \return A new monotonic time point. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::now(void) +{ + ::timespec data; + if (::clock_gettime(CLOCK_MONOTONIC, &data) == -1) + UNREACHABLE_MSG("clock_gettime(CLOCK_MONOTONIC) failed"); + return monotonic_timestamp(static_cast< int64_t >(data.tv_sec) * 1000000 + + data.tv_nsec / 1000); +} + + +/// Returns the number of microseconds since the monotonic clock's origin. +/// +/// \return A number of microseconds, unrelated to the calendar epoch. +int64_t +datetime::monotonic_timestamp::to_microseconds(void) const +{ + return _useconds; +} + + +/// Calculates the addition of a delta to a monotonic time point. +/// +/// \param other The delta to add. +/// +/// \return A new monotonic time point at the resulting deadline. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::operator+(const datetime::delta& other) const +{ + return monotonic_timestamp(_useconds + other.to_microseconds()); +} + + +/// Calculates the delta between two monotonic time points. +/// +/// \param other The subtrahend. +/// +/// \return The difference between this object and the other object. +/// +/// \throw std::runtime_error If the subtraction would result in a negative time +/// delta, which is not supported. +datetime::delta +datetime::monotonic_timestamp::operator-( + const monotonic_timestamp& other) const +{ + return delta::from_microseconds(_useconds - other._useconds); +} + + +/// Injects the object into a stream. +/// +/// \param output The stream into which to inject the object. +/// \param object The object to format. +/// +/// \return The output stream. +std::ostream& +datetime::operator<<(std::ostream& output, const monotonic_timestamp& object) +{ + return output << object.to_microseconds() << "us"; +} diff --git a/contrib/kyua/utils/datetime.hpp b/contrib/kyua/utils/datetime.hpp index 0c24f332f6d3..83ff866dc9c8 100644 --- a/contrib/kyua/utils/datetime.hpp +++ b/contrib/kyua/utils/datetime.hpp @@ -38,6 +38,7 @@ extern "C" { #include } *** 740 LINES SKIPPED *** From nobody Mon Nov 23 01:18:47 2026 X-Original-To: dev-commits-src-branches@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 4jXp472n6Qz71TVM for ; Mon, 23 Nov 2026 01:18:47 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp471ZxMz4byp for ; Mon, 23 Nov 2026 01:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396727; 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=1ILmz+YhDRjHqq58u6YWMeWpeJpNxOzMWCxOx2+FkWY=; b=qMYaMcu0umwqLWfOOpNpt92tYkMc6NF19FQQrygxecOoWxmrCFWbjAKL2w+yP35HhREIVJ 58rP+3BW7Ca5MextIA7l+5fsW+Yr87idf9M4wwh8sxTJQjNuYymJJKmnGvCnc8UOBDUZHb cjrol7d7bZ58KLr+DvqUHkJaI104tils1DR4sg79e4Z792v5onebSW91ge21l/BUcfOJHO PUPLKiG6xXYSAXdskZ1XAN1szvKnQAv5TAAvlHamjVr2D5XrBkwpOadmOoMFIhLeGUvziV lrJp1nwAThRv58FaFGjlhQOumOKcJUnSrzeCZ83sBNYGqSlz5/RUWjDFJXiJqw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396727; b=GzJ0D0p+kysAVPptfRDbFRzW0YOnw8YDxLSDhL5WyDO4XBvK0RlaTInnMRYHteHlSHjXTa 8j6unsAetKNqgJtqzX+snLdX/93leH1P+2vmo08cKH8hKzYhapgCcb07UADaD7stsoHFGo l60Y5IRFecqp6KCaTgRfbZU2CZW3sFsil0T/ojAYDl0x7ETRYhh8Cetkw25wOzaCB6iVvo Gzh4C54/2/TAbOxbwHET94h53ARsFDPwExpm3TpNq4fGaTir9ftCeIjPXnTFUxsVB+O2r6 D8X3k0a1JBudL90oI3KJ5awQy9L2Jin4xT0u69aMgNfLLn05Y43E7HE+xHzwPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396727; 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=1ILmz+YhDRjHqq58u6YWMeWpeJpNxOzMWCxOx2+FkWY=; b=NXWvJYYota3y92NE1zRt+QscW313EgIIdp6uD9TrsUIOsMPOnmihec7L2lBLCWmgyqMIhQ QIpflVdkYE/lCHQky6bO1QLdIdHTlPais2olECaO3+PbPC7R+/Eg7uclFFExdYu782l85N 75sgiuxhU1JaqAk/Zh5IuAio+djlGtZVUDIzhTewxy8UBNDlBE9S0Gw8SfuMgwCtjJgMew jCOWzSQkWzaJkZb8oeDJoYpMNVOuQd6b1DY/xdi3++WdIkwe5W4DBwqoWckzn/BesrO3u2 wQHeaHzPn4HnQ/igTw4MNawCjf2CHFYlqI0/W0cNR+W7OzrJZ6yLrl7BIUfDMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp470rT8zSH3 for ; Mon, 23 Nov 2026 01:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 405a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 6c5fc2ba4239 - stable/15 - contrib/kyua: update config.h for 0.15.1 -> 0.15.2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6c5fc2ba4239d899c07693644912a575363a9757 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:47 +0000 Message-Id: <6b039477.405a.35f290b4@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=6c5fc2ba4239d899c07693644912a575363a9757 commit 6c5fc2ba4239d899c07693644912a575363a9757 Author: Enji Cooper AuthorDate: 2026-11-20 00:03:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 contrib/kyua: update config.h for 0.15.1 -> 0.15.2 This was accidentally missed in the prior commit. This commit addresses a largely cosmetic issue. MFC after: 6 days MFC with: c16da33701d0 Fixes: c16da33701d0 contrib/kyua: update to 0.15.2 (cherry picked from commit d9daf5ae796518af1793f919156fb6feba05959d) --- contrib/kyua/config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index cccfe36ae3a2..d456545697b3 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -122,7 +122,7 @@ #define PACKAGE_NAME "Kyua" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Kyua 0.15.1" +#define PACKAGE_STRING "Kyua 0.15.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "kyua" @@ -131,7 +131,7 @@ #define PACKAGE_URL "https://github.com/freebsd/kyua/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.15.1" +#define PACKAGE_VERSION "0.15.2" /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -139,4 +139,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.15.1" +#define VERSION "0.15.2" From nobody Mon Nov 23 01:18:48 2026 X-Original-To: dev-commits-src-branches@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 4jXp486NFfz71Tfh for ; Mon, 23 Nov 2026 01:18:48 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp481WXZz4bqk for ; Mon, 23 Nov 2026 01:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396728; 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=+QZh0e7IWNLX0I/2GpcXd6RXkAabyg3ExX4QALzGQAA=; b=vi14ng7NUeRifKpmS2b5Qz+2oXEXwrIPYWyQYDg9NcjmxwYlKdf9eEg1+HRqeeRadYpBRx uDzc5k2AYJNy8bkwvYGDZSX682kU6CH5c20h0136Kf6sQFTkrArSs4g+2wQUDsq+E6mKWa ufV49FGKppnAk79F7FeX9jgGe9vHXGtbhYsm5/xCDOQ5Lutzmp7Cd/WpeamSjm/JgaXTO0 bfYaIFhpRuFt05kCPmRH9qGWpgcwiFYP/DlG8P/rsjwkJKFkHHSpeHVd/eHrLvk6k4ifo0 /PLPUe5Ej4DFo8EmE7rHUUCKEuEU1PCXSK+Cd/ABSgH08SpsIFSXJU4XfjiPKg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396728; b=HnvKaLot5U5AnYi5miXKSKrCABedWKbgznRkDRCGWnMW6QvWofTefG1msta738REw6g2mh G3+eFgZB85Al1wfHPXT55NrpZEcz7GHTJj7S8Np1l2QuKcwnTN0SF0IolslfVkmKrQt6Jj WIjCDFkvhGd6zPTIS51mzuRb7ji//WEeQo7SrUDSyRx8dllp1aG5lG2qxfkPQlgEGiOdV5 MsM6Zwe7ARWzONdNhYjdSUF1mN6+kW/asbulEx6zouAngcj/EHdNOBLvgqv4Czsv57WoiY 9bwgyRnYoyZ+hAPmyqhWjuT+3QLCpCPLBWZEgX5HyKg93JdJ0mx8BnTf8viYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396728; 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=+QZh0e7IWNLX0I/2GpcXd6RXkAabyg3ExX4QALzGQAA=; b=tCb2/k+7KXnwCJz2ftUlL3cgfeNC+7Il4JZe3lj5b7f+fK9SikG4tiKQzuzbionVtNjLBw InbJWCAOCnsOp9rhA5AiJZkPuLdHkhXcslpOYmY1jnyhUC9soz6pPvo87NRroXZX1vSlcb lhxJKx3pXwNxCLi/+qt20CzPCnuvRH5eQmmCfL5NbHIz6pgrmdaSe/AWPF8RnVl5VkO80I GKCiXoQaN7OiDWpvP1jVte0TAr/tK3fhc4usBQuGRm3885oLpbNRYwvmIW/Swm2Qc5jvM8 sJG7PDQsK5nY5PdBy3yt15nLEAJFrrQEctgHTnNx+i4NtbEP3yp1Aw3UoWvEuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp481BDSzSH4 for ; Mon, 23 Nov 2026 01:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 7687d4ca4600 - stable/15 - atf, lutok, kyua: compile with CXXSTD=gnu++20 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:48 +0000 Message-Id: <6b039478.36b1.1bfb55e9@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4 commit 7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4 Author: Enji Cooper AuthorDate: 2026-10-31 20:13:06 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 atf, lutok, kyua: compile with CXXSTD=gnu++20 All three of the test infrastructure components require at least C++20 in order to build. Make that version the default to better match what is required in recent versions of the projects. MFC after: 1 week (cherry picked from commit 0e58fb271c6e1cbd4b2ae5d33da181b7e7c2f0d5) --- lib/atf/common.mk | 2 ++ lib/liblutok/Makefile | 2 ++ usr.bin/kyua/Makefile | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/atf/common.mk b/lib/atf/common.mk index e1967097d2c1..4b0f9911eecd 100644 --- a/lib/atf/common.mk +++ b/lib/atf/common.mk @@ -16,3 +16,5 @@ atf-version-real: .PHONY @grep 'define VERSION' ${ATF}/config.h \ | cut -d '"' -f 2 >atf-version-real CLEANFILES+= atf-version atf-version-real + +CXXSTD= gnu++20 diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile index 08737afbb61a..a145cf3dab52 100644 --- a/lib/liblutok/Makefile +++ b/lib/liblutok/Makefile @@ -18,4 +18,6 @@ CFLAGS+= -I${SRCTOP}/contrib/lutok/include \ WARNS?= 3 SHLIB_MAJOR= 0 +CXXSTD= gnu++20 + .include diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 192a4e68734a..1b6889376f60 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -172,6 +172,8 @@ SRCS+= os/freebsd/execenv_jail.cpp \ LIBADD+= jail .endif +CXXSTD= gnu++20 + FILESGROUPS= DOCS MISC STORE .if ${MK_EXAMPLES} != "no" From nobody Mon Nov 23 01:18:49 2026 X-Original-To: dev-commits-src-branches@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 4jXp495VTYz71Tlf for ; Mon, 23 Nov 2026 01:18:49 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp492GRlz4c6K for ; Mon, 23 Nov 2026 01:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2pTIVEp6VlhCeurK2/RmoO+4R4AouBwiKI38Dx6H9Fw=; b=g1K+lET9BPe49cdOKfGCP8ftzq1BeiqE62XjAXacqcSyMFnLWRB+HQNQULVu9gUBPdw2d6 WcPw8ao1Unzk/lLi6cDkYxS2qgRaUr7t8nJIfjJ3cg7aLyDBGhZpSXQSAP5WzacKBi1eqj yEFE9NRLn08iQ9TkDww45EW5bXq0OU8+YG8PmuXR4gRQKfp/oc2aD7jBjblisB+Qwlujix GGG8IJraT+kyY2w6HpyOhIVZeKa3ecLl/y6b+F8hWOLncaEIimU4tMKplAMIWWA/sSl7t5 2l9UrevQ0youmg/UAKL4rcdQ2m3MtbvnN30NWi4Pt4cix2THpJ+HUok68dB5qw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396729; b=xEOCTNdxnALd0h7FEymbVzb2gfO7uqCYi6b0cCSvopzp8mCkBGxbFRbuC6eaMggY4HL6tW 02B5UCjHKfPFj1uktk6Jm6sKJmt7zKnzlvHFsf/rmrz/AWH3b2JtM+uDP56Kzq4l32LHow K76znaiC9J5MiyqRUFhutCt8FeJV0gOFWWUsqjymfD2+0BC77kU4fg8xSUApZekKL7eP91 xg/pALo9Z53+AiQSC59PeUZHyg1fvEqPCgGTQiP5NYMdCOxL9x67iriDHl3lw2r5tRNo/l CLUXaawspRZAanzalwBz4xstSQA0SEPkqBgTygvb+qEiHEhTQHDI5yVYZZW/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2pTIVEp6VlhCeurK2/RmoO+4R4AouBwiKI38Dx6H9Fw=; b=EnhgtEYEwnP2QfyBLy4Hl7/Nc761p4QMNqIR/K1vXiUm1KPBuT3jfh35UI8Gsc8vyNjQF8 /n0U3S/MOwpS9BIrDVSbwSjKbZ8KOymY9mpxXkDaXymDAFD1EJccVPTkev/jCUZjs27AgK ckiVtQ2KKICRVuTvCIvUyuh/JCj+DC5YQKBU/delkU0H3agujCoEd26ET9gFP7JVzyi2OQ pvttAP8y9uC6sHCCjz1lBkJT5EZC0/APzRsXZq4SgGw37uVT0xKYL+8FCednfeWqWUT6m3 RTbpB1PQGc151PHjI1ywD0dQTeTCbKNnyi7B820jbWsVuXJoSPBhFVWb7Q8yDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp491lykzSbc for ; Mon, 23 Nov 2026 01:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3acb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: d0322012f076 - stable/15 - kyua: Add "prepare" command List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d0322012f0767cbb32ff5f1a098509e634a8e428 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:49 +0000 Message-Id: <6b039479.3acb.4c6e4146@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d0322012f0767cbb32ff5f1a098509e634a8e428 commit d0322012f0767cbb32ff5f1a098509e634a8e428 Author: Igor Ostapenko AuthorDate: 2026-08-23 22:42:48 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 kyua: Add "prepare" command This introduces the requirement preparation handler concept, with the first handler implemented to load the required kernel modules. Running without arguments lists all available handlers: kyua prepare Currently there are only two handlers: all: runs all available handlers kmods: loads the modules declared by required_kmods metadata The dry run option lists the required modules without actual loading: kyua prepare { --dry-run | -n } kmods The "prepare" command traverses only the given tree of tests, i.e., the following invocation lists all required modules for the whole test suite: kyua prepare -k /usr/tests/Kyuafile -n kmods , while this one is limited to the pf tests only: kyua prepare -k /usr/tests/sys/netpfil/pf/Kyuafile -n kmods Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D48087 (cherry picked from commit edb230c4af499203d7a6894b3711fe6574b26040) --- contrib/kyua/cli/cmd_prepare.cpp | 76 +++++++++++++++ contrib/kyua/cli/cmd_prepare.hpp | 53 +++++++++++ contrib/kyua/cli/main.cpp | 2 + contrib/kyua/engine/prepare/prepare.cpp | 83 ++++++++++++++++ contrib/kyua/engine/prepare/prepare.hpp | 107 +++++++++++++++++++++ contrib/kyua/engine/prepare/prepare_all.cpp | 66 +++++++++++++ contrib/kyua/engine/prepare/prepare_all.hpp | 53 +++++++++++ contrib/kyua/model/metadata.hpp | 4 +- contrib/kyua/os/freebsd/main.cpp | 3 + contrib/kyua/os/freebsd/prepare_kmods.cpp | 143 ++++++++++++++++++++++++++++ contrib/kyua/os/freebsd/prepare_kmods.hpp | 55 +++++++++++ usr.bin/kyua/Makefile | 8 +- 12 files changed, 649 insertions(+), 4 deletions(-) diff --git a/contrib/kyua/cli/cmd_prepare.cpp b/contrib/kyua/cli/cmd_prepare.cpp new file mode 100644 index 000000000000..a3ba5c3285a1 --- /dev/null +++ b/contrib/kyua/cli/cmd_prepare.cpp @@ -0,0 +1,76 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "cli/cmd_prepare.hpp" + +#include "cli/common.ipp" +#include "engine/prepare/prepare.hpp" +#include "utils/cmdline/options.hpp" + +namespace cmdline = utils::cmdline; +namespace config = utils::config; +namespace prepare = engine::prepare; + +using cli::cmd_prepare; + + +/// Default constructor for cmd_prepare. +cmd_prepare::cmd_prepare(void) : cli_command( + "prepare", "[handler-name ...]", 0, -1, + "Prepares environment and declared requirements before testing") +{ + add_option(kyuafile_option); + add_option(build_root_option); + add_option(cmdline::bool_option('n', "dry-run", "Do not alter the system")); +} + + +/// Entry point for the "prepare" subcommand. +/// +/// \param ui Object to interact with the I/O of the program. +/// \param cmdline Representation of the command line to the subcommand. +/// \param user_config The runtime configuration of the program. +/// +/// \return 0 if successful, 1 otherwise. +int +cmd_prepare::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) +{ + // List available preparation handlers + if (cmdline.arguments().empty()) { + for (auto& h : prepare::handlers()) { + ui->out(h->name(), false); + ui->out("\t\t\t", false); + ui->out(h->description()); + } + return EXIT_SUCCESS; + } + + // Or run the given ones + return prepare::run(cmdline.arguments(), ui, cmdline, user_config); +} diff --git a/contrib/kyua/cli/cmd_prepare.hpp b/contrib/kyua/cli/cmd_prepare.hpp new file mode 100644 index 000000000000..322b2baf9e8f --- /dev/null +++ b/contrib/kyua/cli/cmd_prepare.hpp @@ -0,0 +1,53 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file cli/cmd_prepare.hpp +/// Provides the cmd_prepare class. + +#if !defined(CLI_CMD_PREPARE_HPP) +#define CLI_CMD_PREPARE_HPP + +#include "cli/common.hpp" + +namespace cli { + + +/// Implementation of the "prepare" subcommand. +class cmd_prepare : public cli_command +{ +public: + cmd_prepare(void); + + int run(utils::cmdline::ui*, const utils::cmdline::parsed_cmdline&, + const utils::config::tree&); +}; + + +} // namespace cli + +#endif // !defined(CLI_CMD_PREPARE_HPP) diff --git a/contrib/kyua/cli/main.cpp b/contrib/kyua/cli/main.cpp index 6fd17c140270..ca15a06a999a 100644 --- a/contrib/kyua/cli/main.cpp +++ b/contrib/kyua/cli/main.cpp @@ -49,6 +49,7 @@ extern "C" { #include "cli/cmd_debug.hpp" #include "cli/cmd_help.hpp" #include "cli/cmd_list.hpp" +#include "cli/cmd_prepare.hpp" #include "cli/cmd_report.hpp" #include "cli/cmd_report_html.hpp" #include "cli/cmd_report_junit.hpp" @@ -195,6 +196,7 @@ safe_main(cmdline::ui* ui, int argc, const char* const argv[], commands.insert(new cli::cmd_debug(), "Workspace"); commands.insert(new cli::cmd_list(), "Workspace"); + commands.insert(new cli::cmd_prepare(), "Workspace"); commands.insert(new cli::cmd_test(), "Workspace"); commands.insert(new cli::cmd_report(), "Reporting"); diff --git a/contrib/kyua/engine/prepare/prepare.cpp b/contrib/kyua/engine/prepare/prepare.cpp new file mode 100644 index 000000000000..218b236450c0 --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare.cpp @@ -0,0 +1,83 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/prepare/prepare.hpp" + +#include "engine/prepare/prepare_all.hpp" + +namespace prepare = engine::prepare; + + +/// List of registered requirement preparation handlers. +/// +/// Use register_handler() to add an entry to this global list. +static std::vector< std::shared_ptr< prepare::handler > > _handlers = { + std::shared_ptr< prepare::handler >(new prepare::prepare_all()) +}; + + +void +prepare::register_handler(const std::shared_ptr< handler > handler) +{ + _handlers.push_back(handler); +} + + +const std::vector< std::shared_ptr< prepare::handler > > +prepare::handlers() +{ + return _handlers; +} + + +int +prepare::run(const std::vector< std::string >& handler_names, + cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) +{ + for (auto& hname : handler_names) { + std::shared_ptr< prepare::handler > handler = nullptr; + for (auto& h : prepare::handlers()) + if (h->name() == hname) { + handler = h; + break; + } + + if (handler == nullptr) { + ui->out(F("Unknown requirement preparation handler: %s") % hname); + return EXIT_FAILURE; + } + + if (handler->exec(ui, cmdline, user_config) != 0) + // suppress the actual code -- main limits possible exit codes + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/contrib/kyua/engine/prepare/prepare.hpp b/contrib/kyua/engine/prepare/prepare.hpp new file mode 100644 index 000000000000..2ee12b11a623 --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare.hpp @@ -0,0 +1,107 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/prepare/prepare.hpp +/// Requirement preparation subsystem interface. + +#if !defined(ENGINE_PREPARE_HPP) +#define ENGINE_PREPARE_HPP + +#include +#include + +#include "utils/cmdline/parser.ipp" +#include "utils/cmdline/ui.hpp" +#include "utils/config/tree.ipp" + +namespace cmdline = utils::cmdline; +namespace config = utils::config; + + +namespace engine { +namespace prepare { + + +/// Abstract interface of a requirement preparation handler. +class handler { +public: + /// Constructor. + handler() {} + + /// Destructor. + virtual ~handler() {} + + /// Returns name of the handler. + virtual const std::string& name() const = 0; + + /// Returns short description of the handler. + virtual const std::string& description() const = 0; + + /// Runs the requirement preparation handler. + /// + /// \param ui Object to interact with the I/O of the program. + /// \param cmdline Representation of the command line to the subcommand. + /// \param user_config The runtime configuration of the program. + /// + /// \return 0 to indicate success. + virtual int exec(cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const = 0; +}; + + +/// Registers a requirement preparation handler. +/// +/// \param handler A requirement preparation handler. +void register_handler(const std::shared_ptr< handler > handler); + + +/// Returns the list of registered requirement preparation handlers. +/// +/// \return A vector of pointers to requirement preparation handlers. +const std::vector< std::shared_ptr< handler > > handlers(); + + +/// Run named handlers. +/// +/// \param handler_names Names of the handlers to run. +/// \param ui Object to interact with the I/O of the program. +/// \param cmdline Representation of the command line to the subcommand. +/// \param user_config The runtime configuration of the program. +/// +/// \return 0 to indicate success. +int run(const std::vector< std::string >& handler_names, + cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config); + + +} // namespace prepare +} // namespace engine + +#endif // !defined(ENGINE_PREPARE_HPP) diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp new file mode 100644 index 000000000000..db8ea330a51e --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare_all.cpp @@ -0,0 +1,66 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/prepare/prepare_all.hpp" + +static const std::string _name = "all"; +static const std::string _description = "Run all preparations"; + +namespace prepare = engine::prepare; + + +const std::string& +prepare::prepare_all::name() const +{ + return _name; +} + + +const std::string& +prepare::prepare_all::description() const +{ + return _description; +} + + +int +prepare::prepare_all::exec(cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const +{ + for (auto& handler : prepare::handlers()) { + if (handler->name() == this->name()) + continue; + + int error = handler->exec(ui, cmdline, user_config); + if (error != EXIT_SUCCESS) + return error; + } + + return EXIT_SUCCESS; +} diff --git a/contrib/kyua/engine/prepare/prepare_all.hpp b/contrib/kyua/engine/prepare/prepare_all.hpp new file mode 100644 index 000000000000..7c5c54fe269c --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare_all.hpp @@ -0,0 +1,53 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/prepare/prepare_all.hpp +/// The requirement preparation handler which runs all registered handlers. + +#if !defined(ENGINE_PREPARE_ALL_HPP) +#define ENGINE_PREPARE_ALL_HPP + +#include "engine/prepare/prepare.hpp" + +namespace engine { +namespace prepare { + + +class prepare_all : public prepare::handler { +public: + const std::string& name() const; + const std::string& description() const; + int exec(cmdline::ui*, const cmdline::parsed_cmdline&, + const config::tree&) const; +}; + + +} // namespace prepare +} // namespace engine + +#endif // !defined(ENGINE_PREPARE_ALL_HPP) diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp index eee7eaf0f7c4..d915677eb41d 100644 --- a/contrib/kyua/model/metadata.hpp +++ b/contrib/kyua/model/metadata.hpp @@ -75,8 +75,8 @@ public: const strings_set& required_configs(void) const; const utils::units::bytes& required_disk_space(void) const; const paths_set& required_files(void) const; - const utils::units::bytes& required_memory(void) const; const strings_set& required_kmods(void) const; + const utils::units::bytes& required_memory(void) const; const paths_set& required_programs(void) const; const std::string& required_user(void) const; const utils::datetime::delta& timeout(void) const; @@ -121,8 +121,8 @@ public: metadata_builder& set_required_configs(const strings_set&); metadata_builder& set_required_disk_space(const utils::units::bytes&); metadata_builder& set_required_files(const paths_set&); - metadata_builder& set_required_memory(const utils::units::bytes&); metadata_builder& set_required_kmods(const strings_set&); + metadata_builder& set_required_memory(const utils::units::bytes&); metadata_builder& set_required_programs(const paths_set&); metadata_builder& set_required_user(const std::string&); metadata_builder& set_string(const std::string&, const std::string&); diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 1fe4fca8cae4..57e5cc8e8d97 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -63,6 +63,9 @@ freebsd::main(const int, const char* const* const) prepare::register_handler( std::make_shared()); + + prepare::register_handler( + std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods())); #endif return 0; diff --git a/contrib/kyua/os/freebsd/prepare_kmods.cpp b/contrib/kyua/os/freebsd/prepare_kmods.cpp new file mode 100644 index 000000000000..91771f3aedfd --- /dev/null +++ b/contrib/kyua/os/freebsd/prepare_kmods.cpp @@ -0,0 +1,143 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/prepare_kmods.hpp" + +#include "cli/common.hpp" +#include "drivers/list_tests.hpp" +#include "engine/filters.hpp" +#include "model/metadata.hpp" +#include "model/test_case.hpp" +#include "model/test_program.hpp" + +#include + +// FreeBSD kldload syscall +extern "C" { +#include +#include +} + + +namespace { + + +static const std::string _name = "kmods"; +static const std::string _description = "FreeBSD: load modules specified " + "in the required_kmods metadata"; + + +/// Hooks for list_tests to examine test cases as they come. +class list_hooks : public drivers::list_tests::base_hooks { + /// Collected names of required kernel modules. + std::set< std::string >& _modules; + +public: + /// Initializes the hooks. + /// + /// \param modules_ The set of modules to fill. + list_hooks(std::set< std::string >& modules_) : + _modules(modules_) + { + } + + /// Examine a test case as soon as it is found. + /// + /// \param test_program The test program containing the test case. + /// \param test_case_name The name of the located test case. + void + got_test_case(const model::test_program& test_program, + const std::string& test_case_name) + { + auto test_case = test_program.find(test_case_name); + auto kmods = test_case.get_metadata().required_kmods(); + _modules.insert(kmods.begin(), kmods.end()); + } +}; + + +} // anonymous namespace + + +namespace freebsd { + + +const std::string& +prepare_kmods::name() const +{ + return _name; +} + + +const std::string& +prepare_kmods::description() const +{ + return _description; +} + + +int +prepare_kmods::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const +{ + int err = 0; + + // Collect required modules + std::set< std::string > modules; + list_hooks hooks(modules); + const std::set< engine::test_filter > nofilters; + const drivers::list_tests::result result = drivers::list_tests::drive( + cli::kyuafile_path(cmdline), cli::build_root_path(cmdline), + nofilters, user_config, hooks); + + // Nothing to do + if (modules.empty()) + return 0; + + // Announce the work + ui->out("kldload", false); + for (auto& m : modules) + ui->out(F(" %s") % m, false); + ui->out(""); + + if (cmdline.has_option("dry-run")) + return 0; + + // Load the modules + for (auto& m : modules) { + if (::kldload(m.c_str()) != -1 || errno == EEXIST) + continue; + ui->out(F("WARN: cannot kldload %s") % m); + err = EINVAL; + } + + return err; +} + + +} // namespace freebsd diff --git a/contrib/kyua/os/freebsd/prepare_kmods.hpp b/contrib/kyua/os/freebsd/prepare_kmods.hpp new file mode 100644 index 000000000000..36a3236a4e2d --- /dev/null +++ b/contrib/kyua/os/freebsd/prepare_kmods.hpp @@ -0,0 +1,55 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/prepare_kmods.hpp +/// The preparation handler which loads FreeBSD modules declared via +/// "required_kmods" metadata. + +#if !defined(FREEBSD_PREPARE_KMODS_HPP) +#define FREEBSD_PREPARE_KMODS_HPP + +#include "engine/prepare/prepare.hpp" + +namespace prepare = engine::prepare; + + +namespace freebsd { + + +class prepare_kmods : public prepare::handler { +public: + const std::string& name() const; + const std::string& description() const; + int exec(cmdline::ui*, const cmdline::parsed_cmdline&, + const config::tree&) const; +}; + + +} // namespace freebsd + +#endif // !defined(FREEBSD_PREPARE_KMODS_HPP) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 1b6889376f60..68b3a064280b 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -127,11 +127,14 @@ SRCS+= engine/atf.cpp \ engine/tap_parser.cpp \ engine/scheduler.cpp \ engine/execenv/execenv.cpp \ - engine/execenv/execenv_host.cpp + engine/execenv/execenv_host.cpp \ + engine/prepare/prepare.cpp \ + engine/prepare/prepare_all.cpp SRCS+= os/freebsd/execenv_jail_manager.cpp \ os/freebsd/main.cpp \ - os/freebsd/reqs_checker_kmods.cpp + os/freebsd/reqs_checker_kmods.cpp \ + os/freebsd/prepare_kmods.cpp SRCS+= store/dbtypes.cpp \ store/exceptions.cpp \ @@ -156,6 +159,7 @@ SRCS+= cli/cmd_about.cpp \ cli/cmd_debug.cpp \ cli/cmd_help.cpp \ cli/cmd_list.cpp \ + cli/cmd_prepare.cpp \ cli/cmd_report.cpp \ cli/cmd_report_html.cpp \ cli/cmd_report_junit.cpp \ From nobody Mon Nov 23 01:18:50 2026 X-Original-To: dev-commits-src-branches@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 4jXp4B59vfz71TXN for ; Mon, 23 Nov 2026 01:18: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4B3zLyz4c0D for ; Mon, 23 Nov 2026 01:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rS7YxNrRjI6EPu4IgoMjXDw316m/InE2uk9mdP37hkM=; b=B0euwRJpbxEX3yhw4AgIIhWnkWrJ9jlY+d/qPrgRo78cpJVbPyzJFtoOc78f/UqEIL3+Ac ZYwDrhN9o43mWDms5JV1ygEt9p9ltiBotfXkkJPQ2gYguUDvlkdF1qOGowDUmd+vQloSOq O2jh93pLBQDPdanhufEQ3cXEfO/U87XkwBFaoQEJ+fZcQTCyp5GHnhegM/jcWsVEwHEM+7 5VutOqcE3K684ZNeEeCvB2advyhEmeK3IY0AEA2K7DUyuXYfveo0uwX6MM7dQbKj61qZVL grdfPzB2oKjhwQNVIE5KHqfrg+dV6HLEqyGIyTHbWpqX8o08ds7dcM5dEYN5wg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396730; b=kBS0fs0nd4DXs1SXtBk1mbTrCK/wnH4JNFibf7EVyTKnwoIeQ0f4mBFKu8VV0hXVhD+rqp Ax7drGevtf/XbywlP2oVpOGAQ7tUZ8Qd6SF0Uk8c/fjU9iEowZFAjEUjxpAlfXHcF2km2x UvDfNqz/gBuI3ePOYDbcZb9LpS6D3VWdOuRf4L8wBAzhxleZtuP7ufpNhXOpUkUZbq/OpZ NKk2Os+wxNCoUfXTVvpw10TZWCnavuEabpk3Z2CIJ/SpjFsP5d5Zdzo5UQzoJ56rtzJwdf cMZcSOdvfrYQC8JagETxLBLBxbzeqPJWVPfd5AN4QtFTlZMvUhA88xLUFPfdsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rS7YxNrRjI6EPu4IgoMjXDw316m/InE2uk9mdP37hkM=; b=MiWTyEHYGlBWo/Ptcf5ykZ+qP4UjRd/TO2rKTzVmqa0CW0pI5uQQ28yIgmRZipDaLtS0T6 PsyvVTuLV2+FOEdi/FzSGJj6dTp267FfqFd1HUBeLNVI9iLXLzfDFSn+T4Yv4fzFtGskCB 1BZBHK5peeL7MBpcpYaHhzCKUEyDg48xpFC8g2Z9+LGgRo/hbkNlwFNacBrfGSjc74jrfx 817TIQXdmDBzOPEJK+X7ASnwIC3Mj8QeZMTvhi1cMwI+pRddIt8vEs4I/8KNVSmTEefl8L mG38mb5w88or3GhWCUWGok8xaVeR7kMmmR0ZfJGa4d7/Ks+w41Lu+4OBzOIQ6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4B1vNkzSKH for ; Mon, 23 Nov 2026 01:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Siva Mahadevan From: Enji Cooper Subject: git: 281f1610f178 - stable/15 - contrib/kyua: fix -Wshadow error List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 281f1610f178192bb708083f768d5bf5135a2769 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:50 +0000 Message-Id: <6b03947a.f35.51005ac7@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=281f1610f178192bb708083f768d5bf5135a2769 commit 281f1610f178192bb708083f768d5bf5135a2769 Author: Siva Mahadevan AuthorDate: 2026-09-05 14:12:11 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 contrib/kyua: fix -Wshadow error This fixes the build with gcc 14: /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow] 56 | for (auto& handler : prepare::handlers()) { | ^~~~~~~ In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35, from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29: /usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here 51 | class handler { | ^ Fixes: edb230c4af499203d7a6894b3711fe6574b26040 Reviewed by: igoro, rlibby, ngie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59346 (cherry picked from commit a73bb621ca361edc678bbf49f3ca1acca8aa0344) --- contrib/kyua/engine/prepare/prepare_all.cpp | 6 +++--- contrib/kyua/os/freebsd/main.cpp | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp index db8ea330a51e..73591ef5822a 100644 --- a/contrib/kyua/engine/prepare/prepare_all.cpp +++ b/contrib/kyua/engine/prepare/prepare_all.cpp @@ -53,11 +53,11 @@ prepare::prepare_all::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, const config::tree& user_config) const { - for (auto& handler : prepare::handlers()) { - if (handler->name() == this->name()) + for (auto& h : prepare::handlers()) { + if (h->name() == this->name()) continue; - int error = handler->exec(ui, cmdline, user_config); + int error = h->exec(ui, cmdline, user_config); if (error != EXIT_SUCCESS) return error; } diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 57e5cc8e8d97..1fe4fca8cae4 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -63,9 +63,6 @@ freebsd::main(const int, const char* const* const) prepare::register_handler( std::make_shared()); - - prepare::register_handler( - std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods())); #endif return 0; From nobody Mon Nov 23 01:18:51 2026 X-Original-To: dev-commits-src-branches@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 4jXp4C5Z1Lz71TZZ for ; Mon, 23 Nov 2026 01:18:51 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4C2gXcz4c29 for ; Mon, 23 Nov 2026 01:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8D6Ftbs1mUMLjjv/crBLpWST0nBaHqjzNWqEgjdOOkg=; b=nKzA8QUM3tEuCpu3rd6MUjCPDJxeWn4iMWJKC3bTvpdL59O84/7Wtg0Y1k2wpekhnMmCkn BrsDbMXWN/H2DSd4thefpJgEj6osyMdQL24IedaEr9DxLEMK72QZL3aRNDhFXYBasNDftg 0fTfJ3z8YlkNA4lBXrsKyBReo7pPTZci9/Wj/iWYfcngFt/mTH++gw2msQ1FeXgNmwU6aD 5/PtfL+DVfvvzpfmAhg2xefj8YXRHC7ckAuabUdhGiyURc39ku8+wupXDWmO9nRc//rww3 /a7SLKr6IPeBRw2a0wUupliRkvrHew6RZq16k/yNvr6UPmeZo5er+xFVzA6nyg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396731; b=qDl8FbkHTvk1mg0CHrQD2aO72BSBNFtNPzHorDRN6yfUW5YgbuwUBh6pb5y+7V3fq2x0fB 7b5LhPuXBr6r9Uwfuz6oQYUjWSxaeFZPU247g9fnfcr6J4vznk+5eQjiS87lhV3FBrQdxV 9k7f7LzQt9EjF3s52sBIunAuYBhx4ktABLM5Mq1qTv/jGTT0vKyGLhYtVLbe5DBoSTgUEV eyrPABpDG8m5gq8szEJrSc+jIrpx+2N0HY4Lkz2XRWUydSIq+QkmhW+CQdCG08pKbi1aAW t5WyLJ9Whyy/Wqnfletp38GBfZAcxSsVMGStuzMoGKPoA5Kgo3647fj3UjAfPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795396731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8D6Ftbs1mUMLjjv/crBLpWST0nBaHqjzNWqEgjdOOkg=; b=lwBZEDqjJ3Vi1EUvhWcswYIfRFbhpqk1FKGj6U2w2+O8ocWoKdPNgb6iFt8NY/SyMZaR4i 36Sm1CYhT9MKneJZjbzsL59dnWhJKFpOdDZBVPbRhSSKOM5COmblOkW8C0JS3SKmUwtRbg s0w7tEQKMGU0sULER8fgtDrzD2nbpaUyt6pQBjcLFVnxDaqey0UazUfzXsybK4UEhTp5J9 PveGaYM4gYs0R1YWbIQdmPX+KZhY+xIyK5xISJQx4KXsL6ActVYjM1Sk7bsCQXi045r6Az n8xz6krowbf/4TePcvqRJlc9V4LripIckCAfIUQRYd/HcfaBrLOPtrE0tXxfNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4C2HHnzShB for ; Mon, 23 Nov 2026 01:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ef7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:18:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: cf6c2bf648a1 - stable/15 - kyua: Make "test" command actually report about workdir cleanup issues List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cf6c2bf648a1c42134cb66dff02b6498c4c1a865 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:18:51 +0000 Message-Id: <6b03947b.1ef7.31132342@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=cf6c2bf648a1c42134cb66dff02b6498c4c1a865 commit cf6c2bf648a1c42134cb66dff02b6498c4c1a865 Author: Igor Ostapenko AuthorDate: 2025-10-11 13:14:16 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:17:41 +0000 kyua: Make "test" command actually report about workdir cleanup issues Reviewed by: ngie MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D51136 (cherry picked from commit 21716b6c3ed6e28fe5cc14ee3ffe93f44c458b09) --- contrib/kyua/drivers/run_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp index e8ee03385184..b5231ac07f92 100644 --- a/contrib/kyua/drivers/run_tests.cpp +++ b/contrib/kyua/drivers/run_tests.cpp @@ -212,7 +212,7 @@ finish_test(scheduler::result_handle_ptr result_handle, hooks.got_result( *test_result_handle->test_program(), test_result_handle->test_case_name(), - test_result_handle->test_result(), + test_result, result_handle->end_time() - result_handle->start_time()); } From nobody Mon Nov 23 01:31:41 2026 X-Original-To: dev-commits-src-branches@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 4jXpM13mdjz71Ytq for ; Mon, 23 Nov 2026 01:31:41 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpM12Y8cz4ks2 for ; Mon, 23 Nov 2026 01:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeRcXRR09xAKCY8SbukZBDXvhmOLxMxKBtXIPBN3zYk=; b=QeqM5mqNUrCRE256TeUgMmeSDpW4maBE5uiXrTMFLXqdzgVg3MKmbVfoFAbnDuaqBsptwR wKN7v0NSVqMuwciEbZCIdwxQfJ92vLPzph0pN9C8/NaCAPSHsItvuNZ3AqLrM7pOzkxLXM FbOQmZcyiB14p88RWusHFQ15GZUnMVmVKAC7b5+qpDpE6CGo85oKouzc0s5W6kJfE8hkoS ZLgEe0b79kCh6UGwIxVo/DQ0xW+GDNfgw6mlUBwmgpiIqN3hKEPr76HmZtUOUfjBmUAdXj DTLqJcI92SxO3uiYi/9YHx/KRa+GI7N1wjU2Lmn7Kpb5vgj6lz9PCAcxK6pO2Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397501; b=uf7GUdbWRGc2Tn/dQj9EF3ZjepXW8i6kmEEnU2q0Z53KMYwGoV/qtKSeyg23x6GPY6CQGu ZM8z95nUEyWztzd7i/DCbOyWSbADoFXybQvM4lPp12RKozQzNWnyKkrwTsxgE4Iq0LzkUH bTwe4wa0xnVIf5GJGJoGwBSM3bVAMiNd2VrRsTPNdUlO1tQEz+r/E0cALconOkZZiekH2y MtqStaazHxEL5w8yXyIdU3Mz+wrg3NiZ+9a/G1NAi/ZMg3l8TH4CBdIAjMNe894XWz0Q/v yuafknoSAqtB9i96BtZzWDC1Oyt1OudOiv4Ycc8E/zg02JlvGFTgsXl4L9UUAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeRcXRR09xAKCY8SbukZBDXvhmOLxMxKBtXIPBN3zYk=; b=YUIP1CgM8MGFrCVC4O91ImTjUeezQcWvHfZ6IUlej674dsTLk1BOOv0/pqUUduZOvbgs89 NrNnO8QY+T+e86uCPi+AVeFiqmEZFwxVyDfTevadja4zBrGoY3SEjsND6TuVibc7NnX955 Z7sRJ35iv8qRxNtZbjhdhL7aWqwU8lBmaSPxiRpJ9/WCYMGCLMbm6GPej/7UxmGaUKdpOU QG2HfPTxHeLhPn6jpn5Y0hAR2C2j4/faN18wEP3cDbruYna7kaKEpk+aLplL3Dzy48D/4s MIdIq0wnhedySboC8z1Dk2fvBqV2ZVJi1OCKIg8mLtH5YuTAxla8m8Ek8bnCFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpM11y5ZzTDs for ; Mon, 23 Nov 2026 01:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 552d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:31:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Muhammad Moinur Rahman From: Enji Cooper Subject: git: 652eb5e0ba14 - stable/14 - contrib/kyua: Merge vendor import List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:31:41 +0000 Message-Id: <6b03977d.552d.5f694169@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c commit 652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c Author: Muhammad Moinur Rahman AuthorDate: 2024-01-18 16:26:13 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:29:16 +0000 contrib/kyua: Merge vendor import * commit '5f174897f67783925f4ec69122673f9bad6ee6fe': vendor/kyua: Update to snapshot 84c8ec8 Vendor import of freebsd/kyua@a0d44bb356e0c816 Approved by: markj Differential Revision: https://reviews.freebsd.org/D43475 (cherry picked from commit 6b13d60bf49ee40626d7e3a5d5a80519f0067307) --- contrib/kyua/.cirrus.yml | 25 +++ contrib/kyua/AUTHORS | 1 + contrib/kyua/admin/travis-build.sh | 2 +- contrib/kyua/cli/cmd_report_html.cpp | 5 +- contrib/kyua/doc/kyua.1.in | 5 + contrib/kyua/doc/manbuild_test.sh | 0 contrib/kyua/integration/cmd_about_test.sh | 0 contrib/kyua/integration/cmd_config_test.sh | 0 contrib/kyua/integration/cmd_db_exec_test.sh | 0 contrib/kyua/integration/cmd_db_migrate_test.sh | 0 contrib/kyua/integration/cmd_debug_test.sh | 0 contrib/kyua/integration/cmd_help_test.sh | 0 contrib/kyua/integration/cmd_list_test.sh | 0 contrib/kyua/integration/cmd_report_html_test.sh | 0 contrib/kyua/integration/cmd_report_junit_test.sh | 0 contrib/kyua/integration/cmd_report_test.sh | 0 contrib/kyua/integration/cmd_test_test.sh | 0 contrib/kyua/integration/global_test.sh | 0 contrib/kyua/integration/utils.sh | 4 +- contrib/kyua/utils/datetime.cpp | 11 +- contrib/kyua/utils/datetime_test.cpp | 10 +- contrib/kyua/utils/process/Kyuafile | 1 + contrib/kyua/utils/process/Makefile.am.inc | 5 + contrib/kyua/utils/process/executor.cpp | 58 ++++-- contrib/kyua/utils/process/executor_pid_test.cpp | 208 ++++++++++++++++++++++ 25 files changed, 304 insertions(+), 31 deletions(-) diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml new file mode 100644 index 000000000000..855693b34fa1 --- /dev/null +++ b/contrib/kyua/.cirrus.yml @@ -0,0 +1,25 @@ +env: + ARCH: amd64 + +task: + matrix: + - name: 14.0-RELEASE + freebsd_instance: + image_family: freebsd-14-0 + - name: 14.0-STABLE + freebsd_instance: + image_family: freebsd-14-0-snap + - name: 13.2-RELEASE + freebsd_instance: + image_family: freebsd-13-2 + - name: 13.2-STABLE + freebsd_instance: + image_family: freebsd-13-2-snap + env: + DO: distcheck + install_script: + - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf + - ASSUME_ALWAYS_YES=yes pkg bootstrap -f + - pkg install -y autoconf automake atf lutok pkgconf sqlite3 + script: + - ./admin/travis-build.sh diff --git a/contrib/kyua/AUTHORS b/contrib/kyua/AUTHORS index 26bfcd3471d3..4cf65083015a 100644 --- a/contrib/kyua/AUTHORS +++ b/contrib/kyua/AUTHORS @@ -8,5 +8,6 @@ # * Name # * Organization +* The FreeBSD Foundation * Google Inc. * Igor Ostapenko diff --git a/contrib/kyua/admin/travis-build.sh b/contrib/kyua/admin/travis-build.sh index e69f271c13f1..0ccf1cc41efb 100755 --- a/contrib/kyua/admin/travis-build.sh +++ b/contrib/kyua/admin/travis-build.sh @@ -61,7 +61,7 @@ syntax(2) parallelism = 4 EOF [ "${UNPRIVILEGED_USER:-no}" = no ] || \ - echo "unprivileged_user = 'travis'" >>kyua.conf + echo "unprivileged_user = 'nobody'" >>kyua.conf local f= f="${f} CFLAGS='${archflags}'" diff --git a/contrib/kyua/cli/cmd_report_html.cpp b/contrib/kyua/cli/cmd_report_html.cpp index b2133a8de047..9c99e4348252 100644 --- a/contrib/kyua/cli/cmd_report_html.cpp +++ b/contrib/kyua/cli/cmd_report_html.cpp @@ -54,6 +54,7 @@ #include "utils/fs/operations.hpp" #include "utils/fs/path.hpp" #include "utils/optional.ipp" +#include "utils/text/operations.hpp" #include "utils/text/templates.hpp" namespace cmdline = utils::cmdline; @@ -365,12 +366,12 @@ public: { const std::string stdout_text = iter.stdout_contents(); if (!stdout_text.empty()) - templates.add_variable("stdout", stdout_text); + templates.add_variable("stdout", text::escape_xml(stdout_text)); } { const std::string stderr_text = iter.stderr_contents(); if (!stderr_text.empty()) - templates.add_variable("stderr", stderr_text); + templates.add_variable("stderr", text::escape_xml(stderr_text)); } generate(templates, "test_result.html", diff --git a/contrib/kyua/doc/kyua.1.in b/contrib/kyua/doc/kyua.1.in index 2fca5eb09f9f..4a3ab7852b11 100644 --- a/contrib/kyua/doc/kyua.1.in +++ b/contrib/kyua/doc/kyua.1.in @@ -392,6 +392,11 @@ codes above 1 can be returned. .Xr atf 7 , .Xr tests 7 .Sh AUTHORS +The original author of +.Nm +was +.An Julio Merino . +.Pp For more details on the people that made .Nm possible and the license terms, run: diff --git a/contrib/kyua/doc/manbuild_test.sh b/contrib/kyua/doc/manbuild_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_about_test.sh b/contrib/kyua/integration/cmd_about_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_config_test.sh b/contrib/kyua/integration/cmd_config_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_db_exec_test.sh b/contrib/kyua/integration/cmd_db_exec_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_db_migrate_test.sh b/contrib/kyua/integration/cmd_db_migrate_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_debug_test.sh b/contrib/kyua/integration/cmd_debug_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_help_test.sh b/contrib/kyua/integration/cmd_help_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_list_test.sh b/contrib/kyua/integration/cmd_list_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_report_html_test.sh b/contrib/kyua/integration/cmd_report_html_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_report_junit_test.sh b/contrib/kyua/integration/cmd_report_junit_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_report_test.sh b/contrib/kyua/integration/cmd_report_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/cmd_test_test.sh b/contrib/kyua/integration/cmd_test_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/global_test.sh b/contrib/kyua/integration/global_test.sh old mode 100755 new mode 100644 diff --git a/contrib/kyua/integration/utils.sh b/contrib/kyua/integration/utils.sh old mode 100755 new mode 100644 index 99565a1c9857..d1462a5a9b01 --- a/contrib/kyua/integration/utils.sh +++ b/contrib/kyua/integration/utils.sh @@ -42,7 +42,7 @@ # script that automatically does this. # CHECK_STYLE_DISABLE utils_strip_times='sed -E \ - -e "s,( |\[|\")[0-9][0-9]*.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \ + -e "s,( |\[|\")[0-9][0-9]*\.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \ -e "s,[0-9]{8}-[0-9]{6}-[0-9]{6},YYYYMMDD-HHMMSS-ssssss,g" \ -e "s,[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}Z,YYYY-MM-DDTHH:MM:SS.ssssssZ,g"' # CHECK_STYLE_ENABLE @@ -55,7 +55,7 @@ utils_strip_times='sed -E \ # replaced by the fixed string YYYY-MM-DDTHH:MM:SS.ssssssZ. # CHECK_STYLE_DISABLE utils_strip_times_but_not_ids='sed -E \ - -e "s,( |\[|\")[0-9][0-9]*.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \ + -e "s,( |\[|\")[0-9][0-9]*\.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \ -e "s,[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}Z,YYYY-MM-DDTHH:MM:SS.ssssssZ,g"' # CHECK_STYLE_ENABLE diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp index ae3fdb62fe55..174d830031d2 100644 --- a/contrib/kyua/utils/datetime.cpp +++ b/contrib/kyua/utils/datetime.cpp @@ -590,11 +590,12 @@ datetime::timestamp::operator-=(const datetime::delta& other) datetime::delta datetime::timestamp::operator-(const datetime::timestamp& other) const { - if ((*this) < other) { - throw std::runtime_error( - F("Cannot subtract %s from %s as it would result in a negative " - "datetime::delta, which are not supported") % other % (*this)); - } + /* + * XXX-BD: gettimeofday isn't necessarily monotonic so return the + * smallest non-zero delta if time went backwards. + */ + if ((*this) < other) + return datetime::delta::from_microseconds(1); return datetime::delta::from_microseconds(to_microseconds() - other.to_microseconds()); } diff --git a/contrib/kyua/utils/datetime_test.cpp b/contrib/kyua/utils/datetime_test.cpp index 9f8ff50cd0f8..a2d3a3c0cdad 100644 --- a/contrib/kyua/utils/datetime_test.cpp +++ b/contrib/kyua/utils/datetime_test.cpp @@ -532,11 +532,11 @@ ATF_TEST_CASE_BODY(timestamp__subtraction) ATF_REQUIRE_EQ(datetime::delta(100, 0), ts3 - ts1); ATF_REQUIRE_EQ(datetime::delta(99, 999988), ts3 - ts2); - ATF_REQUIRE_THROW_RE( - std::runtime_error, - "Cannot subtract 1291970850123456us from 1291970750123468us " - ".*negative datetime::delta.*not supported", - ts2 - ts3); + /* + * NOTE (ngie): behavior change for + * https://github.com/jmmv/kyua/issues/155 . + */ + ATF_REQUIRE_EQ(datetime::delta::from_microseconds(1), ts2 - ts3); } diff --git a/contrib/kyua/utils/process/Kyuafile b/contrib/kyua/utils/process/Kyuafile index 92e62cfac6fc..37ab662982d5 100644 --- a/contrib/kyua/utils/process/Kyuafile +++ b/contrib/kyua/utils/process/Kyuafile @@ -6,6 +6,7 @@ atf_test_program{name="child_test"} atf_test_program{name="deadline_killer_test"} atf_test_program{name="exceptions_test"} atf_test_program{name="executor_test"} +atf_test_program{name="executor_pid_test"} atf_test_program{name="fdstream_test"} atf_test_program{name="isolation_test"} atf_test_program{name="operations_test"} diff --git a/contrib/kyua/utils/process/Makefile.am.inc b/contrib/kyua/utils/process/Makefile.am.inc index 3cff02e7e455..5ce894091a53 100644 --- a/contrib/kyua/utils/process/Makefile.am.inc +++ b/contrib/kyua/utils/process/Makefile.am.inc @@ -83,6 +83,11 @@ utils_process_executor_test_SOURCES = utils/process/executor_test.cpp utils_process_executor_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) utils_process_executor_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) +tests_utils_process_PROGRAMS += utils/process/executor_pid_test +utils_process_executor_pid_test_SOURCES = utils/process/executor_pid_test.cpp +utils_process_executor_pid_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) +utils_process_executor_pid_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) + tests_utils_process_PROGRAMS += utils/process/fdstream_test utils_process_fdstream_test_SOURCES = utils/process/fdstream_test.cpp utils_process_fdstream_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) diff --git a/contrib/kyua/utils/process/executor.cpp b/contrib/kyua/utils/process/executor.cpp index 7aa3d14d313a..bddbeee7605f 100644 --- a/contrib/kyua/utils/process/executor.cpp +++ b/contrib/kyua/utils/process/executor.cpp @@ -39,10 +39,12 @@ extern "C" { #include } +#include #include #include #include #include +#include #include "utils/datetime.hpp" #include "utils/format/macros.hpp" @@ -123,7 +125,7 @@ utils::process::executor::detail::setup_child( } -/// Internal implementation for the exit_handle class. +/// Internal implementation for the exec_handle class. struct utils::process::executor::exec_handle::impl : utils::noncopyable { /// PID of the process being run. int pid; @@ -547,6 +549,9 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable { /// Mapping of PIDs to the data required at run time. exec_handles_map all_exec_handles; + /// Former members of all_exec_handles removed due to PID reuse. + std::forward_list stale_exec_handles; + /// Whether the executor state has been cleaned yet or not. /// /// Used to keep track of explicit calls to the public cleanup(). @@ -558,6 +563,8 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable { interrupts_handler(new signals::interrupts_handler()), root_work_directory(new fs::auto_directory( fs::auto_directory::mkdtemp_public(work_directory_template))), + all_exec_handles(), + stale_exec_handles(), cleaned(false) { } @@ -603,6 +610,17 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable { } all_exec_handles.clear(); + for (auto iter : stale_exec_handles) { + // The process already exited, so no need to kill and wait. + try { + fs::rm_r(iter.control_directory()); + } catch (const fs::error& e) { + LE(F("Failed to clean up stale subprocess work directory " + "%s: %s") % iter.control_directory() % e.what()); + } + } + stale_exec_handles.clear(); + try { // The following only causes the work directory to be deleted, not // any of its contents, so we expect this to always succeed. This @@ -611,9 +629,9 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable { // subprocesses. root_work_directory->cleanup(); } catch (const fs::error& e) { - LE(F("Failed to clean up executor work directory %s: %s; this is " - "an internal error") % root_work_directory->directory() - % e.what()); + LE(F("Failed to clean up executor work directory %s: %s; " + "this could be an internal error or a buggy test") % + root_work_directory->directory() % e.what()); } root_work_directory.reset(); @@ -801,12 +819,16 @@ executor::executor_handle::spawn_post( timeout, unprivileged_user, detail::refcnt_t(new detail::refcnt_t::element_type(0))))); - INV_MSG(_pimpl->all_exec_handles.find(handle.pid()) == - _pimpl->all_exec_handles.end(), - F("PID %s already in all_exec_handles; not properly cleaned " - "up or reused too fast") % handle.pid());; - _pimpl->all_exec_handles.insert(exec_handles_map::value_type( - handle.pid(), handle)); + const auto value = exec_handles_map::value_type(handle.pid(), handle); + auto insert_pair = _pimpl->all_exec_handles.insert(value); + if (!insert_pair.second) { + LI(F("PID %s already in all_exec_handles") % handle.pid()); + _pimpl->stale_exec_handles.push_front(insert_pair.first->second); + _pimpl->all_exec_handles.erase(insert_pair.first); + insert_pair = _pimpl->all_exec_handles.insert(value); + INV_MSG(insert_pair.second, F("PID %s still in all_exec_handles") % + handle.pid()); + } LI(F("Spawned subprocess with exec_handle %s") % handle.pid()); return handle; } @@ -844,12 +866,16 @@ executor::executor_handle::spawn_followup_post( timeout, base.unprivileged_user(), base.state_owners()))); - INV_MSG(_pimpl->all_exec_handles.find(handle.pid()) == - _pimpl->all_exec_handles.end(), - F("PID %s already in all_exec_handles; not properly cleaned " - "up or reused too fast") % handle.pid());; - _pimpl->all_exec_handles.insert(exec_handles_map::value_type( - handle.pid(), handle)); + const auto value = exec_handles_map::value_type(handle.pid(), handle); + auto insert_pair = _pimpl->all_exec_handles.insert(value); + if (!insert_pair.second) { + LI(F("PID %s already in all_exec_handles") % handle.pid()); + _pimpl->stale_exec_handles.push_front(insert_pair.first->second); + _pimpl->all_exec_handles.erase(insert_pair.first); + insert_pair = _pimpl->all_exec_handles.insert(value); + INV_MSG(insert_pair.second, F("PID %s still in all_exec_handles") % + handle.pid()); + } LI(F("Spawned subprocess with exec_handle %s") % handle.pid()); return handle; } diff --git a/contrib/kyua/utils/process/executor_pid_test.cpp b/contrib/kyua/utils/process/executor_pid_test.cpp new file mode 100644 index 000000000000..22e0b90ba14b --- /dev/null +++ b/contrib/kyua/utils/process/executor_pid_test.cpp @@ -0,0 +1,208 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 Dell Inc. + * Author: Eric van Gyzen + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 + +1. Run some "bad" tests that prevent kyua from removing the work directory. + We use "chflags uunlink". Mounting a file system from an md(4) device + is another common use case. +2. Fork a lot, nearly wrapping the PID number space, so step 3 will re-use + a PID from step 1. Running the entire FreeBSD test suite is a more + realistic scenario for this step. +3. Run some more tests. If the stars align, the bug is not fixed yet, and + kyua is built with debugging, kyua will abort with the following messages. + Without debugging, the tests in step 3 will reuse the context from step 1, + including stdout, stderr, and working directory, which are still populated + with stuff from step 1. When I found this bug, step 3 was + __test_cases_list__, which expects a certain format in stdout and failed + when it found something completely unrelated. +4. You can clean up with: chflags -R nouunlink /tmp/kyua.*; rm -rf /tmp/kyua.* + +$ cc -o pid_wrap -latf-c pid_wrap.c +$ kyua test +pid_wrap:leak_0 -> passed [0.001s] +pid_wrap:leak_1 -> passed [0.001s] +pid_wrap:leak_2 -> passed [0.001s] +pid_wrap:leak_3 -> passed [0.001s] +pid_wrap:leak_4 -> passed [0.001s] +pid_wrap:leak_5 -> passed [0.001s] +pid_wrap:leak_6 -> passed [0.001s] +pid_wrap:leak_7 -> passed [0.001s] +pid_wrap:leak_8 -> passed [0.001s] +pid_wrap:leak_9 -> passed [0.001s] +pid_wrap:pid_wrap -> passed [1.113s] +pid_wrap:pid_wrap_0 -> passed [0.001s] +pid_wrap:pid_wrap_1 -> passed [0.001s] +pid_wrap:pid_wrap_2 -> passed [0.001s] +pid_wrap:pid_wrap_3 -> *** /usr/src/main/contrib/kyua/utils/process/executor.cpp:779: Invariant check failed: PID 60876 already in all_exec_handles; not properly cleaned up or reused too fast +*** Fatal signal 6 received +*** Log file is /home/vangyzen/.kyua/logs/kyua.20221006-193544.log +*** Please report this problem to kyua-discuss@googlegroups.com detailing what you were doing before the crash happened; if possible, include the log file mentioned above +Abort trap (core dumped) + +#endif + +#include + +#include + +#include +#include +#include + +#include +#include + +void +leak_work_dir() +{ + int fd; + + ATF_REQUIRE((fd = open("unforgettable", O_CREAT|O_EXCL|O_WRONLY, 0600)) + >= 0); + ATF_REQUIRE_EQ(0, fchflags(fd, UF_NOUNLINK)); + ATF_REQUIRE_EQ(0, close(fd)); +} + +void +wrap_pids() +{ + pid_t begin, current, target; + bool wrapped; + + begin = getpid(); + target = begin - 15; + if (target <= 1) { + target += 99999; // PID_MAX + wrapped = true; + } else { + wrapped = false; + } + + ATF_REQUIRE(signal(SIGCHLD, SIG_IGN) != SIG_ERR); + + do { + current = vfork(); + if (current == 0) { + _exit(0); + } + ATF_REQUIRE(current != -1); + if (current < begin) { + wrapped = true; + } + } while (!wrapped || current < target); +} + +void +test_work_dir_reuse() +{ + // If kyua is built with debugging, it would abort here before the fix. +} + +void +clean_up() +{ + (void)system("chflags -R nouunlink ../.."); +} + +ATF_TEST_CASE_WITHOUT_HEAD(leak_0); +ATF_TEST_CASE_BODY(leak_0) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_1); +ATF_TEST_CASE_BODY(leak_1) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_2); +ATF_TEST_CASE_BODY(leak_2) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_3); +ATF_TEST_CASE_BODY(leak_3) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_4); +ATF_TEST_CASE_BODY(leak_4) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_5); +ATF_TEST_CASE_BODY(leak_5) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_6); +ATF_TEST_CASE_BODY(leak_6) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_7); +ATF_TEST_CASE_BODY(leak_7) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_8); +ATF_TEST_CASE_BODY(leak_8) { leak_work_dir(); } +ATF_TEST_CASE_WITHOUT_HEAD(leak_9); +ATF_TEST_CASE_BODY(leak_9) { leak_work_dir(); } + +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap); +ATF_TEST_CASE_BODY(pid_wrap) { wrap_pids(); } + +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_0); +ATF_TEST_CASE_BODY(pid_wrap_0) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_1); +ATF_TEST_CASE_BODY(pid_wrap_1) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_2); +ATF_TEST_CASE_BODY(pid_wrap_2) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_3); +ATF_TEST_CASE_BODY(pid_wrap_3) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_4); +ATF_TEST_CASE_BODY(pid_wrap_4) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_5); +ATF_TEST_CASE_BODY(pid_wrap_5) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_6); +ATF_TEST_CASE_BODY(pid_wrap_6) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_7); +ATF_TEST_CASE_BODY(pid_wrap_7) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_8); +ATF_TEST_CASE_BODY(pid_wrap_8) { test_work_dir_reuse(); } +ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_9); +ATF_TEST_CASE_BODY(pid_wrap_9) { test_work_dir_reuse(); } + +ATF_TEST_CASE_WITHOUT_HEAD(really_clean_up); +ATF_TEST_CASE_BODY(really_clean_up) { clean_up(); } + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, leak_0); + ATF_ADD_TEST_CASE(tcs, leak_1); + ATF_ADD_TEST_CASE(tcs, leak_2); + ATF_ADD_TEST_CASE(tcs, leak_3); + ATF_ADD_TEST_CASE(tcs, leak_4); + ATF_ADD_TEST_CASE(tcs, leak_5); + ATF_ADD_TEST_CASE(tcs, leak_6); + ATF_ADD_TEST_CASE(tcs, leak_7); + ATF_ADD_TEST_CASE(tcs, leak_8); + ATF_ADD_TEST_CASE(tcs, leak_9); + + ATF_ADD_TEST_CASE(tcs, pid_wrap); + + ATF_ADD_TEST_CASE(tcs, pid_wrap_0); + ATF_ADD_TEST_CASE(tcs, pid_wrap_1); + ATF_ADD_TEST_CASE(tcs, pid_wrap_2); + ATF_ADD_TEST_CASE(tcs, pid_wrap_3); + ATF_ADD_TEST_CASE(tcs, pid_wrap_4); + ATF_ADD_TEST_CASE(tcs, pid_wrap_5); + ATF_ADD_TEST_CASE(tcs, pid_wrap_6); + ATF_ADD_TEST_CASE(tcs, pid_wrap_7); + ATF_ADD_TEST_CASE(tcs, pid_wrap_8); + ATF_ADD_TEST_CASE(tcs, pid_wrap_9); + + ATF_ADD_TEST_CASE(tcs, really_clean_up); +} From nobody Mon Nov 23 01:39:28 2026 X-Original-To: dev-commits-src-branches@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 4jXpX03Gbfz71bnr for ; Mon, 23 Nov 2026 01:39:28 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX01PnNz4m0b for ; Mon, 23 Nov 2026 01:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P419yUDMEtHYg5G+GkBjSNo8AezbP1AQlg42b/uB1v0=; b=GYJ2I2HLUc1twYmLqchK6QBUFWrfz9ttrV24aXX65grm6OevfljyjGqxAIX5W1SHAo4pdx D5P1ax9M6lpYb0qbxGtMsViMbtGAB7+gv8fKNgSqu9CGK93sX+V5nbISXwEGJMeSGp/1WX F86OkPL4+SOlo0Df35ArZqPoNVzHStwZ6f7MEC2Q1tz7kBenACnBJ6G1nXirdXflxIr73U wz0+uIj3GQ9L7QMdr1Cd4AkMUIgjwhbyI2l0N3bGyaFlSXdNOsW44AAqFp1OW/YEDaXb9T gryIKDBElME4ZhjsgBU80AFnqzSElB/DjLR8hOYguSXjrtd4iC2zCQwbpOkMtA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397968; b=V2++YIrP0TePF5W0a7oU/qZfa0/U4lJm/g6x0ivYXRyX8Ix/cXZUdtMUNQi/4ZzKEG50WY kpgIs6gus1OJQbbqJH2VlinSEd4SHxXTEpX8jH0FnS4YlyAB/EHQsgTjPgVxGhMLH8y01+ X+eSr9G9TFEQt3KYhe1LjYnveVyDjPXhbOJ9rwpAvFkzPf+AwtPgSUP/+fC8FxLVi+lABd D1MTZEAbYgWT4A8vuFJlARlEJrJ6ZgUyaAWSivHM1WSTleBU7SU+Yowv/UQP5Szu7sXdfR zRa1I9jdbDnYkFf7F5qspUrLEslaJeHkhCqIkC1XXhcWQMdx4Li5KYiIGXNf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P419yUDMEtHYg5G+GkBjSNo8AezbP1AQlg42b/uB1v0=; b=pnnTaLLG0R3iX7Nh6H0+0PpvJdbDAFlTY+4OzScozks9ySimTwzLT2rOR0Yuf/2zuaJspp azlRwOqcqYi0bYgdMYJQlM920BqjLV4agAlZN1KV5eRikIT5K3GnvfhKCrvHVK9ibSLfoP b1LI6XUVOH0Y1ox6jKlK85Ay9Oz0rJuWuQ9ep7FJp2onuMBwQl4HgQZvpfDOhuxE0YfaYU GLUq6ajjCO5QE8IeSzmlIV+VTUtPtLQmAccekpDcmNPCVGwCcMPWjwp59HiLYc2z73kX46 x6TXa2b6ecqwLWD7USHpVqqDS4pJrJuwQVH0FEmKHaUnO945OYmYOl4W3DHNDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX013XLzTKt for ; Mon, 23 Nov 2026 01:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 65b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 1d9dc50bf98c - stable/14 - kyua: Add "kyua debug -p" option List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:28 +0000 Message-Id: <6b039950.65b0.babdb04@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b commit 1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b Author: Igor Ostapenko AuthorDate: 2025-05-17 09:30:55 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:32:48 +0000 kyua: Add "kyua debug -p" option This allows the test engine to be paused right before the test cleanup routine, simplifying debugging. Reviewed by: ziaee, ngie Differential Revision: https://reviews.freebsd.org/D49463 (cherry picked from commit 6b8222793fbb4c0e162232716bc454dad31b709f) --- contrib/kyua/cli/cmd_debug.cpp | 70 ++++++++++++++++++++++++++++++++++++ contrib/kyua/doc/kyua-debug.1.in | 21 ++++++++++- contrib/kyua/drivers/debug_test.cpp | 7 +++- contrib/kyua/drivers/debug_test.hpp | 6 +++- contrib/kyua/engine/debugger.hpp | 71 +++++++++++++++++++++++++++++++++++++ contrib/kyua/engine/scheduler.cpp | 8 +++++ contrib/kyua/model/test_case.cpp | 21 +++++++++++ contrib/kyua/model/test_case.hpp | 5 +++ 8 files changed, 206 insertions(+), 3 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index b7a29b7ab804..c00920c1a3f7 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -29,6 +29,7 @@ #include "cli/cmd_debug.hpp" #include +#include #include "cli/common.ipp" #include "drivers/debug_test.hpp" @@ -38,13 +39,76 @@ #include "utils/cmdline/parser.ipp" #include "utils/cmdline/ui.hpp" #include "utils/format/macros.hpp" +#include "utils/process/executor.hpp" namespace cmdline = utils::cmdline; namespace config = utils::config; +namespace executor = utils::process::executor; using cli::cmd_debug; +namespace { + + +const cmdline::bool_option pause_before_cleanup_upon_fail_option( + 'p', + "pause-before-cleanup-upon-fail", + "Pauses right before the test cleanup upon fail"); + + +const cmdline::bool_option pause_before_cleanup_option( + "pause-before-cleanup", + "Pauses right before the test cleanup"); + + +/// The debugger interface implementation. +class dbg : public engine::debugger { + /// Object to interact with the I/O of the program. + cmdline::ui* _ui; + + /// Representation of the command line to the subcommand. + const cmdline::parsed_cmdline& _cmdline; + +public: + /// Constructor. + /// + /// \param ui_ Object to interact with the I/O of the program. + /// \param cmdline Representation of the command line to the subcommand. + dbg(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline) : + _ui(ui), _cmdline(cmdline) + {} + + void before_cleanup( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >& result, + executor::exit_handle& eh) const + { + if (_cmdline.has_option(pause_before_cleanup_upon_fail_option + .long_name())) { + if (result && !result.get().good()) { + _ui->out("The test failed and paused right before its cleanup " + "routine."); + _ui->out(F("Test work dir: %s") % eh.work_directory().str()); + _ui->out("Press any key to continue..."); + (void) std::cin.get(); + } + } else if (_cmdline.has_option(pause_before_cleanup_option + .long_name())) { + _ui->out("The test paused right before its cleanup routine."); + _ui->out(F("Test work dir: %s") % eh.work_directory().str()); + _ui->out("Press any key to continue..."); + (void) std::cin.get(); + } + }; + +}; + + +} // anonymous namespace + + /// Default constructor for cmd_debug. cmd_debug::cmd_debug(void) : cli_command( "debug", "test_case", 1, 1, @@ -53,6 +117,9 @@ cmd_debug::cmd_debug(void) : cli_command( add_option(build_root_option); add_option(kyuafile_option); + add_option(pause_before_cleanup_upon_fail_option); + add_option(pause_before_cleanup_option); + add_option(cmdline::path_option( "stdout", "Where to direct the standard output of the test case", "path", "/dev/stdout")); @@ -82,7 +149,10 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, const engine::test_filter filter = engine::test_filter::parse( test_case_name); + auto debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); + const drivers::debug_test::result result = drivers::debug_test::drive( + debugger, kyuafile_path(cmdline), build_root_path(cmdline), filter, user_config, cmdline.get_option< cmdline::path_option >("stdout"), cmdline.get_option< cmdline::path_option >("stderr")); diff --git a/contrib/kyua/doc/kyua-debug.1.in b/contrib/kyua/doc/kyua-debug.1.in index 9e962a465421..263aef3667a7 100644 --- a/contrib/kyua/doc/kyua-debug.1.in +++ b/contrib/kyua/doc/kyua-debug.1.in @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd October 13, 2014 +.Dd March 25, 2025 .Dt KYUA-DEBUG 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl -build-root Ar path .Op Fl -kyuafile Ar file +.Op Fl -pause-before-cleanup-upon-fail +.Op Fl -pause-before-cleanup .Op Fl -stdout Ar path .Op Fl -stderr Ar path .Ar test_case @@ -84,6 +86,23 @@ Specifies the Kyuafile to process. Defaults to .Pa Kyuafile file in the current directory. +.It Fl -pause-before-cleanup-upon-fail , Fl p +Causes Kyua to pause right before the test cleanup routine is invoked if the +test fails. +When paused, Kyua waits for input on stdin, and any key press resumes +execution. +.sp +This can be useful for debugging system or end-to-end tests +which alter the system by creating artifacts such as files, network +interfaces, routing entries, firewall configuration, containers, etc. +This flag makes it possible to preserve such artifacts immediately after a test +failure, simplifying debugging. +Otherwise, these artifacts would be removed by the test cleanup routine or +by Kyua built-in cleanup mechanism. +.It Fl -pause-before-cleanup +The unconditional variant of the previous option. +This can be helpful for reproducing the infrastructure or fixture of a passing +test for further development or additional analysis. .It Fl -stderr Ar path Specifies the file to which to send the standard error of the test program's body. diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp index 0717a9ad9419..6bd3d4dc0731 100644 --- a/contrib/kyua/drivers/debug_test.cpp +++ b/contrib/kyua/drivers/debug_test.cpp @@ -63,7 +63,8 @@ using utils::optional; /// /// \returns A structure with all results computed by this driver. drivers::debug_test::result -drivers::debug_test::drive(const fs::path& kyuafile_path, +drivers::debug_test::drive(engine::debugger_ptr debugger, + const fs::path& kyuafile_path, const optional< fs::path > build_root, const engine::test_filter& filter, const config::tree& user_config, @@ -92,6 +93,10 @@ drivers::debug_test::drive(const fs::path& kyuafile_path, const model::test_program_ptr test_program = match.get().first; const std::string& test_case_name = match.get().second; + const model::test_case test_case = test_program->find(test_case_name); + if (debugger) + test_case.attach_debugger(debugger); + scheduler::result_handle_ptr result_handle = handle.debug_test( test_program, test_case_name, user_config, stdout_path, stderr_path); diff --git a/contrib/kyua/drivers/debug_test.hpp b/contrib/kyua/drivers/debug_test.hpp index cbaa2f6acea0..0b4abce6f2ea 100644 --- a/contrib/kyua/drivers/debug_test.hpp +++ b/contrib/kyua/drivers/debug_test.hpp @@ -36,12 +36,15 @@ #if !defined(DRIVERS_DEBUG_TEST_HPP) #define DRIVERS_DEBUG_TEST_HPP +#include "engine/debugger.hpp" #include "engine/filters.hpp" #include "model/test_result.hpp" #include "utils/config/tree_fwd.hpp" #include "utils/fs/path_fwd.hpp" #include "utils/optional_fwd.hpp" +using engine::debugger; + namespace drivers { namespace debug_test { @@ -68,7 +71,8 @@ public: }; -result drive(const utils::fs::path&, const utils::optional< utils::fs::path >, +result drive(std::shared_ptr< debugger >, + const utils::fs::path&, const utils::optional< utils::fs::path >, const engine::test_filter&, const utils::config::tree&, const utils::fs::path&, const utils::fs::path&); diff --git a/contrib/kyua/engine/debugger.hpp b/contrib/kyua/engine/debugger.hpp new file mode 100644 index 000000000000..3c4d087f8ad0 --- /dev/null +++ b/contrib/kyua/engine/debugger.hpp @@ -0,0 +1,71 @@ +// Copyright 2025 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/debugger.hpp +/// The interface between the engine and the users outside. + +#if !defined(ENGINE_DEBUGGER_HPP) +#define ENGINE_DEBUGGER_HPP + +#include "model/test_case_fwd.hpp" +#include "model/test_program_fwd.hpp" +#include "model/test_result_fwd.hpp" +#include "utils/optional_fwd.hpp" +#include "utils/process/executor_fwd.hpp" + +namespace executor = utils::process::executor; + +using utils::optional; + + +namespace engine { + + +/// Abstract debugger interface. +class debugger { +public: + debugger() {} + virtual ~debugger() {} + + /// Called right before test cleanup. + virtual void before_cleanup( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >&, + executor::exit_handle&) const = 0; +}; + + +/// Pointer to a debugger implementation. +typedef std::shared_ptr< debugger > debugger_ptr; + + +} // namespace engine + + +#endif // !defined(ENGINE_DEBUGGER_HPP) diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index 7291f0fa1bb6..4c40bf31046e 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -39,6 +39,7 @@ extern "C" { #include #include "engine/config.hpp" +#include "engine/debugger.hpp" #include "engine/exceptions.hpp" #include "engine/execenv/execenv.hpp" #include "engine/requirements.hpp" @@ -1396,8 +1397,15 @@ scheduler::scheduler_handle::wait_any(void) handle.stderr_file()); } + std::shared_ptr< debugger > debugger = test_case.get_debugger(); + if (debugger) { + debugger->before_cleanup(test_data->test_program, test_case, + result, handle); + } + if (test_data->needs_cleanup) { INV(test_case.get_metadata().has_cleanup()); + // The test body has completed and we have processed it. If there // is a cleanup routine, trigger it now and wait for any other test // completion. The caller never knows about cleanup routines. diff --git a/contrib/kyua/model/test_case.cpp b/contrib/kyua/model/test_case.cpp index f5f6a979eed3..faa4f3cebaf2 100644 --- a/contrib/kyua/model/test_case.cpp +++ b/contrib/kyua/model/test_case.cpp @@ -60,6 +60,9 @@ struct model::test_case::impl : utils::noncopyable { /// Fake result to return instead of running the test case. optional< model::test_result > fake_result; + /// Optional pointer to a debugger attached. + engine::debugger_ptr debugger; + /// Constructor. /// /// \param name_ The name of the test case within the test program. @@ -233,6 +236,24 @@ model::test_case::get_raw_metadata(void) const } +/// Attach a debugger to the test case. +void +model::test_case::attach_debugger(engine::debugger_ptr debugger) const +{ + _pimpl->debugger = debugger; +} + + +/// Gets the optional pointer to a debugger. +/// +/// \return An optional pointer to a debugger. +engine::debugger_ptr +model::test_case::get_debugger() const +{ + return _pimpl->debugger; +} + + /// Gets the fake result pre-stored for this test case. /// /// \return A fake result, or none if not defined. diff --git a/contrib/kyua/model/test_case.hpp b/contrib/kyua/model/test_case.hpp index 3c6fe32c8e62..c92ebacff98d 100644 --- a/contrib/kyua/model/test_case.hpp +++ b/contrib/kyua/model/test_case.hpp @@ -38,11 +38,13 @@ #include #include +#include "engine/debugger.hpp" #include "model/metadata_fwd.hpp" #include "model/test_result_fwd.hpp" #include "utils/noncopyable.hpp" #include "utils/optional_fwd.hpp" + namespace model { @@ -71,6 +73,9 @@ public: const metadata& get_raw_metadata(void) const; utils::optional< test_result > fake_result(void) const; + void attach_debugger(engine::debugger_ptr) const; + engine::debugger_ptr get_debugger() const; + bool operator==(const test_case&) const; bool operator!=(const test_case&) const; }; From nobody Mon Nov 23 01:39:30 2026 X-Original-To: dev-commits-src-branches@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 4jXpX24z8Nz71bs9 for ; Mon, 23 Nov 2026 01:39:30 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX22Pq6z4m0j for ; Mon, 23 Nov 2026 01:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kSal/W94vpJ4lG6rKpn3sHst54QQnCmtKWt6zAcbfY=; b=D4wvNJ+zRQfnvbgdYef1xcdG5Y6opPYB3NvRxTLmYYPDtI2DyLgZpav2FM+FAi5/OuKsgM Lsv73v7DZ5mBQ1oRZQyazqFHnrRODldtnpg/mQ0mvTVeB+MVA6JIo76bHieTTTnz7unGuW ZHFSRnVxkMckyzuQ0u+LSVPrYYKBieVVxKssqrar66ywEumEGlBnu6Q/ZHKnz/IvOMilJt rIhHWRUayYKWMnjpurPlCB6T0Gzm3mJwW/QL9Y3p5/mPvM0CClUuaF3JhRNX6Be9In66s1 LUrZJdC8iZBoWKA7Lvuj6TzNnuTv0PmffTa/+tNviCx9XAxIO8BTihEQpt2xVA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397970; b=Gngwa4IMEiEZcHzo7Q6P+ydMkCUZjZnak+oqPuUxPMWSrIdb4Qje3qqTrFySMHnOmY/f50 A5+Ej2/CjvqNNv1wlY72Otl92mhpdLfwlJ/G3sWf0vmiiLdZ9iyJhi4mCHVana6S8PzDkX B8mEndi/HdBbunqCj0STMiXB8F3mm53KtxtRsfR/FYULgYm9IPwBmIozHAb93N2KIHMauA C26uvNGTEQYfNXXhKQ+BAktgeXcK3+dc7us3AED8zR1YsINOCR3kPeJr8RcI38eZHGWL9R 8B1tGWoOH/+DW1jPWX735jDzBGkzC1iUYfx2z5F0CSOrcBDlPGyOU3QYDiURVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kSal/W94vpJ4lG6rKpn3sHst54QQnCmtKWt6zAcbfY=; b=p0c+1Hg86BVD5Vy1gZfGFXc/XsHO3hfTeSUTixLZEDbADosoJD6SBTm+RfEtDXRT8ZrfQc oupfckQryzVEvswvmdtePzucAzh6Xu1qKLF9XoajZYOt5ex+lGRGKMJHC5qihgWDRNAYwK ri/JnK2pQj5IPKNwKwi96fOaYUPFOKdMsmVjRUUER6TMZoxH6RHZchodng40gHKj1PKD7w P2u6wsDa7md3jmHHoPEw1ystTFtx8kSD2VcvxC+WmqKyvEhYghFhYdAxmdIXesAXBzq4bg Y9XYZk3Kx4BjPguU92ZNKUkO+/YODaK0Xw3flDpGBQUzvU5hooNr8u+mbqarfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX21jYczSyY for ; Mon, 23 Nov 2026 01:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4452 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 5a6495835e45 - stable/14 - kyua: Fix prompt of "debug -p" command List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a6495835e45f9ee31f190345d38fc4178fd9fe3 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:30 +0000 Message-Id: <6b039952.4452.52d7704e@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5a6495835e45f9ee31f190345d38fc4178fd9fe3 commit 5a6495835e45f9ee31f190345d38fc4178fd9fe3 Author: Igor Ostapenko AuthorDate: 2025-12-25 20:41:22 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:34:14 +0000 kyua: Fix prompt of "debug -p" command (cherry picked from commit ecb58f931d45d6fe4e8b60a172415cc387657a6b) --- contrib/kyua/cli/cmd_debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index c00920c1a3f7..700c4b3ea851 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -91,14 +91,14 @@ public: _ui->out("The test failed and paused right before its cleanup " "routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } } else if (_cmdline.has_option(pause_before_cleanup_option .long_name())) { _ui->out("The test paused right before its cleanup routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } }; From nobody Mon Nov 23 01:39:29 2026 X-Original-To: dev-commits-src-branches@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 4jXpX15xLCz71bs2 for ; Mon, 23 Nov 2026 01:39:29 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX11kxBz4m38 for ; Mon, 23 Nov 2026 01:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VcCKYSDiRS3b8/KjdSFUCKoC5bfEwbmb4uTitZQ75Z4=; b=efeNH0tAm5DzIk0e17wfT9iId8JoKa47SNqilnHM7t+JvcokkKCiocrAd6/qKzSHVUo80Z gNAIJ7dMHP5lUIsVlv52cgquJoQXQlFU2EnMRdjOH0EKS9oNdvOxfuBKemBHVmrgATl5pH ILVhj5IIPjjKAvR8Vk+JGS5LckVsRN3VZP/wXr+qWIRkg5axEgH18qWHTFumQGLZo5yoWn IGrUaPHwNPxaAOwCbCfxTseFhegVY3mgCACuXX2XYS7gmXMCSqLs2IsHkA+n6drB7hfjVy ZFjos33yB2i8na3ByFiPdsUIWOG9e1GacreBmqv1SEhIEM8fB0yr8IYWSm6BDA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397969; b=KhrGh9bRcrddVYh/rk0oEMl9fLOfXZ0pDfMdYWyNmSGSW+FbifuUTkIE3SpciS/p/ewej3 VQDR+/8JkRfksuWktiL0BnZsy7+C2pNju9Ydw4gR9YTCTBrPX3g1oFV/XVMCuhtmTgWEdK sPUIAJDJNH1+ISNlGtXbPWZVyZ3BqaWRQ9eWqx6NnW667soZPSAzN42FV/xmPNwflNwHPi /pESz/d6oOw6wJLshrkB9eTPVwNpU18nXzJlpEAYd+er80RCvfxK81YI9RT3d8GYdDEtiY V6h5IHZP7Q9qxnzwYsexbb/0r4Z9g+eWF7CV6b3yCZaGvb0cuPxDScb+oTdFKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VcCKYSDiRS3b8/KjdSFUCKoC5bfEwbmb4uTitZQ75Z4=; b=MY+RwnLVEEnBPrCtv2Q5s02xPQx2OZPCHsTSkCeFFKvlQjxagZg+S4SDM7H08L+GyQfLCa fLtTTzWG8LiDISymDrggyhSDa01pFmAEqY4LQpoDXADvoaPbqj2vrZ2xT5iTx34tMRYYn6 MAzeJqi3sGmjUGcwh731PW23yR8DKRTKGWvBcBnyBLDdIUDXV16d477uxVKDOn/sAiwEPy avzojZjbMPt04V025h4TBr1ukRXyWCHrYedvMgcxsvjBA9uc6+QgrApZP2yVwv92nee25C kioouqADpIIWQhWaRn5FO02sqYOfJ9kM61awJSs68RMK7wNEcevOBCo85Ufpyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX11NnMzTKv for ; Mon, 23 Nov 2026 01:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 665c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: da0015f4e55b - stable/14 - kyua: Make "test" command actually report about workdir cleanup issues List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: da0015f4e55baf72f12658f9ffdb50bdc99ca8c8 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:29 +0000 Message-Id: <6b039951.665c.14712ab9@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=da0015f4e55baf72f12658f9ffdb50bdc99ca8c8 commit da0015f4e55baf72f12658f9ffdb50bdc99ca8c8 Author: Igor Ostapenko AuthorDate: 2025-10-11 13:14:16 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:33:54 +0000 kyua: Make "test" command actually report about workdir cleanup issues Reviewed by: ngie MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D51136 (cherry picked from commit 21716b6c3ed6e28fe5cc14ee3ffe93f44c458b09) --- contrib/kyua/drivers/run_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp index d92940005242..3af9a1268815 100644 --- a/contrib/kyua/drivers/run_tests.cpp +++ b/contrib/kyua/drivers/run_tests.cpp @@ -209,7 +209,7 @@ finish_test(scheduler::result_handle_ptr result_handle, hooks.got_result( *test_result_handle->test_program(), test_result_handle->test_case_name(), - test_result_handle->test_result(), + test_result, result_handle->end_time() - result_handle->start_time()); } From nobody Mon Nov 23 01:39:31 2026 X-Original-To: dev-commits-src-branches@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 4jXpX41MtXz71c21 for ; Mon, 23 Nov 2026 01:39:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX32bcMz4lsK for ; Mon, 23 Nov 2026 01:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=; b=QCbvEei/xfi0YG/eXo4mM2BIDwSrIDDvsJtmAaS8AiIWxDi1HFUC/1yezJgOChrkgYEDGc ICUdSvHNvq01iVRUZR8W1wM7xWwMC8jGiAVQGalAEB5hjAGyOeMOw7Fz3EsfcEI5SVprQ+ 9QCwUm1uIuXzJooWBlpVesoyideh6Hpu0TwFt6QMteExxar7OzKjbuT+NuEecnLpRDlMWz 2zWeX+ma4ZsbNQTb3hBjk7VtaUasy8aWX+aHw6Qf1Fbo2vM4D6v4kXXQY1hrTTbHxb5Kyt TsfNr3OsKhbLIQdAM1kWyPkhST1nVYkhXFYU7E/Z+eKjiLntGYlwLhzSfifb8A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397971; b=JWLYKvNkvCwKvldvAmcnyNQgQIEU9rxJR3Jr0vdaJ7+dvyBxKg2cnHbQct2ccD3ILApuaY F7sLJlvY3r09BxeJ54RT3UfLfx7KQFpqpyvJtLyI6ouc/B0CbsQhJtluQMCP9xiENXFDDT /KGFWLO3HFe7p7vm/5xxEgLLanC5x8Mta3+ihUUXVM2/WeLbf2vPYXiaB7tRFXiHwnH1zn /G0hE4yri0pMaoW7aMMwZgwqgdHHuXtoPi/k4G3vyL4owxOpsLC9T48xRCKKpz9ZqESeEj hHMQ6n/JMVIDJItWhKqT8JRnbGNcRtMDVhNS3S375VsDrdn39+S+kaNnRp0MCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=; b=g7/A/lyXPH4VtqB9uwy9qZhTSL3JxBpY8igE0gpuIh6HmNDq4i+DG/Hu0WMJvTuaHKYiD+ NbIhiewVEb9lun+jU/ye+Pv/p8W3apjtGQ80+IyLtVXpL/Nf0zLFYWOzrVWZoe3bdo+QP7 Pck2mDPKsyVvNTGOfGJsCrLaKYpWk4V0tr8iFD5Y3rZyzKnrU/ZYfG6vIDoEclJtmZT57M k4u2xDTh4s4xhju4x3h4Zg56UfDw8Hp9uk5D4NL8ilcKQGonVW3vmtAg3eley4A/smETMi ZOkoqcDH1X3UloS8+dw/Kjd1fcBPSYG7Ts1RL74xp3PBIX8J03y4KSO+NJxwWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX327tbzSyZ for ; Mon, 23 Nov 2026 01:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 5532 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 5ffb27477ba0 - stable/14 - kyua: Make "debug -p" skip writing stdout/stderr to tmp files List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ffb27477ba09f4400ee4e3e5784887d139069f1 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:31 +0000 Message-Id: <6b039953.5532.54f83cd2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5ffb27477ba09f4400ee4e3e5784887d139069f1 commit 5ffb27477ba09f4400ee4e3e5784887d139069f1 Author: Igor Ostapenko AuthorDate: 2025-12-26 20:06:56 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:34:33 +0000 kyua: Make "debug -p" skip writing stdout/stderr to tmp files Reviewed by: kp, ngie Differential Revision: https://reviews.freebsd.org/D54363 (cherry picked from commit 350f319731897f741b516db99636e7ced071dfa4) --- contrib/kyua/cli/cmd_debug.cpp | 6 +++++- contrib/kyua/engine/scheduler.cpp | 20 +++++++++++++++----- contrib/kyua/engine/scheduler.hpp | 6 +++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index 700c4b3ea851..978ccae0fdf1 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -149,7 +149,11 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, const engine::test_filter filter = engine::test_filter::parse( test_case_name); - auto debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); + engine::debugger_ptr debugger = nullptr; + if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name()) + || cmdline.has_option(pause_before_cleanup_option.long_name())) { + debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); + } const drivers::debug_test::result result = drivers::debug_test::drive( debugger, diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index 4c40bf31046e..a0719ec461ab 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1283,7 +1283,9 @@ scheduler::exec_handle scheduler::scheduler_handle::spawn_test( const model::test_program_ptr test_program, const std::string& test_case_name, - const config::tree& user_config) + const config::tree& user_config, + const utils::optional& stdout_target, + const utils::optional& stderr_target) { _pimpl->generic.check_interrupt(); @@ -1305,7 +1307,7 @@ scheduler::scheduler_handle::spawn_test( run_test_program(interface, test_program, test_case_name, user_config), test_case.get_metadata().timeout(), - unprivileged_user); + unprivileged_user, stdout_target, stderr_target); const exec_data_ptr data(new test_exec_data( test_program, test_case_name, interface, user_config, handle.pid())); @@ -1563,8 +1565,16 @@ scheduler::scheduler_handle::debug_test( const fs::path& stdout_target, const fs::path& stderr_target) { + optional out = none; + optional err = none; + const model::test_case& test_case = test_program->find(test_case_name); + if (test_case.get_debugger() != nullptr) { + out = stdout_target; + err = stderr_target; + } + const exec_handle exec_handle = spawn_test( - test_program, test_case_name, user_config); + test_program, test_case_name, user_config, out, err); result_handle_ptr result_handle = wait_any(); // TODO(jmmv): We need to do this while the subprocess is alive. This is @@ -1574,12 +1584,12 @@ scheduler::scheduler_handle::debug_test( // Unfortunately, we cannot do so. We cannot just read and block from a // file, waiting for further output to appear... as this only works on pipes // or sockets. We need a better interface for this whole thing. - { + if (test_case.get_debugger() == nullptr) { std::unique_ptr< std::ostream > output = utils::open_ostream( stdout_target); *output << utils::read_file(result_handle->stdout_file()); } - { + if (test_case.get_debugger() == nullptr) { std::unique_ptr< std::ostream > output = utils::open_ostream( stderr_target); *output << utils::read_file(result_handle->stderr_file()); diff --git a/contrib/kyua/engine/scheduler.hpp b/contrib/kyua/engine/scheduler.hpp index ee01c83b4991..508a0c0cbfd9 100644 --- a/contrib/kyua/engine/scheduler.hpp +++ b/contrib/kyua/engine/scheduler.hpp @@ -74,6 +74,8 @@ #include "utils/process/executor_fwd.hpp" #include "utils/process/status_fwd.hpp" +using utils::none; + namespace engine { namespace scheduler { @@ -248,7 +250,9 @@ public: const utils::config::tree&); exec_handle spawn_test(const model::test_program_ptr, const std::string&, - const utils::config::tree&); + const utils::config::tree&, + const utils::optional& = none, + const utils::optional& = none); result_handle_ptr wait_any(void); result_handle_ptr debug_test(const model::test_program_ptr, From nobody Mon Nov 23 01:39:32 2026 X-Original-To: dev-commits-src-branches@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 4jXpX450S8z71bp4 for ; Mon, 23 Nov 2026 01:39:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX42syNz4m3d for ; Mon, 23 Nov 2026 01:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+5ZcbqSTG/Qu7VxtoNutGk44HlifFEcrSEJsWZ3BmY=; b=Spza32Ov1mOhsbiw0MvcNOYY0Uz133Xq+ddjgZoC5bXucrZoLNFOOj1LNfQlf/CvsEcEIV +j05y+m02Yj+72G1CGxDAlM5cf4UihDhUdRPuplZ/YbehJitz10Yq5FqfyNeyOCITcEuoM d2xtm7wxZJCbOoBxmptVHB3/mBedllXx/+soHMBIgrtzDgIVvehQpiCCgtzCAmzwBrkUN7 HG6H1WuqajiNM8DOQvpe4mLLt6jhBIveCD8xgnv+t8o6QwD956Ryc+o+sstVRjqw59VxEs iA4miU2kHOyjNH3Ju9RuRhpnsMUC8HdGIcEIyHn9kLFXGtMyE+vxLtIgndLXgA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397972; b=OY0lMTWcFJq1hxDS1XZieaUVOJjPqPqtrnwcPyN2yGEWnMcoJogA9ezkDbNJxNQPLLlOmH i6CKIFWq8Dh+v6WC7KMHS2PxPTbU8CjZpoHEoc1q3MvH0wNSuRlpU+FtMeAQLZR0f453dd n7UvQ3ekyji4HqDdPCVEEL+6zswamN0pHRluhB55yvIHKK/9YyxvTOa9ZjrIBlecou6a2B 98hVw/ygyddOGvt+dWV/CSBPNMkllYqx3nIpwIK1vNOidHffEAHjHUDilp1E1CpBA4uGee m8wGvtoh+KDGSKX3hOLPNAVuGHoTHd+AW0AIpMPOdw+oKtEFet3Oxvt9GoqBtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+5ZcbqSTG/Qu7VxtoNutGk44HlifFEcrSEJsWZ3BmY=; b=JVjk46zezkTvovW37KNpjKIWevsk7hRjL3Kr4W9PH2ogFCtbvJD2rtsySYQJEBLugeQz4O czMZZBKdeTiFiwBMKax1vhD5fSfywj8A/Sj/i3uOalVHZQShxSK1PPkwz5Q/EvrbZ6G7is gOIgTpPkcjgwEa1T7JPFvuFvnZF5FIvGia5LZTkv5tb/7JVcWrMvz7X22ba4A8yEX7D6yV ros8H3xTAqDre1ngY7q0Uy/AbH8zmruXsr0DWW3t3ulEQs0aF6Fnjvd9gNZkCl3Nr6NBut RZbf6ISaf0CbZconIFFG0BM54B0N6XcRVSMKl7aH83kcR/Y9Cp0IhNy88slr9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX42Xz2zTHP for ; Mon, 23 Nov 2026 01:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 414c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: fb62ef32e6ca - stable/14 - kyua: Add "debug -x|--execute cmd" option List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fb62ef32e6ca321c138090e8df1abfe75e7997ba Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:32 +0000 Message-Id: <6b039954.414c.21786e85@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=fb62ef32e6ca321c138090e8df1abfe75e7997ba commit fb62ef32e6ca321c138090e8df1abfe75e7997ba Author: Igor Ostapenko AuthorDate: 2026-01-11 13:43:33 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:35:11 +0000 kyua: Add "debug -x|--execute cmd" option With execenv=jail specified, the "cmd" runs inside the test's jail. Reviewed by: ngie, markj Differential Revision: https://reviews.freebsd.org/D52642 (cherry picked from commit 8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6) --- contrib/kyua/cli/cmd_debug.cpp | 82 +++++++++++++++++++++++++++++++++- contrib/kyua/engine/debugger.hpp | 7 +++ contrib/kyua/engine/scheduler.cpp | 3 ++ contrib/kyua/utils/cmdline/options.cpp | 20 +++++++-- contrib/kyua/utils/cmdline/options.hpp | 8 +++- contrib/kyua/utils/cmdline/parser.cpp | 20 ++++++--- contrib/kyua/utils/process/child.cpp | 24 ++++++++++ contrib/kyua/utils/process/child.hpp | 5 +++ contrib/kyua/utils/process/child.ipp | 20 +++++++++ 9 files changed, 178 insertions(+), 11 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index 978ccae0fdf1..060113d137fa 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -28,6 +28,10 @@ #include "cli/cmd_debug.hpp" +extern "C" { +#include +} + #include #include @@ -39,13 +43,20 @@ #include "utils/cmdline/parser.ipp" #include "utils/cmdline/ui.hpp" #include "utils/format/macros.hpp" +#include "utils/fs/path.hpp" +#include "utils/process/child.ipp" #include "utils/process/executor.hpp" +#include "utils/process/operations.hpp" +#include "utils/process/status.hpp" namespace cmdline = utils::cmdline; namespace config = utils::config; namespace executor = utils::process::executor; +namespace process = utils::process; using cli::cmd_debug; +using utils::process::args_vector; +using utils::process::child; namespace { @@ -62,6 +73,57 @@ const cmdline::bool_option pause_before_cleanup_option( "Pauses right before the test cleanup"); +static const char* DEFAULT_CMD = "$SHELL"; +const cmdline::string_option execute_option( + 'x', "execute", + "A command to run within the given execenv upon test failure", + "cmd", DEFAULT_CMD, true); + + +/// Functor to execute a program. +class execute { + const std::string& _cmd; + executor::exit_handle& _eh; + +public: + /// Constructor. + /// + /// \param program Program binary absolute path. + /// \param args Program arguments. + execute( + const std::string& cmd_, + executor::exit_handle& eh_) : + _cmd(cmd_), + _eh(eh_) + { + } + + /// Body of the subprocess. + void + operator()(void) + { + if (::chdir(_eh.work_directory().c_str()) == -1) { + std::cerr << "execute: chdir() errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + + std::string program_path = "/bin/sh"; + const char* shell = std::getenv("SHELL"); + if (shell) + program_path = shell; + + args_vector av; + if (!(_cmd.empty() || _cmd == DEFAULT_CMD)) { + av.push_back("-c"); + av.push_back(_cmd); + } + + process::exec(utils::fs::path(program_path), av); + } +}; + + /// The debugger interface implementation. class dbg : public engine::debugger { /// Object to interact with the I/O of the program. @@ -103,6 +165,21 @@ public: } }; + void upon_test_failure( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >&, + executor::exit_handle& eh) const + { + if (!_cmdline.has_option(execute_option.long_name())) + return; + const std::string& cmd = _cmdline.get_option( + execute_option.long_name()); + std::unique_ptr< process::child > child = child::fork_interactive( + execute(cmd, eh)); + (void) child->wait(); + }; + }; @@ -127,6 +204,8 @@ cmd_debug::cmd_debug(void) : cli_command( add_option(cmdline::path_option( "stderr", "Where to direct the standard error of the test case", "path", "/dev/stderr")); + + add_option(execute_option); } @@ -151,7 +230,8 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, engine::debugger_ptr debugger = nullptr; if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name()) - || cmdline.has_option(pause_before_cleanup_option.long_name())) { + || cmdline.has_option(pause_before_cleanup_option.long_name()) + || cmdline.has_option(execute_option.long_name())) { debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline)); } diff --git a/contrib/kyua/engine/debugger.hpp b/contrib/kyua/engine/debugger.hpp index 3c4d087f8ad0..ce87d41ed94d 100644 --- a/contrib/kyua/engine/debugger.hpp +++ b/contrib/kyua/engine/debugger.hpp @@ -58,6 +58,13 @@ public: const model::test_case&, optional< model::test_result >&, executor::exit_handle&) const = 0; + + /// Called upon test failure. + virtual void upon_test_failure( + const model::test_program_ptr&, + const model::test_case&, + optional< model::test_result >&, + executor::exit_handle&) const = 0; }; diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index a0719ec461ab..d04fc1dfbd3d 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1403,6 +1403,9 @@ scheduler::scheduler_handle::wait_any(void) if (debugger) { debugger->before_cleanup(test_data->test_program, test_case, result, handle); + if (!result.get().good()) + debugger->upon_test_failure(test_data->test_program, test_case, + result, handle); } if (test_data->needs_cleanup) { diff --git a/contrib/kyua/utils/cmdline/options.cpp b/contrib/kyua/utils/cmdline/options.cpp index 61736e31c11e..9d448503e3f9 100644 --- a/contrib/kyua/utils/cmdline/options.cpp +++ b/contrib/kyua/utils/cmdline/options.cpp @@ -53,15 +53,18 @@ namespace text = utils::text; /// purposes. /// \param default_value_ If not NULL, specifies that the option has a default /// value for the mandatory argument. +/// \param arg_is_optional_ Specifies if a value must be provided or not. cmdline::base_option::base_option(const char short_name_, const char* long_name_, const char* description_, const char* arg_name_, - const char* default_value_) : + const char* default_value_, + bool arg_is_optional_) : _short_name(short_name_), _long_name(long_name_), _description(description_), _arg_name(arg_name_ == NULL ? "" : arg_name_), + _arg_is_optional(arg_is_optional_), _has_default_value(default_value_ != NULL), _default_value(default_value_ == NULL ? "" : default_value_) { @@ -164,6 +167,16 @@ cmdline::base_option::arg_name(void) const } +/// Returns optionality of the argument. +/// +/// \return The optionality. +bool +cmdline::base_option::arg_is_optional(void) const +{ + return _arg_is_optional; +} + + /// Checks whether the option has a default value for its argument. /// /// \pre needs_arg() must be true. @@ -558,9 +571,10 @@ cmdline::string_option::string_option(const char short_name_, const char* long_name_, const char* description_, const char* arg_name_, - const char* default_value_) : + const char* default_value_, + bool arg_is_optional_) : base_option(short_name_, long_name_, description_, arg_name_, - default_value_) + default_value_, arg_is_optional_) { } diff --git a/contrib/kyua/utils/cmdline/options.hpp b/contrib/kyua/utils/cmdline/options.hpp index f3a83889e491..d11de14af514 100644 --- a/contrib/kyua/utils/cmdline/options.hpp +++ b/contrib/kyua/utils/cmdline/options.hpp @@ -91,6 +91,9 @@ class base_option { /// Descriptive name of the required argument; empty if not allowed. std::string _arg_name; + /// If the option can be used without an explicit argument provided. + bool _arg_is_optional = false; + /// Whether the option has a default value or not. /// /// \todo We should probably be using the optional class here. @@ -101,7 +104,7 @@ class base_option { public: base_option(const char, const char*, const char*, const char* = NULL, - const char* = NULL); + const char* = NULL, bool = false); base_option(const char*, const char*, const char* = NULL, const char* = NULL); virtual ~base_option(void); @@ -113,6 +116,7 @@ public: bool needs_arg(void) const; const std::string& arg_name(void) const; + bool arg_is_optional(void) const; bool has_default_value(void) const; const std::string& default_value(void) const; @@ -219,7 +223,7 @@ public: class string_option : public base_option { public: string_option(const char, const char*, const char*, const char*, - const char* = NULL); + const char* = NULL, bool = false); string_option(const char*, const char*, const char*, const char* = NULL); virtual ~string_option(void) {} diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp index 5c83f6d69cc4..29dd4612f6ad 100644 --- a/contrib/kyua/utils/cmdline/parser.cpp +++ b/contrib/kyua/utils/cmdline/parser.cpp @@ -88,7 +88,10 @@ options_to_getopt_data(const cmdline::options_vector& options, long_option.name = option->long_name().c_str(); if (option->needs_arg()) - long_option.has_arg = required_argument; + if (option->arg_is_optional()) + long_option.has_arg = optional_argument; + else + long_option.has_arg = required_argument; else long_option.has_arg = no_argument; @@ -96,7 +99,7 @@ options_to_getopt_data(const cmdline::options_vector& options, if (option->has_short_name()) { data.short_options += option->short_name(); if (option->needs_arg()) - data.short_options += ':'; + data.short_options += option->arg_is_optional() ? "::" : ":"; id = option->short_name(); } else { id = cur_id++; @@ -320,9 +323,11 @@ cmdline::parse(const int argc, const char* const* argv, for (cmdline::options_vector::const_iterator iter = options.begin(); iter != options.end(); iter++) { const cmdline::base_option* option = *iter; - if (option->needs_arg() && option->has_default_value()) + if (option->needs_arg() && option->has_default_value() && + !option->arg_is_optional()) { option_values[option->long_name()].push_back( option->default_value()); + } } args_vector args; @@ -357,8 +362,13 @@ cmdline::parse(const int argc, const char* const* argv, if (::optarg != NULL) { option->validate(::optarg); option_values[option->long_name()].push_back(::optarg); - } else - INV(option->has_default_value()); + } else { + if (option->arg_is_optional()) + option_values[option->long_name()].push_back( + option->default_value()); + else + INV(option->has_default_value()); + } } else { option_values[option->long_name()].push_back(""); } diff --git a/contrib/kyua/utils/process/child.cpp b/contrib/kyua/utils/process/child.cpp index 36b6b6b3e51f..c51c39e6d1ff 100644 --- a/contrib/kyua/utils/process/child.cpp +++ b/contrib/kyua/utils/process/child.cpp @@ -235,6 +235,30 @@ process::child::fork_capture_aux(void) } +std::unique_ptr< process::child > +process::child::fork_interactive(void) +{ + std::cout.flush(); + std::cerr.flush(); + + std::unique_ptr< signals::interrupts_inhibiter > inhibiter( + new signals::interrupts_inhibiter); + pid_t pid = detail::syscall_fork(); + if (pid == -1) { + inhibiter.reset(); // Unblock signals. + throw process::system_error("fork(2) failed", errno); + } else if (pid == 0) { + inhibiter.reset(); // Unblock signals. + return {}; + } else { + signals::add_pid_to_kill(pid); + inhibiter.reset(NULL); // Unblock signals. + return std::unique_ptr< process::child >( + new process::child(new impl(pid, NULL))); + } +} + + /// Helper function for fork(). /// /// Please note: if you update this function to change the return type or to diff --git a/contrib/kyua/utils/process/child.hpp b/contrib/kyua/utils/process/child.hpp index 3e00cea8752c..fbe32311a05b 100644 --- a/contrib/kyua/utils/process/child.hpp +++ b/contrib/kyua/utils/process/child.hpp @@ -80,6 +80,8 @@ class child : noncopyable { static std::unique_ptr< child > fork_capture_aux(void); + static std::unique_ptr< child > fork_interactive(void); + static std::unique_ptr< child > fork_files_aux(const fs::path&, const fs::path&); @@ -92,6 +94,9 @@ public: static std::unique_ptr< child > fork_capture(Hook); std::istream& output(void); + template< typename Hook > + static std::unique_ptr< child > fork_interactive(Hook); + template< typename Hook > static std::unique_ptr< child > fork_files(Hook, const fs::path&, const fs::path&); diff --git a/contrib/kyua/utils/process/child.ipp b/contrib/kyua/utils/process/child.ipp index beb2ea3b0b0a..86bc01fc0d6e 100644 --- a/contrib/kyua/utils/process/child.ipp +++ b/contrib/kyua/utils/process/child.ipp @@ -104,6 +104,26 @@ child::fork_capture(Hook hook) } +template< typename Hook > +std::unique_ptr< child > +child::fork_interactive(Hook hook) +{ + std::unique_ptr< child > child = fork_interactive(); + if (child.get() == NULL) { + try { + hook(); + std::abort(); + } catch (const std::runtime_error& e) { + detail::report_error_and_abort(e); + } catch (...) { + detail::report_error_and_abort(); + } + } + + return child; +} + + } // namespace process } // namespace utils From nobody Mon Nov 23 01:39:33 2026 X-Original-To: dev-commits-src-branches@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 4jXpX56HVSz71bsJ for ; Mon, 23 Nov 2026 01:39:33 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX53nFjz4lvm for ; Mon, 23 Nov 2026 01:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QtH4WtKrihEWPAI3i+9uOO0nEZAckvudiQm/QHcZ0Q=; b=Ya7xX44I7o1Qn1UZXRnXwQsCIShliVEuRTkVU36OSB5ahiRqpn+39hopc902f/fOcKqxP3 G3ENAJR8TPdXFBlGNJB7BjzI/Jqf289tX1H6jluPLg+nnX8RHFU7E2uRyvWiU0V4sA1kRK R5yToEmS2LJdFbRXclUQpwpArOup3m0zEm38aYHBIVJxochrrlmkR/rg/dvHzUJBFa3lqJ tyGXbnN1CAY4nuo2CfozGvldPHcuqi0n2CXH5Ry+LXoptuOAOSafAa8wzIfQk54IAxS3IS ybcYy9tu6ej1oJeByGh5b22eEQ/BlS8vREBdRgQyrrVTOBK8vUR6SEWDuHZBlA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397973; b=KIuqvPc/pPp1Fm5y/ZxrijqEDHcVT3lQ0Um8R/D8JT3I5NUSqz+zKp0JZnsrqFZAvzN3mX VU5K0Xx8nwHOtGtKmL42dagwuz7C/aeOobyWZknuuc1mQdi1bum2YRg0xP0UbFNCFsJieY kfWU2CyRcIQAb/VrIV06WECvpeNAf6kFR76p0AHq1k360vAAMmtJPouPHp1iEOsZSntMwc qhtD4BykX84hzbKLH808+hBFxgPduyd949uG2wEBhGoWdcF/2KWQrPFg6fFprzZJN1R5hK WHx2W7jGaVUHILNCrSMq9MG1PP8wnsPi9etbl3jAa+pIu4ohCVevuRRa/G0Whw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QtH4WtKrihEWPAI3i+9uOO0nEZAckvudiQm/QHcZ0Q=; b=Ql4e1iXKhsLePTn+TcsB0E1nIh0MAjaTTWmRDmCPSLc3OF88eTaspImDYyUjwdL8/e/VAg haP8aIfbY1IB0cHWDUkN///r/5WuMxpbToOwqbRjWFxIQDGQY2LTNcIozVtJjjGhdREr2P oP5D8wUOfVPXfnZ+VCz0cGx2syiG2U64rOJEjaXH7G1B/K+EVeQKve+WFrcALHWo3FUi5v 5j+nVLIIlURpA0C4ygauY6NDJAhUu8De3qb6aOfZyA0MwwMsKwbXf5uwb9+l3e9EC6XX6F rPJE5TadvnjWFFK63D0tut3iQUNg1UWil4czcn26gju6tfcNwLVmvnvtzLQbeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX52xPxzTHQ for ; Mon, 23 Nov 2026 01:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 6661 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Enji Cooper Subject: git: db951ba365a4 - stable/14 - kyua-debug: Add -P option List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: db951ba365a49a0024da90a6c71a1abe08edbcdb Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:33 +0000 Message-Id: <6b039955.6661.4b8e7fc9@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=db951ba365a49a0024da90a6c71a1abe08edbcdb commit db951ba365a49a0024da90a6c71a1abe08edbcdb Author: Dag-Erling Smørgrav AuthorDate: 2026-07-22 08:37:56 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:35:33 +0000 kyua-debug: Add -P option Add -P as shorthand for --pause-before-cleanup. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56613 (cherry picked from commit 7c51da13ae55dc98e9cc1b794e1fe6fc001d7f42) --- contrib/kyua/cli/cmd_debug.cpp | 1 + contrib/kyua/doc/kyua-debug.1.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index 060113d137fa..8ad52afb73a6 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -69,6 +69,7 @@ const cmdline::bool_option pause_before_cleanup_upon_fail_option( const cmdline::bool_option pause_before_cleanup_option( + 'P', "pause-before-cleanup", "Pauses right before the test cleanup"); diff --git a/contrib/kyua/doc/kyua-debug.1.in b/contrib/kyua/doc/kyua-debug.1.in index 263aef3667a7..a28c82dc270f 100644 --- a/contrib/kyua/doc/kyua-debug.1.in +++ b/contrib/kyua/doc/kyua-debug.1.in @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd March 25, 2025 +.Dd July 22, 2026 .Dt KYUA-DEBUG 1 .Os .Sh NAME @@ -99,7 +99,7 @@ This flag makes it possible to preserve such artifacts immediately after a test failure, simplifying debugging. Otherwise, these artifacts would be removed by the test cleanup routine or by Kyua built-in cleanup mechanism. -.It Fl -pause-before-cleanup +.It Fl -pause-before-cleanup , Fl P The unconditional variant of the previous option. This can be helpful for reproducing the infrastructure or fixture of a passing test for further development or additional analysis. From nobody Mon Nov 23 01:39:34 2026 X-Original-To: dev-commits-src-branches@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 4jXpX66JZLz71bsL for ; Mon, 23 Nov 2026 01:39:34 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX64XdMz4m8S for ; Mon, 23 Nov 2026 01:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFOM6xLFCBzoxvEqgYcZwndTeGrm3UlgsfBLZynH6L4=; b=Y4LgvIqCPcg9PycDGchEV4CfaNjosf20YCihuCtB18R55k5ebuQiUfumXXIt9VMpROO27R TIHq8I5ej8Ll+jvfJDmTshzlgR42Ln0Vm60QRPJJdWirWi/T+oc7wlIdVfoATffalWLJs8 0hIgpaIW4Yrp56HNkqN6Zy2tyYgMqzfa4Qt3hFagFtN52M961e6VS1CkkBHR5S0mXrqHP9 5sQEE1QX5DH/OdKhrhrzwCBgOBKcR246gLLlhz0Wag8lFNqwFsUa7d/aPm5QUYo6ecPVzp sWc3ulcEMQwuhLQj3uNuQX7EWuqCKb7kYgduLcBFdM6ja2k2SMhzIxEnWr3acQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397974; b=g7ChgB8cbBIiFxNx/Rhy9C6IiFrGG+tq8B5LzTBeZq6l+0PiKAAkQexgDo3zJJEUluHMJu OJOs2PFYRZpS8z5i7kerFWy89mVp2a9KFhst8aekpVjvEg3Y0+B62hG9uptvTfHcNdwljj NNXIzjAPfvkvPQ5g7mKOmc22pYv237yWyUiSW0FsZG3tyLY07Mqr4vdeMeFuj89Y+zkC5T EZaQmMSzESSGfZeYbd2ldmelUWACggiPmFWWn0qSSmBfc9ApvCr5YpnUHwdKLTNIVzUlWI 63BjmL1U9Tgm/zef/lVU9Dvb+5oMbl9QXRqBSzSUFV7ZNXLhFIL2MCF+AGK+wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFOM6xLFCBzoxvEqgYcZwndTeGrm3UlgsfBLZynH6L4=; b=voUN8h/Ykml1IYBf6pfYxbRo4Jo6j6Ga/8SEfV7qfRJ1YQXT0qtf1H9LUtUaMU6aFLLTMl 3/xxHF5mF3IrTNgdqx/B0jUDNz7UdKz9kfJ+Nlkq1EjZrF/x+Cp+Fh9ftJ6Wyzxmx7CylV qC1s5ca/IFDFcBMdVFQ4+Apvhg6GHUU3nbQgBtwj2aOD3XFXFtOv9aLnZf4mKmkaiWKrT2 nP2Vb93wjdNYv3ZwQn5VslDJjBpqoseZPGj4HNfOktGlS7oRd9BJi+vP558Ri2i4XJZrbU UFgslD3hK7/mBLYGnL6Ipqq9fIVEKmqYK2ncSVRHBLzrjkJ7faO9HPDbD+ryWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX63RRJzTL0 for ; Mon, 23 Nov 2026 01:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 454b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: f203a6264f00 - stable/14 - kyua: Add "prepare" command List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f203a6264f00ad780f17608c1806258907d93e7e Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:34 +0000 Message-Id: <6b039956.454b.30b99735@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f203a6264f00ad780f17608c1806258907d93e7e commit f203a6264f00ad780f17608c1806258907d93e7e Author: Igor Ostapenko AuthorDate: 2026-08-23 22:42:48 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:35:53 +0000 kyua: Add "prepare" command This introduces the requirement preparation handler concept, with the first handler implemented to load the required kernel modules. Running without arguments lists all available handlers: kyua prepare Currently there are only two handlers: all: runs all available handlers kmods: loads the modules declared by required_kmods metadata The dry run option lists the required modules without actual loading: kyua prepare { --dry-run | -n } kmods The "prepare" command traverses only the given tree of tests, i.e., the following invocation lists all required modules for the whole test suite: kyua prepare -k /usr/tests/Kyuafile -n kmods , while this one is limited to the pf tests only: kyua prepare -k /usr/tests/sys/netpfil/pf/Kyuafile -n kmods Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D48087 (cherry picked from commit edb230c4af499203d7a6894b3711fe6574b26040) --- contrib/kyua/cli/cmd_prepare.cpp | 76 +++++++++++++++ contrib/kyua/cli/cmd_prepare.hpp | 53 +++++++++++ contrib/kyua/cli/main.cpp | 2 + contrib/kyua/doc/kyuafile.5.in | 1 + contrib/kyua/engine/prepare/prepare.cpp | 83 ++++++++++++++++ contrib/kyua/engine/prepare/prepare.hpp | 107 +++++++++++++++++++++ contrib/kyua/engine/prepare/prepare_all.cpp | 66 +++++++++++++ contrib/kyua/engine/prepare/prepare_all.hpp | 53 +++++++++++ contrib/kyua/model/metadata.cpp | 47 +++++---- contrib/kyua/model/metadata.hpp | 4 +- contrib/kyua/os/freebsd/main.cpp | 8 ++ contrib/kyua/os/freebsd/prepare_kmods.cpp | 143 ++++++++++++++++++++++++++++ contrib/kyua/os/freebsd/prepare_kmods.hpp | 55 +++++++++++ usr.bin/kyua/Makefile | 8 +- 14 files changed, 686 insertions(+), 20 deletions(-) diff --git a/contrib/kyua/cli/cmd_prepare.cpp b/contrib/kyua/cli/cmd_prepare.cpp new file mode 100644 index 000000000000..a3ba5c3285a1 --- /dev/null +++ b/contrib/kyua/cli/cmd_prepare.cpp @@ -0,0 +1,76 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "cli/cmd_prepare.hpp" + +#include "cli/common.ipp" +#include "engine/prepare/prepare.hpp" +#include "utils/cmdline/options.hpp" + +namespace cmdline = utils::cmdline; +namespace config = utils::config; +namespace prepare = engine::prepare; + +using cli::cmd_prepare; + + +/// Default constructor for cmd_prepare. +cmd_prepare::cmd_prepare(void) : cli_command( + "prepare", "[handler-name ...]", 0, -1, + "Prepares environment and declared requirements before testing") +{ + add_option(kyuafile_option); + add_option(build_root_option); + add_option(cmdline::bool_option('n', "dry-run", "Do not alter the system")); +} + + +/// Entry point for the "prepare" subcommand. +/// +/// \param ui Object to interact with the I/O of the program. +/// \param cmdline Representation of the command line to the subcommand. +/// \param user_config The runtime configuration of the program. +/// +/// \return 0 if successful, 1 otherwise. +int +cmd_prepare::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) +{ + // List available preparation handlers + if (cmdline.arguments().empty()) { + for (auto& h : prepare::handlers()) { + ui->out(h->name(), false); + ui->out("\t\t\t", false); + ui->out(h->description()); + } + return EXIT_SUCCESS; + } + + // Or run the given ones + return prepare::run(cmdline.arguments(), ui, cmdline, user_config); +} diff --git a/contrib/kyua/cli/cmd_prepare.hpp b/contrib/kyua/cli/cmd_prepare.hpp new file mode 100644 index 000000000000..322b2baf9e8f --- /dev/null +++ b/contrib/kyua/cli/cmd_prepare.hpp @@ -0,0 +1,53 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file cli/cmd_prepare.hpp +/// Provides the cmd_prepare class. + +#if !defined(CLI_CMD_PREPARE_HPP) +#define CLI_CMD_PREPARE_HPP + +#include "cli/common.hpp" + +namespace cli { + + +/// Implementation of the "prepare" subcommand. +class cmd_prepare : public cli_command +{ +public: + cmd_prepare(void); + + int run(utils::cmdline::ui*, const utils::cmdline::parsed_cmdline&, + const utils::config::tree&); +}; + + +} // namespace cli + +#endif // !defined(CLI_CMD_PREPARE_HPP) diff --git a/contrib/kyua/cli/main.cpp b/contrib/kyua/cli/main.cpp index dd7ce939e162..ad679f0949b3 100644 --- a/contrib/kyua/cli/main.cpp +++ b/contrib/kyua/cli/main.cpp @@ -49,6 +49,7 @@ extern "C" { #include "cli/cmd_debug.hpp" #include "cli/cmd_help.hpp" #include "cli/cmd_list.hpp" +#include "cli/cmd_prepare.hpp" #include "cli/cmd_report.hpp" #include "cli/cmd_report_html.hpp" #include "cli/cmd_report_junit.hpp" @@ -191,6 +192,7 @@ safe_main(cmdline::ui* ui, int argc, const char* const argv[], commands.insert(new cli::cmd_debug(), "Workspace"); commands.insert(new cli::cmd_list(), "Workspace"); + commands.insert(new cli::cmd_prepare(), "Workspace"); commands.insert(new cli::cmd_test(), "Workspace"); commands.insert(new cli::cmd_report(), "Reporting"); diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index a9106e95d790..eddb8f92cb86 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -300,6 +300,7 @@ Supported platforms: .Pp ATF: .Va require.kmods +(appends to the list declared at the Kyuafile level instead of overwriting it) .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/engine/prepare/prepare.cpp b/contrib/kyua/engine/prepare/prepare.cpp new file mode 100644 index 000000000000..218b236450c0 --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare.cpp @@ -0,0 +1,83 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/prepare/prepare.hpp" + +#include "engine/prepare/prepare_all.hpp" + +namespace prepare = engine::prepare; + + +/// List of registered requirement preparation handlers. +/// +/// Use register_handler() to add an entry to this global list. +static std::vector< std::shared_ptr< prepare::handler > > _handlers = { + std::shared_ptr< prepare::handler >(new prepare::prepare_all()) +}; + + +void +prepare::register_handler(const std::shared_ptr< handler > handler) +{ + _handlers.push_back(handler); +} + + +const std::vector< std::shared_ptr< prepare::handler > > +prepare::handlers() +{ + return _handlers; +} + + +int +prepare::run(const std::vector< std::string >& handler_names, + cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) +{ + for (auto& hname : handler_names) { + std::shared_ptr< prepare::handler > handler = nullptr; + for (auto& h : prepare::handlers()) + if (h->name() == hname) { + handler = h; + break; + } + + if (handler == nullptr) { + ui->out(F("Unknown requirement preparation handler: %s") % hname); + return EXIT_FAILURE; + } + + if (handler->exec(ui, cmdline, user_config) != 0) + // suppress the actual code -- main limits possible exit codes + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/contrib/kyua/engine/prepare/prepare.hpp b/contrib/kyua/engine/prepare/prepare.hpp new file mode 100644 index 000000000000..2ee12b11a623 --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare.hpp @@ -0,0 +1,107 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/prepare/prepare.hpp +/// Requirement preparation subsystem interface. + +#if !defined(ENGINE_PREPARE_HPP) +#define ENGINE_PREPARE_HPP + +#include +#include + +#include "utils/cmdline/parser.ipp" +#include "utils/cmdline/ui.hpp" +#include "utils/config/tree.ipp" + +namespace cmdline = utils::cmdline; +namespace config = utils::config; + + +namespace engine { +namespace prepare { + + +/// Abstract interface of a requirement preparation handler. +class handler { +public: + /// Constructor. + handler() {} + + /// Destructor. + virtual ~handler() {} + + /// Returns name of the handler. + virtual const std::string& name() const = 0; + + /// Returns short description of the handler. + virtual const std::string& description() const = 0; + + /// Runs the requirement preparation handler. + /// + /// \param ui Object to interact with the I/O of the program. + /// \param cmdline Representation of the command line to the subcommand. + /// \param user_config The runtime configuration of the program. + /// + /// \return 0 to indicate success. + virtual int exec(cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const = 0; +}; + + +/// Registers a requirement preparation handler. +/// +/// \param handler A requirement preparation handler. +void register_handler(const std::shared_ptr< handler > handler); + + +/// Returns the list of registered requirement preparation handlers. +/// +/// \return A vector of pointers to requirement preparation handlers. +const std::vector< std::shared_ptr< handler > > handlers(); + + +/// Run named handlers. +/// +/// \param handler_names Names of the handlers to run. +/// \param ui Object to interact with the I/O of the program. +/// \param cmdline Representation of the command line to the subcommand. +/// \param user_config The runtime configuration of the program. +/// +/// \return 0 to indicate success. +int run(const std::vector< std::string >& handler_names, + cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config); + + +} // namespace prepare +} // namespace engine + +#endif // !defined(ENGINE_PREPARE_HPP) diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp new file mode 100644 index 000000000000..db8ea330a51e --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare_all.cpp @@ -0,0 +1,66 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/prepare/prepare_all.hpp" + +static const std::string _name = "all"; +static const std::string _description = "Run all preparations"; + +namespace prepare = engine::prepare; + + +const std::string& +prepare::prepare_all::name() const +{ + return _name; +} + + +const std::string& +prepare::prepare_all::description() const +{ + return _description; +} + + +int +prepare::prepare_all::exec(cmdline::ui* ui, + const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const +{ + for (auto& handler : prepare::handlers()) { + if (handler->name() == this->name()) + continue; + + int error = handler->exec(ui, cmdline, user_config); + if (error != EXIT_SUCCESS) + return error; + } + + return EXIT_SUCCESS; +} diff --git a/contrib/kyua/engine/prepare/prepare_all.hpp b/contrib/kyua/engine/prepare/prepare_all.hpp new file mode 100644 index 000000000000..7c5c54fe269c --- /dev/null +++ b/contrib/kyua/engine/prepare/prepare_all.hpp @@ -0,0 +1,53 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/prepare/prepare_all.hpp +/// The requirement preparation handler which runs all registered handlers. + +#if !defined(ENGINE_PREPARE_ALL_HPP) +#define ENGINE_PREPARE_ALL_HPP + +#include "engine/prepare/prepare.hpp" + +namespace engine { +namespace prepare { + + +class prepare_all : public prepare::handler { +public: + const std::string& name() const; + const std::string& description() const; + int exec(cmdline::ui*, const cmdline::parsed_cmdline&, + const config::tree&) const; +}; + + +} // namespace prepare +} // namespace engine + +#endif // !defined(ENGINE_PREPARE_ALL_HPP) diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp index afb31435a238..708a01667bbb 100644 --- a/contrib/kyua/model/metadata.cpp +++ b/contrib/kyua/model/metadata.cpp @@ -255,8 +255,8 @@ init_tree(config::tree& tree) tree.define< config::strings_set_node >("required_configs"); tree.define< bytes_node >("required_disk_space"); tree.define< paths_set_node >("required_files"); - tree.define< bytes_node >("required_memory"); tree.define< config::strings_set_node >("required_kmods"); + tree.define< bytes_node >("required_memory"); tree.define< paths_set_node >("required_programs"); tree.define< user_node >("required_user"); tree.define< delta_node >("timeout"); @@ -282,8 +282,8 @@ set_defaults(config::tree& tree) model::strings_set()); tree.set< bytes_node >("required_disk_space", units::bytes(0)); tree.set< paths_set_node >("required_files", model::paths_set()); - tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< config::strings_set_node >("required_kmods", model::strings_set()); + tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< paths_set_node >("required_programs", model::paths_set()); tree.set< user_node >("required_user", ""); // TODO(jmmv): We shouldn't be setting a default timeout like this. See @@ -585,20 +585,6 @@ model::metadata::required_files(void) const } -/// Returns the amount of memory required by the test. -/// -/// \return Number of bytes, or 0 if this does not apply. -const units::bytes& -model::metadata::required_memory(void) const -{ - if (_pimpl->props.is_set("required_memory")) { - return _pimpl->props.lookup< bytes_node >("required_memory"); - } else { - return get_defaults().lookup< bytes_node >("required_memory"); - } -} - - /// Returns the list of kernel modules needed by the test. /// /// \return Set of kernel module names. @@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const } +/// Returns the amount of memory required by the test. +/// +/// \return Number of bytes, or 0 if this does not apply. +const units::bytes& +model::metadata::required_memory(void) const +{ + if (_pimpl->props.is_set("required_memory")) { + return _pimpl->props.lookup< bytes_node >("required_memory"); + } else { + return get_defaults().lookup< bytes_node >("required_memory"); + } +} + + /// Returns the list of programs needed by the test. /// /// \return Set of paths. @@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files) } +/// Sets the list of required kernel modules. +/// +/// \param vars Set of kernel module names. +/// +/// \return A reference to this builder. +/// +/// \throw model::error If the value is invalid. +model::metadata_builder& +model::metadata_builder::set_required_kmods(const model::strings_set& kmods) +{ + set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods); + return *this; +} + + /// Sets the amount of memory required by the test. /// /// \param bytes Number of bytes. diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp index eee7eaf0f7c4..d915677eb41d 100644 --- a/contrib/kyua/model/metadata.hpp +++ b/contrib/kyua/model/metadata.hpp @@ -75,8 +75,8 @@ public: const strings_set& required_configs(void) const; const utils::units::bytes& required_disk_space(void) const; const paths_set& required_files(void) const; - const utils::units::bytes& required_memory(void) const; const strings_set& required_kmods(void) const; + const utils::units::bytes& required_memory(void) const; const paths_set& required_programs(void) const; const std::string& required_user(void) const; const utils::datetime::delta& timeout(void) const; @@ -121,8 +121,8 @@ public: metadata_builder& set_required_configs(const strings_set&); metadata_builder& set_required_disk_space(const utils::units::bytes&); metadata_builder& set_required_files(const paths_set&); - metadata_builder& set_required_memory(const utils::units::bytes&); metadata_builder& set_required_kmods(const strings_set&); + metadata_builder& set_required_memory(const utils::units::bytes&); metadata_builder& set_required_programs(const paths_set&); metadata_builder& set_required_user(const std::string&); metadata_builder& set_string(const std::string&, const std::string&); diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 700284b64b78..30f1a3fa7142 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -34,7 +34,12 @@ #include "engine/requirements.hpp" #include "os/freebsd/reqs_checker_kmods.hpp" +#include "engine/prepare/prepare.hpp" +#include "os/freebsd/prepare_kmods.hpp" + namespace execenv = engine::execenv; +namespace prepare = engine::prepare; + /// FreeBSD related features initialization. /// @@ -59,6 +64,9 @@ freebsd::main(const int, const char* const* const) new freebsd::reqs_checker_kmods() ) ); + + prepare::register_handler( + std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods())); #endif return 0; diff --git a/contrib/kyua/os/freebsd/prepare_kmods.cpp b/contrib/kyua/os/freebsd/prepare_kmods.cpp new file mode 100644 index 000000000000..91771f3aedfd --- /dev/null +++ b/contrib/kyua/os/freebsd/prepare_kmods.cpp @@ -0,0 +1,143 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/prepare_kmods.hpp" + +#include "cli/common.hpp" +#include "drivers/list_tests.hpp" +#include "engine/filters.hpp" +#include "model/metadata.hpp" +#include "model/test_case.hpp" +#include "model/test_program.hpp" + +#include + +// FreeBSD kldload syscall +extern "C" { +#include +#include +} + + +namespace { + + +static const std::string _name = "kmods"; +static const std::string _description = "FreeBSD: load modules specified " + "in the required_kmods metadata"; + + +/// Hooks for list_tests to examine test cases as they come. +class list_hooks : public drivers::list_tests::base_hooks { + /// Collected names of required kernel modules. + std::set< std::string >& _modules; + +public: + /// Initializes the hooks. + /// + /// \param modules_ The set of modules to fill. + list_hooks(std::set< std::string >& modules_) : + _modules(modules_) + { + } + + /// Examine a test case as soon as it is found. + /// + /// \param test_program The test program containing the test case. + /// \param test_case_name The name of the located test case. + void + got_test_case(const model::test_program& test_program, + const std::string& test_case_name) + { + auto test_case = test_program.find(test_case_name); + auto kmods = test_case.get_metadata().required_kmods(); + _modules.insert(kmods.begin(), kmods.end()); + } +}; + + +} // anonymous namespace + + +namespace freebsd { + + +const std::string& +prepare_kmods::name() const +{ + return _name; +} + + +const std::string& +prepare_kmods::description() const +{ + return _description; +} + + +int +prepare_kmods::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, + const config::tree& user_config) const +{ + int err = 0; + + // Collect required modules + std::set< std::string > modules; + list_hooks hooks(modules); + const std::set< engine::test_filter > nofilters; + const drivers::list_tests::result result = drivers::list_tests::drive( + cli::kyuafile_path(cmdline), cli::build_root_path(cmdline), + nofilters, user_config, hooks); + + // Nothing to do + if (modules.empty()) + return 0; + + // Announce the work + ui->out("kldload", false); + for (auto& m : modules) + ui->out(F(" %s") % m, false); + ui->out(""); + + if (cmdline.has_option("dry-run")) + return 0; + + // Load the modules + for (auto& m : modules) { + if (::kldload(m.c_str()) != -1 || errno == EEXIST) + continue; + ui->out(F("WARN: cannot kldload %s") % m); + err = EINVAL; + } + + return err; +} + + +} // namespace freebsd diff --git a/contrib/kyua/os/freebsd/prepare_kmods.hpp b/contrib/kyua/os/freebsd/prepare_kmods.hpp new file mode 100644 index 000000000000..36a3236a4e2d --- /dev/null +++ b/contrib/kyua/os/freebsd/prepare_kmods.hpp @@ -0,0 +1,55 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/prepare_kmods.hpp +/// The preparation handler which loads FreeBSD modules declared via +/// "required_kmods" metadata. + +#if !defined(FREEBSD_PREPARE_KMODS_HPP) +#define FREEBSD_PREPARE_KMODS_HPP + +#include "engine/prepare/prepare.hpp" + +namespace prepare = engine::prepare; + + +namespace freebsd { + + +class prepare_kmods : public prepare::handler { +public: + const std::string& name() const; + const std::string& description() const; + int exec(cmdline::ui*, const cmdline::parsed_cmdline&, + const config::tree&) const; +}; + + +} // namespace freebsd + +#endif // !defined(FREEBSD_PREPARE_KMODS_HPP) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 931958f09f2c..593eaee9d378 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -127,11 +127,14 @@ SRCS+= engine/atf.cpp \ engine/tap_parser.cpp \ engine/scheduler.cpp \ engine/execenv/execenv.cpp \ - engine/execenv/execenv_host.cpp + engine/execenv/execenv_host.cpp \ + engine/prepare/prepare.cpp \ + engine/prepare/prepare_all.cpp SRCS+= os/freebsd/execenv_jail_manager.cpp \ os/freebsd/main.cpp \ - os/freebsd/reqs_checker_kmods.cpp + os/freebsd/reqs_checker_kmods.cpp \ + os/freebsd/prepare_kmods.cpp SRCS+= store/dbtypes.cpp \ store/exceptions.cpp \ @@ -156,6 +159,7 @@ SRCS+= cli/cmd_about.cpp \ cli/cmd_debug.cpp \ cli/cmd_help.cpp \ cli/cmd_list.cpp \ + cli/cmd_prepare.cpp \ cli/cmd_report.cpp \ cli/cmd_report_html.cpp \ cli/cmd_report_junit.cpp \ From nobody Mon Nov 23 01:39:35 2026 X-Original-To: dev-commits-src-branches@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 4jXpX806Dvz71c2R for ; Mon, 23 Nov 2026 01:39:36 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX74Kr1z4mDb for ; Mon, 23 Nov 2026 01:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyH/hfZAJoU+68TU8wP9GWCAfmGJ90fSUhSrQNpfjJo=; b=sX/AuTg+AngPvMijpZbmFYOHFzY+ozGuKXhkjJAfh5fm9GDlBDkNkT42HMtkl0Yv4CGx9Q 0xhEXFgQ4RnXoUyPMcf+wouIcK9b9No92reL0aInPzBriO9Q2350asA8pDbNyrAoqz2pbj aXflSU5+xMLLX4JL+hnapR4ctlLpH40wfwXTuuLArprC59w1g6YV6EnkxTRcp1fFvFGPcI KHrFrio95HlKQLDYdI1vgNMPauR+4+lvsQZdwhEw3gx/oBttzuQuQDh05QYK0zYVBmXvSM UGpIR30F/zZRaxQ0qmw2Bc2AZ99fkkgeiBKYGxiuF6Y/IEgKGX6QTxPQBoqfCA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397975; b=jI7trwc9jY1vdu85b+mEvtT96oH4yEByxXvct2iIgjwjUDQ8hpUOf7kdC/3aMAEhOVU1z1 WLmdPk892abG2d8sVhdDSaI/y7dWR8XnmZGCsCSj2DLS1nX7EIPPaQjTAk8FWC3r6+j/Pv yAurwH9SPIvv0ESAJuzq8bklxn0qghLEocEaD1PcdrMs4kkzpkxZ1eqpLkH6lRH07kd5Ba YTRLrb+3PWqvZKwQc8jMQf+d96841XFuttNAB8NhyKmFnquwln2UYzdP3hR41R8GlCVYqE TWEX1TklaV2/zKO5AGy8Z+UEvGu2SgoEehEYm1QOnueWb/B4+yrZvhtMaz1JLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyH/hfZAJoU+68TU8wP9GWCAfmGJ90fSUhSrQNpfjJo=; b=DDN8YWuFxjQgsfe6sHbTZsQRg4c3HUooPtkAZ4/IM6z76rBRyaPZvhSQfiV1RTBKQycNt2 RaIGqXGG7bUSUK7pHr4OFBgW8DPkzYkIjGYJ1g7UypZQ2q0JqyyV/WMRdQ1tnlhymuFoJC JQWmU/E5U+F5tywAkBllp/WabouK65UOROrGs2OQWpMs4ckaC0Rq+jOH1rq/MZQaMGs+IJ ta4OSXtpUNrcgk6lkwElyF2PvUXqQI9i+v21o5lxsOcxCCn37SgqtnNIoQhY9hbMwmIlR6 aQXwZZ/I060Q4glFKcQKCNEGcso/PaTuIwZtAp6PUOaigSc3AOwu4Mjv7qLHuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX73hjrzTL2 for ; Mon, 23 Nov 2026 01:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 54eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Siva Mahadevan From: Enji Cooper Subject: git: c0e03beeee8c - stable/14 - contrib/kyua: fix -Wshadow error List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c0e03beeee8c84bcbdc1605065f43408b2fb7ac3 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:35 +0000 Message-Id: <6b039957.54eb.1c779d2a@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e03beeee8c84bcbdc1605065f43408b2fb7ac3 commit c0e03beeee8c84bcbdc1605065f43408b2fb7ac3 Author: Siva Mahadevan AuthorDate: 2026-09-05 14:12:11 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:35:53 +0000 contrib/kyua: fix -Wshadow error This fixes the build with gcc 14: /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow] 56 | for (auto& handler : prepare::handlers()) { | ^~~~~~~ In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35, from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29: /usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here 51 | class handler { | ^ Fixes: edb230c4af499203d7a6894b3711fe6574b26040 Reviewed by: igoro, rlibby, ngie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59346 (cherry picked from commit a73bb621ca361edc678bbf49f3ca1acca8aa0344) --- contrib/kyua/engine/prepare/prepare_all.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp index db8ea330a51e..73591ef5822a 100644 --- a/contrib/kyua/engine/prepare/prepare_all.cpp +++ b/contrib/kyua/engine/prepare/prepare_all.cpp @@ -53,11 +53,11 @@ prepare::prepare_all::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline, const config::tree& user_config) const { - for (auto& handler : prepare::handlers()) { - if (handler->name() == this->name()) + for (auto& h : prepare::handlers()) { + if (h->name() == this->name()) continue; - int error = handler->exec(ui, cmdline, user_config); + int error = h->exec(ui, cmdline, user_config); if (error != EXIT_SUCCESS) return error; } From nobody Mon Nov 23 01:39:36 2026 X-Original-To: dev-commits-src-branches@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 4jXpX95q09z71c2X for ; Mon, 23 Nov 2026 01:39:37 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX85v2Xz4m8c for ; Mon, 23 Nov 2026 01:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397976; 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=EjIKksdq04rNgucySjEICpGu5WP6MZ9ID05kmR5E7Is=; b=Z5Bl3lWbZGtIjS5yt8ubKSkEOXfPURgX0nVPJ0ulH1JcyU+GXse9E1AXd6nJSIMwAqiZ/h 46DhO28GImUb1z8U4QGJSxmsJVmkm6cQwKbYO7yF0ZpKDT3jLEVYcsJN1JnKA5N0tKuXK4 f5iVPTHPKK5sLUiBqy2V8GSwF5s65+riTbYjxXrX+GUAOJTz3jyVxnUE2ESd1gH3jSHjSw TttEch5Id8z8wWncr+VwuA+wRGEqwh8ZbtPiXxPx2OQY3q2Pue9S12IOChtMkwW/f5KBxi LzpHGYA635CJbbg1TscwFq7jIc1zf4ACPOY+O4SEd9LSImrsnm99sjXA4QUuTw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397976; b=E96pUGue2MsmKo2W/qns/rat9Ud2PYVb84k+BP76LUwaSuAF4TnhnbI594Dqaiaus5TNo3 T13npc/oswpRFSIwGhXOItF2NCmF0Y+bqY4aEkHJLec6AIGXOCng4NnOIG86h+a76mCqg+ C/SJWfwMgnZD4uMCPHbgoHUDluLtd5WDVFNtz/VO24oD8XozK1e8bC4us96f4Xaj7TkVQp mBLfGMn4keBjyGwaojHIPy3S3SHcs7tnmKKkPP7+OKbDFbYjowHIk9BaVUOH2nO19Ukf4M RDUwBU9Ri9dIvyb3JNjBrTWa4bQlBd9llvDxgbzO2xbhP+djAqaS+cB9Sx9C3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397976; 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=EjIKksdq04rNgucySjEICpGu5WP6MZ9ID05kmR5E7Is=; b=Wnsk68yQwBJb4VUngIauS6niozEJ6EhQHTMqUkXWDMd2tnEcAPy1RgU/Qa1yQVINA2FyZ3 FFkffxRStZQcA+xSF9K3RutX7ZHhODoOoUyPZY/UdB4Aw0STmUFSsxZhHF6aULKuJXB80H mpL8EQ/FaIcfMbeHgAbd+5Vj7v782+2XgMmYtq1/dbvOrtF/hVzJsk9CInSueb+xgtSPQ1 8zzBk0VXGfkamjx0DGbgTi3ALKVUvnrICBd953rsx7nX413qlatnE2Lboj+e6t6Mp5ZAWX GXfCZ0fqr1BDa/ofH4NMm4C60kaBSIRT/JdKqmWCHjUb6qzunm6wK9fjRT/m4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX851y8zTFF for ; Mon, 23 Nov 2026 01:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4457 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 1c503e031aa7 - stable/14 - contrib/kyua: update to 0.15.0 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1c503e031aa7e468a127b0ad2adec8e2bc3b8f56 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:36 +0000 Message-Id: <6b039958.4457.6d1a1138@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1c503e031aa7e468a127b0ad2adec8e2bc3b8f56 commit 1c503e031aa7e468a127b0ad2adec8e2bc3b8f56 Author: Enji Cooper AuthorDate: 2026-10-07 17:50:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:36:15 +0000 contrib/kyua: update to 0.15.0 This new release contains multiple feature updates and bugfixes. Please see the release notes mentioned in the merge commit for more details. MFC after: 1 month Merge commit '144afd05f8a2300361ec30c1c2020e4022ddd943' Conflicts: contrib/kyua/cli/cmd_debug.cpp contrib/kyua/doc/kyua-debug.1.in contrib/kyua/doc/kyuafile.5.in contrib/kyua/engine/config.cpp contrib/kyua/engine/execenv/execenv.cpp contrib/kyua/engine/execenv/execenv.hpp contrib/kyua/engine/execenv/execenv_host.hpp contrib/kyua/engine/requirements.cpp contrib/kyua/engine/requirements.hpp contrib/kyua/engine/scheduler.cpp contrib/kyua/model/metadata.cpp contrib/kyua/os/freebsd/execenv_jail.hpp contrib/kyua/os/freebsd/execenv_jail_stub.cpp contrib/kyua/os/freebsd/main.cpp contrib/kyua/os/freebsd/reqs_checker_kmods.cpp contrib/kyua/os/freebsd/utils/jail.hpp contrib/kyua/utils/fs/directory.cpp contrib/kyua/utils/process/executor.cpp (cherry picked from commit eb8f69902f7de8012a31a85db2f88a54584f81af) --- contrib/kyua/.cirrus.yml | 25 - contrib/kyua/.gitignore | 23 - contrib/kyua/.travis.yml | 49 -- contrib/kyua/Doxyfile.in | 1 - contrib/kyua/FREEBSD-Xlist | 12 + contrib/kyua/INSTALL.md | 268 ------ contrib/kyua/Makefile.am | 186 ---- contrib/kyua/{NEWS.md => NEWS} | 163 +++- contrib/kyua/README.md | 33 +- contrib/kyua/admin/.gitignore | 6 - contrib/kyua/admin/Makefile.am.inc | 41 - contrib/kyua/admin/build-bintray-dist.sh | 131 --- contrib/kyua/admin/check-api-docs.awk | 72 -- contrib/kyua/admin/check-style-common.awk | 79 -- contrib/kyua/admin/check-style-cpp.awk | 87 -- contrib/kyua/admin/check-style-make.awk | 71 -- contrib/kyua/admin/check-style-man.awk | 71 -- contrib/kyua/admin/check-style-shell.awk | 95 -- contrib/kyua/admin/check-style.sh | 170 ---- contrib/kyua/admin/clean-all.sh | 90 -- contrib/kyua/admin/travis-build.sh | 98 --- contrib/kyua/admin/travis-install-deps.sh | 83 -- contrib/kyua/bootstrap/.gitignore | 4 - contrib/kyua/bootstrap/Kyuafile | 5 - contrib/kyua/bootstrap/Makefile.am.inc | 90 -- contrib/kyua/bootstrap/plain_helpers.cpp | 141 --- contrib/kyua/bootstrap/testsuite.at | 200 ----- contrib/kyua/cli/Makefile.am.inc | 123 --- contrib/kyua/cli/cmd_debug.cpp | 7 +- contrib/kyua/cli/main.cpp | 4 + contrib/kyua/config.h | 139 +++ contrib/kyua/configure.ac | 173 ---- contrib/kyua/doc/.gitignore | 14 - contrib/kyua/doc/Makefile.am.inc | 152 ---- contrib/kyua/doc/kyua-about.1.in | 2 +- contrib/kyua/doc/kyua-config.1.in | 2 +- contrib/kyua/doc/kyua-db-exec.1.in | 2 +- contrib/kyua/doc/kyua-db-migrate.1.in | 2 +- contrib/kyua/doc/kyua-debug.1.in | 4 +- contrib/kyua/doc/kyua-help.1.in | 2 +- contrib/kyua/doc/kyua-list.1.in | 2 +- contrib/kyua/doc/kyua-report-html.1.in | 2 +- contrib/kyua/doc/kyua-report-junit.1.in | 2 +- contrib/kyua/doc/kyua-report.1.in | 2 +- contrib/kyua/doc/kyua-test.1.in | 2 +- contrib/kyua/doc/kyua.1.in | 6 +- contrib/kyua/doc/kyua.conf.5.in | 2 +- contrib/kyua/doc/kyuafile.5.in | 19 +- contrib/kyua/drivers/Makefile.am.inc | 72 -- contrib/kyua/engine/Kyuafile | 3 + contrib/kyua/engine/Makefile.am.inc | 155 ---- contrib/kyua/engine/atf.hpp | 21 +- contrib/kyua/engine/atf_result.cpp | 16 +- contrib/kyua/engine/atf_result_test.cpp | 7 +- contrib/kyua/engine/atf_test.cpp | 2 +- contrib/kyua/engine/config.cpp | 4 +- contrib/kyua/engine/execenv/execenv.cpp | 3 - contrib/kyua/engine/execenv/execenv.hpp | 6 +- contrib/kyua/engine/execenv/execenv_fwd.hpp | 44 + contrib/kyua/engine/execenv/execenv_host.hpp | 2 +- contrib/kyua/engine/googletest.cpp | 219 +++++ contrib/kyua/engine/googletest.hpp | 68 ++ contrib/kyua/engine/googletest_helpers.cpp | 330 +++++++ contrib/kyua/engine/googletest_list.cpp | 111 +++ .../atf_helpers.cpp => engine/googletest_list.hpp} | 49 +- contrib/kyua/engine/googletest_list_test.cpp | 208 +++++ contrib/kyua/engine/googletest_result.cpp | 528 ++++++++++++ contrib/kyua/engine/googletest_result.hpp | 111 +++ contrib/kyua/engine/googletest_result_fwd.hpp | 43 + contrib/kyua/engine/googletest_result_test.cpp | 427 +++++++++ contrib/kyua/engine/googletest_test.cpp | 361 ++++++++ contrib/kyua/engine/kyuafile.hpp | 5 - contrib/kyua/engine/kyuafile_test.cpp | 10 +- contrib/kyua/engine/plain.hpp | 13 +- contrib/kyua/engine/requirements.cpp | 4 +- contrib/kyua/engine/requirements.hpp | 4 +- contrib/kyua/engine/scheduler.cpp | 4 +- contrib/kyua/engine/scheduler.hpp | 26 +- contrib/kyua/engine/scheduler_test.cpp | 24 +- contrib/kyua/engine/tap.hpp | 13 +- contrib/kyua/examples/Makefile.am.inc | 45 - contrib/kyua/integration/Makefile.am.inc | 150 ---- contrib/kyua/integration/cmd_about_test.sh | 2 +- contrib/kyua/integration/cmd_report_test.sh | 2 +- contrib/kyua/integration/cmd_test_test.sh | 4 +- contrib/kyua/integration/helpers/.gitignore | 11 - contrib/kyua/integration/helpers/Makefile.am.inc | 90 -- contrib/kyua/integration/utils.sh | 34 +- contrib/kyua/m4/ax_cxx_compile_stdcxx.m4 | 951 --------------------- contrib/kyua/m4/compiler-features.m4 | 122 --- contrib/kyua/m4/compiler-flags.m4 | 169 ---- contrib/kyua/m4/developer-mode.m4 | 112 --- contrib/kyua/m4/doxygen.m4 | 62 -- contrib/kyua/m4/fs.m4 | 125 --- contrib/kyua/m4/getopt.m4 | 213 ----- contrib/kyua/m4/memory.m4 | 122 --- contrib/kyua/m4/signals.m4 | 92 -- contrib/kyua/m4/uname.m4 | 63 -- contrib/kyua/misc/Makefile.am.inc | 32 - contrib/kyua/model/Makefile.am.inc | 89 -- contrib/kyua/model/README | 11 - contrib/kyua/model/metadata.cpp | 51 +- contrib/kyua/os/freebsd/execenv_jail.hpp | 2 +- contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 2 +- contrib/kyua/os/freebsd/main.cpp | 8 - contrib/kyua/os/freebsd/reqs_checker_kmods.cpp | 2 +- contrib/kyua/os/freebsd/utils/jail.hpp | 7 +- contrib/kyua/store/Makefile.am.inc | 145 ---- contrib/kyua/store/write_transaction_test.cpp | 2 +- contrib/kyua/utils/.gitignore | 2 - contrib/kyua/utils/Makefile.am.inc | 133 --- contrib/kyua/utils/cmdline/Makefile.am.inc | 96 --- contrib/kyua/utils/config/Makefile.am.inc | 87 -- contrib/kyua/utils/config/nodes.cpp | 20 +- contrib/kyua/utils/config/nodes.hpp | 2 + contrib/kyua/utils/config/nodes_test.cpp | 15 +- contrib/kyua/utils/defs.hpp.in | 15 +- contrib/kyua/utils/format/Makefile.am.inc | 59 -- contrib/kyua/utils/fs/Makefile.am.inc | 84 -- contrib/kyua/utils/fs/directory.cpp | 13 +- contrib/kyua/utils/fs/operations.cpp | 120 +-- contrib/kyua/utils/logging/Makefile.am.inc | 53 -- contrib/kyua/utils/process/.gitignore | 1 - contrib/kyua/utils/process/Kyuafile | 1 - contrib/kyua/utils/process/Makefile.am.inc | 118 --- contrib/kyua/utils/process/child.hpp | 4 +- contrib/kyua/utils/process/child_test.cpp | 2 +- contrib/kyua/utils/process/executor.cpp | 2 + contrib/kyua/utils/process/executor_pid_test.cpp | 208 ----- contrib/kyua/utils/process/executor_test.cpp | 23 +- contrib/kyua/utils/process/isolation.cpp | 2 +- contrib/kyua/utils/process/operations.cpp | 3 +- contrib/kyua/utils/process/operations.hpp | 6 +- contrib/kyua/utils/process/operations_test.cpp | 4 +- contrib/kyua/utils/sanity.hpp | 4 +- contrib/kyua/utils/signals/Makefile.am.inc | 73 -- contrib/kyua/utils/signals/misc_test.cpp | 2 +- contrib/kyua/utils/sqlite/Makefile.am.inc | 82 -- contrib/kyua/utils/sqlite/database.hpp | 1 + contrib/kyua/utils/sqlite/test_utils.hpp | 4 +- contrib/kyua/utils/stacktrace.cpp | 2 +- contrib/kyua/utils/stacktrace_test.cpp | 9 +- contrib/kyua/utils/test_utils.ipp | 2 +- contrib/kyua/utils/text/Makefile.am.inc | 74 -- contrib/kyua/utils/text/operations.ipp | 1 + contrib/kyua/utils/text/regex.cpp | 4 +- contrib/kyua/utils/text/regex.hpp | 1 + 147 files changed, 3019 insertions(+), 6883 deletions(-) diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml deleted file mode 100644 index 855693b34fa1..000000000000 --- a/contrib/kyua/.cirrus.yml +++ /dev/null @@ -1,25 +0,0 @@ -env: - ARCH: amd64 - -task: - matrix: - - name: 14.0-RELEASE - freebsd_instance: - image_family: freebsd-14-0 - - name: 14.0-STABLE - freebsd_instance: - image_family: freebsd-14-0-snap - - name: 13.2-RELEASE - freebsd_instance: - image_family: freebsd-13-2 - - name: 13.2-STABLE - freebsd_instance: - image_family: freebsd-13-2-snap - env: - DO: distcheck - install_script: - - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf - - ASSUME_ALWAYS_YES=yes pkg bootstrap -f - - pkg install -y autoconf automake atf lutok pkgconf sqlite3 - script: - - ./admin/travis-build.sh diff --git a/contrib/kyua/.gitignore b/contrib/kyua/.gitignore deleted file mode 100644 index d7f1a180d6fb..000000000000 --- a/contrib/kyua/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -*.a -*.o -*_helpers -*_inttest -*_test -*~ - -.deps -.dirstamp -Doxyfile -Makefile -Makefile.in -aclocal.m4 -api-docs -autom4te.cache -config.h -config.h.in -config.log -config.status -configure -kyua -local-kyua -stamp-h1 diff --git a/contrib/kyua/.travis.yml b/contrib/kyua/.travis.yml deleted file mode 100644 index 619dceaf3d2d..000000000000 --- a/contrib/kyua/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: cpp -sudo: required - -before_install: - - ./admin/travis-install-deps.sh - -matrix: - include: - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=no - - os: linux - dist: xenial - compiler: gcc - env: ARCH=amd64 DO=distcheck AS_ROOT=no - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=apidocs - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=style - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=no - - os: linux - dist: xenial - compiler: clang - env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=yes - # TODO(ngie): reenable i386; the libraries were not available in the - # Ubuntu Xenial x86_64 docker image. - #- os: linux - # dist: xenial - # compiler: clang - # env: ARCH=i386 DO=distcheck AS_ROOT=no - #- os: linux - # dist: xenial - # compiler: gcc - # env: ARCH=i386 DO=distcheck AS_ROOT=no - -script: - - ./admin/travis-build.sh - -notifications: - email: - - kyua-log@googlegroups.com diff --git a/contrib/kyua/Doxyfile.in b/contrib/kyua/Doxyfile.in index e28d82f8999a..ac1dbf3398b6 100644 --- a/contrib/kyua/Doxyfile.in +++ b/contrib/kyua/Doxyfile.in @@ -45,7 +45,6 @@ JAVADOC_AUTOBRIEF = YES MACRO_EXPANSION = YES OUTPUT_DIRECTORY = @top_builddir@/api-docs OUTPUT_LANGUAGE = English -PREDEFINED += "KYUA_DEFS_NORETURN=" PREDEFINED += "KYUA_DEFS_FORMAT_PRINTF(x, y)=" PROJECT_NAME = "@PACKAGE_NAME@" PROJECT_NUMBER = @VERSION@ diff --git a/contrib/kyua/FREEBSD-Xlist b/contrib/kyua/FREEBSD-Xlist new file mode 100644 index 000000000000..06fef93a4024 --- /dev/null +++ b/contrib/kyua/FREEBSD-Xlist @@ -0,0 +1,12 @@ +*/*/Makefile* +*/Makefile* +*/*.m4 +*/*.pc.in +INSTALL.md +Makefile* +aclocal.m4 +admin/ +config.h.in +bootstrap/ +configure* +m4/ diff --git a/contrib/kyua/INSTALL.md b/contrib/kyua/INSTALL.md deleted file mode 100644 index d3dcab49cb74..000000000000 --- a/contrib/kyua/INSTALL.md +++ /dev/null @@ -1,268 +0,0 @@ -Installation instructions -========================= - -Kyua uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as -its build system. These are used only when compiling the application -from the source code package. If you want to install Kyua from a binary -package, you do not need to read this document. - -For the impatient: - - $ ./configure - $ make - $ make check - Gain root privileges - # make install - Drop root privileges - $ make installcheck - -Or alternatively, install as a regular user into your home directory: - - $ ./configure --prefix ~/local - $ make - $ make check - $ make install - $ make installcheck - - -Dependencies ------------- - -To build and use Kyua successfully you need: - -* A standards-compliant C and C++ complier. -* Lutok 0.4. -* pkg-config. -* SQLite 3.6.22. - -To build the Kyua tests, you optionally need: - -* The Automated Testing Framework (ATF), version 0.15 or greater. This - is required if you want to create a distribution file. - -If you are building Kyua from the code on the repository, you will also -need the following tools: - -* GNU Autoconf. -* GNU Automake. -* GNU Libtool. - - -Regenerating the build system ------------------------------ - -This is not necessary if you are building from a formal release -distribution file. - -On the other hand, if you are building Kyua from code extracted from the -repository, you must first regenerate the files used by the build -system. You will also need to do this if you modify `configure.ac`, -`Makefile.am` or any of the other build system files. To do this, simply -run: - - $ autoreconf -i -s - -If ATF is installed in a different prefix than Autoconf, you will also -need to tell autoreconf where the ATF M4 macros are located. Otherwise, -the configure script will be incomplete and will show confusing syntax -errors mentioning, for example, `ATF_CHECK_SH`. To fix this, you have -to run autoreconf in the following manner, replacing `` with -the appropriate path: - - $ autoreconf -i -s -I /share/aclocal - - -General build procedure ------------------------ - -To build and install the source package, you must follow these steps: - -1. Configure the sources to adapt to your operating system. This is - done using the `configure` script located on the sources' top - directory, and it is usually invoked without arguments unless you - want to change the installation prefix. More details on this - procedure are given on a later section. - -2. Build the sources to generate the binaries and scripts. Simply run - `make` on the sources' top directory after configuring them. No - problems should arise. - -3. Check that the built programs work by running `make check`. You do - not need to be root to do this, but if you are not, some checks will - be skipped. - -4. Install the program by running `make install`. You may need to - become root to issue this step. - -5. Issue any manual installation steps that may be required. These are - described later in their own section. - -6. Check that the installed programs work by running `make - installcheck`. You do not need to be root to do this, but if you are - not, some checks will be skipped. - - -Configuration flags -------------------- - -The most common, standard flags given to `configure` are: - -* `--prefix=directory`: - **Possible values:** Any path. - **Default:** `/usr/local`. - - Specifies where the program (binaries and all associated files) will - be installed. - -* `--sysconfdir=directory`: - **Possible values:** Any path. - **Default:** `/usr/local/etc`. - - Specifies where the installed programs will look for configuration - files. `/kyua` will be appended to the given path unless - `KYUA_CONFSUBDIR` is redefined as explained later on. - -* `--help`: - - Shows information about all available flags and exits immediately, - without running any configuration tasks. - -The following environment variables are specific to Kyua's `configure` -script: - -* `GDB`: - **Possible values:** empty, absolute path to GNU GDB. - **Default:** empty. - - Specifies the path to the GNU GDB binary that Kyua will use to gather a - stack trace of a crashing test program. If empty, the configure script - will try to find a suitable binary for you and, if not found, Kyua will - attempt to do the search at run time. - -* `KYUA_ARCHITECTURE`: - **Possible values:** name of a CPU architecture (e.g. `x86_64`, `powerpc`). - **Default:** autodetected; typically the output of `uname -p`. - - Specifies the name of the CPU architecture on which Kyua will run. - This value is used at run-time to determine tests that are not - applicable to the host system. - -* `KYUA_CONFSUBDIR`: - **Possible values:** empty, a relative path. - **Default:** `kyua`. - - Specifies the subdirectory of the configuration directory (given by - the `--sysconfdir` argument) under which Kyua will search for its - configuration files. - -* `KYUA_CONFIG_FILE_FOR_CHECK`: - **Possible values:** none, an absolute path to an existing file. - **Default:** none. - - Specifies the `kyua.conf` configuration file to use when running any - of the `check`, `installcheck` or `distcheck` targets on this source - tree. This setting is exclusively used to customize the test runs of - Kyua itself and has no effect whatsoever on the built product. - -* `KYUA_MACHINE`: - **Possible values:** name of a machine type (e.g. `amd64`, `macppc`). - **Default:** autodetected; typically the output of `uname -m`. - - Specifies the name of the machine type on which Kyua will run. This - value is used at run-time to determine tests that are not applicable - to the host system. - -* `KYUA_TMPDIR`: - **Possible values:** an absolute path to a temporary directory. - **Default:** `/tmp`. - - Specifies the path that Kyua will use to create temporary directories - in by default. - -The following flags are specific to Kyua's `configure` script: - -* `--enable-developer`: - **Possible values:** `yes`, `no`. - **Default:** `yes` in Git `HEAD` builds; `no` in formal releases. - - Enables several features useful for development, such as the inclusion - of debugging symbols in all objects or the enforcement of compilation - warnings. - - The compiler will be executed with an exhaustive collection of warning - detection features regardless of the value of this flag. However, such - warnings are only fatal when `--enable-developer` is `yes`. - -* `--with-atf`: - **Possible values:** `yes`, `no`, `auto`. - **Default:** `auto`. - - Enables usage of ATF to build (and later install) the tests. - - Setting this to `yes` causes the configure script to look for ATF - unconditionally and abort if not found. Setting this to `auto` lets - configure perform the best decision based on availability of ATF. - Setting this to `no` explicitly disables ATF usage. - - When support for tests is enabled, the build process will generate the - test programs and will later install them into the tests tree. - Running `make check` or `make installcheck` from within the source - directory will cause these tests to be run with Kyua. - -* `--with-doxygen`: - **Possible values:** `yes`, `no`, `auto` or a path. - **Default:** `auto`. - - Enables usage of Doxygen to generate documentation for internal APIs. - This documentation is *not* installed and is only provided to help the - developer of this package. Therefore, enabling or disabling Doxygen - causes absolutely no differences on the files installed by this - package. - - Setting this to `yes` causes the configure script to look for Doxygen - unconditionally and abort if not found. Setting this to `auto` lets - configure perform the best decision based on availability of Doxygen. - Setting this to `no` explicitly disables Doxygen usage. And, lastly, - setting this to a path forces configure to use a specific Doxygen - binary, which must exist. - - -Post-installation steps ------------------------ - -Copy the `Kyuafile.top` file installed in the examples directory to the -root of your tests hierarchy and name it `Kyuafile`. For example: - - # cp /usr/local/share/kyua/examples/Kyuafile.top \ - /usr/local/tests/Kyuafile - -This will allow you to simply go into `/usr/tests` and run the tests -from there. - - -Run the tests! --------------- - -Lastly, after a successful installation, you should periodically run the -tests from the final location to ensure things remain stable. Do so as -follows: - - $ cd /usr/local/kyua && kyua test - -The following configuration variables are specific to the 'kyua' test -suite and can be given to Kyua with arguments of the form -`-v test_suites.kyua.=`: - -* `run_coredump_tests`: - **Possible values:** `true` or `false`. - **Default:** `true`. - - Avoids running tests that crash subprocesses on purpose to make them - dump core. Such tests are particularly slow on macOS, and it is - sometimes handy to disable them for quicker development iteration. - -If you see any tests fail, do not hesitate to report them in: - - https://github.com/jmmv/kyua/issues/ - -Thank you! diff --git a/contrib/kyua/Makefile.am b/contrib/kyua/Makefile.am deleted file mode 100644 index d7f3cd27e73b..000000000000 --- a/contrib/kyua/Makefile.am +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright 2010 The Kyua Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Google Inc. nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ACLOCAL_AMFLAGS = -I m4 - -CHECK_BOOTSTRAP_DEPS = -CHECK_KYUA_DEPS = -CHECK_LOCAL = -CLEAN_TARGETS = -DIST_HOOKS = -PHONY_TARGETS = -CLEANFILES = - -EXTRA_DIST = -noinst_DATA = -noinst_LIBRARIES = -noinst_SCRIPTS = - -doc_DATA = AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE NEWS.md -noinst_DATA += INSTALL.md README.md -EXTRA_DIST += $(doc_DATA) INSTALL.md README.md - -if WITH_ATF -tests_topdir = $(pkgtestsdir) - -tests_top_DATA = Kyuafile -EXTRA_DIST += $(tests_top_DATA) -endif - -include admin/Makefile.am.inc -include bootstrap/Makefile.am.inc -include cli/Makefile.am.inc -include doc/Makefile.am.inc -include drivers/Makefile.am.inc -include engine/Makefile.am.inc -include examples/Makefile.am.inc -include integration/Makefile.am.inc -include misc/Makefile.am.inc -include model/Makefile.am.inc -include store/Makefile.am.inc -include utils/Makefile.am.inc - -bin_PROGRAMS = kyua -kyua_SOURCES = main.cpp -kyua_CXXFLAGS = $(CLI_CFLAGS) $(ENGINE_CFLAGS) $(UTILS_CFLAGS) -kyua_LDADD = $(CLI_LIBS) $(ENGINE_LIBS) $(UTILS_LIBS) - -CHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \ - KYUA_DOCDIR="$(abs_top_srcdir)" \ - KYUA_EXAMPLESDIR="$(abs_top_srcdir)/examples" \ - KYUA_MISCDIR="$(abs_top_srcdir)/misc" \ - KYUA_STOREDIR="$(abs_top_srcdir)/store" \ - KYUA_STORETESTDATADIR="$(abs_top_srcdir)/store" \ - PATH="$(abs_top_builddir):$${PATH}" -INSTALLCHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \ - PATH="$(prefix)/bin:$${PATH}" - -# Generate local-kyua, a wrapper shell script to run the just-built 'kyua' -# binary by pointing it to the possibly not-yet-installed data files in the -# build tree. -noinst_SCRIPTS += local-kyua -CLEANFILES += local-kyua local-kyua.tmp -local-kyua: Makefile - $(AM_V_GEN)echo '#!/bin/sh' >local-kyua.tmp; \ - echo 'env $(CHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT)' \ - '"$(abs_top_builddir)/kyua" \ - --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' \ - "$${@}"' >>local-kyua.tmp; \ - chmod +x local-kyua.tmp; \ - mv -f local-kyua.tmp local-kyua - -if WITH_ATF -CHECK_LOCAL += dump-ulimits check-kyua -PHONY_TARGETS += check-kyua -check-kyua: $(CHECK_KYUA_DEPS) - @failed=no; \ - ./local-kyua test \ - --kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' \ - || failed=yes; \ - if [ "$${failed}" = yes ]; then \ - ./local-kyua report --results-file='$(abs_top_srcdir)' \ - --verbose --results-filter=broken,failed; \ - exit 1; \ - fi - -installcheck-local: dump-ulimits installcheck-kyua -PHONY_TARGETS += installcheck-kyua -installcheck-kyua: - @failed=no; \ - cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \ - kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' test \ - || failed=yes; \ - if [ "$${failed}" = yes ]; then \ - cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) \ - $(TESTS_ENVIRONMENT) \ - kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' report \ - --verbose --results-filter=broken,failed; \ - exit 1; \ - fi - -# TODO(jmmv): kyua should probably be recording this information itself as part -# of the execution context, just as we record environment variables. -PHONY_TARGETS += dump-ulimits -dump-ulimits: - @echo "Resource limits:" - @{ \ - ulimit -a | sed -e 's,$$, (soft),'; \ - ulimit -a -H | sed -e 's,$$, (hard),'; \ - } | sort | sed -e 's,^, ,' - @echo -else -DIST_HOOKS += forbid-dist -PHONY_TARGETS += forbid-dist -forbid-dist: - @echo "Sorry; cannot make dist without atf." - @false -endif -check-local: $(CHECK_LOCAL) - -if WITH_DOXYGEN -# Runs doxygen on the source tree and validates the contents of the docstrings. -# We do not do this by default, even if doxygen has been enabled, because this -# step takes a long time. Instead, we just rely on a Travis CI build to catch -# inconsistencies. -PHONY_TARGETS += check-api-docs -check-api-docs: api-docs/api-docs.tag - @$(AWK) -f $(srcdir)/admin/check-api-docs.awk api-docs/doxygen.out - -api-docs/api-docs.tag: $(builddir)/Doxyfile $(SOURCES) - @$(MKDIR_P) api-docs - @rm -f api-docs/doxygen.out api-docs/doxygen.out.tmp - $(AM_V_GEN)$(DOXYGEN) $(builddir)/Doxyfile \ - >api-docs/doxygen.out.tmp 2>&1 && \ - mv api-docs/doxygen.out.tmp api-docs/doxygen.out - -CLEAN_TARGETS += clean-api-docs -clean-api-docs: - rm -rf api-docs -endif - -# Replace Automake's builtin check-news functionality so that we can validate -# the NEWS.md file instead of NEWS. -DIST_HOOKS += check-news -PHONY_TARGETS += check-news -check-news: - @case "$$(sed 15q "$(srcdir)/NEWS.md")" in \ - *"$(VERSION)"*) : ;; \ - *) \ - echo "NEWS.md not updated; not releasing" 1>&2; \ - exit 1 \ - ;; \ - esac - -clean-local: $(CLEAN_TARGETS) -dist-hook: $(DIST_HOOKS) - -PHONY_TARGETS += clean-all -clean-all: - GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh - -.PHONY: $(PHONY_TARGETS) diff --git a/contrib/kyua/NEWS.md b/contrib/kyua/NEWS similarity index 85% rename from contrib/kyua/NEWS.md rename to contrib/kyua/NEWS index 304cfe94695a..c794e6e60092 100644 --- a/contrib/kyua/NEWS.md +++ b/contrib/kyua/NEWS @@ -1,17 +1,119 @@ -Major changes between releases -============================== +# Major changes between releases +## Changes in version 0.15.0 -Changes in version 0.14 ------------------------ +**Released on 2026/10/07.** -**NOT RELEASED YET; STILL UNDER DEVELOPMENT.** +### Bugfixes -* Explicitly require C++11 language features when compiling Kyua. +* #265: Null cleanups +* #271: kyua: Try harder to delete directories. +* #300: Implement utils::config::positive_int_node::deep_copy +### Developer Workflow Changes -Changes in version 0.13 ------------------------ +* #254: Add initial GitHub Actions support for kyua +* #288: [CI] remove legacy CI scripts and files +* #291: Remove Travis CI config +* #298: Add sanitizers and code coverage support +* #301: Add FreeBSD CI support via vmactions +* #305: Automate uploading release assets + +### Feature Enhancements + +* #203: Add GoogleTest support +* #230: Do not count skipped as passed in test cmd +* #260: Support require.diskspace ATF metadata +* #261: Pass unprivileged user config prop to ATF using all known names +* #266: Add "kyua debug -p" option +* #270: Add required_kmods metadata +* #272: Make "test" command actually report about workdir cleanup issues +* #273: Make "debug -p" skip writing stdout/stderr to tmp files +* #277: kyua-debug: Add -P option +* #290: Require C++-20 in order to build kyua +* #307: Upstream multiple items from FreeBSD + +### Documentation + +* #258: kyuafile.5: Add ATF metadata mapping reference +* #275: kyua manuals: Correct --results-file short form +* #279: docs: Standardize document description tone + +### Miscellaneous + +* #264: Switch from std::auto_ptr<> to std::unique_ptr<> +* #269: Fix cmd_about_test:topic__version test case +* #297: Reduce overall lutok dependency +* #312: Replace KYUA_ATTRIBUTE_{NORETURN,UNUSED}} with C++ attributes +* #318: utils::fs: remove umount(8) support + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.14.1...kyua-0.15.0 + +## Changes in version 0.14.1 + +**Released on March 29th, 2025.** + +* Issue #263: fix release tarball by relying on `make dist`. + +* Document ATF to Kyua mappings for metadata properties. + +* Support `require.diskspace` ATF metadata property. + +* Support backwards compatible `unprivileged_user` metadata property for ease + of use dealing with ATF vs Kyua. + +* Fix building from source by tracking `utils/process/Kyuafile.in` and + `engine/execenv/execenv_fwd.hpp` with automake. + +## Changes in version 0.14 + +**Released on December 31st, 2024.** + +* Replace `--with-atf` with `--enable-atf`. The latter must be specified + to enable ATF support and the Kyua tests by proxy. + +* Require newer versions of ATF (0.21) and Lutok (0.5). This is being done + as part of a multi-phase deprecation of pre-C++11 environments. + +* Vendor the ATF m4 files from the freebsd/atf repo. + +* Translate `is_exclusive` metadata to its ATF counterpart. + +* Issue #236: fix accidental test forkbomb in specific user environments + with `integration` tests by avoiding infinite recursion calling kyua. + +* Fix the build on Ubuntu 24.04. + +- execenv support added. This FreeBSD-specific feature allows tests to be + executed in jails. + +* Issue #169: Remove deprecated `readdir_r` use. + +* Fix build issue on more recent versions of MacOS. + +* Fix build issue on IllumOS. + +* Fix issues with PID reuse in testcases. + +* Escape characters captured from stderr and stdout in HTML output. + +* `integration/cmd_report_test:verbose`: fix regular expression used in + tests which would break in certain user environments. + +* Add Cirrus CI support for testing Kyua on FreeBSD. + +* Remove `UTILS_UNUSED_PARAM` macro. + +* Fix document rendering with newer versions of doxygen. + +* Issue #152: explicitly require C++11 language features when compiling Kyua. + Remove `std::shared_ptr` compatibility header, `utils/shared_ptr.hpp`. + +* Fix `igor` and `mandoc -Tlint` reported issues with generated manpages. + +* Issue #167: fix typos in kyua(1) manpage. + +## Changes in version 0.13 **Released on August 26th, 2016.** @@ -36,8 +138,7 @@ Changes in version 0.13 timers to control test deadlines. -Changes in version 0.12 ------------------------ +## Changes in version 0.12 **Released on November 22nd, 2015.** @@ -129,8 +230,7 @@ parallelization possibilities. Markdown for better formatting online. -Changes in version 0.11 ------------------------ +## Changes in version 0.11 **Released on October 23rd, 2014.** @@ -211,8 +311,7 @@ Changes in version 0.11 examples. -Changes in version 0.10 ------------------------ +## Changes in version 0.10 **Experimental version released on August 14th, 2014.** @@ -232,8 +331,7 @@ Changes in version 0.10 prevent triggering a core dump that made the test fail in some platforms. -Changes in kyua-cli version 0.9 -------------------------------- +## Changes in kyua-cli version 0.9 **Experimental version released on August 8th, 2014.** @@ -276,8 +374,7 @@ Changes in more detail: files. -Changes in kyua-testers version 0.3 ------------------------------------ +## Changes in kyua-testers version 0.3 **Experimental version released on August 8th, 2014.** @@ -293,8 +390,7 @@ Changes in kyua-testers version 0.3 handle test programs that report a pass but exit with a non-zero code. *** 10994 LINES SKIPPED *** From nobody Mon Nov 23 01:39:38 2026 X-Original-To: dev-commits-src-branches@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 4jXpXC1cF3z71c6n for ; Mon, 23 Nov 2026 01:39: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXB6JNSz4mF1 for ; Mon, 23 Nov 2026 01:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397978; 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=BwxWoo6jEEgLP/YHGohWN7y5ShTKW7gjsxCQ5/6xpQw=; b=mTyd69x0RvYOQd5C5pHU8WJOCy/fjvyhZry0D/QinfxAndbVjPDf7WQIytxDpZORkv1LgA sA0815h3ryGueJiBr47mPUIESDY/b4OfecIQf7HbgLnqL9xwypJ3BEQ2gsImb8FLbT6dUF Dj2k/VSKbdsMAmZvRFHUYU3BnPr2LAdnvnIv6zLD/3kppcEu7rm2csvfOUbcUJcEpDtwEr cQEVLbFD9UqMN8ul4wtJEBxqeLGVntLqcXca0NBPCoVMdr0mh0sOb031Hx74VKb7KWCy5u vGGZCz0xAjlwjwXeOaRzb0kW40tgSdb0M2NrktNwpMydWDpIALiqUCEYM2JIvw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397978; b=bC6W3DnF2HhD65SFtLq70cTFm7K8jIyWTZXbJHr80RGk74IJIJSmqVb4fH4LyHrzL9B5zA M+UKd0jtGrw0s3Mqlo95CQUSu3FYYzEmBOq9zMg6jS5hLZrvVawKq0kXocOmFCLYoJzUza 4PO9rl8ji9ls0Xhvl99DsSy2BnXbbZ6E/NPfTwNkdHj9F2FcI+WboKT2PuIz5diJKhOrBP RGXzzX5yLANAkUDs5P4dVMeTnCX893K0r/hCxnqggMe5NPDm89vmTojnXkEDz6X3mpKORb hTUJwO70hM7w8YTTtDiU/NyBk1p13Txjw51Wjj4p9yWD/KzLGcqbyrzyoXWjkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397978; 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=BwxWoo6jEEgLP/YHGohWN7y5ShTKW7gjsxCQ5/6xpQw=; b=A4OsYRBgfFpnlS6ShYiUoojIS0pOgwFxCw7ONoB0669jlJR26Hpbvi5SIJRWG5dRtm8Rah AiidxjoGVndkYX8vw5Ai8qFR8T/PA/2VW6sdOQBlxZFlmnaK4zuGk/k9HJKJ3wxPRcdE4x xPyIGC0IoUL3/rUDe9hEs3kdyZdWeDibUcq9leZ81uPm/lESATPimQRCQZbvQVFTxo9FdU vGeKEPIMByVx5bNtmtJ+CW07MkFywFbHghqxLG5bubU/KNTr3L3AlHfkFzd+4DAoewLDoR uM7WpLlC4aWJT8/nCpf5hd1mz79hnpTRIte2EGOefT/y+KeG2H8O/rzj+BFoDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXB5zDHzT3P for ; Mon, 23 Nov 2026 01:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 489e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 62b649e7dca2 - stable/14 - contrib/kyua: commit generated files List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62b649e7dca2f43ebe6902bdee6987f0a8cd58c8 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:38 +0000 Message-Id: <6b03995a.489e.1122738d@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=62b649e7dca2f43ebe6902bdee6987f0a8cd58c8 commit 62b649e7dca2f43ebe6902bdee6987f0a8cd58c8 Author: Enji Cooper AuthorDate: 2026-10-07 18:04:21 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:36:15 +0000 contrib/kyua: commit generated files MFC after: 1 month Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0") (cherry picked from commit 26eb328b52c3ec0ff79c8914b1993dfad03a0a7d) --- contrib/kyua/doc/kyua-about.1 | 95 ++++++ contrib/kyua/doc/kyua-config.1 | 59 ++++ contrib/kyua/doc/kyua-db-exec.1 | 199 ++++++++++++ contrib/kyua/doc/kyua-db-migrate.1 | 182 +++++++++++ contrib/kyua/doc/kyua-debug.1 | 417 +++++++++++++++++++++++++ contrib/kyua/doc/kyua-help.1 | 64 ++++ contrib/kyua/doc/kyua-list.1 | 232 ++++++++++++++ contrib/kyua/doc/kyua-report-html.1 | 253 +++++++++++++++ contrib/kyua/doc/kyua-report-junit.1 | 237 +++++++++++++++ contrib/kyua/doc/kyua-report.1 | 307 +++++++++++++++++++ contrib/kyua/doc/kyua-test.1 | 498 ++++++++++++++++++++++++++++++ contrib/kyua/doc/kyua.1 | 405 ++++++++++++++++++++++++ contrib/kyua/doc/kyua.conf.5 | 150 +++++++++ contrib/kyua/doc/kyuafile.5 | 574 +++++++++++++++++++++++++++++++++++ 14 files changed, 3672 insertions(+) diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1 new file mode 100644 index 000000000000..ba3041f14447 --- /dev/null +++ b/contrib/kyua/doc/kyua-about.1 @@ -0,0 +1,95 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd May 20, 2015 +.Dt KYUA-ABOUT 1 +.Os +.Sh NAME +.Nm "kyua about" +.Nd show detailed authors, license, and version information +.Sh SYNOPSIS +.Nm +.Op Ar authors | license | version +.Sh DESCRIPTION +The +.Sq about +command provides generic information about the +.Xr kyua 1 +tool. +In the default synopsis form (no arguments), the information printed +includes: +.Bl -enum +.It +The name of the package, which is +.Sq kyua . +.It +The version number, which is +.Sq 0.15.0 . +.It +License information. +.It +Authors information. +.It +A link to the project web site. +.El +.Pp +You can customize the information printed by this command by specifying +the desired topic as the single argument to the command. +This can be one of: +.Bl -tag -width authorsXX +.It Ar authors +Displays the list of authors and contributors only. +.It Ar license +Displays the license information and the list of copyrights. +.It Ar version +Displays the package name and the version number in a format that is +compatible with the output of GNU tools that support a +.Fl -version +flag. +Use this whenever you have to query the version number of the package. +.El +.Sh FILES +The following files are read by the +.Nm +command: +.Bl -tag -width XX +.It Pa /usr/share/doc/kyua/AUTHORS +List of authors (aka copyright holders). +.It Pa /usr/share/doc/kyua/CONTRIBUTORS +List of contributors (aka individuals that have contributed to the project). +.It Pa /usr/share/doc/kyua/LICENSE +License information. +.El +.Sh EXIT STATUS +The +.Nm +command always returns 0. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-config.1 b/contrib/kyua/doc/kyua-config.1 new file mode 100644 index 000000000000..ae08ad9e013a --- /dev/null +++ b/contrib/kyua/doc/kyua-config.1 @@ -0,0 +1,59 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd September 9, 2012 +.Dt KYUA-CONFIG 1 +.Os +.Sh NAME +.Nm "kyua config" +.Nd inspect the values of the loaded configuration +.Sh SYNOPSIS +.Nm +.Op Ar variable1 .. variableN +.Sh DESCRIPTION +The +.Nm +command provides a way to list all defined configuration variables and +their current values. +.Pp +This command is intended to help you in resolving the values of the +configuration variables without having to scan over configuration files. +.Pp +In the default synopsis form (no arguments), the command prints all +configuration variables. +If any arguments are provided, the command will only print the +requested variables. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if any of the specified configuration +variables does not exist. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-db-exec.1 b/contrib/kyua/doc/kyua-db-exec.1 new file mode 100644 index 000000000000..8769ac534aa3 --- /dev/null +++ b/contrib/kyua/doc/kyua-db-exec.1 @@ -0,0 +1,199 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-EXEC 1 +.Os +.Sh NAME +.Nm "kyua db-exec" +.Nd execute a SQL statement in a results file +.Sh SYNOPSIS +.Nm +.Op Fl -no-headers +.Op Fl -results-file Ar file +.Ar statement +.Sh DESCRIPTION +The +.Nm +command provides a way to execute an arbitrary SQL statement within the +database. +This command is mostly intended to aid in debugging, but can also be used to +extract information from the database when the current interfaces do not +provide the desired functionality. +.Pp +The input database must exist. +It makes no sense to use +.Nm +on a nonexistent or empty database. +.Pp +The +.Nm +command takes one or more arguments, all of which are concatenated to form +a single SQL statement. +Once the statement is executed, +.Nm +prints the resulting table on the screen, if any. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -no-headers +Avoids printing the headers of the table in the output of the command. +.It Fl -results-file Ar path , Fl r Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the SQL statement is invalid or fails +to run. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 , +.Xr kyua-test 1 diff --git a/contrib/kyua/doc/kyua-db-migrate.1 b/contrib/kyua/doc/kyua-db-migrate.1 new file mode 100644 index 000000000000..177dd0795d10 --- /dev/null +++ b/contrib/kyua/doc/kyua-db-migrate.1 @@ -0,0 +1,182 @@ +.\" Copyright 2013 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd October 13, 2014 +.Dt KYUA-DB-MIGRATE 1 +.Os +.Sh NAME +.Nm "kyua db-migrate" +.Nd upgrade the schema of an existing results file +.Sh SYNOPSIS +.Nm +.Op Fl -results-file Ar file +.Sh DESCRIPTION +The +.Nm +command migrates the schema of an existing database to the latest +version implemented in +.Xr kyua 1 . +.Pp +This operation is not reversible. +However, a backup of the database is created in the same directory where the +database lives. +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -results-file Ar path , Fl r Ar path +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Specifies the results file to operate on. +Defaults to +.Sq LATEST , +which causes +.Nm +to automatically load the latest results file from the current test suite. +.Pp +The following values are accepted: +.Bl -tag -width XX +.It Sq LATEST +Requests the load of the latest results file available for the test suite rooted +at the current directory. +.It Directory +Requests the load of the latest results file available for the test suite rooted +at the given directory. +.It Test suite name +Requests the load of the latest results file available for the given test suite. +.It Results identifier +Requests the load of a specific results file. +.It Explicit file name (aka everything else) +Load the specified results file. +.El +.Pp +See +.Sx Results files +for more details. +.El +.Ss Results files +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Results files contain, as their name implies, the results of the execution of a +test suite. +Each test suite executed by +.Xr kyua-test 1 +generates a new results file, and such results files can be loaded later on by +inspection commands such as +.Xr kyua-report 1 +to analyze their contents. +.Pp +Results files support identifier-based lookups and also path name lookups. +The differences between the two are described below. +.Pp +The default naming scheme for the results files provides simple support for +identifier-based lookups and historical recording of test suite runs. +Each results file is given an identifier derived from the test suite that +generated it and the time the test suite was run. +Kyua can later look up results files by these fields. +.Pp +The identifier follows this pattern: +.Bd -literal -offset indent +\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt +.Ed +.Pp +where +.Sq test_suite +is the path to the root of the test suite that was run with all slashes replaced +by underscores and +.Sq YYYYMMDD-HHMMSS-uuuuuu +is a timestamp with microsecond resolution. +.Pp +When using the default naming scheme, results files are stored in the +.Pa ~/.kyua/store/ +subdirectory and each file holds a name of the form: +.Bd -literal -offset indent +~/.kyua/store/results.\*(Ltidentifier\*(Gt.db +.Ed +.Pp +Results files are simple SQLite databases with the schema described in the +.Pa /usr/share/kyua/store/schema_v?.sql +files. +For details on the schema, please refer to the heavily commented SQL file. +.Sh EXIT STATUS +The +.Nm +command returns 0 on success or 1 if the migration fails. +.Pp +Additional exit codes may be returned as described in +.Xr kyua 1 . +.Sh SEE ALSO +.Xr kyua 1 diff --git a/contrib/kyua/doc/kyua-debug.1 b/contrib/kyua/doc/kyua-debug.1 new file mode 100644 index 000000000000..760cf097a349 --- /dev/null +++ b/contrib/kyua/doc/kyua-debug.1 @@ -0,0 +1,417 @@ +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Dd April 18, 2026 +.Dt KYUA-DEBUG 1 +.Os +.Sh NAME +.Nm "kyua debug" +.Nd execute a single test case with facilities for debugging +.Sh SYNOPSIS +.Nm +.Op Fl -build-root Ar path +.Op Fl -kyuafile Ar file +.Op Fl -pause-before-cleanup-upon-fail +.Op Fl -pause-before-cleanup +.Op Fl -stdout Ar path +.Op Fl -stderr Ar path +.Ar test_case +.Sh DESCRIPTION +The +.Nm +command provides a mechanism to execute a single test case bypassing some +of the Kyua infrastructure and allowing the user to poke into the execution +behavior of the test. +.Pp +The test case to run is selected by providing a test filter, described below in +.Sx Test filters , +that matches a single test case. +The test case is executed and its result is printed as the last line of the +output of the tool. +.Pp +The test executed by +.Nm +is run under a controlled environment as described in +.Sx Test isolation . +.Pp +At the moment, the +.Nm +command allows the following aspects of a test case execution to be +tweaked: +.Bl -bullet +.It +Redirection of the test case's stdout and stderr to the console (the +default) or to arbitrary files. +See the +.Fl -stdout +and +.Fl -stderr +options below. +.El +.Pp +The following subcommand options are recognized: +.Bl -tag -width XX +.It Fl -build-root Ar path +Specifies the build root in which to find the test programs referenced +by the Kyuafile, if different from the Kyuafile's directory. +See +.Sx Build directories +below for more information. +.It Fl -kyuafile Ar file , Fl k Ar file +Specifies the Kyuafile to process. +Defaults to +.Pa Kyuafile +file in the current directory. +.It Fl -pause-before-cleanup-upon-fail , Fl p +Causes Kyua to pause right before the test cleanup routine is invoked if the +test fails. +When paused, Kyua waits for input on stdin, and any key press resumes +execution. +.sp +This can be useful for debugging system or end-to-end tests +which alter the system by creating artifacts such as files, network +interfaces, routing entries, firewall configuration, containers, etc. +This flag makes it possible to preserve such artifacts immediately after a test +failure, simplifying debugging. +Otherwise, these artifacts would be removed by the test cleanup routine or +by Kyua built-in cleanup mechanism. +.It Fl -pause-before-cleanup , Fl P +The unconditional variant of the previous option. +This can be helpful for reproducing the infrastructure or fixture of a passing +test for further development or additional analysis. +.It Fl -stderr Ar path +Specifies the file to which to send the standard error of the test +program's body. +The default is +.Pa /dev/stderr , +which is a special character device that redirects the output to +standard error on the console. +.It Fl -stdout Ar path +Specifies the file to which to send the standard output of the test +program's body. +The default is +.Pa /dev/stdout , +which is a special character device that redirects the output to +standard output on the console. +.El +.Pp +For example, consider the following Kyua session: +.Bd -literal -offset indent +$ kyua test +kernel/fs:mkdir -> passed +kernel/fs:rmdir -> failed: Invalid argument + +1/2 passed (1 failed) +.Ed +.Pp +At this point, we do not have a lot of information regarding the +failure of the +.Sq kernel/fs:rmdir +test. +We can run this test through the +.Nm +command to inspect its output a bit closer, hoping that the test case is +kind enough to log its progress: +.Bd -literal -offset indent +$ kyua debug kernel/fs:rmdir +Trying rmdir('foo') +Trying rmdir(NULL) +kernel/fs:rmdir -> failed: Invalid argument +.Ed +.Pp +Luckily, the offending test case was printing status lines as it +progressed, so we could see the last attempted call and we can know match +the failure message to the problem. +.Ss Build directories +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.Em Build directories +(or object directories, target directories, product directories, etc.) is +the concept that allows a developer to keep the source tree clean from +build products by asking the build system to place such build products +under a separate subtree. +.Pp +Most build systems today support build directories. +For example, the GNU Automake/Autoconf build system exposes such concept when +invoked as follows: +.Bd -literal -offset indent +$ cd my-project-1.0 +$ mkdir build +$ cd build +$ ../configure +$ make +.Ed +.Pp +Under such invocation, all the results of the build are left in the +.Pa my-project-1.0/build/ +subdirectory while maintaining the contents of +.Pa my-project-1.0/ +intact. +.Pp +Because build directories are an integral part of most build systems, and +because they are a tool that developers use frequently, +.Nm +supports build directories too. +This manifests in the form of +.Nm +being able to run tests from build directories while reading the (often +immutable) test suite definition from the source tree. +.Pp +One important property of build directories is that they follow (or need to +follow) the exact same layout as the source tree. +For example, consider the following directory listings: +.Bd -literal -offset indent +src/Kyuafile +src/bin/ls/ +src/bin/ls/Kyuafile +src/bin/ls/ls.c +src/bin/ls/ls_test.c +src/sbin/su/ +src/sbin/su/Kyuafile +src/sbin/su/su.c +src/sbin/su/su_test.c + +obj/bin/ls/ +obj/bin/ls/ls* +obj/bin/ls/ls_test* +obj/sbin/su/ +obj/sbin/su/su* +obj/sbin/su/su_test* +.Ed +.Pp +Note how the directory layout within +.Pa src/ +matches that of +.Pa obj/ . +The +.Pa src/ +directory contains only source files and the definition of the test suite +(the Kyuafiles), while the +.Pa obj/ +directory contains only the binaries generated during a build. +.Pp +All commands that deal with the workspace support the +.Fl -build-root Ar path +option. +When this option is provided, the directory specified by the +option is considered to be the root of the build directory. +For example, considering our previous fake tree layout, we could invoke +.Nm +as any of the following: +.Bd -literal -offset indent +$ kyua debug --kyuafile=src/Kyuafile --build-root=obj +$ cd src && kyua debug --build-root=../obj +.Ed +.Ss Test filters +.\" Copyright 2012 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +A +.Em test filter +is a string that is used to match test cases or test programs in a test suite. +Filters have the following form: +.Bd -literal -offset indent +test_program_name[:test_case_name] +.Ed +.Pp +Where +.Sq test_program_name +is the name of a test program or a subdirectory in the test suite, and +.Sq test_case_name +is the name of a test case. +.Ss Test isolation +.\" Copyright 2014 The Kyua Authors. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" * Neither the name of Google Inc. nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The test programs and test cases run by +.Nm +are all executed in a deterministic environment. +This known, clean environment serves to make the test execution as +reproducible as possible and also to prevent clashes between tests that may, +for example, create auxiliary files with overlapping names. +.Pp +For plain test programs and for TAP test programs, the whole test program +is run under a single instance of the environment described in this page. +For ATF test programs (see +.Xr atf 7 ) , +each individual test case +.Em and +test cleanup routine are executed in separate environments. +.Bl -tag -width XX +.It Process space +Each test is executed in an independent processes. +Corollary: the test can do whatever it wants to the current process (such +as modify global variables) without having to undo such changes. +.It Session and process group +The test is executed in its own session and its own process group. +There is no controlling terminal attached to the session. +.Pp +Should the test spawn any children, the children should maintain the same +session and process group. +Modifying any of these settings prevents +.Nm +from being able to kill any stray subprocess as part of the cleanup phase. +If modifying these settings is necessary, or if any subprocess started by +the test decides to use a different process group or session, it is the +responsibility of the test to ensure those subprocesses are forcibly +terminated during cleanup. +.It Work directory +The test is executed in a temporary directory automatically created by the +runtime engine. +Corollary: the test can write to its current directory +without needing to clean any files and/or directories it creates. +The runtime engine takes care to recursively delete the temporary directories +after the execution of a test case. +Any file systems mounted within the temporary directory are also unmounted. +.It Home directory +The +.Va HOME +environment variable is set to the absolute path of the work directory. +.It Umask +The value of the umask is set to 0022. +.It Environment +The +.Va LANG , +.Va LC_ALL , +.Va LC_COLLATE , +.Va LC_CTYPE , +.Va LC_MESSAGES , +.Va LC_MONETARY , +.Va LC_NUMERIC +and +.Va LC_TIME +variables are unset. +.Pp +The +.Va TZ +variable is set to +.Sq UTC . +.Pp +The +.Va TMPDIR +variable is set to the absolute path of the work directory. *** 2802 LINES SKIPPED *** From nobody Mon Nov 23 01:39:37 2026 X-Original-To: dev-commits-src-branches@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 4jXpXB1fmkz71c91 for ; Mon, 23 Nov 2026 01:39:38 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX965Pfz4m8p for ; Mon, 23 Nov 2026 01:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397977; 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=JxSq8WbCqT5eMhMmisyTP45Z65L5RD9reffby7bAp7M=; b=fKEf1P/8JmTxBVdVPTmw6kCKb9cd4biRCVyXy+itlC3vUHTVxplHFAO2AdCuevF7pSbdj5 4zlY0jcs9czxy0tZ1jplbOCvC6x5gzqpsflt7cD8OiIsVtgAjPndYUHgoCECrRcHM9KMrb itnriijB8QbtoFQDjGW0vX5M/+YrFYPqZnpfZOTwQa9IK6bbRr6M4fk4LseeEC/4Kzmw4C LoBJOm3Zmpr/TpUeXAtCGd/zFUNXvqE/F98Wl8drtqUl9rXLMpbFsXNrD6HgiD98gLXggU rdkR6puJjLxlNyAhWstCTpFEFk5zKYJd9OX3Jgp+E7M3G6LWXH3G1kcmpFK5VQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397977; b=vacsgL14qcSn+RiFHvFtKRzYHGz5whR7nRQ1hgFtNbtFx7FVPZ+VtzF3DgwVwn/PbZm1X2 oHU+pZVNizbDg/nBQHUHL/Q79+UXYPcnenMFdmMqC8f4yF4eaTc40Es7ATK3FhW3+wzvm8 dP6m6a+LfdhbSzLeCR1BSVBlle4Zz0ZIqqcjj/EWZMSmuXbcVoG7qd5YyHOAvgO+Lb1dUt H2PypxRIWysNs+gwh35q+UhcH7hs0iNSxadZixW+2p/btzkbVYMe7cG7qE7AM3iKde0DF2 Onqh/9HunusTnlYyjyUBF/e1v1E5gPhtIVdMqcqCmEIrQs2POyuBM+Qa1eCGrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397977; 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=JxSq8WbCqT5eMhMmisyTP45Z65L5RD9reffby7bAp7M=; b=N/wCDjK4/C65ZSEs6+jdkxzdjwXi6SG5MtIgGHMeinAN06OTFgMVt3fZB12IScbxE+if01 sgEOy799p3346GuugGUcwoeTR/QapbhS4rosp5o1dZOTv55i0d9PIBLaInub0N5Nwg0Q/T BGs4KwThL1REU6QYkIteBFsUmmi+Mlziyvsgd07N4s36RR+vbxVQgMAL+mTw64Bt5kOxlQ GnMnG2+7ySZxRZBfOBfZz070t23LHjYDBV4NlfMWY/GlsgHXScBUbP8TWWISbo6lzJsOdo mZv5DmmXxwsOqxcoH10MaH91bp8SYpgNTF+IA9Z1yrtfwbqfuzsqAQFTJUXUzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX95NrZzTDS for ; Mon, 23 Nov 2026 01:39:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 540eaf68d99e - stable/14 - contrib/kyua: commit Makefile changes for version update List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 540eaf68d99ec1833a5d94748b60abcec890a8e4 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:37 +0000 Message-Id: <6b039959.40e4.6ad20095@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=540eaf68d99ec1833a5d94748b60abcec890a8e4 commit 540eaf68d99ec1833a5d94748b60abcec890a8e4 Author: Enji Cooper AuthorDate: 2026-10-07 17:55:21 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:36:15 +0000 contrib/kyua: commit Makefile changes for version update This was accidentally missed in the version update. MFC after: 1 month Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0") (cherry picked from commit b836604e126d5b3d0d3dee5da6c4168d3ec43fea) --- usr.bin/kyua/Makefile | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 593eaee9d378..3a126640c84e 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -6,7 +6,6 @@ KYUA_DOCDIR= /usr/share/doc/kyua KYUA_EGDIR= /usr/share/examples/kyua KYUA_MISCDIR= /usr/share/kyua/misc KYUA_STOREDIR= /usr/share/kyua/store -KYUA_VERSION= 0.13 KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} @@ -16,6 +15,7 @@ PROG_CXX= kyua SRCS= main.cpp LIBADD= lutok sqlite3 util +.PATH: ${KYUA_SRCDIR}/doc MAN= kyua-about.1 \ kyua-config.1 \ kyua-db-exec.1 \ @@ -45,10 +45,6 @@ CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ -DKYUA_PLATFORM=\"${MACHINE}\" \ -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ - -DPACKAGE=\"kyua\" \ - -DPACKAGE_NAME=\"Kyua\" \ - -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ - -DVERSION=\"${KYUA_VERSION}\" SRCS+= utils/datetime.cpp \ utils/env.cpp \ @@ -119,6 +115,9 @@ SRCS+= engine/atf.cpp \ engine/config.cpp \ engine/exceptions.cpp \ engine/filters.cpp \ + engine/googletest.cpp \ + engine/googletest_list.cpp \ + engine/googletest_result.cpp \ engine/kyuafile.cpp \ engine/plain.cpp \ engine/requirements.cpp \ @@ -208,20 +207,4 @@ STOREDIR= ${KYUA_STOREDIR} STORETAGS= package=tests .PATH: ${KYUA_SRCDIR}/store -CLEANFILES+= ${MAN} -.PATH: ${KYUA_SRCDIR}/doc -.for man in ${MAN} -${man}: ${man}.in - sh ${KYUA_SRCDIR}/doc/manbuild.sh \ - -v "CONFDIR=${KYUA_CONFDIR}" \ - -v "DOCDIR=${KYUA_DOCDIR}" \ - -v "EGDIR=${KYUA_EGDIR}" \ - -v "MISCDIR=${KYUA_MISCDIR}" \ - -v "PACKAGE=kyua" \ - -v "STOREDIR=${KYUA_STOREDIR}" \ - -v "TESTSDIR=${TESTSBASE}" \ - -v "VERSION=${KYUA_VERSION}" \ - ${.ALLSRC} ${.TARGET} -.endfor - .include From nobody Mon Nov 23 01:39:40 2026 X-Original-To: dev-commits-src-branches@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 4jXpXF2PLpz71byy for ; Mon, 23 Nov 2026 01:39:41 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXD74LLz4mN2 for ; Mon, 23 Nov 2026 01:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397981; 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=J3hXlsuEtZPnHheD53IeYGnxaZCM0UYy/hVmx0NdUZo=; b=ejsLb8dLkZZTkfBBIvEEbxF67W7ttNo1rd+AEthjktpfru3q1HCBInN+DHrA1+ogGP8u9S 3MKRjFy8vkjgsczdDjj8NWj7pROYNsFS3ufFby4Zhxogzbt8GW6dBhJyK9dQlvoCBrzHj7 Tqz+A5d8/2wy9/Sf7oJ1JBUYfxy21XvdO/WxK/zTRJ4Sp0DGTwCJGEgObDTMJmXq2C4DeM Lrb4I+Wwi6rcWZIcFheDRq//OolNYwM3BYGeYR4ITy3uOdiEm2xInP+ZyxWnWe4dmRv1kh FrqvH3yin6Z2PCyoPB9M6q0I6RVNExzczrVO0Ai46rpUB7GJc7dFccCBoGv4vw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397981; b=Y3hGV3eZGJgpvkEDh1HonASq18kJLdHvhfQMvZy/39ZkMS/OE5+1mcYAvAYVu9ImGEsbZF TxTbZo7akqJUjjtp4/uNQnMtL3cPTLtv1VfUHRXcpq3mUeV3dJ22zXBeOY/rX06W3HVkk1 7t/Ol4uBPJ/7Ri9aTF1iOZRvwpj4mggcVkzkfaODP28bw54sSFSLQbgFfWdZLmxU2et5BS EeMFvfwyLRTfF83PRexCvlXoTylEtgzltTJ25ahNpDZYbxC0OsGoa8JRHnCYmt+HjEYWWp TAV2Y7z6wurDYxNNTfIKg9hVBw6k8L2BDYHN7+iAtGZljzbUx92m1TIELggpUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397981; 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=J3hXlsuEtZPnHheD53IeYGnxaZCM0UYy/hVmx0NdUZo=; b=dZD7tiaXCvIU5hMpAHBZrWI3CZWqusXz5yUmjyOQFozsmAui6xzcEmHg5dbuAd4XY+IlV3 i/Yg7GttKUiJC74pYswDBk9vK/cI+zTJ8KixWJ1JgrrrOWwCLTNIVVKbpCH10qh1H1DRq1 YYTfx7NsRGolrYM6HEOz6/RYHdw+C2/T8vg6DAOb5KxIESbHX41B1i7XzbBIzLMQzzVckL BanckcDXIt0C1pwJt2it/OahMqDbeDwPxHW9p+TZqCrolKboeE9/Sc/ysnSeogLCUQreGx Oy3GxSRbLMdab/CFpStBAYWm7IGg1Vh7ASFzZz1Phe8j5ytntKNc4zUcm581Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXD6jDxzTN3 for ; Mon, 23 Nov 2026 01:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 56d6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: f46766b0190c - stable/14 - atf, lutok, kyua: compile with CXXSTD=gnu++20 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f46766b0190c67c560d22fabee1f29fefbb3793d Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:40 +0000 Message-Id: <6b03995c.56d6.3c0856a2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f46766b0190c67c560d22fabee1f29fefbb3793d commit f46766b0190c67c560d22fabee1f29fefbb3793d Author: Enji Cooper AuthorDate: 2026-10-31 20:13:06 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:38:03 +0000 atf, lutok, kyua: compile with CXXSTD=gnu++20 All three of the test infrastructure components require at least C++20 in order to build. Make that version the default to better match what is required in recent versions of the projects. MFC after: 1 week (cherry picked from commit 0e58fb271c6e1cbd4b2ae5d33da181b7e7c2f0d5) --- lib/atf/common.mk | 2 ++ lib/liblutok/Makefile | 2 ++ usr.bin/kyua/Makefile | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/atf/common.mk b/lib/atf/common.mk index e1967097d2c1..4b0f9911eecd 100644 --- a/lib/atf/common.mk +++ b/lib/atf/common.mk @@ -16,3 +16,5 @@ atf-version-real: .PHONY @grep 'define VERSION' ${ATF}/config.h \ | cut -d '"' -f 2 >atf-version-real CLEANFILES+= atf-version atf-version-real + +CXXSTD= gnu++20 diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile index 1ac88cfa06b3..56c1225a237b 100644 --- a/lib/liblutok/Makefile +++ b/lib/liblutok/Makefile @@ -19,4 +19,6 @@ CFLAGS+= -I${SRCTOP}/contrib/lutok/include \ WARNS?= 3 SHLIB_MAJOR= 0 +CXXSTD= gnu++20 + .include diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 3a126640c84e..44a38b33ca86 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -175,6 +175,8 @@ SRCS+= os/freebsd/execenv_jail.cpp \ LIBADD+= jail .endif +CXXSTD= gnu++20 + FILESGROUPS= DOCS MISC STORE .if ${MK_EXAMPLES} != "no" From nobody Mon Nov 23 01:39:39 2026 X-Original-To: dev-commits-src-branches@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 4jXpXD1p3Tz71cCS for ; Mon, 23 Nov 2026 01:39:40 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXC71kzz4m9F for ; Mon, 23 Nov 2026 01:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJaKWiBWi5IEijBpk9s1hg0faMBxWfwsmFKdvsOi9DA=; b=DAQyu6eQiJi+DIhOLDqvGwVF7ajlwgfFgld8MJvAospGdLUR9zbtWxsYN5cynOzQpRyj+w JALQ4xK7KQW1pIShQUc0addioJNOHALI6iUpOkglpk5q7Wu26tPpSdC3Ase9VzBZk6pLPq JG7ve8lMVPWSVIPhhp0sz9AcHXWwoYaX/1q0RfVptQsOhylz84flO0Ai0KfW0z3z2jGWed kFbRMI59jdtwjN6OhiZ6U20S1QrjYY0UfCBZdPV7BWC60IG33LSJ8cG7PItokUuSY7LXS5 q9TehzF0TI1EbimNvDsjVbgAM2JrKB7s/WbMUROtIGJP8PI6MfVCqZTj3oylZg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397980; b=N7DS2tkmygPCqMUgrmfOW9jzRuJfJLCxUivUzsFA13kCjZ/XlSFQIMIUpFWHGMIdTauNW9 8m686FdxJWnVHVZED0iLCmSRyuGcAwnZdP3dO/hMCeNR+JYMifQHAEookkXUmWT6ke25cS l+3KVikzs2IAZCw4mowo8WE49rzncmOrvwXDuh2FZxjpm+X5pBAv18wRYYJwKS28b2+Cgp X1IWUnrAxsGA2+YZCi6K43t060H1H69spf3TnepwRYevr87o801szIhpf9PCtUDJ/dktnF Sz2aPXmKaOC2627PcJsuNuH/BybImSEClqRmQvj3t9gJv54H+h2CAD5rtLdqRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795397980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJaKWiBWi5IEijBpk9s1hg0faMBxWfwsmFKdvsOi9DA=; b=rDOF7mYvTUpwMtO6smc1cF3kilSEWT1pVaqFfqtEnG76Q84ed22CxMbU8ALLm4g3KC8CIj WfRX4J3xyMj09ZpVFZQUW3Wr3VcgTOIZLqwMzrCBOKOj+UortRxFz/DkYjBNfc/XuEkW9v gC5y0O51/N7ZsUg3gPa1uLly3Uzo1oxSWPrQ59ViF5eVmkK8YIv/HOgFtm83pRR++a1Hor t6MFf7RT2nwGJnyPBnLKfYFge6gJoKV4I5s5UMEsxvIIIfQj9MUvFQ2QSCRoj1pAvy/Kme yUh/YJJTQ/kZ6ImTUu/e+GbEieUUPkrh1buy5Tf2vUHr+5wEP5/iLtlDrZdFLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXC6K2pzTFH for ; Mon, 23 Nov 2026 01:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 56d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:39:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: c92c1d38ecd6 - stable/14 - kyua: Fixes after vendor merge List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c92c1d38ecd6c2d2e33879e7b7adfa214839f003 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:39:39 +0000 Message-Id: <6b03995b.56d1.68314f99@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c92c1d38ecd6c2d2e33879e7b7adfa214839f003 commit c92c1d38ecd6c2d2e33879e7b7adfa214839f003 Author: Igor Ostapenko AuthorDate: 2026-10-18 17:22:55 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:36:35 +0000 kyua: Fixes after vendor merge Reviewed by: ngie MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D60446 (cherry picked from commit af238d55d313a4a99fe9a3492755eb152b17bca0) --- contrib/kyua/cli/cmd_debug.cpp | 4 ++-- contrib/kyua/doc/kyuafile.5 | 1 + contrib/kyua/doc/kyuafile.5.in | 1 + contrib/kyua/engine/scheduler.cpp | 4 ++-- contrib/kyua/model/metadata.cpp | 47 ++++++++++++++++++++++++++------------- contrib/kyua/os/freebsd/main.cpp | 16 ++++++++----- 6 files changed, 47 insertions(+), 26 deletions(-) diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp index f5e48572407e..f43be8fe85f2 100644 --- a/contrib/kyua/cli/cmd_debug.cpp +++ b/contrib/kyua/cli/cmd_debug.cpp @@ -155,14 +155,14 @@ public: _ui->out("The test failed and paused right before its cleanup " "routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } } else if (_cmdline.has_option(pause_before_cleanup_option .long_name())) { _ui->out("The test paused right before its cleanup routine."); _ui->out(F("Test work dir: %s") % eh.work_directory().str()); - _ui->out("Press any key to continue..."); + _ui->out("Press to continue..."); (void) std::cin.get(); } }; diff --git a/contrib/kyua/doc/kyuafile.5 b/contrib/kyua/doc/kyuafile.5 index 1990e7bba3a3..d26312dd0d18 100644 --- a/contrib/kyua/doc/kyuafile.5 +++ b/contrib/kyua/doc/kyuafile.5 @@ -311,6 +311,7 @@ Supported platforms: .Pp ATF: .Va require.kmods +(appends to the list declared at the Kyuafile level instead of overwriting it) .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index ae4b8ebfa3fe..9485ed187814 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -311,6 +311,7 @@ Supported platforms: .Pp ATF: .Va require.kmods +(appends to the list declared at the Kyuafile level instead of overwriting it) .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index 6e19a1598f8c..d04fc1dfbd3d 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -1653,8 +1653,8 @@ scheduler::generate_config(const config::tree& user_config, if (user_config.is_set("unprivileged_user")) { const passwd::user& user = user_config.lookup< engine::user_node >("unprivileged_user"); - // The property is duplicated using both ATF and Kyua naming styles - // for better UX. + // The property is duplicated using both ATF and Kyua naming styles + // for better UX. props["unprivileged-user"] = user.name; props["unprivileged_user"] = user.name; } diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp index 8bb071163c10..51a7b03e4599 100644 --- a/contrib/kyua/model/metadata.cpp +++ b/contrib/kyua/model/metadata.cpp @@ -255,8 +255,8 @@ init_tree(config::tree& tree) tree.define< config::strings_set_node >("required_configs"); tree.define< bytes_node >("required_disk_space"); tree.define< paths_set_node >("required_files"); - tree.define< bytes_node >("required_memory"); tree.define< config::strings_set_node >("required_kmods"); + tree.define< bytes_node >("required_memory"); tree.define< paths_set_node >("required_programs"); tree.define< user_node >("required_user"); tree.define< delta_node >("timeout"); @@ -282,8 +282,8 @@ set_defaults(config::tree& tree) model::strings_set()); tree.set< bytes_node >("required_disk_space", units::bytes(0)); tree.set< paths_set_node >("required_files", model::paths_set()); - tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< config::strings_set_node >("required_kmods", model::strings_set()); + tree.set< bytes_node >("required_memory", units::bytes(0)); tree.set< paths_set_node >("required_programs", model::paths_set()); tree.set< user_node >("required_user", ""); // TODO(jmmv): We shouldn't be setting a default timeout like this. See @@ -585,20 +585,6 @@ model::metadata::required_files(void) const } -/// Returns the amount of memory required by the test. -/// -/// \return Number of bytes, or 0 if this does not apply. -const units::bytes& -model::metadata::required_memory(void) const -{ - if (_pimpl->props.is_set("required_memory")) { - return _pimpl->props.lookup< bytes_node >("required_memory"); - } else { - return get_defaults().lookup< bytes_node >("required_memory"); - } -} - - /// Returns the list of kernel modules needed by the test. /// /// \return Set of kernel module names. @@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const } +/// Returns the amount of memory required by the test. +/// +/// \return Number of bytes, or 0 if this does not apply. +const units::bytes& +model::metadata::required_memory(void) const +{ + if (_pimpl->props.is_set("required_memory")) { + return _pimpl->props.lookup< bytes_node >("required_memory"); + } else { + return get_defaults().lookup< bytes_node >("required_memory"); + } +} + + /// Returns the list of programs needed by the test. /// /// \return Set of paths. @@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files) } +/// Sets the list of required kernel modules. +/// +/// \param vars Set of kernel module names. +/// +/// \return A reference to this builder. +/// +/// \throw model::error If the value is invalid. +model::metadata_builder& +model::metadata_builder::set_required_kmods(const model::strings_set& kmods) +{ + set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods); + return *this; +} + + /// Sets the amount of memory required by the test. /// /// \param bytes Number of bytes. diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 700284b64b78..1fe4fca8cae4 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -34,7 +34,12 @@ #include "engine/requirements.hpp" #include "os/freebsd/reqs_checker_kmods.hpp" +#include "engine/prepare/prepare.hpp" +#include "os/freebsd/prepare_kmods.hpp" + namespace execenv = engine::execenv; +namespace prepare = engine::prepare; + /// FreeBSD related features initialization. /// @@ -50,15 +55,14 @@ int freebsd::main(const int, const char* const* const) { execenv::register_execenv( - std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager()) - ); + std::make_shared()); #ifdef __FreeBSD__ engine::register_reqs_checker( - std::shared_ptr< engine::reqs_checker >( - new freebsd::reqs_checker_kmods() - ) - ); + std::make_shared()); + + prepare::register_handler( + std::make_shared()); #endif return 0; From nobody Mon Nov 23 01:57:46 2026 X-Original-To: dev-commits-src-branches@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 4jXpx715Hlz71g1f for ; Mon, 23 Nov 2026 01:57:47 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpx7093fz4tWq for ; Mon, 23 Nov 2026 01:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WHPjNsmDeILrzHyh9TtmZ5UC4cdYiIMYY5Qo4yqaY1o=; b=L1DyNZNCUOR/Yrbs+DyQ0foZcVLMqNQRgF90UmBvYlCjVtrnt4dmRfSaXtyKgQKTwgBYu/ NAtAWfeW0N5aadFglZT6UE2v7Z8LBZHPB87vMM/HRvbQnOuDbMtrshK4Tygv2Ob5zuZZbJ rU4DakwW3+wNaeiureXKblhzFjUdAXB7mIFHvToClYM5sgNhWvAA9Of/nLWPYoIfepmwYr acJ+0FKx+bJwCcOMbfVHZVvhsXvXFpsGhTy0pzraoO88NEVQn5dduHuTMcaeAEeYuik4/l zm9dGz2FlnwE6sZ2BBx1g57CrCd36E5ZmPrObtiWgCdrOWtkYlVGkrXdH4BEtQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399067; b=yiyJRNztugcPzQ54HxaUilpPvfIfvu3gUEx186LjdQPLaOc9qqS11PGLFYjd0RMC+SayMI i6ii093dIu1kC3CwHbOxN864xoWrViMVMzVlFu53M4DMcvonjrXzBjZKjA7mtWLCoOpfRG nxjB6CLIIABglbq5cEf1ZqfKdSquXyYUD4WqkpFvA8zGEzAdr5Au2h6Kk+UVw3cgd14gY+ EtETU7egXmTdME0t6t82vd1fdzJbRLN/U9JdUUGXqI4AFR6A4d9IP/h8155i++cCBAH5dr +Qs+hrbv10SFEaIsuG1REZ/sC5+6UzxLf6AFfqwT+TTMTrkDfQASez452O7rrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WHPjNsmDeILrzHyh9TtmZ5UC4cdYiIMYY5Qo4yqaY1o=; b=DeFw1eOzsgZoQiHjjXsWsCgM8XGU4QBUgVpLX4G9uqMyWyVwV+VlekP8ZTT36inHVtGm+0 uK9M8nigMDqzGEhbZ1xXbiEDfHESvRB5/W73I/LAqGhMgeokufU09Y9ypE6YHnQNXTCbBv FTRELYU17mDl9ThFK04/VICg5V7AVQkirrspHCpTAt1SChB+bxZnvaHPNgT/+6jmj/swpm 4sd2ZbaIzcl/AEjLjYHUJytEHjx/7m7RvPqhFlmYTWg3OULMkP1KwMjNlOFFwf/Rbn4ltR k57alh7oRgNHeVYOXEFHq2XLmd47IbFyDTqPOw4qTECyB3k76RX0gWBKLKpZeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpx66xMXzVKD for ; Mon, 23 Nov 2026 01:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 7e0a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 01:57:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Enji Cooper Subject: git: 005e2e59079c - stable/14 - capsicum: add tests for copy_file_range List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 005e2e59079c88481f6a90384e85366946a2d827 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 01:57:46 +0000 Message-Id: <6b039d9a.7e0a.3fb71972@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=005e2e59079c88481f6a90384e85366946a2d827 commit 005e2e59079c88481f6a90384e85366946a2d827 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:27:27 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 01:57:36 +0000 capsicum: add tests for copy_file_range Reviewed by: emaste, theraven, kib, markj (all previous version) Differential Revision: https://reviews.freebsd.org/D41967 (cherry picked from commit 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83) --- contrib/capsicum-test/copy_file_range.cc | 228 +++++++++++++++++++++++++++++++ contrib/capsicum-test/makefile | 2 +- tests/sys/capsicum/Makefile | 1 + 3 files changed, 230 insertions(+), 1 deletion(-) diff --git a/contrib/capsicum-test/copy_file_range.cc b/contrib/capsicum-test/copy_file_range.cc new file mode 100644 index 000000000000..b785eb7f1e97 --- /dev/null +++ b/contrib/capsicum-test/copy_file_range.cc @@ -0,0 +1,228 @@ +#include +#include + +#include + +#include "capsicum.h" +#include "capsicum-test.h" +#include "syscalls.h" + +#define TOPDIR "cap_copy_file_range" +#define INFILE "infile" +#define OUTFILE "outfile" + +/* Test that copy_file_range() checks capabilities correctly. + * When used without offset arguments, copy_file_range() should + * require only CAP_READ on the source and CAP_WRITE on the destination + * file descriptors, respectively. + * When used with offset arguments, copy_file_range() should + * additionally require CAP_SEEK. + */ +class CopyFileRangeTest : public ::testing::Test { + public: + CopyFileRangeTest() { + int rc = mkdir(TmpFile(TOPDIR), 0755); + EXPECT_OK(rc); + if (rc < 0) { + EXPECT_EQ(EEXIST, errno); + } + wd_ = open(TmpFile(TOPDIR), O_DIRECTORY); + EXPECT_OK(wd_); + CreateFile(TmpFile(TOPDIR "/" INFILE)); + CreateFile(TmpFile(TOPDIR "/" OUTFILE)); + } + ~CopyFileRangeTest() { + close(wd_); + unlink(TmpFile(TOPDIR "/" INFILE)); + unlink(TmpFile(TOPDIR "/" OUTFILE)); + rmdir(TmpFile(TOPDIR)); + } + + private: + void CreateFile(const char *filename) { + int fd = open(filename, O_CREAT|O_RDWR, 0644); + const char *contents = "lorem ipsum dolor sit amet"; + EXPECT_OK(fd); + for (int i = 0; i < 100; i++) { + EXPECT_OK(write(fd, contents, strlen(contents))); + } + close(fd); + } + + protected: + int wd_; + + int openInFile(cap_rights_t *rights) { + int fd = openat(wd_, INFILE, O_RDONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } + int openOutFile(cap_rights_t *rights) { + int fd = openat(wd_, OUTFILE, O_WRONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } +}; + +TEST_F(CopyFileRangeTest, WriteReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, WriteWriteNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile index ad697f160e2e..e55393bbf131 100644 --- a/contrib/capsicum-test/makefile +++ b/contrib/capsicum-test/makefile @@ -1,5 +1,5 @@ all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) -OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o +OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o GTEST_DIR=gtest-1.10.0 GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 2dc499a14b42..24f488b2d14f 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -23,6 +23,7 @@ SRCS.capsicum-test+= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ + copy_file_range.cc \ fexecve.cc \ procdesc.cc \ capmode.cc \ From nobody Mon Nov 23 02:02:24 2026 X-Original-To: dev-commits-src-branches@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 4jXq2S4Wxlz71gSV for ; Mon, 23 Nov 2026 02:02:24 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2S3V0Cz4vhg for ; Mon, 23 Nov 2026 02:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AktSkVNQGCNjPibjE0D7qeK9aZUIoPpZxtzEI7ns0C0=; b=gEnsAl/dUBnPXi+COyDttd7fTIREHz+otahqdnWi9kB6evzUNykWTlwi/W3oUfjf57Ziyp oo4HWxj/p1RPx7eAatASqDxItPxzWpCO3CaOzlSDQYfyHhamOuHAW3ei6Wt8IySu5b0WHU m7wnXgcYYy+gZa8iAIvb1FdVKC7/R43d53Ss/5yBoRlWRZp+g6mjm4NrWN5atK4teeQDai l25LQdzDOEi5xa6/1UqQyI5vfNCmgr+4/zPMchwBK9lQg17QPKtc+/1iHxydAK+371wXyo iHU7eH295w+mOtBeCD52kUlVyoOgakHq5vxHwc2d/ZetD5T6jypqrAJDe2K9tA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399344; b=BRuEsbSraIPUOwuCDejeBnpo9gJgajSkILX4zPllK1/x6CvzV/YpjISY4f8wv0NTEMTu29 NPDu9sVVx02wOvcOt9UNTIsT73fTAJP0TeAe7q92f3uelca1gZgUo4bdVjnUlquql5jRL0 bd1OmRAHHWSFsCiUlVVniFfVx7KyRGE3aUVSpym9hJ2Ir/DS3YiiYul+0Jupdh7xk2kaax EEsUx4BGK0Lrpu2Zm5xB/B533tLRMSpQ2jUj8MfXrc7IKaQm6dMMmcra9JHXc5CduaIa6t EUU9i1VPT0UH0GufPRRZTgcgzWBtwngjB6InEAMobEtLRD4MSNOVKt6REW09EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AktSkVNQGCNjPibjE0D7qeK9aZUIoPpZxtzEI7ns0C0=; b=Mv9jwLLOKOBGRBJ6tMYQ17pZX7MP+wPuUJiOrm2nmesF8eHNCuRlEt2DCCDKV/ESXfypaf Sgxp8ZZnCEayG8AxPUSTEneTmAePY+BAoCvra0AUTNoYxwaqqWGlip9o2ZScVG26eQ5rA3 +2Za69Wo0Y0ZJ5ZZpkpZSxKrJ1JfOXw19mRUnQcWju/OTOxfnM3FBpurtYMxQCRQcq/uF0 oVn08wVRvpetbwkYooMcr3HFelqvuDLivLOdYFECu3/2GZdNPxDn+7AiWU0aQbQnXJcpDL aLvZiZVDQ/M1EhVIYFF//7lVgtOoiEqWv35INKzHepWkXnApGXvhrrCvNfysnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2S38CDzV8h for ; Mon, 23 Nov 2026 02:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 96b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:02:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: _ov4 From: Enji Cooper Subject: git: 2a25b514f1c6 - stable/15 - poll.2: document that poll is not restarted after signals List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2a25b514f1c6198698ace227d1db3ec67e124010 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:02:24 +0000 Message-Id: <6b039eb0.96b0.e516935@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=2a25b514f1c6198698ace227d1db3ec67e124010 commit 2a25b514f1c6198698ace227d1db3ec67e124010 Author: _ov4 AuthorDate: 2026-11-06 06:16:28 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:01:15 +0000 poll.2: document that poll is not restarted after signals Signed-off-by: _ov4 Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2526 (cherry picked from commit 72a80a4733b2e2cf7a3e004e961f0fbba9aaa31f) --- lib/libsys/poll.2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2 index 6e6ed33f7a6b..12ceb35d22ec 100644 --- a/lib/libsys/poll.2 +++ b/lib/libsys/poll.2 @@ -195,6 +195,18 @@ struct timespec { long tv_nsec; /* and nanoseconds */ }; .Ed +.Sh IMPLEMENTATION NOTES +The +.Fn poll +and +.Fn ppoll +system calls are not restarted after a signal handler returns, +regardless of the +.Dv SA_RESTART +flag on the interrupting signal; +they fail with +.Er EINTR +instead. .Sh RETURN VALUES The .Fn poll From nobody Mon Nov 23 02:02:25 2026 X-Original-To: dev-commits-src-branches@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 4jXq2T6xVdz71gp1 for ; Mon, 23 Nov 2026 02:02:25 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2T3psTz4vNH for ; Mon, 23 Nov 2026 02:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399345; 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=Cwz0sNa5q2xwZg3wqVVjjMG5WqLmguDk+HPgKz178Y8=; b=rIWoftmR9zHRbG85JRGo1LbCpEc9Oed0dUENwUdK1b2RGXmRaCaLF4GB1PGnCHZQzJgXen LgFXPTsBhSi3eNYVvfPEQkeDQNiFLSZQDsdKgJR9DZMSR8et1apBMStraF7x5B1bE1y07L cruANg2ZW+6ykabTVVe1pMycy/VKz7hNfyLJY3pUmWv0ZP7rx0kkXps8HsbOCKmXxfuwKy 4x0ug3WvK6HHk0deE0o/bZJMSk1Vf9YfhLiZQUBNh/9lZEEHH25n+dmNXVSuVRKmbRt824 Qo9TihfFbxNJProsUI0q58la0lDwLtluwTJPMbAuhYh+OrLhkoyeuunly7Yv5A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399345; b=O7uhu21Nl6P+EKfI2Wmx1RgvCI5lqv7EoaT1cSO+TcF8ts24oE9xvjKLUz1qg+TP0lb6lC xFVGArjpzMxSl5nZzKJSvw17hO+RrCXB567VQhphvxUqMVSOxeSuobPYB8GpuYmn6747QS JNAyYWditbZISwv9nzs8TBzLTz54kKySlh2rmb0qae8nG+zsYnmxAonofRuR62vdaqqbvR ZlgVP184p3/Or7JqsXJgt1bEIA7G8Axc3EbbNipFV/JM25DRFrUyuCIsfSVN1ZoWEO4vED 6F7M+o/0slPYwrzS9bxzAi3XXUXm0ZRvMA/19KA7dqw+viKJmIzNmpMRrgIRrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399345; 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=Cwz0sNa5q2xwZg3wqVVjjMG5WqLmguDk+HPgKz178Y8=; b=Igp4qnAOE7tmHHqfwYVy0ajzabSm5erfpcdYZ9QzM5Ch6VPQyPbf6wocvtds0ekEQRVcuD A7ilZydE3RVBqTq53Hdnu6jqGzV+3beT9Q+ZOL2/ZbOF1lJIMAOJUFdp4h0ox1fX0+z083 a/WzAfjawv8QA4aAdDZZBzpRSIB1YK/e0GNKwCf69mkczhn11MnkOqZ0lvVCfqJAY2q3lw agl05bSNZeFt9PStDWWNI8uplR8i+0BU4IYTibIvjrFwa9vuSyOtUYH5h9IgYxuz3ieERk oSWgoIX0m+CoQpUAgSZSLWfgauYwcXOc5VnJopNbGCuMe5t8/4KF2DgRtKZs0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2T3TnmzV8l for ; Mon, 23 Nov 2026 02:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8c21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:02:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 64a648b8ecd8 - stable/15 - libsys/poll.2: bump .Dd for the prior change List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 64a648b8ecd87302b1ab62171e3778d6c21d6164 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:02:25 +0000 Message-Id: <6b039eb1.8c21.103760f1@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=64a648b8ecd87302b1ab62171e3778d6c21d6164 commit 64a648b8ecd87302b1ab62171e3778d6c21d6164 Author: Enji Cooper AuthorDate: 2026-11-09 05:37:49 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:01:15 +0000 libsys/poll.2: bump .Dd for the prior change MFC after: 1 week MFC with: 72a80a4733b2 (cherry picked from commit 89d6ddee20281270934c73b41d07f04e9bfc86bc) --- lib/libsys/poll.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2 index 12ceb35d22ec..0d1643ca31fb 100644 --- a/lib/libsys/poll.2 +++ b/lib/libsys/poll.2 @@ -27,7 +27,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 11, 2024 +.Dd November 08, 2026 .Dt POLL 2 .Os .Sh NAME From nobody Mon Nov 23 02:02:26 2026 X-Original-To: dev-commits-src-branches@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 4jXq2W199Rz71gp3 for ; Mon, 23 Nov 2026 02:02:27 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2V4Z1fz4vLx for ; Mon, 23 Nov 2026 02:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399346; 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=Z1mNSRzHQunatKL+/OOezTPZBb1RDLagqUnTou6KuvQ=; b=MZu7hSxZMlw4duLuz3hWMlsFpFCegw58aY/0/6zKukC/9zXVq0PlpNIt5v71HH8hnHsvnR RMH8OEjyto0196hWpjKkSR0dktDzhh1ODgSJd9zmNGUxxhLpd+DKyFmNQS5pr2Uae1aXYc jtNSeRwtMwMsKzkl44QJH/2AgT+HC96Snj9bfs9DGbon40OuR2qFjnbTd/uludOUO4ob/k FECBOFsjo9zH03lwVj++qHC9mXkFzHWXWfnSoc3uEjZobq0W+fr0mWiFIDgwDfuIbuTXsu Aj55slV/iMa86N0npAl5kKQjMRdgRbCoSiGi2v5lrrbsSMgx3ls3G3AiTEjJaA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399346; b=khyGNkdRWH/3E+7/FFnnGit4ATpSzRq0ix1/cmgd8RU4dGzzMiXBDTklnehDvzC2mGoKTK 9RjpaQPEaj1boa2jO4tHLINDdz3sBMAqetUysmEqN8HcPgC8X+W+fCQzWhILKFV1i4sqaG 5isYFxqX8fLida40XS51VvhEr188jzOMxCTHVVHMrLsBnkEiQpLe9zRIQqyMckIQybz7xW TVgpQqxETALSgBX9BmdsjJ87L+sOtY1Pzpr2RcAFEFP3bdcWq7ETciUC5caV4eegPcbtcw HAJfpGwl3YdWJXDCKuNExdUOtl+MYYxWkYK5Ld2qMKHCwL6ZiSYwHbnLDEJueA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399346; 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=Z1mNSRzHQunatKL+/OOezTPZBb1RDLagqUnTou6KuvQ=; b=DHzJOYtD5LsuJgnHoi3dXvtRD2W9wcn1Nr/vHMUYJqQ8ctdoOZ04LbidIAqaa7kJU4Jcyj 9HsCM5w2TizqW2ezy54cySHzyOYeO9qCmttatUqBrRQJDUgRf6y1NiCvqhiVlQFm3E90rg cpofiH5aFe6ptRGF/3rQTasPFtUs9jRkukdxVHQOBSKxKM6nsG9aVE/54RXppy8uIgY2as 2tj6TNKK8tTNdItN7HFZdGWUctAhqSyCXNGIY/gKy0Qubbg5xcsD6/ucDMhqdbzUWiVp87 3JPoO72QwpBL8dYkL/WYPqnMiQjcoCX4qVR7bxYfSPD0uRLBoQEAGnLJLSKm8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2V3rPjzVqf for ; Mon, 23 Nov 2026 02:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 907d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:02:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 246b08ec16f7 - stable/15 - libsys/ppoll.2: fix .Dd modification to manpage List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 246b08ec16f701ec56cd6359e6df500f05fc7cee Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:02:26 +0000 Message-Id: <6b039eb2.907d.2af6d1b@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=246b08ec16f701ec56cd6359e6df500f05fc7cee commit 246b08ec16f701ec56cd6359e6df500f05fc7cee Author: Enji Cooper AuthorDate: 2026-11-10 05:22:22 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:01:15 +0000 libsys/ppoll.2: fix .Dd modification to manpage Reported by: gcc 14 Fixes: 89d6ddee2028 ("libsys/poll.2: bump .Dd for the prior change") (cherry picked from commit b4a0f17b35fd862feef3e1284926da48a6aad694) --- lib/libsys/poll.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2 index 0d1643ca31fb..648417d0b1a2 100644 --- a/lib/libsys/poll.2 +++ b/lib/libsys/poll.2 @@ -27,7 +27,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 08, 2026 +.Dd November 8, 2026 .Dt POLL 2 .Os .Sh NAME From nobody Mon Nov 23 02:04:41 2026 X-Original-To: dev-commits-src-branches@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 4jXq562X51z71h6P for ; Mon, 23 Nov 2026 02:04:42 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq560K2Vz3Cdc for ; Mon, 23 Nov 2026 02:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399482; 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=4g1KgS2+wnN1SLqInn+WzM8eIQpJy3hcVyF1zxBV3xI=; b=xkaULOhGoekEI+F+IJJGYbwYljZg2Gjy5+mLd9mwLKid9K76Z0xi1yC8YLhbfo1Skt26SI ByX8pQvr4yC4rZp+ZdS1O29HOd6Q9MW7PkEq5EIvsJsW5qn3EdQM4tQWPGufq/DXLIMLvq +CfTH/o63tYeM+9ip8CwY5yNcHhygrCGIJPkStcZ0pT8y62EONeV13URWuTODFZ7nkSwUc Dq3TgnAzjATYqs9WIgwXbUJzOyaN7/2IaUJLXWjnaK85Gi9LpbF/3TMS83JJMuIegfIoQ/ 6XxmL0Q0AvyQ5IY0rgBM2PreEMU0xU7MU0ojba++m5h+DYmXv0IgMgCuXSRlMw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399482; b=QOjhqHfHikWX+abz1ALDPFxcQ/swVaIwWJN/PL7CPHHD+kkAyElSlcpkbR/qokKDXfew5Y b/U9mia4I58pwHgtlBJPACUhuwb9bp+eDLeninB/PSAchrGX/3ipjm9dm69+Q9QsgKTRo5 QCHT2V0MB52d0GLcx9lRmcmJZ0YBr+mjPbcSZvsAFgFLoarhITWAn5HM4kHn2i/aJlMe7U B/ClMMLYOyWPk5xjaYZe6QL+9AolW25FBqRfjnnV1ZLfJ5+hOWa6C93hy2lbZwb0Vn7L1L 5/CavwyWboyEKwcuiRBt8c9wZHI8D55rMhOvsispnkMomYJ+Y1UpQJ4n752Xcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399482; 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=4g1KgS2+wnN1SLqInn+WzM8eIQpJy3hcVyF1zxBV3xI=; b=pgeFv4qA8BD4vYWxrGcQtwzRj5LNu0ObSnZKWh78+us38VEpl3qsdiw6oNnv+aauvuRORz 2caDF2Y6gLENS9kFGQOfaEAO/GnrzrnCADiA2QzGzCqZXG9VyJ9V8aPRRiOsBiH9IBGA// QMtGvYA9eylBycxMAQJ3TiV4QbwQ25SZLWHRPpG9JaCZIL/LSu9m287k/6KBcQ1Fmn+KTi CyKsibuBavCwrjlpErBS7yZJ4XVRdho1P2O7MwI6sYRBcUJl/VI1y6P5QWQk5n7wirRgfL cb4U5Qud3qhCzjWi1gGaDcTg4TGwYxJBhgT5eX97wnBV5/5x72iV0iXIp5m1AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq556Qp2zVqt for ; Mon, 23 Nov 2026 02:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8c95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:04:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 755406d1679d - stable/14 - usr.bin/diff/tests/diff_test: add SPDX ID List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 755406d1679d3dadf96aafc2591ce32b28449891 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:04:41 +0000 Message-Id: <6b039f39.8c95.1755f3d1@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=755406d1679d3dadf96aafc2591ce32b28449891 commit 755406d1679d3dadf96aafc2591ce32b28449891 Author: Enji Cooper AuthorDate: 2026-11-03 03:45:44 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:04:36 +0000 usr.bin/diff/tests/diff_test: add SPDX ID The SPDX ID makes the script's licensing more explicit. MFC after: 1 week Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D60908 (cherry picked from commit a7ec00b71715c36eb60822bf52af5637f3a8d2f3) --- usr.bin/diff/tests/diff_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 19e9bfb25728..4c2ae101ca26 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-2-Clause + atf_test_case simple atf_test_case unified atf_test_case header From nobody Mon Nov 23 02:04:53 2026 X-Original-To: dev-commits-src-branches@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 4jXq5K613vz71h44 for ; Mon, 23 Nov 2026 02:04:53 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq5K4fWkz3CwV for ; Mon, 23 Nov 2026 02:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399493; 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=+6+BCWCKBr4U56Wiug54eIkrSl21uDnTXgBE9e99E9w=; b=FhPzucv3f+PAfBhhv2Ox69m4mXDVMQYzAamOWok1c4XVtJ+n9PKi12PfA9xfwCePzgjhfR mwQGpOimIZ9GJVzqDwu835oTMHog/C8nRrttXtDqJ+iUJ0lOPV0vaxCLEX41tPH1/fLuPh WQ+DBmlcVoyzbgpqQ7CM1IAnHDF+5S2vMGv/Iq37V1Nn0T/spMoyLBmElT+gnsKsTjyTtL sx9suEbwxrJZzIu499Tgul1CfLuf1UF5g3LpKvqWunubS4hRMLATa0l80GNCaNwYqlIHkD VheFUiVJxvi9nffqTx7hdnizKeBR6DWce9YwPEqapD6ptHHzDwEQSFhVfT82yg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399493; b=wxQ0NUvQultN6i2qEcAHpxpq7fFvuNvqCjJCNKETWHVreX+Spf/+8CzCLczN+ZUdG4kv+i fTElW0ybWenCx4iBKZbEddIDmp/QqqbVW3swsoTWVEfpCoRIJEA7wz+ks8hvT2n9Hemq8Q 39N/pvZJ/yxFmkE7NvtHlVQLdPkqfXGrfB8zaMzNhqREjjfNY92roD+xfcgrTBd6bCxuBO RX5JZ7yxmLGZh83E7zuihhVmWCddEyjHxS6zf4DHNTsSGKeMhzl47MHL0tFP6w5oIoxl8x 08/UCnb0GolxMrKFGhwqt659ZocTfe8+W2flAtk6te9NuWBb6R5tewn+RgH3CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399493; 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=+6+BCWCKBr4U56Wiug54eIkrSl21uDnTXgBE9e99E9w=; b=FIstvb6oEiavr/UXrWL10Vr9EaKXgZ+Ucor3YhC+7bED3JN/11Yr5UfXsiLfrEJYtSb0JB UcX+GjMsYetkY08hqlOoyHrMjz6G6THR+3BSQbjIVykG7SuMFghXxC/+VVQUFc6GoYGPs4 WPziMrc34YSU37IzKXZfkvjH5bgtswukFGeCtK7y6YeajP1y+caRhDFtFlR+Q2W+fMBGFw ZyaBkoGxQyhUQfVbAZXun8aSU+HPsHyWR+VHEo+s/1d7ZWuob6pyAnDmfg1DcJid//tkJ7 +u0/ibMczEaS8l/i57h8Wbth6lbDsXJ8FdxWOw2gtt537Khqk+R0jrIijmpPnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5K36wMzVP9 for ; Mon, 23 Nov 2026 02:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9332 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:04:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 55da3d8b5254 - stable/15 - usr.bin/diff/tests/diff_test: add SPDX ID List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 55da3d8b525431de28fbf18891248acc78588361 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:04:53 +0000 Message-Id: <6b039f45.9332.3b33803@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=55da3d8b525431de28fbf18891248acc78588361 commit 55da3d8b525431de28fbf18891248acc78588361 Author: Enji Cooper AuthorDate: 2026-11-03 03:45:44 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:04:48 +0000 usr.bin/diff/tests/diff_test: add SPDX ID The SPDX ID makes the script's licensing more explicit. MFC after: 1 week Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D60908 (cherry picked from commit a7ec00b71715c36eb60822bf52af5637f3a8d2f3) --- usr.bin/diff/tests/diff_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 872103b24cef..fa2e1a79a6a8 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-2-Clause + atf_test_case simple atf_test_case unified atf_test_case header From nobody Mon Nov 23 02:05:13 2026 X-Original-To: dev-commits-src-branches@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 4jXq5k21htz71gyK for ; Mon, 23 Nov 2026 02:05:14 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq5j6hynz3Dt0 for ; Mon, 23 Nov 2026 02:05:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399514; 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=K3Eq5GdoEINQ1hniB8hQSQ9etJVuPllbwjErTHs1TmU=; b=GzckQr7LN8uzw0wcCYf7ucDRGvhPvE/tE9ulXCP+NsOR15ZqUvwUsjZhja2HKNxXJN7jyU MAZax/jdIUFqO1JpJhvQopKj4swggIfqrjQLrDGZLlB4T5ZNgGH3a2Z/6/s0GhJ71+WtTU lJyHJLEJpClgVtUSt3wb/7tkLaMkRgCe3DCKtkZBK1B+to13f82/KWtwf3BYYsu8Ia47nH 6tb7I8clNieizKYvDg7K4/c5X9OmEiWm6iyclQwwCXf7PS7sFfsEKkqXud3tVzlQ/ix10P l/0/wg1BNl9scHr0nb0v0PQpkJL9V2Y7ToQ6ecdcq2beqKszFLvrEPiPuyA/Ng== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399514; b=qDccMqcpYJANOlGwtx2wDf1mjMd1Kbr46RRdLQm+ij0SXEr6E8I91eIzYbbv06CRuavLjM be9wZNMrPWTN0IfLSaNIzc9aECrECI5LEaaK4P/IIvHNHR2hyYrXZ8tgdIkg4aYjMPkfvM Uu2ikAR1MyoKGLVtKJ3nV/v+ruH9gTpogp3gsYGC+nBidt29Xoe71BA6SW5EGF8lxvptin S4o2aeQxkjEmkBA3R8YSydPwcvRHVjM/m4urmJrxReccy+64lfr2VlVG0SIn//WblBTbh+ 1rvt3/ZF1qrbA3l0tCuZXrSlI63xmJPcHpDzk1jDg/TGD9bCf4gYrlbQA9lGRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399514; 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=K3Eq5GdoEINQ1hniB8hQSQ9etJVuPllbwjErTHs1TmU=; b=L5YRWI9poJPoDP3DqIOd8xPxdF3TE4EI5FgNWAO5y9hNJahGRf+aSDIOMPnE3hYw+1cSPX y7uURscdxUxV8sJ34tYOJwaOIFoUo03U5b+0u7WZnZu5GYSaOAUDLELmqKtYHt4MC+8KrJ c+XG3NdbDw1y+E/BKpnutp4awxP6RDYt689iFz5wDta4jx+hIBv2vGCmEsFzRIwnJ/+7eF W4wK96A38pNa8Sul3W9EgFEWmWaLPpXB5U76SV6CQLN6w4Sx1aMXHS+m1XyCebidNtT+ms GzrmhJzVgtLUSjXX5cOdpNeX1asJZFNJwj9FHezs9z7JV0EL5MgFfkel6v4s+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5j62JhzVGy for ; Mon, 23 Nov 2026 02:05:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 923c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:05:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 25b8f5350bcc - stable/15 - net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:05:13 +0000 Message-Id: <6b039f59.923c.1dee079d@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac commit 25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac Author: Enji Cooper AuthorDate: 2026-08-09 05:25:03 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:05:06 +0000 net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed Note that the FreeBSD Foundation manages the current value associated with `OUI_FREEBSD_BASE`. Trim trailing whitespace in comments in the change while here. MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/82 (cherry picked from commit 529e9a00ddd3a207f3841c6581c9f1a23532972e) --- sys/net/ieee_oui.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/net/ieee_oui.h b/sys/net/ieee_oui.h index b5dd9fccefe1..553d9fcd3ba1 100644 --- a/sys/net/ieee_oui.h +++ b/sys/net/ieee_oui.h @@ -30,18 +30,21 @@ * */ -/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */ +/* + * The Organizationally Unique Identifier (OUI) was assigned by IEEE on + * 14 Nov 2013. The OUI registration is managed by the FreeBSD Foundation. + */ #define OUI_FREEBSD_BASE 0x589cfc000000 #define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic)) -/* +/* * OUIs are most often used to uniquely identify network interfaces * and occupy the first 3 bytes of both destination and source MAC * addresses. The following allocations exist so that various * software systems associated with FreeBSD can have unique IDs in the * absence of hardware. The use of OUIs for this purpose is not fully * fleshed out but is now in common use in virtualization technology. - * + * * Allocations from this range are expected to be made using COMMON * SENSE by developers. Do NOT take a large range just because * they're currently wide open. Take the smallest useful range for @@ -50,7 +53,7 @@ * * In the event of a conflict arbitration of allocation in this file * is subject to core@ approval. - * + * * Applications are differentiated based on the high order bit(s) of * the remaining three bytes. Our first allocation has all 0s, the * next allocation has the highest bit set. Allocating in this way From nobody Mon Nov 23 02:05:28 2026 X-Original-To: dev-commits-src-branches@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 4jXq606nBFz71gyN for ; Mon, 23 Nov 2026 02:05:28 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq605pt8z3F7j for ; Mon, 23 Nov 2026 02:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399528; 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=aC19dkg0Kivoql848IEca24ONSX713DQXtwc8/W6h1Q=; b=VfAB3xX2GrgKcrKcQVhaPdg6iCrvGeCXqHjMoPx3QQH2vWGUVCw6df4cT2bAYeLG/Toua+ 6Ejk+wALukaA+plSL38Q0MghDL8NVIW6pd4YZ812MSCF2UkrUOV14w86oK6gv4G/71q+9K RHo87E0qlqZ6B5q+ZT196u12dsf6QyAmVbVD2n0hgkSp9NKG5B7Kbw/sdxQdoNpn5xVCf/ xiOEq8kYOObRy7N7Xq0/zo93Q9DpDNHG4uvwVjJVqQhCZE52DSghCDL+PN2ugLSmhW95ku 9RZqkOvmdg3NbDoTJ/H7JGiACT3/VW0dZ186OvGtvF17xo9A67fSfgL/O90Mvw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399528; b=vzNIjG/tn4MmKsgl3MRTqfDnmxGYJcAhbJOFSe+Z2mRu7tMmvpsyRGMXfIdlLOnqTK1BNC TlPcgxS5E7KCfit2jy9l00gCipq7hJC0jK100IjUj5sj+CwvJ7L9R8nJmgkxzKuCl7/3Lc kYlLRma/TfGgh10MiWhp3uUXTxxlFvRvGalNkFU6d4o3vrbe54SRkA56HF8HiW39aEq8xU JYX5yxl8+KpvW5ev7zC9wboKRVFbrLqvxvOUges/1qt0IGTjIzskrS7LQbZvOckA6RUINN ATDk1xVOL9aFM+7A77DE+60V9J/cvH0jb7s++VumHKmLrmUb4qhwX6hTk/Je4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399528; 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=aC19dkg0Kivoql848IEca24ONSX713DQXtwc8/W6h1Q=; b=FPwQj1Tlr6QybVNBfNU4KVtLUwuxePyAU4s4gDzIa1SEu6wXtQjb88MN1o8HCXp4eln3Ma 9RLe7rSta4tMmkTFCx0zVTXPoH54DB4MA3uAMKPSn2tkULcrZQnFsP27aVfi+xBghwDY2/ vcdUm3cReuRh4t40bc3R+3auoMIDxeRXbqFiUWTtIz/fFixdlYF5CfdUckl0nfLqgsz/iI uikrEe2KNTu+in0hj+1CHUuijig6393QHdFO6p3rJijRElUp51jjrLZIa96DTiyjl8EkvC Mbgnzr8qR3GI/6Hlkv44w7ZPdCwXfkuQo0BrM/yu4HbVlHCdRLhoPG6PcAO0hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq6054lzzVPB for ; Mon, 23 Nov 2026 02:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 940e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:05:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 3c87cbb74994 - stable/14 - net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3c87cbb74994b4cd79d336adc83bfdb566c47e71 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:05:28 +0000 Message-Id: <6b039f68.940e.6979588f@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3c87cbb74994b4cd79d336adc83bfdb566c47e71 commit 3c87cbb74994b4cd79d336adc83bfdb566c47e71 Author: Enji Cooper AuthorDate: 2026-08-09 05:25:03 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:05:23 +0000 net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed Note that the FreeBSD Foundation manages the current value associated with `OUI_FREEBSD_BASE`. Trim trailing whitespace in comments in the change while here. MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/82 (cherry picked from commit 529e9a00ddd3a207f3841c6581c9f1a23532972e) --- sys/net/ieee_oui.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/net/ieee_oui.h b/sys/net/ieee_oui.h index b5dd9fccefe1..553d9fcd3ba1 100644 --- a/sys/net/ieee_oui.h +++ b/sys/net/ieee_oui.h @@ -30,18 +30,21 @@ * */ -/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */ +/* + * The Organizationally Unique Identifier (OUI) was assigned by IEEE on + * 14 Nov 2013. The OUI registration is managed by the FreeBSD Foundation. + */ #define OUI_FREEBSD_BASE 0x589cfc000000 #define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic)) -/* +/* * OUIs are most often used to uniquely identify network interfaces * and occupy the first 3 bytes of both destination and source MAC * addresses. The following allocations exist so that various * software systems associated with FreeBSD can have unique IDs in the * absence of hardware. The use of OUIs for this purpose is not fully * fleshed out but is now in common use in virtualization technology. - * + * * Allocations from this range are expected to be made using COMMON * SENSE by developers. Do NOT take a large range just because * they're currently wide open. Take the smallest useful range for @@ -50,7 +53,7 @@ * * In the event of a conflict arbitration of allocation in this file * is subject to core@ approval. - * + * * Applications are differentiated based on the high order bit(s) of * the remaining three bytes. Our first allocation has all 0s, the * next allocation has the highest bit set. Allocating in this way From nobody Mon Nov 23 02:07:50 2026 X-Original-To: dev-commits-src-branches@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 4jXq8k71zpz71hG1 for ; Mon, 23 Nov 2026 02:07: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8k57LVz3FQy for ; Mon, 23 Nov 2026 02:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399670; 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=HepmDnI9uYBShya9DBV/yFvFA7OjpOxCwZAVG5lhb9E=; b=QbZuFv7246ce7LMowpNJCi8y+etBCW+CnxKJcpazeyMDYV/Tj08KBdgTS7AsvN1hmBUSpi WtWHC8bnaqASQY42bjkNWf5j3IWH0K8S6USVmBK9hjFSpUcw2Jf/08VrlOD2WBB+f0ExTd nVY2xgEdjc83Ln6Gcmaeb3jefRXLtkxNlEWgMTiCoF6pV/r3CEJgqQLRE8V2NCkix0l6ZL Fkl6tA6sS0qBnCCtlJH+CRawbij5lof5yyH6HIW4Cz8liZ8PAJxkwywBmGcKT2CH38udex /gGfdRoZb0d/L64UBr45cJuwvObHN/wDf/e1bWmVJp0MKqszHnJq+NOjOmzXBQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399670; b=NXh8Kxd3ctVY75XIwW+HFeETFxU6k4miCUX1GpQ8fcxTYn22m86HGVQSTvpo6UzWS3MtKL 7PCWn0bNXPEYy0xygpXATlfOnGwMmw7B6zSTIaARbpWIBpyFyL05cM3lS/w8VplkgUEiJd lPLwWBtQVItwDXbLiDtghmKO3SNsFtmp8OmonuV153BxREUCMxrHMM1xN6D2FoR7m/lCvW T5UKZRD3S3ShFUWbvxW6ToM6nFIuNo6UKZa495r1zK/NmWfkTYIu9aW9246XN4LvnwbNCS X3/DPPF/3C0vUZv0kmCXL/APIApTjMsI3aXOQhnagyOB1ECK34rlaRZEDVM/rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399670; 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=HepmDnI9uYBShya9DBV/yFvFA7OjpOxCwZAVG5lhb9E=; b=PjQX6A7XBSEEfqf5/ScdyQyCO3NQFwhs64dIdJm/uWmhONgAyCOB+drTkBhA0nAvoTLtSr lRNXhHLTPSpkkrXPZf6uy7XXp4zhEr+qyk2SHRJno89T/8LrfBt35CmM6aNH973Qx8iUI9 PcRlvOq+qQiWYQ1VdPvIOkhF3QuTghXeoKJdqdM2NmLQ6l9pQx0fa+sWBteF3EQVAZFglk itQH3UTrlnu0P4r0BsokgTNaR6Z5BEoHH5IuscawGWeCW8t2a/jQzCo9NjF4T2ukQAnZg6 pRhRQlKZaoAEZPqj6kOAYjMzUyca9Sa0WCt9lzIZhyMuRj3mYZJM1efRz1rhGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8k4H9pzVdP for ; Mon, 23 Nov 2026 02:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9336 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:07:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 3926aba7c6cd - stable/15 - Remove Dtrace/ZFS tests if their knobs are disabled List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3926aba7c6cd98aafc8e053b27c59c706a0362c1 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:07:50 +0000 Message-Id: <6b039ff6.9336.6c33252a@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3926aba7c6cd98aafc8e053b27c59c706a0362c1 commit 3926aba7c6cd98aafc8e053b27c59c706a0362c1 Author: Enji Cooper AuthorDate: 2026-09-22 02:27:04 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:07:25 +0000 Remove Dtrace/ZFS tests if their knobs are disabled Prior to this change, Dtrace and ZFS tests and their respective directories would remain installed even if `${MK_DTRACE_TESTS}` == no or `${MK_ZFS_TESTS}` == no. This change enhances the logic to remove the tests when the respective knobs are disabled so the tests will be removed when `make delete-old` is run. MFC after: 2 weeks (cherry picked from commit 30c20ca26e105cffc5f37a95964cd9b2cad1b6cd) --- tools/build/mk/OptionalObsoleteFiles.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c42c4c9272df..9f0348a2581b 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1715,6 +1715,18 @@ OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace .endif +.if ${MK_DTRACE_TESTS} == no +DTRACE_TEST_DIRS= cddl/usr.sbin/dtrace +. for d in ${DTRACE_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_EE} == no OLD_FILES+=usr/bin/edit OLD_FILES+=usr/bin/ee @@ -9463,6 +9475,19 @@ OLD_DIRS+=usr/share/zfs/compatibility.d OLD_DIRS+=usr/share/zfs .endif +.if ${MK_ZFS_TESTS} == no +ZFS_TEST_DIRS= cddl/usr.bin/ztest +ZFS_TEST_DIRS+= cddl/usr.sbin/zfsd +. for d in ${ZFS_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_ZONEINFO} == no OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan OLD_FILES+=usr/share/zoneinfo/Africa/Accra From nobody Mon Nov 23 02:07:51 2026 X-Original-To: dev-commits-src-branches@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 4jXq8l74F4z71hCd for ; Mon, 23 Nov 2026 02:07:51 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8l54YVz3FR2 for ; Mon, 23 Nov 2026 02:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399671; 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=13RabSLWQzooRuN6i0FroAyhH0BR//Aw2eSwOlkBgJ0=; b=sMwe5N8FvmZB+6eCPainlfEn33DdyGrOP/y5LZXpH8dUbbVnJSvWISxYFMsdww+Al/dHgX X9cZ+1K6NiRWCYneF5m3PgTy4v4Zh2qbPR5fqnqgOn+o4X14zlS2Ts9+0nMputd3gS1cb5 Dv3jw3MckYEgOpM81OJ4A7bWFrV8rPZrA/ia3nKe+r7GO1iJySmTH26SVGULCbAwxlCKDZ msCAzX0sUB9NJwhzB7poCtvoBKDJJwiZ5/+UGqmSeRTTQaVjvPTMqvT1r1LbsNFvnxP6LI oFZjBeiFi3Ppvwtk/2ioPH2+8titdrqm0l59KUBBxj4gqFsvC6muh3h8o87pzQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399671; b=lSkqLcjQj6OyXwHUfcjOEDNZ9gwL3jsGM2/6Fc9+EyVbWU3eyx687hIm1Cq7vnsWFvKXGr qQOOZKVNROYDY8ddQwZ4DNZzi9S17OrGbj5JOVk4u0jaN7OEA0So1fwPzWbuOzlRbnMrkc Hxg37Km/5/Is2KzLx3yjfegcEjHl5rnl1GBE1JE+xkW6gkAg+xauhPGfQMz990/LFDPUl6 J6sgvCrkQ2DP2eN5I77e9n80llkXZvXo6nOHeoLcne/oy++3klCR75m9HUQyLmZwAVutUo exBk3FsEalLvPCcBlhpI1t7eBr4/NWSJHX4+1CvEAI7oLmLSdKDAaKhmo0t9/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399671; 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=13RabSLWQzooRuN6i0FroAyhH0BR//Aw2eSwOlkBgJ0=; b=V2vcxL9Rz2DHWzttKQhEHy541cXs/jbUTJJku7KjupeFhJGtESzJjJifUNn+lzVcCq31wv 0NMtux+jttDRsOS5rBh8yGEUU6yb/x6ItWHJiJDgiidfkN0JYyXG+qjBYDk/O346VTTc16 2CkcWUIturtCb2j/8hzldgoFGo03RK+F1jhLn+hJmKuaZzGVyP0MR/OATTtLHJYZpQOcWt 3Fs9uBvUnN69pAHnXelzocHWscyE7vEP5ZHPUnEw5zJkem8cRIEy0qXk3+JogVbcxMOTN9 lgu/sSvhvMd4m9HwP53FjO3GVayrHwTyI5a7VKcPwspqzJPBUXQlb6okwDKWLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8l4hzqzVqy for ; Mon, 23 Nov 2026 02:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 7eb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:07:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a0e5c02ffebe - stable/15 - Remove CDDL and ctfconvert tests when their controlling knobs are disabled List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:07:51 +0000 Message-Id: <6b039ff7.7eb1.4022921b@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a commit a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a Author: Enji Cooper AuthorDate: 2026-09-22 02:46:52 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:07:25 +0000 Remove CDDL and ctfconvert tests when their controlling knobs are disabled In the event someone specified MK_CDDL == no prior to this change, all tests under `/usr/tests/cddl` would stick around after the change, resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert, which the ctfconvert tests relied on (but remained around after the knob was disabled). Remove the tests under the respective blocks now so they don't linger around on systems where these knobs are disabled, resulting in false positives when running the complete test suite. The ctfconvert tests weren't specifically put under `${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately from the upstream provided Dtrace test suite. MFC after: 2 weeks MFC with: 30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled") (cherry picked from commit df6131e2b74d9f334c16387e9a46cafd6e27eb78) --- tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 9f0348a2581b..3b1e09f94b1d 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1441,6 +1441,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif +.if ${MK_CDDL} == no +CDDL_TEST_DIRS= cddl +. for d in ${CDDL_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no OLD_FILES+=usr/bin/clang-format .endif @@ -1713,6 +1725,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace OLD_DIRS+=usr/libexec/dwatch OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace + +CTFCONVERT_TEST_DIRS= cddl/usr.bin/ctfconvert +. for d in ${CTFCONVERT_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor .endif .if ${MK_DTRACE_TESTS} == no From nobody Mon Nov 23 02:07:52 2026 X-Original-To: dev-commits-src-branches@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 4jXq8n22FPz71h4V for ; Mon, 23 Nov 2026 02:07:53 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8m5YFzz3FPP for ; Mon, 23 Nov 2026 02:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399672; 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=rJNynHVtjcrJW8/SLcy5uJpTNKjmvy9uNKaCHukbZbg=; b=xfNqK2h2Hut8QGcx5JBmPKciJD3E1ZdJFAF0pWSvX+N8QZgyMqc1d/8CFOfWLlA/3lTA3S mjsX64eoCMV9gkAjhzDDG/YOk0egi/tN3BsC2W2nHM90iEazEeAPL0SfuYpcc5IM5IvoJ9 TQ8bSLfOeY6SBKnnPV/2aMlxPR3XQvkT7+c69ROaiW5ajgtaWiHZBXygWPG5deg/s0jcNz ivDnvbUo/lsd4IrPeTHbHpMl2V68yDQ44RKEeCJGg6YzoZe22zd9lbesLvlhaGKheYBwiK UutDllsJ3WtuUnh2ymlMY9zP4mcQzuwRkMkHMgnEfv1z0V4I2XaT3sUo1vVE1g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399672; b=A/3j3Hv5JMwFJHoYlJFkbt7qT8pHUdYaYq9bg/2al1qswP0WrtqpAN1xrJ1cFyzew7Rs1o 1KI5TTh1JyCAp/qn/9YElBUzeIfGSGx3V5Bsb60ONY5A+cDh8feFJCylz2wMq62LlHI0TL qm5yNVOjsj29CjdG5PG+VN73kXMI64Ffy9UBltlVlzKpFhCu1vCPxSWCKtMYNF635JEJNF egiLzrgwzDC2BFSajzGSZ1aLdQRC9C8FHsj8IPyiujamNYvkM+5XNCpcEgBpVkc01Q03sa KEQE8QxXL90AVaPmDGa/lHz6gn9vy0hfRnnjR32pT525IZBwNN6bGScoOh8MWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399672; 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=rJNynHVtjcrJW8/SLcy5uJpTNKjmvy9uNKaCHukbZbg=; b=s4l000smJY4wAVSotzB/uKF/Gt/BFtdqprDevyKQwzQRRi0IU/jwuB00QzoCj+fSWzWKmc LeaAcsqC0TODePKLlorqcYvB+inP/uxkFkyMgY+uRC1z59Z2ANHj8dlBJMLRN8fEt5FcEM PJZSCg88kV/k1DJdOPpQblhlKKuWouGqndu4qJq/lnW4N/5ZwP1a7IoTWy688V5j7gKqyF BsBf2qW0vC0yaXWeutM6Aq22KNDuJ4kryXgPvXzIaV9Dsj/7YRAvqAxtvdxmZfXNzn63/l rT6WCnNCchCDi6HRHH5l0ED5s+3Mdq+W/Wx3q2UbGjQvYUl14IA+zp1ClKkPUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8m55jxzVPG for ; Mon, 23 Nov 2026 02:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9d81 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:07:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 6109c35c328c - stable/15 - Don't some prune empty dirs created by BSD.tests.dist List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6109c35c328c07082fa4d63cba5503535c3bd579 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:07:52 +0000 Message-Id: <6b039ff8.9d81.78f55cb9@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=6109c35c328c07082fa4d63cba5503535c3bd579 commit 6109c35c328c07082fa4d63cba5503535c3bd579 Author: Enji Cooper AuthorDate: 2026-11-04 18:53:01 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:07:25 +0000 Don't some prune empty dirs created by BSD.tests.dist Before this change, directories needed when MK_DTRACE_TESTS != no and MK_ZFS_TESTS != no but not MK_TESTS != no, were being created via `BSD.tests.dist` as part of the standard build/install process with the top-level `hierarchy` target. This behavior resulted in `make check-old` flagging a lot of issues after 30c20ca26e105c, even after `make delete-old` was run and the directories were removed. Remove the logic which pruned these empty directories; this "fixes" the issue with `make check-old`, et al and allows a proper technical solution to `OptionalObsoleteFiles.inc` to be implemented by pkgbase in an unimpeded manner without introducing additional complexity. See the review for more details. PR: 299650 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D60928 (cherry picked from commit 0df8ed538c620cf021f8dfa2c54892b5ef9620a5) --- tools/build/mk/OptionalObsoleteFiles.inc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 3b1e09f94b1d..931affb4a67f 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1445,8 +1445,12 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz CDDL_TEST_DIRS= cddl . for d in ${CDDL_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif @@ -1741,8 +1745,12 @@ OLD_FILES+=${TESTS_FILES} DTRACE_TEST_DIRS= cddl/usr.sbin/dtrace . for d in ${DTRACE_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif @@ -9502,8 +9510,12 @@ ZFS_TEST_DIRS= cddl/usr.bin/ztest ZFS_TEST_DIRS+= cddl/usr.sbin/zfsd . for d in ${ZFS_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif From nobody Mon Nov 23 02:08:00 2026 X-Original-To: dev-commits-src-branches@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 4jXq8x40w3z71h9y for ; Mon, 23 Nov 2026 02:08:01 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8x10yfz3Ff1 for ; Mon, 23 Nov 2026 02:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399681; 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=nU5DVEsBzxpjLwkxQeDKv5SXV6H/UzTEkq2P8Bc38Ro=; b=m3pBxrQZZsEKfRXUaTLqhpVPVbTvLlGCQE634tz8NAucTcOmCcilKVnkdPOgkwRigqiAIu YGR00iDChlGdOjhLB9Af+Xb8OnlXyc3C/213HanD1T98YEOqTStq++Aso31nn69rzsSQnz lkchqrneSEEml3rsNGbL2O3KaTYtNJeYHIj8bXbNhchPlan6TUPQe77VMwvDrPwr56YsDH Ox+qNHO/rOivmD08jLxDz+mNkyBch5+J/8R+Q/KUzqyZk/EiPP1uuKdu2v09I/Erm3VaOl OuXx3Q6PLc/M83aDqbPaB/YkFKalJFsF10NCB09uaBLzMYZ7qE7mz3D8/DFEVQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399681; b=jCAKZtwSj90xamUD2m4H4opD8Fe+q8huSBFutZNVu7x5DnE1eBVYJ3IzxVlzyKkSz62g6z bmYXHt9EA/Ay/20BF7EbdN7gXMfAgBPpIb6LQU+wQ7F6N9GL319PDNvfxSzpZh9q/0PHsz UsoM8jQeIN5kP8+UKBDA4eYNaR1y9XiLqRS/WtP1vKZgUxHETl9d23Pba7no7o7iNAVNBa Y2um/w21AeyBCyG7ceqkUcswYGumm1rem7qcelAdZ4/H97dxWk9CjFOyqtU/6AU0lnYijK KORjrzWy/Bc7+X1AVm/46YURFv6Bzjr2btsWygWJLMeD6CiISwDkInFlzge7ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399681; 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=nU5DVEsBzxpjLwkxQeDKv5SXV6H/UzTEkq2P8Bc38Ro=; b=NbLpywfz9WHWZbxjpLfiqpAnb/TJK3uv2m6Ar9kfg+uOsigkn3EBAET+UG/vtrvsbgh53k TaWcU3UoYAjJiNil4PwsFOXvZEGpSxIY0Vc9XOGuiSTUUSEBZUwIpyvSdRSvTvKWAhuZT0 yGEF/FLZo4hPvC/RAde6ooFQzEEhSah5hihAj7XbMfnV2TLYTuF+QECC8b7huljg+JNRku qrItZlOTwAM85vVFeAyMToOAR3S/fnQM1ZaGTqao1VRiESscatYom1X78i81Ook5gdfScy un3Dtyf1IQdcUg+rAWGEVM8MgF+lFmHZl8GmdFa/9zrM8h3ap+wOdhAAE00Irw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8x04bCzVqh for ; Mon, 23 Nov 2026 02:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8c25 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:08:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a1c9248d20bb - stable/14 - Remove Dtrace/ZFS tests if their knobs are disabled List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:08:00 +0000 Message-Id: <6b03a000.8c25.2d9f6c5f@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2 commit a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2 Author: Enji Cooper AuthorDate: 2026-09-22 02:27:04 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:06:47 +0000 Remove Dtrace/ZFS tests if their knobs are disabled Prior to this change, Dtrace and ZFS tests and their respective directories would remain installed even if `${MK_DTRACE_TESTS}` == no or `${MK_ZFS_TESTS}` == no. This change enhances the logic to remove the tests when the respective knobs are disabled so the tests will be removed when `make delete-old` is run. MFC after: 2 weeks (cherry picked from commit 30c20ca26e105cffc5f37a95964cd9b2cad1b6cd) --- tools/build/mk/OptionalObsoleteFiles.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 15e9d619fdb3..a4ccaadf7037 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1715,6 +1715,18 @@ OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace .endif +.if ${MK_DTRACE_TESTS} == no +DTRACE_TEST_DIRS= cddl/usr.sbin/dtrace +. for d in ${DTRACE_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_EE} == no OLD_FILES+=usr/bin/edit OLD_FILES+=usr/bin/ee @@ -9487,6 +9499,19 @@ OLD_DIRS+=usr/share/zfs/compatibility.d OLD_DIRS+=usr/share/zfs .endif +.if ${MK_ZFS_TESTS} == no +ZFS_TEST_DIRS= cddl/usr.bin/ztest +ZFS_TEST_DIRS+= cddl/usr.sbin/zfsd +. for d in ${ZFS_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_ZONEINFO} == no OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan OLD_FILES+=usr/share/zoneinfo/Africa/Accra From nobody Mon Nov 23 02:08:02 2026 X-Original-To: dev-commits-src-branches@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 4jXq8y43dlz71hB1 for ; Mon, 23 Nov 2026 02:08:02 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8y0tJ0z3FZ3 for ; Mon, 23 Nov 2026 02:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399682; 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=xQyZ3Y4kkHMXEBjiyRbpjqHO9Q8qI08wJV50E2MgxBA=; b=EvV1hFpZ2aVeVNnQu+CY0NZpNKaTVATcptIvTHxcXEIV5gAvzzSzKo2vtBk3KpSIx5j6BK 8+/nSkuiYK1OCpUqMIXvXtS1AKXZ1SJKGmEnuFDOintt8+ZU+ayj0m6XJtZnoo8aYOwLYA JRg2/R4dZuv/R9psHEv9vdZC/BjTSNbGUnD5f/GBhxoXCxIukdhhtsfF2/n1ZOVujJ510I gnKaTI+jZoIGW/ekwQ6rBgxWSGfLf/E+J0Ju3gZ8WGmF6n69y1G9ap5dbcug5n0OCdjM29 8EMfGcVxV8zlCzSQIzGJvWWSj+I0ChbBB8jyctyBpRsvQHAE1/e1rzMDP25cFA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399682; b=hYEUoqBEmWjABJ35FhqL+Qz3krfpFsbhL1I4R2yKSzsFucZbDcVvujRttmwPRooy8SXuZM 8s6o0dG0r8PUrIibjB0m2ThVk9VfVoVrsQR6DIklVSgOsjBe9oyB+Q09PkVhS+utCWCmky vZKFUGHUNeQCnDstmgM8IazaT7UGxMmEtNmOBFtrOoyPolvkLB9/RxKTW6j8nrdqiSwreY UqFMb3UFMBvdDZKtZnzCn5CjT9f27NPFrupdUbaWcz8238rH50eY3omLXYz9GlBUcOTzXq njW4K+ID/VWrC7pcHDyKVzpNZ5X+tMEaUu6Q9j1NxzMBneaEGUaS4UsPu9kokA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399682; 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=xQyZ3Y4kkHMXEBjiyRbpjqHO9Q8qI08wJV50E2MgxBA=; b=lZh6/H0A9IaQMk8EIr8L5W3LCYeA8hPASKtVmpU/3BCBsAhb2YWpIHCm9TXSkOWBohuZnL a4r8lmKKPny8leSP13fde+TBsrk8dmZco5jzWQp3FV7TU3hl28s4vTUce5yBICB20zFBdK ocbQ+74Hqcy9dC0gYhX2h2Bhjt2kBFqHX5CjffW5qDZyn8FbDagtacak0tz+gvw1xQuDLr +8A7J8kkRPETBREdXmvc0s4inrvXAP3rS1/JC0uT/Llm8qEpheclMgw7H5Mh0nwAsDxi4p OqBqQ64zuXdeePPt+AfkT6TNRYw05BU03P8j1XrZ/1mtCy2Gw4Aw8+P9tLmW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8y0XwKzVdQ for ; Mon, 23 Nov 2026 02:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 94d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:08:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: bd794b9b77ec - stable/14 - Remove CDDL and ctfconvert tests when their controlling knobs are disabled List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd794b9b77ece3314b3f1ad7a879fca5c09ccf17 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:08:02 +0000 Message-Id: <6b03a002.94d4.118faf54@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=bd794b9b77ece3314b3f1ad7a879fca5c09ccf17 commit bd794b9b77ece3314b3f1ad7a879fca5c09ccf17 Author: Enji Cooper AuthorDate: 2026-09-22 02:46:52 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:06:47 +0000 Remove CDDL and ctfconvert tests when their controlling knobs are disabled In the event someone specified MK_CDDL == no prior to this change, all tests under `/usr/tests/cddl` would stick around after the change, resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert, which the ctfconvert tests relied on (but remained around after the knob was disabled). Remove the tests under the respective blocks now so they don't linger around on systems where these knobs are disabled, resulting in false positives when running the complete test suite. The ctfconvert tests weren't specifically put under `${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately from the upstream provided Dtrace test suite. MFC after: 2 weeks MFC with: 30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled") (cherry picked from commit df6131e2b74d9f334c16387e9a46cafd6e27eb78) --- tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index a4ccaadf7037..6aaa5dbe1bcb 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1425,6 +1425,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif +.if ${MK_CDDL} == no +CDDL_TEST_DIRS= cddl +. for d in ${CDDL_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor +.endif + .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no OLD_FILES+=usr/bin/clang-format .endif @@ -1713,6 +1725,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace OLD_DIRS+=usr/libexec/dwatch OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace + +CTFCONVERT_TEST_DIRS= cddl/usr.bin/ctfconvert +. for d in ${CTFCONVERT_TEST_DIRS} +. if exists(${DESTDIR}${TESTSBASE}/${d}/) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${TESTS_FILES} +. endif +. endfor .endif .if ${MK_DTRACE_TESTS} == no From nobody Mon Nov 23 02:08:03 2026 X-Original-To: dev-commits-src-branches@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 4jXq8z4tH9z71h7P for ; Mon, 23 Nov 2026 02:08:03 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8z1J8Vz3FvG for ; Mon, 23 Nov 2026 02:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399683; 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=1tbOUCe7KPZ1OLzOnkc1PkrljCoBsU/zx3n7LM+ik7A=; b=i5V+Tj3Lx9+YgKCSD5VaM2ZDSExGuDnHmEdNpLDnqcbK5/Xq3WsfrELG/fSyt91mKWpzwX LDrJv5gHk1P/aTFNmiGG94W001NB5EVlHBqB3il05b59eo2iBZ7t1i7bN/RtioFs/pbzK9 9DSYqbp0ZaLBC1pxvFUFb0RcCL7CXgpqXEG0y9lyaGnqRrETm3Sf74qKIvsZxaCYapdee4 QR2Y7ujXAEQXIFId7P74UW21jgum9RS22WC5WG72GAVUk0noWgWaA+oYbClNn/Uhs2S5Kg Mn5kPgtcqiS5AiZhvle7d1EGTs1cSljRlG2m0ca9c6ElvxGmaQOEpxQF6aH+RA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399683; b=uEXDiTmt8OImhxO5Gj4LFZGuFgxc/PR9KI8bjDyfVOzoadc0iKyuQ/b2kP1RLar8VEUCBO cgNRfjbRmTuBo/P1CRQDL/I2bU9ejvLWxdNXJlCxoPKC7XwUTEjl4OoFsAHn/+RsVAk67p NlaqKSampdk/h/NV9Aj6qvF+jHWHswcGj+7PYVAbtQi9JewHccgtzqpqQCIm5RQ8IXseJX 9+7uk0PC1SSR/RDG2spld0VY+kHc5XQT+I4dQ91FzPi5b4jvbEMz96DWNt13GE4CpsRrxH iqyjhJy1YVQfdbyBp/6ZDL6tHrMMBl2YRdB81iEzWRWxf9RBgCDcGJhNTayUdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795399683; 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=1tbOUCe7KPZ1OLzOnkc1PkrljCoBsU/zx3n7LM+ik7A=; b=X8woiuVsVa+dhe6Wd0I0hNcHYFATEBkI+lDgRvDyjwgJ2ce1Ano2LEhCxFcCc+2JGFebKp Y2xWS+BveDetBj1bX1wOfJBidTtdmGeFa0Dxi/Ivx0t258yMHx/mNYXKKKTj49dwBzcHta Usf/+GRN/Nrgd2Ct++31Au1e19vV+s3W3UY6wjUCcRk38Ra0q69kIjfYNU5b5QntdDKvyq ZuDt1jR2aUguTuQQ9t6CysUL2XtoYVeJdzs5jrWo1I9C4vZrpHIqqH9knfgMaWNaY25p7p 0jttNmeSAQ1WAyvgxnZZsDjprNcL9WroIZ60ffFZOgPzYLwwUi09Bv1vmGUn2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8z0z47zVPJ for ; Mon, 23 Nov 2026 02:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8656 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 02:08:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a8d121f489b8 - stable/14 - Don't some prune empty dirs created by BSD.tests.dist List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8d121f489b8dfc1a7e64c8794cbd77307d304f6 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 02:08:03 +0000 Message-Id: <6b03a003.8656.3a36a92e@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a8d121f489b8dfc1a7e64c8794cbd77307d304f6 commit a8d121f489b8dfc1a7e64c8794cbd77307d304f6 Author: Enji Cooper AuthorDate: 2026-11-04 18:53:01 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 02:06:47 +0000 Don't some prune empty dirs created by BSD.tests.dist Before this change, directories needed when MK_DTRACE_TESTS != no and MK_ZFS_TESTS != no but not MK_TESTS != no, were being created via `BSD.tests.dist` as part of the standard build/install process with the top-level `hierarchy` target. This behavior resulted in `make check-old` flagging a lot of issues after 30c20ca26e105c, even after `make delete-old` was run and the directories were removed. Remove the logic which pruned these empty directories; this "fixes" the issue with `make check-old`, et al and allows a proper technical solution to `OptionalObsoleteFiles.inc` to be implemented by pkgbase in an unimpeded manner without introducing additional complexity. See the review for more details. PR: 299650 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D60928 (cherry picked from commit 0df8ed538c620cf021f8dfa2c54892b5ef9620a5) --- tools/build/mk/OptionalObsoleteFiles.inc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 6aaa5dbe1bcb..cd0684b8f43a 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1429,8 +1429,12 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz CDDL_TEST_DIRS= cddl . for d in ${CDDL_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif @@ -1741,8 +1745,12 @@ OLD_FILES+=${TESTS_FILES} DTRACE_TEST_DIRS= cddl/usr.sbin/dtrace . for d in ${DTRACE_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif @@ -9526,8 +9534,12 @@ ZFS_TEST_DIRS= cddl/usr.bin/ztest ZFS_TEST_DIRS+= cddl/usr.sbin/zfsd . for d in ${ZFS_TEST_DIRS} . if exists(${DESTDIR}${TESTSBASE}/${d}/) -TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo -OLD_DIRS+=${TESTS_DIRS} +# Bug 299650: do not prune empty directories created by +# `etc/mtree/BSD.tests.dist`. +# +# Read https://reviews.freebsd.org/D60928 for more details. +#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo +#OLD_DIRS+=${TESTS_DIRS} TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif From nobody Mon Nov 23 05:49:19 2026 X-Original-To: dev-commits-src-branches@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 4jXw4H5Cylz71ymG for ; Mon, 23 Nov 2026 05:49:19 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4H1hC8z4Sdh for ; Mon, 23 Nov 2026 05:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FL4fnUoOjveS7yfNwt32YGpDjIWzRPk1oREVNe8z+OM=; b=Of55hZx8fo6my78sLHTOmuy21yqMlPJt3s0FtT6yTPJxb/Srb/JzhOeNGDnq9KK2+yqtKp 9Xy5oioaIGFo4dk3OUELVcOBwv8MyY4KzzvIQghHElWq3SraCU8sBBog2kfSMpShY1I+FX LXWskhiSsMmaHjm2EBy076N8EKnFOE6IGFA78t/14YsW5IEO1l4Dn9z3SwJIPbzWJ/2yvw F8V7lt4rEezOvanTzQduTWs6PXMsmfR9TaaHNCbs7Eaz2/pT70mUZSAzmG6BIw/2n3PIP2 uVaHCYf2+u1fT6sHxRQoE5+yg79K+6qL1fTYm2VU7o3NvxVnNuriVuz6TMR3TA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412959; b=VLeUnbw+LGoVijTre3ikn1tPLJrxVffQEZ6LWZkw8i2gfzAy7c+4Euz/qArA5vDQClsPkk ECrXS7GHUOF5O0u4+ad6TqMJxayG45VZQNGHwgTiGNujyROxzEwf6ltI4c6jzyV7TxIxac /6TGoeR3OzmOKxBtWlBf6gyG+oLnl4dwTYaYsY/1LTwSFjT0YgaKnMIG4ZJ4ALbWkreccZ q8Mt5Uq2ld1KJxRt7ZZupbIO449nNtyzT2q8oXcJWZOveeytYadffSs1/W6v7yUNozJyCL 95ef4XT8dD0yGpmTJEJI1kV1OTcR90ZnJj0hqJ9jXSQkNg91UEGgfStL1OaGPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FL4fnUoOjveS7yfNwt32YGpDjIWzRPk1oREVNe8z+OM=; b=gh6I05VhricXcZni6Yj5BsGWXol6YY8X9egG9+hNFQwV+5A+Pe9F/ck175EHDZkvTlO8Dw 17xSgO3AoBuEoF18emU4VGAkgXU4oNLeu5Mnl5/LnnvtTy6Nyu1sd68pPKCnU/ruFYKT7o yFQt3//FfZrUA/8ez6UXHDjjwre5B1jb6HZADac9DVAV0SX8rsLJKRY9FA7STUngyIJ+jG yQo48WSCdtsBYIfDEkGPZh2VK48Hy4OkTETmGybeHAUsrywoAr7aZe54rd71HDtxI7C+Ii FGu24Y2aYklaiaFXDicv1S016Ewu36+UFsMXGl7MW0dTItA/xF7cijDQcNJ2jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4H0bq5zfWv for ; Mon, 23 Nov 2026 05:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e03d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ed Maste From: Enji Cooper Subject: git: 5f1cc74b81c7 - stable/14 - CODEOWNERS: Add myself to capsicum-test List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f1cc74b81c7ed610e55187f6a1539eadbc77e0a Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:19 +0000 Message-Id: <6b03d3df.1e03d.404a2cb8@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5f1cc74b81c7ed610e55187f6a1539eadbc77e0a commit 5f1cc74b81c7ed610e55187f6a1539eadbc77e0a Author: Ed Maste AuthorDate: 2026-01-27 15:28:39 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:28:11 +0000 CODEOWNERS: Add myself to capsicum-test (cherry picked from commit 5b036b25853349cd3cf26495e628276f79f29c42) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 534d93b63925..592db52a318a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -33,7 +33,7 @@ /bin/sh @jillest /contrib/atf @ngie-eign -/contrib/capsicum-test @ngie-eign +/contrib/capsicum-test @ngie-eign @emaste /contrib/googletest @ngie-eign /sbin/ipf @cschuber /contrib/libcxxrt @DimitryAndric @emaste From nobody Mon Nov 23 05:49:20 2026 X-Original-To: dev-commits-src-branches@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 4jXw4J45Y1z71ybW for ; Mon, 23 Nov 2026 05:49:20 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4J1Dbjz4Shh for ; Mon, 23 Nov 2026 05:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCFEtO1CZ4EjL/M3v+u8F1kxNpGHQ2X4D3mM89q7SJc=; b=ifnsMCtoummJrsqLYeffcgdclwx4zM5DMvmYqmJRYjMH+HoDDMhb9bZADC262frwYURnyE 5KRKWnQiRJiyWSqOQLJNmdk/glEgTrBlXbtx0keE4mKnBpUzixJsAITx6PL4HXUkOtM/po SrwFcliKNmZz9DKJ7+OrNAUu+gtIJPmGb/DRgWdVZWkLg0KHCkLDsd4cshezAJsVdgPy8D 0jO6YI1yHmdthrL5ZFa3vnvba2p97c24J/qyFtywacmpSDzpLA9nVmLVNRYdcgiI5rF1nc AQfYizY2h3+pmC82hrETkJCYGMoKzGIfu58PlYimsB0fBYtq7cdUpnoGsAPyCQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412960; b=pt5A3B1DkkDRLxkenQTF98gOVtL4T3GpAAKeHpBXDuUr22oGXZPZJV36FMDLqhjlCj2YLg u/gBm1p1P7hCFECR6etIPMIad/UfIcME6xOy5qHyjC4ApNsNeJv8OulurqFttCadJX+oG3 /WjFBcNo9JetRr/CzM6/dzZcERiiAD7Z17Orw4YbeGN9ZUoM5vtbe2YZhDJvIKo5Y4lloQ u8sfyyCirD+hLb9Y59O0eZcc0LEWK8Cx7dG3nnP+PjzJvzC2ma7Ozwev7zI2mPkTziyXtr /uMlPxJTqCtzKYc+RdD938VkXOjizdbX3na8Q7ct7BjGTgYlhMJIjIpZWz+yZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCFEtO1CZ4EjL/M3v+u8F1kxNpGHQ2X4D3mM89q7SJc=; b=KETfzFxCC2ePIG9Ud6GWLUTX5TcoOECCmQPlUchO1/0RaU5y7MUIih08PjvAbdAsTrtnDY Ku/I+z5dbDAQkPSAmDnzehkTbt+w1et+UkS9KKI7gvd0zHMAKXskjaQ/+MUGafvQmA4Zt/ ioIusnKZf0b79TvxSg6FzsN0hfiGbr89vjAOaJ2jAGeGK3UdqYPtlKR9kRC7ag0ijvJDGQ n01baVaPs47SvB0LRTqndKomB19sVEbteKqMg+H/4GD2wnGUeicweWgoezYmZgOQ9OcySO 3GzOkqvaqkTk6ZvkIRNqrCdF6u14shN5B0UAe53SUtVO0kruQ3ykCeGYulrBJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4J0t8vzf45 for ; Mon, 23 Nov 2026 05:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1feec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ed Maste From: Enji Cooper Subject: git: 01d8317dda8c - stable/14 - capsicum-test: Move out of contrib List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:20 +0000 Message-Id: <6b03d3e0.1feec.7b0d0f28@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0 commit 01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0 Author: Ed Maste AuthorDate: 2026-01-27 13:28:23 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:29:33 +0000 capsicum-test: Move out of contrib Google developed the Capsicum unit test suite[1] as part of the Capsicum-Linux[2] project, based on unit tests that existed in FreeBSD and unit tests developed as part of the initial Capsicum-Linux port. Capsicum-Linux was archived as of October 31, 2022 and is no longer being maintained. FreeBSD is currently the only consumer of and contributor to the test suite. Move the src into tests/sys/capsicum to simplify ongoing maintenance. The makefiles were deleted as we (continue to) use the existing bespoke FreeBSD Makefile, and CONTRIBUTING.md was removed as the Google CLA is no longer applicable. [1] https://github.com/google/capsicum-test [2] https://github.com/google/capsicum-linux Reviewed by: asomers, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54917 (cherry picked from commit 670b568ec1c36464c6d55e400382c290b0391ccf) --- .github/CODEOWNERS | 2 +- contrib/capsicum-test/.gitignore | 19 ----- contrib/capsicum-test/CONTRIBUTING.md | 20 ------ contrib/capsicum-test/GNUmakefile | 82 ---------------------- contrib/capsicum-test/makefile | 36 ---------- .../capsicum-test => tests/sys/capsicum}/LICENSE | 0 tests/sys/capsicum/Makefile | 2 - .../capsicum-test => tests/sys/capsicum}/README.md | 0 .../sys/capsicum}/capability-fd-pair.cc | 0 .../sys/capsicum}/capability-fd.cc | 0 .../sys/capsicum}/capmode.cc | 0 .../sys/capsicum}/capsicum-freebsd.h | 0 .../sys/capsicum}/capsicum-linux.h | 0 .../sys/capsicum}/capsicum-rights.h | 0 .../sys/capsicum}/capsicum-test-main.cc | 0 .../sys/capsicum}/capsicum-test.cc | 0 .../sys/capsicum}/capsicum-test.h | 0 .../sys/capsicum}/capsicum.h | 0 .../sys/capsicum}/copy_file_range.cc | 0 .../capsicum-test => tests/sys/capsicum}/fcntl.cc | 0 .../sys/capsicum}/fexecve.cc | 0 .../capsicum-test => tests/sys/capsicum}/ioctl.cc | 0 .../capsicum-test => tests/sys/capsicum}/linux.cc | 0 .../capsicum-test => tests/sys/capsicum}/mini-me.c | 0 .../capsicum-test => tests/sys/capsicum}/mqueue.cc | 0 .../capsicum-test => tests/sys/capsicum}/openat.cc | 0 .../sys/capsicum}/overhead.cc | 0 .../sys/capsicum}/procdesc.cc | 0 .../capsicum-test => tests/sys/capsicum}/rename.cc | 0 .../capsicum-test => tests/sys/capsicum}/sctp.cc | 0 .../capsicum-test => tests/sys/capsicum}/select.cc | 0 .../sys/capsicum}/showrights | 0 .../sys/capsicum}/smoketest.c | 0 .../capsicum-test => tests/sys/capsicum}/socket.cc | 0 .../sys/capsicum}/syscalls.h | 0 .../capsicum-test => tests/sys/capsicum}/sysctl.cc | 0 .../sys/capsicum}/waittest.c | 0 37 files changed, 1 insertion(+), 160 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 592db52a318a..c34af9276b3e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -33,7 +33,6 @@ /bin/sh @jillest /contrib/atf @ngie-eign -/contrib/capsicum-test @ngie-eign @emaste /contrib/googletest @ngie-eign /sbin/ipf @cschuber /contrib/libcxxrt @DimitryAndric @emaste @@ -91,6 +90,7 @@ /sys/x86/pci @bsdimp @bsdjhb /tests @ngie-eign /tests/sys/aio/ @asomers +/tests/sys/capsicum-test @ngie-eign @emaste /tests/sys/fs/fusefs/ @asomers /tests/sys/kqueue/ @jmgurney /tests/sys/opencrypto/ @jmgurney diff --git a/contrib/capsicum-test/.gitignore b/contrib/capsicum-test/.gitignore deleted file mode 100644 index bc8f8f5ce265..000000000000 --- a/contrib/capsicum-test/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -capsicum-test -mini-me -mini-me.noexec -mini-me.setuid -mini-me.32 -mini-me.x32 -mini-me.64 -libgtest.a -smoketest -*.o -libcap*.deb -libcap*.dsc -libcap*.tar.gz -libcap*.changes -casper*.deb -casper*.dsc -casper*.tar.gz -casper*.changes -libcaprights.a \ No newline at end of file diff --git a/contrib/capsicum-test/CONTRIBUTING.md b/contrib/capsicum-test/CONTRIBUTING.md deleted file mode 100644 index 1a054b840c0b..000000000000 --- a/contrib/capsicum-test/CONTRIBUTING.md +++ /dev/null @@ -1,20 +0,0 @@ -## Contributor License Agreement ## - -Contributions to any Google project must be accompanied by a Contributor -License Agreement. This is not a copyright **assignment**, it simply gives -Google permission to use and redistribute your contributions as part of the -project. - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual - CLA][]. - - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA][]. - -You generally only need to submit a CLA once, so if you've already submitted -one (even if it was for a different project), you probably don't need to do it -again. - -[individual CLA]: https://developers.google.com/open-source/cla/individual -[corporate CLA]: https://developers.google.com/open-source/cla/corporate diff --git a/contrib/capsicum-test/GNUmakefile b/contrib/capsicum-test/GNUmakefile deleted file mode 100644 index 426eb49cdfa1..000000000000 --- a/contrib/capsicum-test/GNUmakefile +++ /dev/null @@ -1,82 +0,0 @@ -OS:=$(shell uname) - -# Set ARCH to 32 or x32 for i386/x32 ABIs -ARCH?=64 -ARCHFLAG=-m$(ARCH) - -ifeq ($(OS),FreeBSD) -EXTRA_LIBS=-lprocstat -endif - -ifeq ($(OS),Linux) -PROCESSOR:=$(shell uname -p) - -ifneq ($(wildcard /usr/lib/$(PROCESSOR)-linux-gnu),) -# Can use standard Debian location for static libraries. -PLATFORM_LIBDIR=/usr/lib/$(PROCESSOR)-linux-gnu -else -# Attempt to determine library location from gcc configuration. -PLATFORM_LIBDIR=$(shell gcc -v 2>&1 | grep "Configured with:" | sed 's/.*--libdir=\(\/usr\/[^ ]*\).*/\1/g') -endif - -# Override for explicitly specified ARCHFLAG. -# Use locally compiled libcaprights in this case, on the -# assumption that any installed version is 64-bit. -ifeq ($(ARCHFLAG),-m32) -PROCESSOR=i386 -PLATFORM_LIBDIR=/usr/lib32 -LIBCAPRIGHTS=./libcaprights.a -endif -ifeq ($(ARCHFLAG),-mx32) -PROCESSOR=x32 -PLATFORM_LIBDIR=/usr/libx32 -LIBCAPRIGHTS=./libcaprights.a -endif - -# Detect presence of libsctp in normal Debian location -ifneq ($(wildcard $(PLATFORM_LIBDIR)/libsctp.a),) -LIBSCTP=-lsctp -CXXFLAGS=-DHAVE_SCTP -endif - -ifneq ($(LIBCAPRIGHTS),) -# Build local libcaprights.a (assuming ./configure -# has already been done in libcaprights/) -LOCAL_LIBS=$(LIBCAPRIGHTS) -LIBCAPRIGHTS_OBJS=libcaprights/capsicum.o libcaprights/linux-bpf-capmode.o libcaprights/procdesc.o libcaprights/signal.o -LOCAL_CLEAN=$(LOCAL_LIBS) $(LIBCAPRIGHTS_OBJS) -else -# Detect installed libcaprights static library. -ifneq ($(wildcard $(PLATFORM_LIBDIR)/libcaprights.a),) -LIBCAPRIGHTS=$(PLATFORM_LIBDIR)/libcaprights.a -else -ifneq ($(wildcard /usr/lib/libcaprights.a),) -LIBCAPRIGHTS=/usr/lib/libcaprights.a -endif -endif -endif - -endif - -# Extra test programs for arch-transition tests -EXTRA_PROGS = mini-me.32 mini-me.64 -ifneq ($(wildcard /usr/include/gnu/stubs-x32.h),) -EXTRA_PROGS += mini-me.x32 -endif - -# Chain on to the master makefile -include makefile - -./libcaprights.a: $(LIBCAPRIGHTS_OBJS) - ar cr $@ $^ - -# Small static programs of known architectures -# These may require additional packages to be installed; for example, for Debian: -# - libc6-dev-i386 provides 32-bit headers for a 64-bit system -# - libc6-dev-x32 provides headers for the x32 ABI. -mini-me.32: mini-me.c - $(CC) $(CFLAGS) -m32 -static -o $@ $< -mini-me.x32: mini-me.c - $(CC) $(CFLAGS) -mx32 -static -o $@ $< -mini-me.64: mini-me.c - $(CC) $(CFLAGS) -m64 -static -o $@ $< diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile deleted file mode 100644 index e55393bbf131..000000000000 --- a/contrib/capsicum-test/makefile +++ /dev/null @@ -1,36 +0,0 @@ -all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) -OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o - -GTEST_DIR=gtest-1.10.0 -GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR) -GTEST_FLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_HAS_TR1_TUPLE=1 -CXXFLAGS+=$(ARCHFLAG) -Wall -g $(GTEST_INCS) $(GTEST_FLAGS) --std=c++11 -CFLAGS+=$(ARCHFLAG) -Wall -g - -capsicum-test: $(OBJECTS) libgtest.a $(LOCAL_LIBS) - $(CXX) $(CXXFLAGS) -g -o $@ $(OBJECTS) libgtest.a -lpthread -lrt $(LIBSCTP) $(LIBCAPRIGHTS) $(EXTRA_LIBS) - -# Small statically-linked program for fexecve tests -# (needs to be statically linked so that execve()ing it -# doesn't involve ld.so traversing the filesystem). -mini-me: mini-me.c - $(CC) $(CFLAGS) -static -o $@ $< -mini-me.noexec: mini-me - cp mini-me $@ && chmod -x $@ -mini-me.setuid: mini-me - rm -f $@ && cp mini-me $@&& sudo chown root $@ && sudo chmod u+s $@ - -# Simple C test of Capsicum syscalls -SMOKETEST_OBJECTS=smoketest.o -smoketest: $(SMOKETEST_OBJECTS) $(LOCAL_LIBS) - $(CC) $(CFLAGS) -o $@ $(SMOKETEST_OBJECTS) $(LIBCAPRIGHTS) - -test: capsicum-test mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) - ./capsicum-test -gtest-all.o: - $(CXX) $(CXXFLAGS) $(ARCHFLAG) -I$(GTEST_DIR)/include -I$(GTEST_DIR) $(GTEST_FLAGS) -c ${GTEST_DIR}/src/gtest-all.cc -libgtest.a: gtest-all.o - $(AR) -rv libgtest.a gtest-all.o - -clean: - rm -rf gtest-all.o libgtest.a capsicum-test mini-me mini-me.noexec smoketest $(SMOKETEST_OBJECTS) $(OBJECTS) $(LOCAL_CLEAN) $(EXTRA_PROGS) diff --git a/contrib/capsicum-test/LICENSE b/tests/sys/capsicum/LICENSE similarity index 100% rename from contrib/capsicum-test/LICENSE rename to tests/sys/capsicum/LICENSE diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 24f488b2d14f..82ea99448186 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -10,8 +10,6 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no -.PATH: ${SRCTOP}/contrib/capsicum-test - GTESTS+= capsicum-test GTESTS_WRAPPER_SH.capsicum-test= functional # This test script runs the same test suite twice, once as root and once as an diff --git a/contrib/capsicum-test/README.md b/tests/sys/capsicum/README.md similarity index 100% rename from contrib/capsicum-test/README.md rename to tests/sys/capsicum/README.md diff --git a/contrib/capsicum-test/capability-fd-pair.cc b/tests/sys/capsicum/capability-fd-pair.cc similarity index 100% rename from contrib/capsicum-test/capability-fd-pair.cc rename to tests/sys/capsicum/capability-fd-pair.cc diff --git a/contrib/capsicum-test/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc similarity index 100% rename from contrib/capsicum-test/capability-fd.cc rename to tests/sys/capsicum/capability-fd.cc diff --git a/contrib/capsicum-test/capmode.cc b/tests/sys/capsicum/capmode.cc similarity index 100% rename from contrib/capsicum-test/capmode.cc rename to tests/sys/capsicum/capmode.cc diff --git a/contrib/capsicum-test/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h similarity index 100% rename from contrib/capsicum-test/capsicum-freebsd.h rename to tests/sys/capsicum/capsicum-freebsd.h diff --git a/contrib/capsicum-test/capsicum-linux.h b/tests/sys/capsicum/capsicum-linux.h similarity index 100% rename from contrib/capsicum-test/capsicum-linux.h rename to tests/sys/capsicum/capsicum-linux.h diff --git a/contrib/capsicum-test/capsicum-rights.h b/tests/sys/capsicum/capsicum-rights.h similarity index 100% rename from contrib/capsicum-test/capsicum-rights.h rename to tests/sys/capsicum/capsicum-rights.h diff --git a/contrib/capsicum-test/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc similarity index 100% rename from contrib/capsicum-test/capsicum-test-main.cc rename to tests/sys/capsicum/capsicum-test-main.cc diff --git a/contrib/capsicum-test/capsicum-test.cc b/tests/sys/capsicum/capsicum-test.cc similarity index 100% rename from contrib/capsicum-test/capsicum-test.cc rename to tests/sys/capsicum/capsicum-test.cc diff --git a/contrib/capsicum-test/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h similarity index 100% rename from contrib/capsicum-test/capsicum-test.h rename to tests/sys/capsicum/capsicum-test.h diff --git a/contrib/capsicum-test/capsicum.h b/tests/sys/capsicum/capsicum.h similarity index 100% rename from contrib/capsicum-test/capsicum.h rename to tests/sys/capsicum/capsicum.h diff --git a/contrib/capsicum-test/copy_file_range.cc b/tests/sys/capsicum/copy_file_range.cc similarity index 100% rename from contrib/capsicum-test/copy_file_range.cc rename to tests/sys/capsicum/copy_file_range.cc diff --git a/contrib/capsicum-test/fcntl.cc b/tests/sys/capsicum/fcntl.cc similarity index 100% rename from contrib/capsicum-test/fcntl.cc rename to tests/sys/capsicum/fcntl.cc diff --git a/contrib/capsicum-test/fexecve.cc b/tests/sys/capsicum/fexecve.cc similarity index 100% rename from contrib/capsicum-test/fexecve.cc rename to tests/sys/capsicum/fexecve.cc diff --git a/contrib/capsicum-test/ioctl.cc b/tests/sys/capsicum/ioctl.cc similarity index 100% rename from contrib/capsicum-test/ioctl.cc rename to tests/sys/capsicum/ioctl.cc diff --git a/contrib/capsicum-test/linux.cc b/tests/sys/capsicum/linux.cc similarity index 100% rename from contrib/capsicum-test/linux.cc rename to tests/sys/capsicum/linux.cc diff --git a/contrib/capsicum-test/mini-me.c b/tests/sys/capsicum/mini-me.c similarity index 100% rename from contrib/capsicum-test/mini-me.c rename to tests/sys/capsicum/mini-me.c diff --git a/contrib/capsicum-test/mqueue.cc b/tests/sys/capsicum/mqueue.cc similarity index 100% rename from contrib/capsicum-test/mqueue.cc rename to tests/sys/capsicum/mqueue.cc diff --git a/contrib/capsicum-test/openat.cc b/tests/sys/capsicum/openat.cc similarity index 100% rename from contrib/capsicum-test/openat.cc rename to tests/sys/capsicum/openat.cc diff --git a/contrib/capsicum-test/overhead.cc b/tests/sys/capsicum/overhead.cc similarity index 100% rename from contrib/capsicum-test/overhead.cc rename to tests/sys/capsicum/overhead.cc diff --git a/contrib/capsicum-test/procdesc.cc b/tests/sys/capsicum/procdesc.cc similarity index 100% rename from contrib/capsicum-test/procdesc.cc rename to tests/sys/capsicum/procdesc.cc diff --git a/contrib/capsicum-test/rename.cc b/tests/sys/capsicum/rename.cc similarity index 100% rename from contrib/capsicum-test/rename.cc rename to tests/sys/capsicum/rename.cc diff --git a/contrib/capsicum-test/sctp.cc b/tests/sys/capsicum/sctp.cc similarity index 100% rename from contrib/capsicum-test/sctp.cc rename to tests/sys/capsicum/sctp.cc diff --git a/contrib/capsicum-test/select.cc b/tests/sys/capsicum/select.cc similarity index 100% rename from contrib/capsicum-test/select.cc rename to tests/sys/capsicum/select.cc diff --git a/contrib/capsicum-test/showrights b/tests/sys/capsicum/showrights similarity index 100% rename from contrib/capsicum-test/showrights rename to tests/sys/capsicum/showrights diff --git a/contrib/capsicum-test/smoketest.c b/tests/sys/capsicum/smoketest.c similarity index 100% rename from contrib/capsicum-test/smoketest.c rename to tests/sys/capsicum/smoketest.c diff --git a/contrib/capsicum-test/socket.cc b/tests/sys/capsicum/socket.cc similarity index 100% rename from contrib/capsicum-test/socket.cc rename to tests/sys/capsicum/socket.cc diff --git a/contrib/capsicum-test/syscalls.h b/tests/sys/capsicum/syscalls.h similarity index 100% rename from contrib/capsicum-test/syscalls.h rename to tests/sys/capsicum/syscalls.h diff --git a/contrib/capsicum-test/sysctl.cc b/tests/sys/capsicum/sysctl.cc similarity index 100% rename from contrib/capsicum-test/sysctl.cc rename to tests/sys/capsicum/sysctl.cc diff --git a/contrib/capsicum-test/waittest.c b/tests/sys/capsicum/waittest.c similarity index 100% rename from contrib/capsicum-test/waittest.c rename to tests/sys/capsicum/waittest.c From nobody Mon Nov 23 05:49:21 2026 X-Original-To: dev-commits-src-branches@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 4jXw4K4Cl6z71yrh for ; Mon, 23 Nov 2026 05:49:21 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4K2FVFz4Spn for ; Mon, 23 Nov 2026 05:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GK7vr0wDTWDb7jJug2CxdZ8KaFNoBSd19XrNLl8kSys=; b=E4YPmKQUcgDo+ub+nt8y2VPlsmU6xSMVz66hQYSoIi0Y8lgTD1p0562LvEXqDdfVjTwjRe HBk8JYKdNsqFgdB/qi2SRTgVYfzpkgLBsXotJ7YSXb2Z3gyUnfp00nc4G0BASjz5t2U7em y2DX+6/f/0Rk8H5JZZ69KtZr5TIKagwOHjHnVnpq9Mysq8MkmiVIhHahihbFC3L3XftFw1 YnSej+08PmkKf/JqAov/yR3n/HL1gep5wwWI3qFBvpgU7nuN95WCMLRyoUXA0wj6cswm5/ btpUqFzmSCTUjQquhvpoEPAaHHcD85Al752cihU70hrnMZZgt5RYd/Umz0DvMA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412961; b=lxHDOtgRyvhEkqOlIx77Cz6Ba4aRKW384Jw4vkQfFnoKYk46rK3ZBqeobBNGK1m8a4814t dA0MCGC6r0JI17AC0C9/mkb1fV2C+YYz7W2sA2q8jJkQZpUx0+z+ndOPwhTmGtEFrysu8c VjQCFfslZUu1LVjcfEt5jIPCQRvE/nlHV5iUsaMuk7JRTt1prU/7qujRAM7P3+PEpu310y 74wdA+8Ik3jJjAGUohwVRqnNTj2XJH6O79eO+kVgaRq7aEAt9oUrRAzfFlMkWTopNbYX/f SB6F4STRAA5G2TZhWD25AEZkDThFm0UbSJ6KCcGOUU60YtUkpKPc+x1bN3n59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GK7vr0wDTWDb7jJug2CxdZ8KaFNoBSd19XrNLl8kSys=; b=A7amnNrMfoOhFaQ0tNlHwPbYfgcDTSP/lgJudMH4b7uLTW3cU4qfifVVDFGCsBdD8ZnD1J xoJP0h1mlOuadzFiNc2fncnU8YRqqmBtJTi24gJUq1JGCbKla0doL6VUMgODZ11M4ai0vj 7vIFhT2y3rzm1j259UIQ41l1ZbfAuNJxn1w7wnHMpe0ihWktqyJB9XRDu8jSYw2BbyGW9z BeTaVSZNyldcq6kefDjTuP+PgMBd6UcFhytVHRboeASVDkcH3g1sH0i30nzHUCV3KH8xaK lozXVQLivB2oUgwcjPRPKIPUgMf9eOWuEjHkIYqCuSr0rChdw3KF+2Ghaa0PLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4K1B0szfL7 for ; Mon, 23 Nov 2026 05:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1eea9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ed Maste From: Enji Cooper Subject: git: 952a75f511d5 - stable/14 - MAINTAINERS, CODEOWNERS: Update capsicum-test List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 952a75f511d5ba33073987af5f5d72dbd3dbce82 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:21 +0000 Message-Id: <6b03d3e1.1eea9.39b2305c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=952a75f511d5ba33073987af5f5d72dbd3dbce82 commit 952a75f511d5ba33073987af5f5d72dbd3dbce82 Author: Ed Maste AuthorDate: 2026-02-05 18:21:27 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:31:08 +0000 MAINTAINERS, CODEOWNERS: Update capsicum-test Fixes: 670b568ec1c3 ("capsicum-test: Move out of contrib") Sponsored by: The FreeBSD Foundation (cherry picked from commit b773da180e02c0c27de48dbba72f3fb7a64656da) --- .github/CODEOWNERS | 2 +- MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c34af9276b3e..2af2ef56ef1b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -90,7 +90,7 @@ /sys/x86/pci @bsdimp @bsdjhb /tests @ngie-eign /tests/sys/aio/ @asomers -/tests/sys/capsicum-test @ngie-eign @emaste +/tests/sys/capsicum/ @ngie-eign @emaste /tests/sys/fs/fusefs/ @asomers /tests/sys/kqueue/ @jmgurney /tests/sys/opencrypto/ @jmgurney diff --git a/MAINTAINERS b/MAINTAINERS index a17d94d7c90d..627fdc400e90 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -37,7 +37,6 @@ subsystem login notes aio(4) asomers Pre-commit review requested. ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org contrib/atf ngie,#test Pre-commit review requested. -contrib/capsicum-test ngie,#capsicum,#test Pre-commit review requested. contrib/googletest ngie,#test Pre-commit review requested. sbin/ipf cy Pre-commit review requested. contrib/libcxxrt dim,emaste Pre-commit review preferred. @@ -117,6 +116,7 @@ sys/x86/xen royger Pre-commit review recommended. sys/xen royger Pre-commit review recommended. tests ngie,#test Pre-commit review requested. tools/build imp Pre-commit review requested, especially to fix bootstrap issues. +tests/sys/capsicum ngie,#capsicum,#test Pre-commit review requested. top(1) eadler Pre-commit review requested. usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. From nobody Mon Nov 23 05:49:22 2026 X-Original-To: dev-commits-src-branches@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 4jXw4L6601z71yrj for ; Mon, 23 Nov 2026 05:49:22 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4L2V32z4SMy for ; Mon, 23 Nov 2026 05:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvEQW5ZrQJhQOnvauV5nQBHz07Sdj9Roi48RxNcQHtI=; b=CDh2CPWshIRUs0vMvutK2SUk3LQeaQZxKFfmoHLwvwPouCOAsZeakanbbinqXYQuyQdyaz IjrVdsG4KChhO+Ve99wW/CgAldYA9elEqLFIRnx3vKf3OIFyCTdjD6dMvzrXVBX3FSxEOV zC/kxfHV80JzrGBlpRZrNAbvEikiDdqjeIoNu6abWeq51yMBn4CcLTWvkQzODEDVcwC2Jq OjXxin2Oxdhl1JbYhHyUywUEWNVNLapfhQ3WtuZ0tpIzYgSF7fC317wjJ98Uyb0AT955EB 5vABNuUeSpiT3JzuEsuOMMTUQCp7vrwW/y0Q6Qq4rHnpLoO36OBBtMOqHJF3hA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412962; b=fCZYfIkAxcw0syzhuCPJMfVSVKh3YSHam08gjt2r50a8Kk1UVWJw0F/MOHKFFi3dG8N6M+ F9GjygwNCdpLO0gH89BJP3k9g2F/+7b0gI2og8JohA0n0E3Z6goy/uJB2BVv/Ak0HWoCnx fTVer18KwD146aNmO6u3+XcX2SD/V1LUcXatZ0fLFewAztF7JflTgSrLTVkuuY7dhyOaxx emzXhTIhXpvFQc3U5WIiumH5cpC9XsvlVaKOA+iUkNf2+6f7e5FQlSEWPm/H9qIVnn1+8y Thew1vFJmYJr1uiYPM1RekC7KCOw8N8dhGyIpEZtSkAHfY2EfrmH1mv7WhIOxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvEQW5ZrQJhQOnvauV5nQBHz07Sdj9Roi48RxNcQHtI=; b=d2NZd1dazuihDGGZnzzkk33HO5GzUyiHQwOyLtU5RmZcXr66u+8XqW0ZM8z6At2K5dPvI4 ed7Ordfz7vo7gqK6Mjr+8Qaynv7hpz+TYkKAXtsx9LXbSgDRvq+lCzTFZeNrnJfOdcAEaY OqgEAraRfHfN9We7yIL0IZmQ2cRwoQQkQ38XZAOLvsqFHW3EUmQjfih2XCzavdY5BGdTan rZNHEvkhnWdFdFTqN2+xhCHCabJoVFdWyN//BmAsDSmdPuVBkzm8ii9Y/mhIn6TLLD3WHp YZOjchskgMWYS3dvT2fE/KI3ApcdOWNfGH3kFLyB0mXq2/GkJRamu2TOr0j0EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4L1VnHzdw7 for ; Mon, 23 Nov 2026 05:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f54e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alan Somers From: Enji Cooper Subject: git: 78dba31e477c - stable/14 - tests: sys/capsicum/functional requires mqueuefs List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 78dba31e477c33adc9bc0899d11acab52dd00ce7 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:22 +0000 Message-Id: <6b03d3e2.1f54e.2947d52c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=78dba31e477c33adc9bc0899d11acab52dd00ce7 commit 78dba31e477c33adc9bc0899d11acab52dd00ce7 Author: Alan Somers AuthorDate: 2026-01-27 00:04:58 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:32:03 +0000 tests: sys/capsicum/functional requires mqueuefs Skip this test if mqueuefs isn't loaded. Unfortunately, that will skip the entire googletest test program, including test cases that don't require mqueuefs. But the test's own skipping logic doesn't work, and we don't yet have a googletest-compatible require_kmods() function. MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D54902 (cherry picked from commit df68a09ea2ec18ee975fb937d46a18250d4663c8) --- tests/sys/capsicum/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 82ea99448186..72da640437ac 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -16,6 +16,7 @@ GTESTS_WRAPPER_SH.capsicum-test= functional # unprivileged user. Serialize them since some tests access global namespaces, # e.g., mqueuefs, and can trample on each other. TEST_METADATA.functional+= is_exclusive="true" +TEST_METADATA.functional+= required_kmods="mqueuefs" SRCS.capsicum-test+= \ capsicum-test-main.cc \ From nobody Mon Nov 23 05:49:23 2026 X-Original-To: dev-commits-src-branches@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 4jXw4M4rd4z71ygw for ; Mon, 23 Nov 2026 05:49:23 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4M2MF7z4Sq0 for ; Mon, 23 Nov 2026 05:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyqqWuohFfKB4qWXxtRfbK+B49Zog9OphXx13NItiy4=; b=sJtxpYF6XDTw7GcFic3HFUppyXQ2hhzIAtThmd3CUyOt6A0jFQD1IbhsbFr/PzgY03krdM KEkas4Wx+LcI2LezWqzXeNnCjihOKhIB8TEcEpbP238wCGxwSS63hrv5BA1R1D4/Trf4wn OojEfDiih9+vAcXJLBaTMVD3JmV6kiJV0Nx2rmuzsIzAQ8Nx0LhSNljDHBnpZK9ua8zfnh iXvlRIt2GSoX1M/BinLPOkFndYqlQJpT2sYlNxDpbadp8aWR1Bvcj86bMDxbNbDdBjCVyx pjJD+nham5zBIB0rQRjXt0nDtNqSDfAyY1fl80ib8fNdoeBjvix5M3f5uHnShw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412963; b=LQbdX9erT8wwCXxx6g3rgxmddbXV9VsRxms2Xxll+fabx/ViZVv75P13V5rg+ejdB6X4Ad G/xdozzo2p4USsWCkPhtuDPsRcr25PEZWcQqdfZCIVhd9BS3WWcXL6OiBFhXuKdn8Il8aP bJJ02kOoP3fEpE7ckDHVDvh/ZgTUyeirfPEMigmXja+lpaUvknMllcfuQ5u2ZLEW8oTv8e 0BzOe2cQjmCZCec1ifnurod1atg51u0cE5Sj3gk8/fiW8r90X9tiSwfKR6U6Mc3+w3Uyus MOTR8GdK6MRdMIB9nM5P52+CRYey+l5kLOLsuIBAm66h7DejjfktarBr0zfGEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyqqWuohFfKB4qWXxtRfbK+B49Zog9OphXx13NItiy4=; b=R/ulKcUoaMpI4KvNKatNFX79nOXPPd8nt6chucrSYuLBo9yTby8hRzk5xINBV07HrzdjeJ 0hK9wcNjV7QTkLbnvJN7P0Ssz+yxxnVbiyyDLhncNmpkc+ZvqiV8mJi4MdxJ2zEKmkOZ1f uUbLOLdtB3S82/SwEeYL7M9Wl95wdA+Wb4YHY/TvZnekpfcfds9esS8Y0ZUd/4tGcZNdUQ kJNwSUDzcIiqBLHsvzyWgI+Nky+5jDM122egZTCydG53iP7h0Omc07/fh0D4bUrRuFJcX0 T7emtkR2ZECUtKycKyYFACt/GOW0K1pE3x0bV0ENqfJdkt3ZPpHig6JEszYo6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4M1yjPzdw8 for ; Mon, 23 Nov 2026 05:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f193 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alan Somers From: Enji Cooper Subject: git: a84a3e2bc368 - stable/14 - capsicum-tests: remove Linux support List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a84a3e2bc368d568e43edfccc43e3dac157ff38a Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:23 +0000 Message-Id: <6b03d3e3.1f193.376ce136@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a84a3e2bc368d568e43edfccc43e3dac157ff38a commit a84a3e2bc368d568e43edfccc43e3dac157ff38a Author: Alan Somers AuthorDate: 2026-01-29 20:39:20 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:32:23 +0000 capsicum-tests: remove Linux support Now that this project is part of freebsd-src, it no longer needs to be portable. Remove Linux-only tests, cross-os compatibility code, and compatibility with older FreeBSD versions. Leave in place some originally Linux-only tests that could now be ported to FreeBSD, like the pipe2 tests. Sponsored by: ConnectWise Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D54985 (cherry picked from commit fba81b33aabff74ad03d5f9f9663c176cf060fa6) --- tests/sys/capsicum/README.md | 48 ++-------- tests/sys/capsicum/capability-fd-pair.cc | 140 ----------------------------- tests/sys/capsicum/capability-fd.cc | 70 ++------------- tests/sys/capsicum/capmode.cc | 51 +---------- tests/sys/capsicum/capsicum-freebsd.h | 18 ---- tests/sys/capsicum/capsicum-linux.h | 40 --------- tests/sys/capsicum/capsicum-rights.h | 103 --------------------- tests/sys/capsicum/capsicum-test-main.cc | 19 ---- tests/sys/capsicum/capsicum-test.cc | 23 ----- tests/sys/capsicum/capsicum.h | 148 +------------------------------ tests/sys/capsicum/fcntl.cc | 11 +-- tests/sys/capsicum/ioctl.cc | 29 +----- tests/sys/capsicum/linux.cc | 2 +- tests/sys/capsicum/openat.cc | 16 ---- tests/sys/capsicum/procdesc.cc | 66 ++++---------- tests/sys/capsicum/sctp.cc | 4 - tests/sys/capsicum/select.cc | 4 - tests/sys/capsicum/smoketest.c | 41 ++++----- tests/sys/capsicum/socket.cc | 4 - tests/sys/capsicum/syscalls.h | 144 ------------------------------ tests/sys/capsicum/sysctl.cc | 2 - tests/sys/capsicum/waittest.c | 9 -- 22 files changed, 55 insertions(+), 937 deletions(-) diff --git a/tests/sys/capsicum/README.md b/tests/sys/capsicum/README.md index a8c8c6686759..8dea65d8d198 100644 --- a/tests/sys/capsicum/README.md +++ b/tests/sys/capsicum/README.md @@ -1,9 +1,8 @@ # Capsicum User Space Tests -This directory holds unit tests for [Capsicum](http://www.cl.cam.ac.uk/research/security/capsicum/) +This directory holds unit tests for [Capsicum](https://man.freebsd.org/cgi/man.cgi?query=capsicum) object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system, -currently either [FreeBSD >=10.x](http://www.freebsd.org) or a modified Linux kernel (the -[capsicum-linux](http://github.com/google/capsicum-linux) project). +Currently, [FreeBSD >=10.x](http://www.freebsd.org) is the only such operating system. The tests are written in C++11 and use the [Google Test](https://code.google.com/p/googletest/) framework, with some additions to fork off particular tests (because a process that enters capability @@ -17,46 +16,15 @@ The original basis for these tests was: written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port. -These tests were coalesced and moved into an independent repository to enable -comparative testing across multiple OSes, and then substantially extended. +These tests were coalesced and moved into an [independent repository](https://github.com/google/capsicum-test) +to enable comparative testing across multiple OSes, and then substantially extended. -## OS Configuration +Subsequently, the [capsicum-linux port](https://github.com/google/capsicum-linux) was abandoned by +its maintainers, rendering the independent repository obsolete. So the tests were copied back into +the FreeBSD source tree in time for 16.0-RELEASE. -### Linux - -The following kernel configuration options are needed to run the tests: - - - `CONFIG_SECURITY_CAPSICUM`: enable the Capsicum framework - - `CONFIG_PROCDESC`: enable Capsicum process-descriptor functionality - - `CONFIG_DEBUG_FS`: enable debug filesystem - - `CONFIG_IP_SCTP`: enable SCTP support - -### FreeBSD (>= 10.x) +## Configuration The following kernel configuration options are needed so that all tests can run: - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`) - -## Other Dependencies - -### Linux - -The following additional development packages are needed to build the full test suite on Linux. - - - `libcaprights`: See below - - `libcap-dev`: Provides headers for POSIX.1e capabilities. - - `libsctp1`: Provides SCTP library functions. - - `libsctp-dev`: Provides headers for SCTP library functions. - - -## Linux libcaprights - -The Capsicum userspace library is held in the `libcaprights/` subdirectory. Ideally, this -library should be built (with `./configure; make` or `dpkg-buildpackage -uc -us`) and -installed (with `make install` or `dpkg -i libcaprights*.deb`) so that the tests will -use behave like a normal Capsicum-aware application. - -However, if no installed copy of the library is found, the `GNUmakefile` will attempt -to use the local `libcaprights/*.c` source; this requires `./configure` to have been -performed in the `libcaprights` subdirectory. The local code is also used for -cross-compiled builds of the test suite (e.g. `make ARCH=32` or `make ARCH=x32`). diff --git a/tests/sys/capsicum/capability-fd-pair.cc b/tests/sys/capsicum/capability-fd-pair.cc index d56dac049805..63522b960d1e 100644 --- a/tests/sys/capsicum/capability-fd-pair.cc +++ b/tests/sys/capsicum/capability-fd-pair.cc @@ -46,143 +46,3 @@ TEST(CapabilityPair, sendfile) { close(sock_fds[1]); unlink(TmpFile("cap_sendfile_in")); } - -#ifdef HAVE_TEE -TEST(CapabilityPair, tee) { - int pipe1_fds[2]; - EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK)); - int pipe2_fds[2]; - EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK)); - - // Put some data into pipe1. - unsigned char buffer[4] = {1, 2, 3, 4}; - EXPECT_OK(write(pipe1_fds[1], buffer, 4)); - - cap_rights_t r_ro; - cap_rights_init(&r_ro, CAP_READ); - cap_rights_t r_wo; - cap_rights_init(&r_wo, CAP_WRITE); - cap_rights_t r_rw; - cap_rights_init(&r_rw, CAP_READ, CAP_WRITE); - - // Various attempts to tee into pipe2. - int cap_in_wo = dup(pipe1_fds[0]); - EXPECT_OK(cap_in_wo); - EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo)); - int cap_in_rw = dup(pipe1_fds[0]); - EXPECT_OK(cap_in_rw); - EXPECT_OK(cap_rights_limit(cap_in_rw, &r_rw)); - int cap_out_ro = dup(pipe2_fds[1]); - EXPECT_OK(cap_out_ro); - EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro)); - int cap_out_rw = dup(pipe2_fds[1]); - EXPECT_OK(cap_out_rw); - EXPECT_OK(cap_rights_limit(cap_out_rw, &r_rw)); - - EXPECT_NOTCAPABLE(tee(cap_in_wo, cap_out_rw, 4, SPLICE_F_NONBLOCK)); - EXPECT_NOTCAPABLE(tee(cap_in_rw, cap_out_ro, 4, SPLICE_F_NONBLOCK)); - EXPECT_OK(tee(cap_in_rw, cap_out_rw, 4, SPLICE_F_NONBLOCK)); - - close(cap_in_wo); - close(cap_in_rw); - close(cap_out_ro); - close(cap_out_rw); - close(pipe1_fds[0]); - close(pipe1_fds[1]); - close(pipe2_fds[0]); - close(pipe2_fds[1]); -} -#endif - -#ifdef HAVE_SPLICE -TEST(CapabilityPair, splice) { - int pipe1_fds[2]; - EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK)); - int pipe2_fds[2]; - EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK)); - - // Put some data into pipe1. - unsigned char buffer[4] = {1, 2, 3, 4}; - EXPECT_OK(write(pipe1_fds[1], buffer, 4)); - - cap_rights_t r_ro; - cap_rights_init(&r_ro, CAP_READ); - cap_rights_t r_wo; - cap_rights_init(&r_wo, CAP_WRITE); - cap_rights_t r_rs; - cap_rights_init(&r_rs, CAP_READ, CAP_SEEK); - cap_rights_t r_ws; - cap_rights_init(&r_ws, CAP_WRITE, CAP_SEEK); - - // Various attempts to splice. - int cap_in_wo = dup(pipe1_fds[0]); - EXPECT_OK(cap_in_wo); - EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo)); - int cap_in_ro = dup(pipe1_fds[0]); - EXPECT_OK(cap_in_ro); - EXPECT_OK(cap_rights_limit(cap_in_ro, &r_ro)); - int cap_in_ro_seek = dup(pipe1_fds[0]); - EXPECT_OK(cap_in_ro_seek); - EXPECT_OK(cap_rights_limit(cap_in_ro_seek, &r_rs)); - int cap_out_wo = dup(pipe2_fds[1]); - EXPECT_OK(cap_out_wo); - EXPECT_OK(cap_rights_limit(cap_out_wo, &r_wo)); - int cap_out_ro = dup(pipe2_fds[1]); - EXPECT_OK(cap_out_ro); - EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro)); - int cap_out_wo_seek = dup(pipe2_fds[1]); - EXPECT_OK(cap_out_wo_seek); - EXPECT_OK(cap_rights_limit(cap_out_wo_seek, &r_ws)); - - EXPECT_NOTCAPABLE(splice(cap_in_ro, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); - EXPECT_NOTCAPABLE(splice(cap_in_wo, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); - EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_ro, NULL, 4, SPLICE_F_NONBLOCK)); - EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_wo, NULL, 4, SPLICE_F_NONBLOCK)); - EXPECT_OK(splice(cap_in_ro_seek, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK)); - - close(cap_in_wo); - close(cap_in_ro); - close(cap_in_ro_seek); - close(cap_out_wo); - close(cap_out_ro); - close(cap_out_wo_seek); - close(pipe1_fds[0]); - close(pipe1_fds[1]); - close(pipe2_fds[0]); - close(pipe2_fds[1]); -} -#endif - -#ifdef HAVE_VMSPLICE -// Although it only involves a single file descriptor, test vmsplice(2) here too. -TEST(CapabilityPair, vmsplice) { - int pipe_fds[2]; - EXPECT_OK(pipe2(pipe_fds, O_NONBLOCK)); - - cap_rights_t r_ro; - cap_rights_init(&r_ro, CAP_READ); - cap_rights_t r_rw; - cap_rights_init(&r_rw, CAP_READ, CAP_WRITE); - - int cap_ro = dup(pipe_fds[1]); - EXPECT_OK(cap_ro); - EXPECT_OK(cap_rights_limit(cap_ro, &r_ro)); - int cap_rw = dup(pipe_fds[1]); - EXPECT_OK(cap_rw); - EXPECT_OK(cap_rights_limit(cap_rw, &r_rw)); - - unsigned char buffer[4] = {1, 2, 3, 4}; - struct iovec iov; - memset(&iov, 0, sizeof(iov)); - iov.iov_base = buffer; - iov.iov_len = sizeof(buffer); - - EXPECT_NOTCAPABLE(vmsplice(cap_ro, &iov, 1, SPLICE_F_NONBLOCK)); - EXPECT_OK(vmsplice(cap_rw, &iov, 1, SPLICE_F_NONBLOCK)); - - close(cap_ro); - close(cap_rw); - close(pipe_fds[0]); - close(pipe_fds[1]); -} -#endif diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc index 0551d9bd81ef..a9e4d30ac4b9 100644 --- a/tests/sys/capsicum/capability-fd.cc +++ b/tests/sys/capsicum/capability-fd.cc @@ -110,40 +110,11 @@ static right_info known_rights[] = { RIGHTS_INFO(CAP_KQUEUE), /* Rights that are only present in some version or some OS, and so are #ifdef'ed */ /* LINKAT got split */ -#ifdef CAP_LINKAT - RIGHTS_INFO(CAP_LINKAT), -#endif -#ifdef CAP_LINKAT_SOURCE RIGHTS_INFO(CAP_LINKAT_SOURCE), -#endif -#ifdef CAP_LINKAT_TARGET RIGHTS_INFO(CAP_LINKAT_TARGET), -#endif - /* Linux aliased some FD operations for pdgetpid/pdkill */ -#ifdef CAP_PDGETPID_FREEBSD - RIGHTS_INFO(CAP_PDGETPID_FREEBSD), -#endif -#ifdef CAP_PDKILL_FREEBSD - RIGHTS_INFO(CAP_PDKILL_FREEBSD), -#endif /* Linux-specific rights */ -#ifdef CAP_FSIGNAL - RIGHTS_INFO(CAP_FSIGNAL), -#endif -#ifdef CAP_EPOLL_CTL - RIGHTS_INFO(CAP_EPOLL_CTL), -#endif #ifdef CAP_NOTIFY RIGHTS_INFO(CAP_NOTIFY), -#endif -#ifdef CAP_SETNS - RIGHTS_INFO(CAP_SETNS), -#endif -#ifdef CAP_PERFMON - RIGHTS_INFO(CAP_PERFMON), -#endif -#ifdef CAP_BPF - RIGHTS_INFO(CAP_BPF), #endif /* Rights in later versions of FreeBSD (>10.0) */ }; @@ -152,7 +123,7 @@ void ShowCapRights(FILE *out, int fd) { size_t ii; bool first = true; cap_rights_t rights; - CAP_SET_NONE(&rights); + CAP_NONE(&rights); if (cap_rights_get(fd, &rights) < 0) { fprintf(out, "Failed to get rights for fd %d: errno %d\n", fd, errno); return; @@ -210,11 +181,11 @@ FORK_TEST(Capability, CapNew) { cap_rights_t r_rws; cap_rights_init(&r_rws, CAP_READ, CAP_WRITE, CAP_SEEK); cap_rights_t r_all; - CAP_SET_ALL(&r_all); + CAP_ALL(&r_all); int cap_fd = dup(STDOUT_FILENO); cap_rights_t rights; - CAP_SET_NONE(&rights); + CAP_NONE(&rights); EXPECT_OK(cap_rights_get(cap_fd, &rights)); EXPECT_RIGHTS_EQ(&r_all, &rights); @@ -511,7 +482,7 @@ static void TryFileOps(int fd, cap_rights_t rights) { close(cap_cap_fd); char ch; - CHECK_RIGHT_RESULT(read(cap_fd, &ch, sizeof(ch)), rights, CAP_READ, CAP_SEEK_ASWAS); + CHECK_RIGHT_RESULT(read(cap_fd, &ch, sizeof(ch)), rights, CAP_READ, 0); ssize_t len1 = pread(cap_fd, &ch, sizeof(ch), 0); CHECK_RIGHT_RESULT(len1, rights, CAP_PREAD); @@ -519,11 +490,10 @@ static void TryFileOps(int fd, cap_rights_t rights) { CHECK_RIGHT_RESULT(len2, rights, CAP_PREAD); EXPECT_EQ(len1, len2); - CHECK_RIGHT_RESULT(write(cap_fd, &ch, sizeof(ch)), rights, CAP_WRITE, CAP_SEEK_ASWAS); + CHECK_RIGHT_RESULT(write(cap_fd, &ch, sizeof(ch)), rights, CAP_WRITE, 0); CHECK_RIGHT_RESULT(pwrite(cap_fd, &ch, sizeof(ch), 0), rights, CAP_PWRITE); CHECK_RIGHT_RESULT(lseek(cap_fd, 0, SEEK_SET), rights, CAP_SEEK); -#ifdef HAVE_CHFLAGS // Note: this is not expected to work over NFS. struct statfs sf; EXPECT_OK(fstatfs(fd, &sf)); @@ -531,7 +501,6 @@ static void TryFileOps(int fd, cap_rights_t rights) { if (!is_nfs) { CHECK_RIGHT_RESULT(fchflags(cap_fd, UF_NODUMP), rights, CAP_FCHFLAGS); } -#endif CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_NONE, MAP_SHARED, cap_fd, 0), rights, CAP_MMAP); @@ -551,9 +520,6 @@ static void TryFileOps(int fd, cap_rights_t rights) { rights, CAP_MMAP_RWX); CHECK_RIGHT_RESULT(fsync(cap_fd), rights, CAP_FSYNC); -#ifdef HAVE_SYNC_FILE_RANGE - CHECK_RIGHT_RESULT(sync_file_range(cap_fd, 0, 1, 0), rights, CAP_FSYNC, CAP_SEEK); -#endif int rc = fcntl(cap_fd, F_GETFL); CHECK_RIGHT_RESULT(rc, rights, CAP_FCNTL); @@ -575,10 +541,6 @@ static void TryFileOps(int fd, cap_rights_t rights) { struct statfs cap_sf; CHECK_RIGHT_RESULT(fstatfs(cap_fd, &cap_sf), rights, CAP_FSTATFS); -#ifdef HAVE_FPATHCONF - CHECK_RIGHT_RESULT(fpathconf(cap_fd, _PC_NAME_MAX), rights, CAP_FPATHCONF); -#endif - CHECK_RIGHT_RESULT(futimes(cap_fd, NULL), rights, CAP_FUTIMES); struct pollfd pollfd; @@ -806,14 +768,12 @@ static void TryDirOps(int dirfd, cap_rights_t rights) { } EXPECT_OK(unlinkat(dirfd, "cap_fsync", 0)); -#ifdef HAVE_CHFLAGSAT rc = openat(dirfd, "cap_chflagsat", O_CREAT, 0600); EXPECT_OK(rc); EXPECT_OK(close(rc)); rc = chflagsat(dfd_cap, "cap_chflagsat", UF_NODUMP, 0); CHECK_RIGHT_RESULT(rc, rights, CAP_CHFLAGSAT, CAP_LOOKUP); EXPECT_OK(unlinkat(dirfd, "cap_chflagsat", 0)); -#endif rc = openat(dirfd, "cap_fchownat", O_CREAT, 0600); EXPECT_OK(rc); @@ -871,13 +831,11 @@ static void TryDirOps(int dirfd, cap_rights_t rights) { EXPECT_OK(unlinkat(dirfd, "cap_mkdirat", AT_REMOVEDIR)); } -#ifdef HAVE_MKFIFOAT rc = mkfifoat(dfd_cap, "cap_mkfifoat", 0600); CHECK_RIGHT_RESULT(rc, rights, CAP_MKFIFOAT, CAP_LOOKUP); if (rc >= 0) { EXPECT_OK(unlinkat(dirfd, "cap_mkfifoat", 0)); } -#endif if (getuid() == 0) { rc = mknodat(dfd_cap, "cap_mknodat", S_IFCHR | 0600, 0); @@ -980,12 +938,10 @@ FORK_TEST(Capability, DirOperations) { DirOperationsTest(0); } -#ifdef O_PATH FORK_TEST(Capability, PathDirOperations) { // Make the dfd in the test a path-only file descriptor. DirOperationsTest(O_PATH); } -#endif static void TryReadWrite(int cap_fd) { char buffer[64]; @@ -1136,22 +1092,6 @@ TEST(Capability, SyscallAt) { EXPECT_OK(mkfifoat(cap_dfd_all, "cap_fifo", 0755)); unlink(TmpFile("cap_at_topdir/cap_fifo")); -#ifdef HAVE_MKNOD_REG - // Need CAP_CREATE to create a regular file with mknodat(2). - EXPECT_NOTCAPABLE(mknodat(cap_dfd_all, "cap_regular", S_IFREG|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_regular")); - EXPECT_OK(mknodat(cap_dfd_create, "cap_regular", S_IFREG|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_regular")); -#endif - -#ifdef HAVE_MKNOD_SOCKET - // Need CAP_BIND to create a UNIX domain socket with mknodat(2). - EXPECT_NOTCAPABLE(mknodat(cap_dfd_all, "cap_socket", S_IFSOCK|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_socket")); - EXPECT_OK(mknodat(cap_dfd_bind, "cap_socket", S_IFSOCK|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_socket")); -#endif - close(cap_dfd_all); close(cap_dfd_no_mkfifo); close(cap_dfd_no_mkdir); diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc index 12921bb53c72..89aa8f653dfc 100644 --- a/tests/sys/capsicum/capmode.cc +++ b/tests/sys/capsicum/capmode.cc @@ -3,9 +3,7 @@ // whether or not they return the expected ECAPMODE. #include #include -#ifdef __FreeBSD__ #include -#endif #include #include #include @@ -69,18 +67,14 @@ FORK_TEST_F(WithFiles, DisallowedFileSyscalls) { EXPECT_CAPMODE(access(TmpFile("cap_capmode_access"), F_OK)); EXPECT_CAPMODE(acct(TmpFile("cap_capmode_acct"))); EXPECT_CAPMODE(chdir(TmpFile("cap_capmode_chdir"))); -#ifdef HAVE_CHFLAGS EXPECT_CAPMODE(chflags(TmpFile("cap_capmode_chflags"), UF_NODUMP)); -#endif EXPECT_CAPMODE(chmod(TmpFile("cap_capmode_chmod"), 0644)); EXPECT_CAPMODE(chown(TmpFile("cap_capmode_chown"), -1, -1)); EXPECT_CAPMODE(chroot(TmpFile("cap_capmode_chroot"))); EXPECT_CAPMODE(creat(TmpFile("cap_capmode_creat"), 0644)); EXPECT_CAPMODE(fchdir(fd_dir_)); -#ifdef HAVE_GETFSSTAT struct statfs statfs; EXPECT_CAPMODE(getfsstat(&statfs, sizeof(statfs), MNT_NOWAIT)); -#endif EXPECT_CAPMODE(link(TmpFile("foo"), TmpFile("bar"))); struct stat sb; EXPECT_CAPMODE(lstat(TmpFile("cap_capmode_lstat"), &sb)); @@ -89,9 +83,7 @@ FORK_TEST_F(WithFiles, DisallowedFileSyscalls) { EXPECT_CAPMODE(open("/dev/null", O_RDWR)); char buf[64]; EXPECT_CAPMODE(readlink(TmpFile("cap_capmode_readlink"), buf, sizeof(buf))); -#ifdef HAVE_REVOKE EXPECT_CAPMODE(revoke(TmpFile("cap_capmode_revoke"))); -#endif EXPECT_CAPMODE(stat(TmpFile("cap_capmode_stat"), &sb)); EXPECT_CAPMODE(symlink(TmpFile("cap_capmode_symlink_from"), TmpFile("cap_capmode_symlink_to"))); EXPECT_CAPMODE(unlink(TmpFile("cap_capmode_unlink"))); @@ -122,9 +114,7 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) { int fd_dup = dup(fd_file_); EXPECT_OK(fd_dup); EXPECT_OK(dup2(fd_file_, fd_dup)); -#ifdef HAVE_DUP3 EXPECT_OK(dup3(fd_file_, fd_dup, 0)); -#endif if (fd_dup >= 0) close(fd_dup); struct stat sb; @@ -134,12 +124,10 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) { EXPECT_OK(read(fd_file_, &ch, sizeof(ch))); EXPECT_OK(write(fd_file_, &ch, sizeof(ch))); -#ifdef HAVE_CHFLAGS rc = fchflags(fd_file_, UF_NODUMP); if (rc < 0) { EXPECT_NE(ECAPMODE, errno); } -#endif char buf[1024]; rc = getdents_(fd_dir_, (void*)buf, sizeof(buf)); @@ -152,7 +140,7 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) { struct iovec io; io.iov_base = data; io.iov_len = 2; -#if !defined(__i386__) && !defined(__linux__) +#if !defined(__i386__) // TODO(drysdale): reinstate these tests for 32-bit runs when possible // libc bug is fixed. EXPECT_OK(pwritev(fd_file_, &io, 1, 0)); @@ -160,18 +148,6 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) { #endif EXPECT_OK(writev(fd_file_, &io, 1)); EXPECT_OK(readv(fd_file_, &io, 1)); - -#ifdef HAVE_SYNCFS - EXPECT_OK(syncfs(fd_file_)); -#endif -#ifdef HAVE_SYNC_FILE_RANGE - EXPECT_OK(sync_file_range(fd_file_, 0, 1, 0)); -#endif -#ifdef HAVE_READAHEAD - if (!tmpdir_on_tmpfs) { // tmpfs doesn't support readahead(2) - EXPECT_OK(readahead(fd_file_, 0, 1)); - } -#endif } FORK_TEST_F(WithFiles, AllowedSocketSyscalls) { @@ -301,19 +277,10 @@ FORK_TEST(Capmode, AllowedIdentifierSyscalls) { gid_t egid; gid_t sgid; EXPECT_OK(getresgid(&rgid, &egid, &sgid)); -#ifdef HAVE_GETLOGIN EXPECT_TRUE(getlogin() != NULL); -#endif // Set various identifiers (to their existing values). EXPECT_OK(setgid(my_gid)); -#ifdef HAVE_SETFSGID - EXPECT_OK(setfsgid(my_gid)); -#endif - EXPECT_OK(setuid(my_uid)); -#ifdef HAVE_SETFSUID - EXPECT_OK(setfsuid(my_uid)); -#endif EXPECT_OK(setregid(my_gid, my_gid)); EXPECT_OK(setresgid(my_gid, my_gid, my_gid)); EXPECT_OK(setreuid(my_uid, my_uid)); @@ -410,14 +377,6 @@ FORK_TEST(Capmode, AllowedPipeSyscalls) { int rc = pipe(fd2); EXPECT_EQ(0, rc); -#ifdef HAVE_VMSPLICE - char buf[11] = "0123456789"; - struct iovec iov; - iov.iov_base = buf; - iov.iov_len = sizeof(buf); - EXPECT_FAIL_NOT_CAPMODE(vmsplice(fd2[0], &iov, 1, SPLICE_F_NONBLOCK)); -#endif - if (rc == 0) { close(fd2[0]); close(fd2[1]); @@ -606,7 +565,6 @@ FORK_TEST_F(WithFiles, AllowedMiscSyscalls) { // TODO(FreeBSD): ktrace -#ifdef HAVE_SYSARCH // sysarch() is, by definition, architecture-dependent #if defined (__amd64__) || defined (__i386__) long sysarch_arg = 0; @@ -614,14 +572,13 @@ FORK_TEST_F(WithFiles, AllowedMiscSyscalls) { #else // TOOD(jra): write a test for other architectures, like arm #endif -#endif } void *thread_fn(void *p) { int fd = (int)(intptr_t)p; if (verbose) fprintf(stderr, " thread waiting to run\n"); AWAIT_INT_MESSAGE(fd, MSG_PARENT_CHILD_SHOULD_RUN); - EXPECT_OK(getpid_()); + EXPECT_OK(getpid()); EXPECT_CAPMODE(open("/dev/null", O_RDWR)); // Return whether there have been any failures to the main thread. void *rval = (void *)(intptr_t)testing::Test::HasFailure(); @@ -671,7 +628,7 @@ FORK_TEST(Capmode, NewThread) { SEND_INT_MESSAGE(proc_pipe[0], MSG_PARENT_CHILD_SHOULD_RUN); // Do an allowed syscall. - EXPECT_OK(getpid_()); + EXPECT_OK(getpid()); // Wait for the first child to exit (should get a zero exit code message). AWAIT_INT_MESSAGE(proc_pipe[0], 0); @@ -687,7 +644,7 @@ FORK_TEST(Capmode, NewThread) { if (verbose) fprintf(stderr, " second child started\n"); EXPECT_OK(close(proc_pipe[0])); // Child: do an allowed and a disallowed syscall. - EXPECT_OK(getpid_()); + EXPECT_OK(getpid()); EXPECT_CAPMODE(open("/dev/null", O_RDWR)); // Notify the parent of success/failure. int rval = (int)testing::Test::HasFailure(); diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h index 13fa24a0f722..9cb3149a05a4 100644 --- a/tests/sys/capsicum/capsicum-freebsd.h +++ b/tests/sys/capsicum/capsicum-freebsd.h @@ -1,6 +1,5 @@ #ifndef __CAPSICUM_FREEBSD_H__ #define __CAPSICUM_FREEBSD_H__ -#ifdef __FreeBSD__ /************************************************************ * FreeBSD Capsicum Functionality. ************************************************************/ @@ -12,15 +11,9 @@ extern "C" { /* FreeBSD definitions. */ #include #include -#if __FreeBSD_version >= 1100014 || \ - (__FreeBSD_version >= 1001511 && __FreeBSD_version < 1100000) #include -#else -#include -#endif #include -#if __FreeBSD_version >= 1000000 #define AT_SYSCALLS_IN_CAPMODE #define HAVE_CAP_RIGHTS_GET #define HAVE_CAP_RIGHTS_LIMIT @@ -32,11 +25,7 @@ typedef uint32_t cap_fcntl_t; // ioctl(2) and cap_ioctls_limit(2) take unsigned long. typedef unsigned long cap_ioctl_t; -#if __FreeBSD_version >= 1101000 #define HAVE_OPENAT_INTERMEDIATE_DOTDOT -#endif - -#endif #ifdef __cplusplus } @@ -45,13 +34,8 @@ typedef unsigned long cap_ioctl_t; // Use fexecve_() in tests to allow Linux variant to bypass glibc version. #define fexecve_(F, A, E) fexecve(F, A, E) -#ifdef ENOTBENEATH -#define E_NO_TRAVERSE_CAPABILITY ENOTBENEATH -#define E_NO_TRAVERSE_O_BENEATH ENOTBENEATH -#else #define E_NO_TRAVERSE_CAPABILITY ENOTCAPABLE #define E_NO_TRAVERSE_O_BENEATH ENOTCAPABLE -#endif // FreeBSD limits the number of ioctls in cap_ioctls_limit to 256 #define CAP_IOCTLS_LIMIT_MAX 256 @@ -66,6 +50,4 @@ typedef unsigned long cap_ioctl_t; // FreeBSD generates a capability from sctp_peeloff(cap_fd,...). #define CAP_FROM_PEELOFF -#endif /* __FreeBSD__ */ - #endif /*__CAPSICUM_FREEBSD_H__*/ diff --git a/tests/sys/capsicum/capsicum-linux.h b/tests/sys/capsicum/capsicum-linux.h deleted file mode 100644 index 5bea418a2bc7..000000000000 --- a/tests/sys/capsicum/capsicum-linux.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __CAPSICUM_LINUX_H__ -#define __CAPSICUM_LINUX_H__ - -#ifdef __linux__ -/************************************************************ - * Linux Capsicum Functionality. - ************************************************************/ -#include -#include -#include - -#define HAVE_CAP_RIGHTS_LIMIT -#define HAVE_CAP_RIGHTS_GET -#define HAVE_CAP_FCNTLS_LIMIT -#define HAVE_CAP_IOCTLS_LIMIT -#define HAVE_PROC_FDINFO -#define HAVE_PDWAIT4 -#define CAP_FROM_ACCEPT -// TODO(drysdale): uncomment if/when Linux propagates rights on sctp_peeloff. -// Linux does not generate a capability from sctp_peeloff(cap_fd,...). -// #define CAP_FROM_PEELOFF -// TODO(drysdale): uncomment if/when Linux allows intermediate .. path segments -// for openat()-like operations. -// #define HAVE_OPENAT_INTERMEDIATE_DOTDOT - -// Failure to open file due to path traversal generates EPERM -#ifdef ENOTBENEATH -#define E_NO_TRAVERSE_CAPABILITY ENOTBENEATH -#define E_NO_TRAVERSE_O_BENEATH ENOTBENEATH -#else -#define E_NO_TRAVERSE_CAPABILITY EPERM -#define E_NO_TRAVERSE_O_BENEATH EPERM -#endif - -// Too many links -#define E_TOO_MANY_LINKS ELOOP - -#endif /* __linux__ */ - -#endif /*__CAPSICUM_LINUX_H__*/ diff --git a/tests/sys/capsicum/capsicum-rights.h b/tests/sys/capsicum/capsicum-rights.h index 73c445434404..751781fd2628 100644 --- a/tests/sys/capsicum/capsicum-rights.h +++ b/tests/sys/capsicum/capsicum-rights.h @@ -5,114 +5,11 @@ extern "C" { #endif -#ifdef __FreeBSD__ #include -#if __FreeBSD_version >= 1100014 || \ - (__FreeBSD_version >= 1001511 && __FreeBSD_version < 1100000) #include -#else -#include -#endif -#endif - -#ifdef __linux__ -#include -#endif #ifdef __cplusplus } #endif -#ifndef CAP_RIGHTS_VERSION -/************************************************************ - * Capsicum compatibility layer: implement new (FreeBSD10.x) - * rights manipulation API in terms of original (FreeBSD9.x) - * functionality. - ************************************************************/ -#include -#include - -/* Rights manipulation macros/functions. - * Note that these use variadic macros, available in C99 / C++11 (and - * also in earlier gcc versions). - */ -#define cap_rights_init(rights, ...) _cap_rights_init((rights), __VA_ARGS__, 0ULL) -#define cap_rights_set(rights, ...) _cap_rights_set((rights), __VA_ARGS__, 0ULL) -#define cap_rights_clear(rights, ...) _cap_rights_clear((rights), __VA_ARGS__, 0ULL) -#define cap_rights_is_set(rights, ...) _cap_rights_is_set((rights), __VA_ARGS__, 0ULL) - -inline cap_rights_t* _cap_rights_init(cap_rights_t *rights, ...) { - va_list ap; - cap_rights_t right; - *rights = 0; - va_start(ap, rights); - while (true) { - right = va_arg(ap, cap_rights_t); - *rights |= right; - if (right == 0) break; - } - va_end(ap); - return rights; -} - -inline cap_rights_t* _cap_rights_set(cap_rights_t *rights, ...) { - va_list ap; - cap_rights_t right; - va_start(ap, rights); - while (true) { - right = va_arg(ap, cap_rights_t); - *rights |= right; - if (right == 0) break; - } - va_end(ap); - return rights; -} - -inline cap_rights_t* _cap_rights_clear(cap_rights_t *rights, ...) { - va_list ap; - cap_rights_t right; - va_start(ap, rights); - while (true) { - right = va_arg(ap, cap_rights_t); - *rights &= ~right; - if (right == 0) break; - } - va_end(ap); - return rights; -} - -inline bool _cap_rights_is_set(const cap_rights_t *rights, ...) { - va_list ap; - cap_rights_t right; - cap_rights_t accumulated = 0; - va_start(ap, rights); - while (true) { - right = va_arg(ap, cap_rights_t); - accumulated |= right; - if (right == 0) break; - } - va_end(ap); - return (accumulated & *rights) == accumulated; -} - -inline bool _cap_rights_is_valid(const cap_rights_t *rights) { - return true; -} - -inline cap_rights_t* cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src) { - *dst |= *src; - return dst; -} - -inline cap_rights_t* cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src) { - *dst &= ~(*src); - return dst; -} - -inline bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little) { - return ((*big) & (*little)) == (*little); -} - -#endif /* old/new style rights manipulation */ - #endif /*__CAPSICUM_RIGHTS_H__*/ diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc index d0f955270fd4..2a2c75000039 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -1,10 +1,5 @@ #include -#ifdef __linux__ -#include -#include -#elif defined(__FreeBSD__) #include -#endif #include #include #include @@ -16,11 +11,6 @@ #include "gtest/gtest.h" #include "capsicum-test.h" -// For versions of googletest that lack GTEST_SKIP. -#ifndef GTEST_SKIP -#define GTEST_SKIP GTEST_FAIL -#endif - std::string tmpdir; class SetupEnvironment : public ::testing::Environment @@ -38,7 +28,6 @@ public: std::cerr << tmpdir << std::endl; } void CheckCapsicumSupport() { -#ifdef __FreeBSD__ int rc; bool trap_enotcap_enabled; size_t trap_enotcap_enabled_len = sizeof(trap_enotcap_enabled); @@ -60,7 +49,6 @@ public: << "Skipping tests because its enablement invalidates the " << "test results."; } -#endif /* FreeBSD */ } void CreateTemporaryRoot() { char *tmpdir_name = tempnam(nullptr, "cptst"); @@ -148,13 +136,6 @@ int main(int argc, char* argv[]) { } } -#ifdef __linux__ - // Check whether our temporary directory is on a tmpfs volume. - struct statfs fsinfo; - statfs(tmpdir.c_str(), &fsinfo); - tmpdir_on_tmpfs = (fsinfo.f_type == TMPFS_MAGIC); -#endif - testing::AddGlobalTestEnvironment(new SetupEnvironment()); return RUN_ALL_TESTS(); } diff --git a/tests/sys/capsicum/capsicum-test.cc b/tests/sys/capsicum/capsicum-test.cc index 1e722089761f..d221aca9e4a8 100644 --- a/tests/sys/capsicum/capsicum-test.cc +++ b/tests/sys/capsicum/capsicum-test.cc @@ -1,6 +1,5 @@ #include "capsicum-test.h" -#ifdef __FreeBSD__ #include #include #include @@ -8,7 +7,6 @@ #include #include #include -#endif #include #include @@ -38,26 +36,6 @@ const char *TmpFile(const char *p) { } char ProcessState(int pid) { -#ifdef __linux__ - // Open the process status file. - char s[1024]; - snprintf(s, sizeof(s), "/proc/%d/status", pid); - FILE *f = fopen(s, "r"); - if (f == NULL) return '\0'; - - // Read the file line by line looking for the state line. - const char *prompt = "State:\t"; - while (!feof(f)) { - fgets(s, sizeof(s), f); - if (!strncmp(s, prompt, strlen(prompt))) { - fclose(f); - return s[strlen(prompt)]; - } - } - fclose(f); - return '?'; -#endif -#ifdef __FreeBSD__ // First check if the process exists/we have permission to see it. This // Avoids warning messages being printed to stderr by libprocstat. size_t len = 0; @@ -115,5 +93,4 @@ char ProcessState(int pid) { procstat_close(prstat); if (verbose) fprintf(stderr, "Process %d in state '%c'\n", pid, result); return result; -#endif } diff --git a/tests/sys/capsicum/capsicum.h b/tests/sys/capsicum/capsicum.h index 0005e7884673..5880bbc8b882 100644 --- a/tests/sys/capsicum/capsicum.h +++ b/tests/sys/capsicum/capsicum.h @@ -4,141 +4,11 @@ #ifndef __CAPSICUM_H__ #define __CAPSICUM_H__ -#ifdef __FreeBSD__ -#include "capsicum-freebsd.h" -#endif - -#ifdef __linux__ -#include "capsicum-linux.h" -#endif - -/* - * CAP_ALL/CAP_NONE is a value in FreeBSD9.x Capsicum, but a functional macro - * in FreeBSD10.x Capsicum. Always use CAP_SET_ALL/CAP_SET_NONE instead. - */ -#ifndef CAP_SET_ALL -#ifdef CAP_RIGHTS_VERSION -#define CAP_SET_ALL(rights) CAP_ALL(rights) -#else -#define CAP_SET_ALL(rights) *(rights) = CAP_MASK_VALID -#endif -#endif - -#ifndef CAP_SET_NONE -#ifdef CAP_RIGHTS_VERSION -#define CAP_SET_NONE(rights) CAP_NONE(rights) -#else *** 1004 LINES SKIPPED *** From nobody Mon Nov 23 05:49:24 2026 X-Original-To: dev-commits-src-branches@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 4jXw4N5Y3Tz71yrq for ; Mon, 23 Nov 2026 05:49:24 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4N2wB8z4Smc for ; Mon, 23 Nov 2026 05:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=; b=HSqf6p5iZXN/NaaGM2Pzjxve4B+SxpLT8d4zUDTNblyHxD5weEVJEo6LkNi6rD9EsLmNhB pjf1jhoubxzrHL0vgH1Qyv5zShFZSV8xu5upNpRqOAiCydKxkwSP2bl8TptqO6xcHbLmDE acreDwCxvnk1+apn9y09KVZfSvhsKBrscBQPMS08V4gKWBtlk9xI1c36utRdA2m4UBCUEO 66ChDfLU8lQcZYd7WEf3AxFipEMgHH45avjC/7VjQd8kqXxpF3EwaZ823NvhHofX6AvAR/ Tvq5IJVulJoH0RKxRhQxTAxdDgU/hB18Viva1Aa7JVTl9OHwTuFxRqPUBQb/+g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412964; b=mUOsRTf05QMzXYxwj06mkOCt1qRHf6By2XiSAZNIWHGt3WJ9I6JDWgYkVvl+wxk1MgwYEM Bw4FdmZmkugY6AZn7PGpSzPMW80RAjGIizglppK6CJ0PFdyF7c8EKIVngG+arqkxr0K184 1SmzpdOX7DN9w3LNCNv/xks4NEK/nV7ZhdWktvGydz61ZRbi93nr7l9/GYC75mbH1x2A9V UKIfmo6dbSl9gaANeGWYm0nkX6H+gZwBG9xmgXE2uZhNM8K5ZKkWvXtOA0LfNJjAcmWhGs GedZJ5rEE3nhgcRJ2tC14b98EMRWcNRmJx3fGNzgSgTToroPFjaLq/QWDV8sFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795412964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=; b=x9VjIQ7SAbosG4HZ7Vg3oV7eGDfmGdehrOtk0B1n2pmXJQyjZGdjPNCPgn3Tksr8d0VVBt S+swv/TfPCCzV7PWfjwR57Unwb7JGyT2IOlqueXO23pgFK6j9AJ/eXjE7gTcksZUojYWXK 1j+fE5vK5iOAqC+yQd4T43jhK/mFRd5anfRpb5VskbuuFxJ4ltaTZZ3nZrvDPg4WI3d5Av sy6ERYz0+Uc0RzYhYnUgK2ZPwZr8gX1bVcK7yD0fiY2FvGdmtoqgw5VxCXHqQ/XUvxtq/e K/HnLDw2RsL0QnyqQsz9OkSAwHXuck/f4VihVkoYmFT+rWdrAQzLd9H30RmplA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4N2TW9zdw9 for ; Mon, 23 Nov 2026 05:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fcda by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:49:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Enji Cooper Subject: git: 5e5687aac4e0 - stable/14 - src: Use gnu++17 as the default C++ standard List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e5687aac4e069dc20fa8dc735c581c188534144 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:49:24 +0000 Message-Id: <6b03d3e4.1fcda.5b9b38f9@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5e5687aac4e069dc20fa8dc735c581c188534144 commit 5e5687aac4e069dc20fa8dc735c581c188534144 Author: John Baldwin AuthorDate: 2025-04-11 13:53:50 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:44:04 +0000 src: Use gnu++17 as the default C++ standard Previously the compiler's default C++ standard was used unlike C where bsd.sys.mk explicitly sets a default language version. Setting an explicit default version will give a more uniform experience across different compilers and compiler versions. gnu++17 was chosen to match the default C standard. It is well supported by a wide range of clang (5+) and GCC (9+) versions. gnu++17 is also the default C++ standard in recent versions of clang (16+) and GCC (11+). As a result, many of the explicit CXXSTD settings in Makefiles had the effect of lowering the C++ standard instead of raising it as was originally intended and are removed. Note that the remaining explicit CXXSTD settings for atf and liblutok explicitly lower the standard to C++11 due to use of the deprecated auto_ptr<> template which is removed in later versions. Reviewed by: imp, asomers, dim, emaste Differential Revision: https://reviews.freebsd.org/D49223 (cherry picked from commit 6527682ab7058e5023a2a6dea01d51c15dca701f) --- lib/clang/llvm.build.mk | 1 - lib/libc/tests/stdlib/Makefile | 2 -- lib/libclang_rt/Makefile.inc | 1 - lib/libcxxrt/Makefile | 1 - lib/libgcc_eh/Makefile.inc | 1 - lib/libomp/Makefile | 1 - lib/ofed/libibnetdisc/Makefile | 1 - libexec/atf/atf-pytest-wrapper/Makefile | 1 - share/mk/bsd.sys.mk | 2 ++ share/mk/googletest.test.inc.mk | 2 -- tests/sys/fs/fusefs/Makefile | 1 - usr.bin/dtc/Makefile | 2 -- usr.sbin/pmc/Makefile | 1 - 13 files changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index e06f9a2c29f6..4716ce12f48d 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -122,7 +122,6 @@ LDFLAGS+= -Wl,-m,elf64lriscv_fbsd .endif .endif -CXXSTD?= c++17 CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti CXXFLAGS+= -fvisibility-inlines-hidden diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 14f1ab022c37..6c7c61bf291b 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -61,8 +61,6 @@ PROGS+= h_getopt h_getopt_long CFLAGS+= -I${.CURDIR} -CXXSTD.cxa_thread_atexit_test= c++11 -CXXSTD.cxa_thread_atexit_nothr_test= c++11 LIBADD.cxa_thread_atexit_test+= pthread # Tests that requires Blocks feature diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 4be3c667462f..b0386bb0ae5d 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -35,4 +35,3 @@ CXXFLAGS+= -fvisibility-inlines-hidden CXXFLAGS+= -fvisibility=hidden CFLAGS+= -I${CRTSRC}/include CFLAGS+= -I${CRTSRC}/lib -CXXSTD= c++17 diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index 48a724dd42f2..66465694e975 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -21,7 +21,6 @@ SRCS+= typeinfo.cc WARNS?= 0 CFLAGS+= -isystem ${SRCDIR} -nostdinc++ -CXXSTD?= c++14 VERSION_MAP= ${.CURDIR}/Version.map .include diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 75e7d743a720..82012746b2c2 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -39,7 +39,6 @@ CFLAGS+= -I${UNWINDINCDIR} CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE CXXFLAGS+= -fno-rtti -CXXSTD?= c++11 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC # Probably need to just move this earlier or use CXXFLAGS .if ${MK_DIRDEPS_BUILD} == "yes" diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile index aa9e6799ab59..81010084a2bf 100644 --- a/lib/libomp/Makefile +++ b/lib/libomp/Makefile @@ -55,7 +55,6 @@ CFLAGS+= -fdata-sections CXXFLAGS+= -fvisibility-inlines-hidden CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -CXXSTD= c++17 .if ${COMPILER_TYPE} == "clang" .if ${MACHINE_CPUARCH} == "i386" diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile index 47470132a2b6..2eb82fb8c938 100644 --- a/lib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -31,7 +31,6 @@ LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${_spath} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband -CXXSTD= c++11 VERSION_MAP= ${_spath}/libibnetdisc.map .include diff --git a/libexec/atf/atf-pytest-wrapper/Makefile b/libexec/atf/atf-pytest-wrapper/Makefile index e4dc0f8a5fd1..80b5e411ec4e 100644 --- a/libexec/atf/atf-pytest-wrapper/Makefile +++ b/libexec/atf/atf-pytest-wrapper/Makefile @@ -4,7 +4,6 @@ PACKAGE= tests PROG_CXX= atf_pytest_wrapper SRCS= atf_pytest_wrapper.cpp -CXXSTD= c++17 MAN= .include diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e2491a49b29d..28ba3cdf70ee 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -23,6 +23,8 @@ CFLAGS+= -std=iso9899:1999 CFLAGS+= -std=${CSTD} .endif # CSTD +CXXSTD?= gnu++17 + .if !empty(CXXSTD) CXXFLAGS+= -std=${CXXSTD} .endif diff --git a/share/mk/googletest.test.inc.mk b/share/mk/googletest.test.inc.mk index 05415775448b..9ef5a3ceac00 100644 --- a/share/mk/googletest.test.inc.mk +++ b/share/mk/googletest.test.inc.mk @@ -9,6 +9,4 @@ GTESTS_CXXFLAGS+= -frtti # libgmock's, etc, headers. CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private -CXXSTD?= c++14 - NO_WTHREAD_SAFETY= diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 1293373e2451..a8035a3bd7a4 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -100,7 +100,6 @@ CXXWARNFLAGS+= -Wno-vla-cxx-extension CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} -CXXSTD= c++14 .for f in getmntopts.c mntopts.h CLEANFILES+= ${f} diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index 9b1aff13511f..d7661ae164c3 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -6,8 +6,6 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions -CXXSTD= c++17 - NO_SHARED?=NO .include diff --git a/usr.sbin/pmc/Makefile b/usr.sbin/pmc/Makefile index dda72c85a106..a4e12470ae5e 100644 --- a/usr.sbin/pmc/Makefile +++ b/usr.sbin/pmc/Makefile @@ -6,7 +6,6 @@ PROG_CXX= pmc MAN= WARNS?= 3 CXXFLAGS+= -O0 -CXXSTD= c++14 CWARNFLAGS.gcc+= -Wno-redundant-decls CFLAGS+= -I${SRCTOP}/lib/libpmcstat From nobody Mon Nov 23 05:57:30 2026 X-Original-To: dev-commits-src-branches@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 4jXwFl1Fdkz720gs for ; Mon, 23 Nov 2026 05:57:31 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFk6183z4W5Z for ; Mon, 23 Nov 2026 05:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413450; 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=8bjn8iUD2DT+609i2TPs8/IoWrepSE2Go02HsOYNB6M=; b=W3Sms1zYYFdhbBhGlgnPAybS47YwMhU3gjX2QyuBS+s6dl+Y1b4v0x2aRK1+tc+QPYVPds QsmutlW48asFKj8/XjpHdMNel6bmWGElpl3SHflz0mESAImmn7E1WTuFoNTkBzFrubzekT N9Sj7L+nHPBGD6R/0N1l4zlmNSJrrDXQxM9n13nVv41c8HNLYZWqFKfwMDRxKLRN/mwRU4 2PbBjiQdt37SgH5E8ErvFOjySjF+5SjF/fWtYmyjgdzMDB13xmeMPtZejKbR51OihLN7xY 89KFfNHHgwK8QItDX9Nsf4AzkIL7OJL6I0kd0ojE65kxQIp9zVkteQg2sZpqFQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413450; b=bfAonqsxlF/lx+TcqrYcJKmVu9WDKpsvCY+C8Ut039ugIHm6N7np9oWZf9SyzWTv8fc/I3 eBGF9gcfZMTI+/7KIPVB89gDv0THm4BNkpt7NMsUOSidb7ao/73jwtzxuBtO5aVHaxYDdm flNZONAJcToHnscuJe9udE3kYJsO4DR9SKjmhig+equYrQQYaBaxCiYWHgc0k54XS85SoZ 1SAgZT+Mu1PKkqfvFs3Rco1qTAPFlunuhf+fNww66WNLDgA2HKXZ2Dhlx97asTfG7Ig79E 135kDRHUN9di1J84GXWgqcyXZyDj79RSV/MNtO0c/QO7FoGzuoyXlDGNpdEtbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413450; 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=8bjn8iUD2DT+609i2TPs8/IoWrepSE2Go02HsOYNB6M=; b=eAEsiGrCqdhfTFT+LqJWd3vqq3/4Z7VXQnf+afusbQMEQrTwA2gGb3aOMNvFEefrTph6hN jQviielY/V539dz40YkCKjkdYL5bnVi5oViOgW9kBLQXigPHt+cUXjoaRv11S1F2fNQTnd zuaZUSCgoI6+SndZZlQj+cPUB6B3mrYlG5fF6y3ry0e4oLTbXTXqLsOx3keU/ySNIQDHoL gpHczhPWftrx1AV03d6LRxFv+KHH2Ilosk9949wN7+bkHAMvtwCuOZV+W1bt5JCKO6WeQr k0jussXo4uXl40Z6hiNN4lpYeUZgs5DQYOqAuwQSPoyYyDffSt4CxnpiO+JkyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFk4bgyzfJl for ; Mon, 23 Nov 2026 05:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1eee3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: da8acc240c75 - stable/14 - contrib/kyua: update to 0.15.1 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: da8acc240c75aa6a582edd900352d8d184755ccc Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:30 +0000 Message-Id: <6b03d5ca.1eee3.7b75fbfe@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=da8acc240c75aa6a582edd900352d8d184755ccc commit da8acc240c75aa6a582edd900352d8d184755ccc Author: Enji Cooper AuthorDate: 2026-10-28 22:02:27 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:28 +0000 contrib/kyua: update to 0.15.1 This new release contains multiple bugfixes. Please see the release notes mentioned in the merge commit for more details. MFC after: 2 weeks Merge commit '3e05143b80d1537cdd51a5dcf742da31f400507e' (cherry picked from commit b68969979d6b590247290b4fe26212d201c3ad96) --- contrib/kyua/NEWS | 19 +++ contrib/kyua/README.md | 4 +- contrib/kyua/config.h | 6 +- contrib/kyua/doc/kyua-about.1 | 2 +- contrib/kyua/drivers/debug_test.cpp | 3 + contrib/kyua/drivers/run_tests.cpp | 3 + contrib/kyua/engine/atf_test.cpp | 1 + contrib/kyua/engine/googletest.cpp | 27 +--- contrib/kyua/engine/googletest_helpers.cpp | 27 +--- contrib/kyua/engine/googletest_list.cpp | 27 +--- contrib/kyua/engine/googletest_list_test.cpp | 27 +--- contrib/kyua/engine/googletest_result.cpp | 195 +++++++++++++++++-------- contrib/kyua/engine/googletest_result.hpp | 31 +--- contrib/kyua/engine/googletest_result_test.cpp | 141 ++++++++++++++---- contrib/kyua/engine/googletest_test.cpp | 28 +--- contrib/kyua/engine/plain_test.cpp | 1 + contrib/kyua/engine/scanner_test.cpp | 1 + contrib/kyua/engine/scheduler_test.cpp | 11 ++ contrib/kyua/engine/tap_test.cpp | 1 + contrib/kyua/utils/config/nodes.cpp | 6 +- contrib/kyua/utils/config/tree.cpp | 11 +- contrib/kyua/utils/sqlite/test_utils.hpp | 4 +- 22 files changed, 316 insertions(+), 260 deletions(-) diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS index c794e6e60092..50a2c8257370 100644 --- a/contrib/kyua/NEWS +++ b/contrib/kyua/NEWS @@ -1,5 +1,24 @@ # Major changes between releases +## Changes in version 0.15.1 + +**Released on 2026/10/25.** + +### Bugfixes + +* #324: googletest: fix "failed without a reason" scenario +* #328: utils::sqlite: restore static on test helpers +* #330: Address a number of issues with the GoogleTest parser +* #331: GoogleTest: licensing and style cleanup +* #332: model/metadata: source code cleanup post-748e27bb +* #339: Guard dynamic_cast results before dereferencing + +### Developer Workflow Changes + +* #338: add 30 minutes timeout for Distcheck step of CI + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.0...kyua-0.15.1 + ## Changes in version 0.15.0 **Released on 2026/10/07.** diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md index e42d6da35377..b8b54d0413de 100644 --- a/contrib/kyua/README.md +++ b/contrib/kyua/README.md @@ -27,9 +27,9 @@ This is not an official Google product. ## Download -The latest version of Kyua is 0.14.1 and was released on March 29th, 2025. +The latest version of Kyua is 0.15.0 and was released on October 7th, 2026. -Download: [kyua-0.14.1](../../releases/tag/kyua-0.14.1). +Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0). See the [release notes](NEWS) for information about the changes in this and all previous releases. diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index d2e8728dde38..eba9c9cb1448 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -119,7 +119,7 @@ #define PACKAGE_NAME "Kyua" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Kyua 0.15.0" +#define PACKAGE_STRING "Kyua 0.15.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "kyua" @@ -128,7 +128,7 @@ #define PACKAGE_URL "https://github.com/freebsd/kyua/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.15.0" +#define PACKAGE_VERSION "0.15.1" /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -136,4 +136,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.15.0" +#define VERSION "0.15.1" diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1 index ba3041f14447..c914fa33374e 100644 --- a/contrib/kyua/doc/kyua-about.1 +++ b/contrib/kyua/doc/kyua-about.1 @@ -48,7 +48,7 @@ The name of the package, which is .Sq kyua . .It The version number, which is -.Sq 0.15.0 . +.Sq 0.15.1 . .It License information. .It diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp index 6bd3d4dc0731..2e0e56d22f46 100644 --- a/contrib/kyua/drivers/debug_test.cpp +++ b/contrib/kyua/drivers/debug_test.cpp @@ -42,6 +42,7 @@ #include "utils/format/macros.hpp" #include "utils/fs/auto_cleaners.hpp" #include "utils/optional.ipp" +#include "utils/sanity.hpp" namespace config = utils::config; namespace fs = utils::fs; @@ -103,6 +104,8 @@ drivers::debug_test::drive(engine::debugger_ptr debugger, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + if (test_result_handle == nullptr) + UNREACHABLE_MSG("Expected a test result handle from the scheduler"); const model::test_result test_result = test_result_handle->test_result(); result_handle->cleanup(); diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp index 3af9a1268815..b5231ac07f92 100644 --- a/contrib/kyua/drivers/run_tests.cpp +++ b/contrib/kyua/drivers/run_tests.cpp @@ -50,6 +50,7 @@ #include "utils/noncopyable.hpp" #include "utils/optional.ipp" #include "utils/passwd.hpp" +#include "utils/sanity.hpp" #include "utils/text/operations.ipp" namespace config = utils::config; @@ -202,6 +203,8 @@ finish_test(scheduler::result_handle_ptr result_handle, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + if (test_result_handle == nullptr) + UNREACHABLE_MSG("Expected a test result handle from the scheduler"); put_test_result(test_case_id, *test_result_handle, tx); diff --git a/contrib/kyua/engine/atf_test.cpp b/contrib/kyua/engine/atf_test.cpp index 5f9b8c59663e..6c3f1cf03b06 100644 --- a/contrib/kyua/engine/atf_test.cpp +++ b/contrib/kyua/engine/atf_test.cpp @@ -150,6 +150,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/googletest.cpp b/contrib/kyua/engine/googletest.cpp index e050410ba1f5..37d979585718 100644 --- a/contrib/kyua/engine/googletest.cpp +++ b/contrib/kyua/engine/googletest.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest.hpp" diff --git a/contrib/kyua/engine/googletest_helpers.cpp b/contrib/kyua/engine/googletest_helpers.cpp index 129a08a89b7c..1a57fa0e977e 100644 --- a/contrib/kyua/engine/googletest_helpers.cpp +++ b/contrib/kyua/engine/googletest_helpers.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause extern "C" { #include diff --git a/contrib/kyua/engine/googletest_list.cpp b/contrib/kyua/engine/googletest_list.cpp index f231cb9e7021..6c006687fe49 100644 --- a/contrib/kyua/engine/googletest_list.cpp +++ b/contrib/kyua/engine/googletest_list.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_list.hpp" diff --git a/contrib/kyua/engine/googletest_list_test.cpp b/contrib/kyua/engine/googletest_list_test.cpp index 5052c2f133ad..d5e9545b15ba 100644 --- a/contrib/kyua/engine/googletest_list_test.cpp +++ b/contrib/kyua/engine/googletest_list_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_list.hpp" diff --git a/contrib/kyua/engine/googletest_result.cpp b/contrib/kyua/engine/googletest_result.cpp index a1fc1f72da4d..9616fc292b86 100644 --- a/contrib/kyua/engine/googletest_result.cpp +++ b/contrib/kyua/engine/googletest_result.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_result.hpp" @@ -53,21 +30,46 @@ using utils::optional; namespace { -/// Internal string for specifying invalid output. -const std::string invalid_output_message = "invalid output"; - /// Regular expression for disabled tests line. const std::regex disabled_re( R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE" ); +/// Regular expression for buggy skipped message output. Should be resolved via +/// google/googletest#5098 . +const std::regex global_env_buggy_skip_prefix_re( + R"RE(.+: Skipped\n)RE" +); + +/// Regular expression for starting sentinel for Global test environment. +const std::regex global_env_context_start_re( + R"(\[\-+\][[:space:]]+Global test environment set-up)" +); + +/// Regular expression for ending sentinel for Global test environment. +const std::regex global_env_context_end_re( + R"(\[\-+\][[:space:]]+Global test environment tear-down)" +); + +// CHECK_STYLE_DISABLE + +/// Regular expression for setup or teardown fixtures that fail for test +/// suites. +/// +/// This only applies to the failure result type, not the other ones. +const std::regex suite_setup_or_teardown_failure_re( + R"RE(\[[[:space:]]+FAILED[[:space:]]+\][[:space:]]+[^:]+:[[:space:]]SetUpTestSuite or TearDownTestSuite)RE" +); + +// CHECK_STYLE_ENABLE + /// Regular expression for starting sentinel of results block. -const std::regex starting_sentinel_re( - R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)" +const std::regex test_context_start_re( + R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[^[:space:]]+)" ); /// Regular expression for ending sentinel of results block. -const std::regex ending_sentinel_re( +const std::regex test_context_end_re( R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE" ); @@ -89,10 +91,13 @@ parse_without_reason(const std::string& status, const std::string& rest) if (status == "skipped") return engine::googletest_result(engine::googletest_result::skipped); - else { - INV(status == "successful"); + else if (status == "successful") return engine::googletest_result(engine::googletest_result::successful); - } + else if (status == "failed") + return engine::googletest_result(engine::googletest_result::failed); + else + return engine::googletest_result(engine::googletest_result::broken, + F("bad status: '%s'; output was:\n%s") % status % rest); } @@ -121,8 +126,10 @@ parse_with_reason(const std::string& status, const std::string& rest) return googletest_result(googletest_result::failed, rest); else if (status == "skipped") return googletest_result(googletest_result::skipped, rest); + else if (status == "successful") + return googletest_result(googletest_result::successful, rest); else - PRE_MSG(false, "Unexpected status"); + PRE_MSG(false, F("Unexpected status: %s") % status); } @@ -178,6 +185,9 @@ engine::googletest_result::googletest_result( /// have a bug), and thus why they are reported as broken instead of just failed /// (which is a legitimate result for a test case). /// +/// TODO(ngie): replace ad hoc output format parsing with a structured file +/// format, e.g., JSON or XML. +/// /// \param input The stream to read from. /// /// \return A generic representation of the result of the test case. @@ -187,6 +197,7 @@ engine::googletest_result engine::googletest_result::parse(std::istream& input) { std::vector lines; + std::string all_context; do { std::string line; @@ -194,50 +205,107 @@ engine::googletest_result::parse(std::istream& input) if (!input.eof()) line.push_back('\n'); lines.push_back(line); + all_context += line; } while (input.good()); - bool capture_context = false; - bool valid_output = false; std::string context, status; + bool capture_immediate_context = false; + bool global_env_message_start_seen = false; + bool valid_output = false; for (auto& line: lines) { + // FIXME: drop the line-by-line parsing and just use multiline regular + // expressions with associated matching or just bite the bullet and + // switch to a structured format like JSON or XML. std::smatch matches; - if (regex_search(line, matches, disabled_re)) { + if (std::regex_search(line, global_env_context_start_re)) { + global_env_message_start_seen = true; + // Issue 326: it's a common pattern for folks to use GoogleTest + // Environments to run checks and skip entire test suites if + // preconditions aren't met. We need to start capturing the context + // in this block, just in case no testcases are run. + // + // In the event test output is found later on, the context will be + // reset by design. + capture_immediate_context = true; + context = ""; + continue; + } + + if (std::regex_search(line, matches, disabled_re)) { context = matches[1]; status = "disabled"; valid_output = true; break; } - if (regex_search(line, matches, starting_sentinel_re)) { - capture_context = true; + + if (!global_env_message_start_seen) { + continue; + } + + if (std::regex_search(line, test_context_start_re)) { + capture_immediate_context = true; + // (Re)set the context to ensure that the test result information + // doesn't show up in the context parsed by kyua. context = ""; continue; } - if (regex_search(line, matches, ending_sentinel_re)) { + if (std::regex_search(line, matches, test_context_end_re)) { std::string googletest_res = matches[1]; + if (googletest_res == "OK") { - context = ""; status = "successful"; } else if (googletest_res == "FAILED") { status = "failed"; } else { - INV(googletest_res == "SKIPPED"); + INV_MSG(googletest_res == "SKIPPED", + F("expected SKIPPED; got %s") % googletest_res); status = "skipped"; } - capture_context = false; + capture_immediate_context = false; + } + if (std::regex_search(line, global_env_context_end_re)) { + capture_immediate_context = false; valid_output = true; + // Keep scanning in case, in case we run into + // `suite_setup_or_teardown_failure_re`. } - if (capture_context) { + + if (std::regex_search(line, suite_setup_or_teardown_failure_re)) { + // Any failure context should get printed out earlier on, but in + // the event it isn't, just dump the whole test output for sanity's + // sake/debuggability. + if (context.empty()) { + context = \ + F("kyua: could not 'summarize' failure context; " + "see full process output for more details:\n\n%s") % + all_context; + } + status = "failed"; + } + + if (capture_immediate_context) { context += line; } } + if (!valid_output) { - context = invalid_output_message; + context = googletest_invalid_output_message; status = "broken"; + } else { + // See Issue 326 comments. + if (std::regex_search(context, global_env_buggy_skip_prefix_re)) { + // It is easier to replace the existing string instead of + // extracting the multiline match. + context = std::regex_replace(context, + global_env_buggy_skip_prefix_re, ""); + status = "skipped"; + } } if (status == "skipped" && context.empty()) - context = bogus_googletest_skipped_nul_message; + context = googletest_bogus_skipped_nul_message; + if (context.empty()) return parse_without_reason(status, context); else @@ -388,18 +456,21 @@ engine::googletest_result::apply(const optional< process::status >& status) model::test_result engine::googletest_result::externalize(void) const { + + // FIXME(ngie,#323): some of these test result types may require a reason, and thus the + // `.get()` -> `.get_default("")` change might be a bug. switch (_type) { case googletest_result::broken: - return model::test_result(model::test_result_broken, _reason.get()); + return model::test_result(model::test_result_broken, _reason.get_default("")); case googletest_result::disabled: - return model::test_result(model::test_result_skipped, _reason.get()); + return model::test_result(model::test_result_skipped, _reason.get_default("")); case googletest_result::failed: - return model::test_result(model::test_result_failed, _reason.get()); + return model::test_result(model::test_result_failed, _reason.get_default("")); case googletest_result::skipped: - return model::test_result(model::test_result_skipped, _reason.get()); + return model::test_result(model::test_result_skipped, _reason.get_default("")); case googletest_result::successful: return model::test_result(model::test_result_passed); @@ -486,16 +557,16 @@ engine::calculate_googletest_result( googletest_result result(googletest_result::broken, "Unknown result"); try { result = googletest_result::load(results_file); - /// atf_result.cpp handles this by side-effect by setting a broken - /// result with "", which results in a std::runtime_error throw from - /// atf_result::parse(..). googletest_result::parse doesn't do that and - /// instead returns a broken result with a reason of - /// `invalid_output_message`, so that case needs to be tested for after - /// the fact to make sure the reason why `invalid_output_message` was - /// because of a program that crashed or failed. + // atf_result.cpp handles this by side-effect by setting a broken + // result with "", which results in a std::runtime_error throw from + // atf_result::parse(..). googletest_result::parse doesn't do that and + // instead returns a broken result with a reason of + // `googletest_invalid_output_message`, so that case needs to be + // tested for after the fact to confirm whether or not program crashed + // or failed. if (result.type() == googletest_result::broken && body_status) { const optional< std::string >& reason = result.reason(); - if (reason && reason.get() == invalid_output_message) { + if (reason && reason.get() == googletest_invalid_output_message) { result = googletest_result( googletest_result::broken, F("Error: Premature exit. Test case %s") % @@ -506,11 +577,11 @@ engine::calculate_googletest_result( if (body_status) result = googletest_result(googletest_result::broken, F("Error: %s. Test case %s") % - error.what() % + error.what() % format_status(body_status.get())); - else { + else { // The test case timed out. apply() handles this case later. - } + } } catch (const std::runtime_error& error) { if (body_status) result = googletest_result( diff --git a/contrib/kyua/engine/googletest_result.hpp b/contrib/kyua/engine/googletest_result.hpp index 325995be3221..f296ea701203 100644 --- a/contrib/kyua/engine/googletest_result.hpp +++ b/contrib/kyua/engine/googletest_result.hpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause /// \file engine/googletest_result.hpp /// Functions and types to process the results of googletest-based test cases. @@ -99,11 +76,13 @@ model::test_result calculate_googletest_result( const utils::optional< utils::process::status >&, const utils::fs::path&); +/// Internal string for specifying invalid output. +const std::string googletest_invalid_output_message = "invalid output"; /// A bogus identifier for nul reasons provided by the test writer. /// /// TODO: Support nul messages with skipped results in the schema, etc. -const std::string bogus_googletest_skipped_nul_message = "\n"; +const std::string googletest_bogus_skipped_nul_message = "\n"; } // namespace engine diff --git a/contrib/kyua/engine/googletest_result_test.cpp b/contrib/kyua/engine/googletest_result_test.cpp index 90bc2cc62b7d..0398a11359ee 100644 --- a/contrib/kyua/engine/googletest_result_test.cpp +++ b/contrib/kyua/engine/googletest_result_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest_result.hpp" @@ -96,7 +73,8 @@ parse_ok_test(const engine::googletest_result::types& exp_type, PARSE(broken, - engine::googletest_result::broken, "invalid output", + engine::googletest_result::broken, + engine::googletest_invalid_output_message.c_str(), "invalid input"); const char disabled_context[] = ( @@ -150,6 +128,71 @@ PARSE(failed, engine::googletest_result::failed, failed_context, failed_message); +// CHECK_STYLE_DISABLE +#if 0 +const char failed_parameterized_context[] = ( +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +); +#else +const char failed_parameterized_context[] = ( +"kyua: could not 'summarize' failure context; see full process output for more details:\n" +"\n" +"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n" +"[ RUN ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[ OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n" +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +"[ FAILED ] 0 tests, listed below:\n" +"\n" +" 0 FAILED TESTS\n" +"[ FAILED ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n" +"\n" +" 1 FAILED TEST SUITE\n" +); +#endif + +const char failed_parameterized_message[] = ( +"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n" +"[ RUN ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n" +"[ OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n" +"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n" +"Expected: (global_count_) >= (2), actual: 1 vs 2\n" +"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n" +"\n" +"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +"[ FAILED ] 0 tests, listed below:\n" +"\n" +" 0 FAILED TESTS\n" +"[ FAILED ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n" +"\n" +" 1 FAILED TEST SUITE\n" +); +// CHECK_STYLE_ENABLE + +PARSE(failed_parameterized, + engine::googletest_result::failed, failed_parameterized_context, + failed_parameterized_message); + const char skipped_message[] = ( "Note: Google Test filter = SkipTest.DoesSkip\n" "[==========] Running 1 test from 1 test suite.\n" @@ -168,7 +211,7 @@ const char skipped_message[] = ( PARSE(skipped, engine::googletest_result::skipped, - engine::bogus_googletest_skipped_nul_message.c_str(), + engine::googletest_bogus_skipped_nul_message.c_str(), skipped_message ); @@ -197,6 +240,36 @@ PARSE(skipped_with_reason, engine::googletest_result::skipped, skipped_with_reason_context, skipped_with_reason_message); +// Issue 326: test suites built against 0.18.0 which skip in +// `Environment::SetUp` misreport tests passing instead of being skipped. +// +// https://github.com/google/googletest/issues/4653 +const char skipped_from_environment_with_buggy_output_context[] = ( +"current user is not allowed to mount\n" +"\n" +"current user is not allowed to mount\n" +"\n" +); + +const char skipped_from_environment_with_buggy_output_message[] = ( +"Note: Google Test filter = Setattr.eacces\n" +"[==========] Running 1 test from 1 test suite.\n" +"[----------] Global test environment set-up.\n" +"/usr/src/tests/sys/fs/fusefs/utils.cc:95: Skipped\n" +"current user is not allowed to mount\n" +"\n" +"current user is not allowed to mount\n" +"\n" +"[----------] Global test environment tear-down\n" +"[==========] 1 test from 1 test suite ran. (0 ms total)\n" +"[ PASSED ] 1 test.\n" +); + +PARSE(skipped_from_environment_with_buggy_output, + engine::googletest_result::skipped, + skipped_from_environment_with_buggy_output_context, + skipped_from_environment_with_buggy_output_message); + const char successful_message[] = ( "Note: Google Test filter = PassFailTest.Passes\n" "[==========] Running 1 test from 1 test case.\n" @@ -251,7 +324,11 @@ PARSE(successful_parameterized, engine::googletest_result::successful, NULL, successful_parameterized_message); -const char successful_message_with_reason[] = ( +const char successful_with_reason_context[] = ( +"This is a reason\n" +); + +const char successful_with_reason_message[] = ( "Note: Google Test filter = PassFailTest.PassesWithReason\n" "[==========] Running 1 test from 1 test suite.\n" "[----------] Global test environment set-up.\n" @@ -267,8 +344,9 @@ const char successful_message_with_reason[] = ( ); PARSE(successful_with_reason, - engine::googletest_result::successful, NULL, - successful_message_with_reason); + engine::googletest_result::successful, + successful_with_reason_context, + successful_with_reason_message); ATF_TEST_CASE_WITHOUT_HEAD(googletest_result__load__ok); ATF_TEST_CASE_BODY(googletest_result__load__ok) @@ -403,7 +481,10 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, googletest_result__parse__broken); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__disabled); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed); + ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed_parameterized); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped); + ATF_ADD_TEST_CASE(tcs, + googletest_result__parse__skipped_from_environment_with_buggy_output); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped_with_reason); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful); ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful2); diff --git a/contrib/kyua/engine/googletest_test.cpp b/contrib/kyua/engine/googletest_test.cpp index 3af4d6801e70..0e74dc80ce6a 100644 --- a/contrib/kyua/engine/googletest_test.cpp +++ b/contrib/kyua/engine/googletest_test.cpp @@ -1,30 +1,7 @@ -// Copyright 2024 The Kyua Authors. +// Copyright 2026 The Kyua Authors. // All rights reserved. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-2-Clause #include "engine/googletest.hpp" @@ -146,6 +123,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/plain_test.cpp b/contrib/kyua/engine/plain_test.cpp index cc3326e4c581..b9c81747bd2c 100644 --- a/contrib/kyua/engine/plain_test.cpp +++ b/contrib/kyua/engine/plain_test.cpp @@ -99,6 +99,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name, const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: "); atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: "); ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); diff --git a/contrib/kyua/engine/scanner_test.cpp b/contrib/kyua/engine/scanner_test.cpp index f79717eca49e..6d8aba1ac2e0 100644 --- a/contrib/kyua/engine/scanner_test.cpp +++ b/contrib/kyua/engine/scanner_test.cpp @@ -327,6 +327,7 @@ ATF_TEST_CASE_BODY(scanner__no_filters__verify_lazy_loads) iter != results.end(); ++iter) { const mock_test_program* mock_program = dynamic_cast< const mock_test_program* >((*iter).first.get()); + ATF_REQUIRE(mock_program != nullptr); ATF_REQUIRE_EQ(1, mock_program->num_calls()); } } diff --git a/contrib/kyua/engine/scheduler_test.cpp b/contrib/kyua/engine/scheduler_test.cpp index 93e7627f291a..ed7d23ccc0fa 100644 --- a/contrib/kyua/engine/scheduler_test.cpp +++ b/contrib/kyua/engine/scheduler_test.cpp @@ -577,6 +577,7 @@ ATF_TEST_CASE_BODY(integration__run_one) const scheduler::test_result_handle* test_result_handle = dynamic_cast< const scheduler::test_result_handle* >( result_handle.get()); + ATF_REQUIRE(test_result_handle != nullptr); ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid()); *** 171 LINES SKIPPED *** From nobody Mon Nov 23 05:57:31 2026 X-Original-To: dev-commits-src-branches@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 4jXwFm17v0z720xB for ; Mon, 23 Nov 2026 05:57:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFl5F2Rz4W1P for ; Mon, 23 Nov 2026 05:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413451; 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=lhpEAlXYR5XEYUY7I+jFX8Anv9XLajvAyDt6Rd93csI=; b=hy2IO9Ul4bPOGC2wlyBvxAHMMbaXPC/G/PncrZKuD5CgYXdi9AWpEMg7fOlJ0IoaPrYmpJ VxTdbSqaVc5VDeBkoNkXf3X1kUWrVzP0gqU5hYumKGUn3urA7MxVlu5cc+F9anrBE2MWJ1 bxYzxlX2spaAg1LcNXD0T/1skH5lVTRyAc3/qimfEDLGiAHD0FoB/QlqYvEnxwahwelUpV DVRFjTdf8e2v4igSA3f98pvO9r0N+38PLyRZeWP1UV2x/+/8JSvdYrVHkkrRwpdeWaqsma Gg9I1N90y847yh4Eu6BpzfCU0VGj2sLv8bbdhPUwU2ST9xTnTg5rKdMUhOg6eg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413451; b=spwx1vULQijH0hfv/UQ7cKHC2MFwAC9tWtXF13dzjgpqPjmWSbS2bqdYQtgNbF7AECi/Xf a3YZMyKsp/MY1lF8u4cNBHisQisKrEE9+NghPLuMXRRhcLU9HfBSNI9IeS36d9cIdEdPv8 7WWwA8/WcsO/vZA6dMRr2zLdL6AVZrLh3F3jj7TdnTzcHf2ln87Wi9hB9gBQkKFN7hbS3r 4vdEmRS+JS0Xuy1slMNVGOV5plWDiodcGVWK1dUFaBnv6i4jcW9ubg8Sn5Tp1bMy6OYGZ9 qNQinWBh1fjI/4ebo+6t2y4L/it5/MJX/Fvuaqr/o1+jUTVGQ1HrQN9CcGLlXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413451; 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=lhpEAlXYR5XEYUY7I+jFX8Anv9XLajvAyDt6Rd93csI=; b=NjM5f1nGtObAGTXvzzJRF17y/q7QYc1UhkBXJi6MQq94exb2KP1hR3MPYz9Th7Inlw7XhV u52G2vcXKUuf4sAqB+seBsFmWT0w7efc4H6sF26zjp8aaxKhHhlJDM0931FewNburIIvwF PsJ7ptlx3q48hYV5QEW+EsYVyTM+4qFFaKXWp2XXVitv00HaWksPRvHTySq4syS/HZpgv0 mxbtFyY1emzBRL4JfgW8fTytm8krqcJq5xIofQuDWZaEB/1YvW8H2svBR7cICKGuSXpOw4 MmvZHRTowrrP6I9S4+LpR0Ia3CN+z9IcKN9fNCO1+EwGO4DPV8I9U1H0Yir4UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFl4vSgzfJm for ; Mon, 23 Nov 2026 05:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f226 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 0fb56a7b2991 - stable/14 - [tests] switch GoogleTest tests to `googletest` interface List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0fb56a7b2991b297c30158ac6a020a96dad7b333 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:31 +0000 Message-Id: <6b03d5cb.1f226.4768dcc2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0fb56a7b2991b297c30158ac6a020a96dad7b333 commit 0fb56a7b2991b297c30158ac6a020a96dad7b333 Author: Enji Cooper AuthorDate: 2026-10-07 18:53:15 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:28 +0000 [tests] switch GoogleTest tests to `googletest` interface The new `googletest` kyua test interface--added in 0.15.0 and fixed in 0.15.1--allows tests to be executed and handled in a more fine-grained manner than the way it was prior to this commit. This change deletes the `capsicum-test` ATF wrapper script, `functional.sh`, and all supporting logic in `googletest.test.mk` as well as this change makes that logic unnecessary. MFC after: 1 month MFC with: b68969979d6b ("contrib/kyua: update to 0.15.1") (cherry picked from commit 3fb03fb35b20d259e0a3a07fc48f2ecc3c5da6e8) --- share/mk/googletest.test.mk | 11 +------- tests/sys/capsicum/Makefile | 1 - tests/sys/capsicum/functional.sh | 60 ---------------------------------------- 3 files changed, 1 insertion(+), 71 deletions(-) diff --git a/share/mk/googletest.test.mk b/share/mk/googletest.test.mk index 026f6dcacce3..b21576112a78 100644 --- a/share/mk/googletest.test.mk +++ b/share/mk/googletest.test.mk @@ -6,10 +6,6 @@ # GoogleTest is a C++ test framework, thus, it does not describe/articulate how # to write tests in other languages, e.g., C or shell, unlike the ATF, plain, # and TAP raw test interfaces. -# -# For now this is a thin wrapper around the `plain` test interface, but in the -# future this will rely on a newer version of kyua which will integrate in -# GoogleTest support. .if !target(____) .error googletest.test.mk cannot be included directly. @@ -34,13 +30,8 @@ BINDIR.${_T}= ${TESTSDIR} CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS} MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.cc -.if !empty(GTESTS_WRAPPER_SH.${_T}) -# A stopgap/workaround to let kyua execute test case one by one -ATF_TESTS_SH+= ${GTESTS_WRAPPER_SH.${_T}} -.else _TESTS+= ${_T} -TEST_INTERFACE.${_T}= plain -.endif +TEST_INTERFACE.${_T}= googletest .endfor .endif diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 72da640437ac..8309d9a190e9 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -11,7 +11,6 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no GTESTS+= capsicum-test -GTESTS_WRAPPER_SH.capsicum-test= functional # This test script runs the same test suite twice, once as root and once as an # unprivileged user. Serialize them since some tests access global namespaces, # e.g., mqueuefs, and can trample on each other. diff --git a/tests/sys/capsicum/functional.sh b/tests/sys/capsicum/functional.sh deleted file mode 100755 index 8d4a7eef2dec..000000000000 --- a/tests/sys/capsicum/functional.sh +++ /dev/null @@ -1,60 +0,0 @@ -#- -# SPDX-License-Identifier: BSD-2-Clause -# -# Copyright (c) 2020 The FreeBSD Foundation -# -# This software was developed by Li-Wen Hsu -# under sponsorship from the FreeBSD Foundation. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -CAPSICUM_TEST_BIN=capsicum-test - -atf_test_case "test_root" -test_root_head() { - - atf_set descr 'Run capsicum-test as root' - atf_set require.user root -} - -test_root_body() { - atf_check -s exit:0 -o match:PASSED -e ignore \ - "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u tests)" -} - -atf_test_case "test_unprivileged" -test_unprivileged_head() { - - atf_set descr 'Run capsicum-test as an unprivileged user' - atf_set require.user unprivileged -} - -test_unprivileged_body() { - atf_check -s exit:0 -o match:PASSED -e ignore \ - "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u)" -} - -atf_init_test_cases() { - atf_add_test_case test_root - atf_add_test_case test_unprivileged -} From nobody Mon Nov 23 05:57:32 2026 X-Original-To: dev-commits-src-branches@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 4jXwFn3ZYJz720jt for ; Mon, 23 Nov 2026 05:57:33 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFm5xQ3z4W3D for ; Mon, 23 Nov 2026 05:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413452; 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=ek0Q/NBGxMhbXrg+1BeUbqYaWkRMwSg9/kB1KV7ZRJ4=; b=Szi4ny8nOdlZWjrLM1hhcSVLKN2+ILNDNyN4N/S76AkK7IFGe/+atdI6HL/Sf1SFXswjA4 rVB3tOTgAdSWJlzrtxaFZD4F8x6sg7/4LQgJ9eRFNwyhU8BPzdLf/W2zam0vwbgDNnYAaS hHd/X6jiMpIl1UFrF0RflUKN6MqlPvK2lFe9g4fm8cmLJW0Ulgkeb0PG0fUo+E6kJaBNxz liCbOPHCFRSAWZedAFmFAHVOKuQJqqiOYlwMVHvwJfDHcR7fiYXzRnbFmpvwrrINMBF8Jr FokDSxn2puGz4hvehPhm3imEVzy//RzY3SLSu/+0JkSRRKF5FDAizLxvmjSGAA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413452; b=wIdIBI0dFQ8/9JDXoPd7eqGIiFZ4MTpcbMztvJK40megGEKESb2iLHldUrLm8tNifshgzf WXv4UlBGMtdu1y3dQQvq9eQDpiIZlZKdBsgQthrmiwwtAwE0EythehNpQdI5s+8smdqEkI 9NUg561tLDT1xNvcQGiEwJs0nQCmlcbftnPsQRkett8WHDi6OQz+qJiRhizsHOO0axAr+M xVa0mwVAMZChYf8b9oQUC37bonbF02nF1Z+35TyOovphSysaftZyOBpd7x/L+vD9/o57/8 A5r+Prt2rWceUKKWySzN1WhHHcRRwVM4h4mAMbz9mMZBzjwDnaoW5RnZZ7+Ktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413452; 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=ek0Q/NBGxMhbXrg+1BeUbqYaWkRMwSg9/kB1KV7ZRJ4=; b=xsPoQU2jBgXHF/xuyf1ms8rFUTmYAx7/cmrOUtSbtODtE6pRa6MMDMlnJjpdOtBSU+JRYk lD3Wm3KhY3ABasMg1mUiuHuHih1owgpXjtuSTwTVU8f3jOz9ABxRNXxhSZz7Q1rX2iYTl2 Kmj99rsZTibNrbhj6Mp9PZJ5LZcn6r9/mbXCSy2Wc4c65/WqxhyQgz7bguykuZxDeBgjTD meEq9r0ZGGg2fbq+59bMEmWdbdY8LeJNrCmbk7PYFG/OJUHi4ZqlCYKSBO/B5w3lnDLWMk NjMAhy+oot9kcrtmjMMaeU8vMvbV1idx6Tg3w58Htg1VMhOZwKCswZzvNmdn8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFm5G9Kzdym for ; Mon, 23 Nov 2026 05:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f9b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 906dced78237 - stable/14 - GoogleTest: run several tests as plain C++ tests List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 906dced7823773de1747699aa9e68b664bbe6d3f Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:32 +0000 Message-Id: <6b03d5cc.1f9b6.2de592e8@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=906dced7823773de1747699aa9e68b664bbe6d3f commit 906dced7823773de1747699aa9e68b664bbe6d3f Author: Enji Cooper AuthorDate: 2026-10-09 21:33:50 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:28 +0000 GoogleTest: run several tests as plain C++ tests Some of the tests provided by GoogleTest don't play well with the kyua GoogleTest engine available in 0.15.0, in part because they test edgecases that the kyua GoogleTest engine does not expect or handle gracefully. Treat the tests as plain C++ tests to keep parity (result-wise) before switching the testcase type from `plain` (what it is today under the covers) to `googletest`. MFC after: 1 month MFC with: 3fb03fb35b20 ("[tests] switch GoogleTest tests to ...") (cherry picked from commit eecc84de3572d1ee6caac1fa14dd3140c9601c9c) --- lib/googletest/tests/gmock/Makefile | 3 ++- lib/googletest/tests/gtest/Makefile | 21 ++++++++++++++------- lib/googletest/tests/gtest_main/Makefile | 17 ++++++++++++----- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile index 5df1f48c0e4a..672cd66ec44f 100644 --- a/lib/googletest/tests/gmock/Makefile +++ b/lib/googletest/tests/gmock/Makefile @@ -3,7 +3,8 @@ .PATH: ${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test -GTESTS+= gmock_stress_test +# This doesn't work with the googletest engine in kyua 0.15.0. +PLAIN_TESTS_CXX+= gmock_stress_test LIBADD+= pthread gtest gmock diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile index 0000167dfe70..9fd25304a6bd 100644 --- a/lib/googletest/tests/gtest/Makefile +++ b/lib/googletest/tests/gtest/Makefile @@ -3,14 +3,21 @@ .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test -GTESTS+= gtest_environment_test -GTESTS+= gtest_no_test_unittest -GTESTS+= googletest-param-test-test GTESTS+= gtest_premature_exit_test -GTESTS+= gtest_repeat_test -GTESTS+= gtest_stress_test -GTESTS+= gtest_throw_on_failure_ex_test -GTESTS+= gtest-unittest-api_test +# These test scenarios are't handled properly with the googletest engine in +# kyua 0.15.0. +PLAIN_TESTS_CXX+= gtest_environment_test +PLAIN_TESTS_CXX+= gtest_no_test_unittest +PLAIN_TESTS_CXX+= gtest_throw_on_failure_ex_test + +# NOTE: these tests rely on testing by side-effect with global variables/state +# used in multiple testcases. +# +# Running this plain C++ tests gets around that problem. +PLAIN_TESTS_CXX+= googletest-param-test-test +PLAIN_TESTS_CXX+= gtest_repeat_test +PLAIN_TESTS_CXX+= gtest_stress_test +PLAIN_TESTS_CXX+= gtest-unittest-api_test CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile index 3124042f8b95..58e84458a86d 100644 --- a/lib/googletest/tests/gtest_main/Makefile +++ b/lib/googletest/tests/gtest_main/Makefile @@ -4,8 +4,6 @@ .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test GTESTS+= googletest-death-test-test -GTESTS+= googletest-filepath-test -GTESTS+= googletest-listener-test GTESTS+= googletest-message-test GTESTS+= googletest-options-test GTESTS+= googletest-port-test @@ -15,10 +13,19 @@ GTESTS+= gtest-typed-test_test GTESTS+= gtest_main_unittest GTESTS+= gtest_pred_impl_unittest GTESTS+= gtest_prod_test -GTESTS+= gtest_skip_test -GTESTS+= gtest_skip_in_environment_setup_test GTESTS+= gtest_sole_header_test -GTESTS+= gtest_unittest + +# Crashes when listing testcases using googletest engine in kyua 0.15.0 +# (probably test bugs). +PLAIN_TESTS_CXX+= googletest-filepath-test +PLAIN_TESTS_CXX+= googletest-listener-test +# These test scearios don't work with the googletest engine in kyua 0.15.0. +PLAIN_TESTS_CXX+= gtest_skip_in_environment_setup_test +PLAIN_TESTS_CXX+= gtest_skip_test +# Some of the test scenarios show up as "skipped", when in reality they're just +# testing skipped functionality. Don't inflate the testcase numbers +# unnecessarily as it can serve to confuse downstream users. +PLAIN_TESTS_CXX+= gtest_unittest CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} From nobody Mon Nov 23 05:57:33 2026 X-Original-To: dev-commits-src-branches@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 4jXwFp2dYBz720v0 for ; Mon, 23 Nov 2026 05:57:34 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFn6zH5z4Vyw for ; Mon, 23 Nov 2026 05:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413454; 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=V1OCeBZr2r7ZZPcphVoGlDQXyvIuyn3oE+9GfkbJQOE=; b=UuEZuUg8tArx3uDTWwI5l0unAevJkBypaxkWpciOI/3OMuCqOaj7qEq5ZlqHTkvIlxz1fO SiCe8aV3wFXSZM10fax7jnSbLzq/WGEft5eCyS5MpimLyyCbbBGcnu01CiQ0HcbGRevha2 vQ7fOaeFc/lyXYSU5sINZBbfTe0qFE2xhWlTFOWEoBpAy55miYcEeG3F6FNL8xSyk+251t sg3iF3uoJ0GNTeuO6rD+3Y+4qlsvZVOD0kcZZrPTwZ7LxpChRFVRVafJ9LPyXnfcONjEkx AcR5DGQa1aBwNhZtXY5++qnuNq4gLNeFaNel5eZa7iIbvPnzvkNIJQr9CGuEfw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413454; b=jaC1QL84vugGOm10d3103SbcLtQnSAp7tnjU5tjNFHJGHD4DTwm4B5/qw+2vyHA6GfOq3K 27IH7FLaR5IbbT7Wm/XTAfpqNkYFB3sR+gVHE4tmnIwrNo7euh4plpDtlXcF6+eSivBnkv NAr88EcqXuV/82LJ69slap8QV4hJzA68yf+IHEQbi+ieGPTXEhPIu26xXFRbYIux8aO34T i0Kwgi98UQVYm2aYz98fyoL2dWXpu4LQ9+UtlNaOl+fpPcBnfdG9eA6xtZiqSASElKObRo 7HKCjOF5fHps1OyUCVNhwE3duAYwkC/3jFY4juvNOus+KCZF/oyNtgI+Sodflg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413454; 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=V1OCeBZr2r7ZZPcphVoGlDQXyvIuyn3oE+9GfkbJQOE=; b=wq+uDl+HVHIB6JzoquRtE0EkRDt2sl8vXl8yMAfhRRkGxPvUNeejPjaznjmkzTUBLQQl0G GRkfrRP83no//4XxLeE0tg6dNh2mQRm8SiHDuSbqvoi5TV0nPxDKB4lhfcUB3TUerxwEem zQxZf6qBqXQmAM7MxrufhF1eAFH1TptikAJEc6dMS28mDefyyRZl6oT97HSY9ITnaSmySS 84lSdjRx/mLBqw7hFQaOLv6XIG8+Khy3y9gLPwBLSHXUMYm7SPw/fQ9T0k98nK+PJEHuMJ cuFrGA50+ulftA803qs0yxUDSX0aZPebNDqID3EXSyDnrU+aphd1ntIetsIJ3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFn5cfjzdwf for ; Mon, 23 Nov 2026 05:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 2ca11a16475a - stable/14 - tests/sys/capsicum: restore test coverage with root user List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ca11a16475a766256bd5c0354121bba9b95d890 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:33 +0000 Message-Id: <6b03d5cd.31.6a41f254@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca11a16475a766256bd5c0354121bba9b95d890 commit 2ca11a16475a766256bd5c0354121bba9b95d890 Author: Enji Cooper AuthorDate: 2026-11-10 01:55:45 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:28 +0000 tests/sys/capsicum: restore test coverage with root user This change builds capsicum_test and installs/runs it as an unprivileged user ("tests" in vanilla FreeBSD) and root. This required adjusting logic in the Makefile in order to build two binaries with the same sources and running them as separate binaries. Moreover, in order to restore coverage and ensure that some tests which require `other_uid` (typically specified via `-u` on the CLI with the test program) don't fail, become the "tests" user when run as root. This technically doesn't honor unprivileged_user property in kyua.conf: the property needs to be passed via a command-line parameter to the test program. MFC after: 1 week Reported by: markj Fixes: 3fb03fb35b20 ("[tests] switch GoogleTest tests ...") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61066 (cherry picked from commit 58e5c5cac1e7c8c99a6e7f8846b655afed05b74f) --- tests/sys/capsicum/Makefile | 27 ++++++++++++++++++--------- tests/sys/capsicum/capsicum-test-main.cc | 24 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 8309d9a190e9..d559a66d9c83 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -10,14 +10,11 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no -GTESTS+= capsicum-test -# This test script runs the same test suite twice, once as root and once as an -# unprivileged user. Serialize them since some tests access global namespaces, -# e.g., mqueuefs, and can trample on each other. -TEST_METADATA.functional+= is_exclusive="true" -TEST_METADATA.functional+= required_kmods="mqueuefs" +GTESTS+= capsicum-test_privileged +GTESTS+= capsicum-test_unprivileged -SRCS.capsicum-test+= \ +# SRCS required for `capsicum-test*`. +SRCS.capsicum-test= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ @@ -37,8 +34,20 @@ SRCS.capsicum-test+= \ overhead.cc \ rename.cc -LIBADD.capsicum-test+= gtest pthread procstat -TEST_METADATA.capsicum-test= required_user="unprivileged" +.for gtest in ${GTESTS} +SRCS.${gtest}= ${SRCS.capsicum-test} + +LIBADD.${gtest}+= gtest pthread procstat + +# This test script runs the same test suite twice, once as root and once as an +# unprivileged user. Serialize them since some tests access global namespaces, +# e.g., mqueuefs, and can trample on each other. +TEST_METADATA.${gtest}+= is_exclusive="true" +TEST_METADATA.${gtest}+= required_kmods="mqueuefs" +.endfor + +TEST_METADATA.capsicum-test_privileged+= required_user="root" +TEST_METADATA.capsicum-test_unprivileged+= required_user="unprivileged" .for p in mini-me mini-me.noexec mini-me.setuid PROGS+= $p diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc index 2a2c75000039..308c121a0281 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -136,6 +136,30 @@ int main(int argc, char* argv[]) { } } + // Last ditch effort to get an unprivileged user on the fly from /etc/passwd + // for testcases that need it. + // + // This must be done this way because the typical way of handling this (via + // the `-u` argument) isn't supported yet with kyua: + // https://github.com/freebsd/kyua/issues/354 . + // + // IMPORTANT: + // - this doesn't honor `unprivileged_user` in `kyua.conf`. + // - this doesn't fail because doing that could break all testing on systems + // where the `tests` user isn't available. + if (other_uid == 0) { + const char *test_user = "tests"; + + struct passwd *test_user_entry = getpwnam(test_user); + + if (test_user_entry) { + other_uid = test_user_entry->pw_uid; + } else { + std::cerr << "Failed to get entry for " << test_user << ", errno=" << errno << "; some tests may fail" << std::endl; + } + + } + testing::AddGlobalTestEnvironment(new SetupEnvironment()); return RUN_ALL_TESTS(); } From nobody Mon Nov 23 05:57:34 2026 X-Original-To: dev-commits-src-branches@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 4jXwFq0yt6z7210P for ; Mon, 23 Nov 2026 05:57:35 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFp6Sz2z4VkG for ; Mon, 23 Nov 2026 05:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413454; 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=N9kTrKlk3TFyYlAFC9Bco3Z9aqSGn4yR1Dv2Ms57hj8=; b=YbMuOjdRiub36xWPX9aVyXwSh40eeZzbXTejlIUcBylTSLTEqaoXfzPy9H1gHQYnkMFs+Q okvvjLmKtBC3G2ZM4LegLPIYHqGFsY3vAk49ZupwSLwYyFWndZM1llXxHzXJl4URq6DrFn MLBIpE4L1hLJ0wg1C69j6P4ybhtbAhrxSeeWwX+Mh1DvCWlCHstUNKB9+rU+zQwHyErzJr 2wIeAWiYNsvaJn0cyJwfL7lhtHfPPiFVEAlCl3Y3q/Yk5eMjJceg5zNieqFGeVn6kZuFIB eSP2r1NM8lPR2qCsdrWaRFwgyBJovY5NhzgDLU3rUTRPBHNVwpprExd5YoqJLw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413454; b=hgC4SnBOHscuzRqIn7ByR2X8r5ZAooqsReisXpfk7y4B1VM8OLu+0O5zFe4PttN/aCSEkK 6+V0FcnImYWA4H7E3vD2djs6ACW/+SA+pBecSCLAASEZPkmxfaeoMYPCk6VSbfy27L+wNh RhNopms0HepDKR/6g9khlkUaJ4qut27H8i/7DQek3h3W7j1WzeQtkxcHK6KppPq3PA89za VVQPETZVYZ1oh3nfiWN5xAWagZ5a+tRz8YtkU4zbVyZp73X6Eox6MTsxKwBmF1AceCuSEN BtLDB/WHph9q4BtFtax7OpZ9fKE520A9guklqJAn8Uf6IJAut59q/517xogZ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413454; 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=N9kTrKlk3TFyYlAFC9Bco3Z9aqSGn4yR1Dv2Ms57hj8=; b=WZkc0HQPUVsrO9/Wk9Lv3+fJIn7Rp+TMknt4q5iDGTM1GpvpNg6evCIt+KLoOWjqesZLDG dksTJzLmUMhvyW37Lo5qihTFz0+cLBqJZ6eoJR8OIb8zy6fNfVqK45mdOakgHMCK1GJTGs n92JaU9evzQ3BgDcInF2nJ//8BPp9nGFxu99Hsbl63cYGLJGj9u994nNJ8LBer5TlE6lJC Wu6zgns+JuDcjh9JqSt47v5ig2t5jBr20qITVMwg54bmSyyJc6WL/dfa9LM/rolADbJP3E /VY5kDcYwUiR2hFsruHQ1Lzge37ssMeLouGvJoZgsvCM5vtgFKWGDOiOEEZvUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFp60w1zfTK for ; Mon, 23 Nov 2026 05:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e67e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 90bdd1e79a98 - stable/14 - capsicum-test: make the code WARNS=6 clean List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 90bdd1e79a98eabb8a215750e7c9a46c96138c01 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:34 +0000 Message-Id: <6b03d5ce.1e67e.5ebdf36c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=90bdd1e79a98eabb8a215750e7c9a46c96138c01 commit 90bdd1e79a98eabb8a215750e7c9a46c96138c01 Author: Enji Cooper AuthorDate: 2026-11-10 01:52:55 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:28 +0000 capsicum-test: make the code WARNS=6 clean Make the code WARNS=6 clean by doing the following: - Renaming variables (-Wshadow). - Use memcpy instead of assigning the result of CMSG_DATA to a variable (-Wcast-align). - Wrap some macros with do-while(0) to avoid variable collisions (-Wshadow). - Push one of the TRACE statements up by 1 layer to avoid a collision between 2 calls of TRACE via the same overarching macro. This was needed in order for the code to build properly with D61066, since the code was not compiling with WARNS set to 3 at the testcase level. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61080 (cherry picked from commit 04c4b2084eb93fc2374dbb89f343f3941585a640) --- tests/sys/capsicum/capability-fd.cc | 10 +++-- tests/sys/capsicum/capmode.cc | 2 +- tests/sys/capsicum/capsicum-freebsd.h | 15 +++---- tests/sys/capsicum/capsicum-test-main.cc | 8 +++- tests/sys/capsicum/capsicum-test.h | 36 +++++++++++----- tests/sys/capsicum/fexecve.cc | 12 +++--- tests/sys/capsicum/procdesc.cc | 6 ++- tests/sys/capsicum/sctp.cc | 30 +++++++------- tests/sys/capsicum/socket.cc | 70 ++++++++++++++++---------------- 9 files changed, 107 insertions(+), 82 deletions(-) diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc index a9e4d30ac4b9..d79f3e4be917 100644 --- a/tests/sys/capsicum/capability-fd.cc +++ b/tests/sys/capsicum/capability-fd.cc @@ -974,6 +974,8 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { pid_t child = fork(); if (child == 0) { + int child_cap_fd; + // Child: enter cap mode EXPECT_OK(cap_enter()); // Child: send startup notification @@ -984,16 +986,16 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { EXPECT_OK(rc); EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen); cmptr = CMSG_FIRSTHDR(&mh); - int cap_fd = *(int*)CMSG_DATA(cmptr); + memcpy(&child_cap_fd, CMSG_DATA(cmptr), sizeof(child_cap_fd)); EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len); cmptr = CMSG_NXTHDR(&mh, cmptr); EXPECT_TRUE(cmptr == NULL); // Child: confirm we can do the right operations on the capability cap_rights_t rights; - EXPECT_OK(cap_rights_get(cap_fd, &rights)); + EXPECT_OK(cap_rights_get(child_cap_fd, &rights)); EXPECT_RIGHTS_EQ(&r_rs, &rights); - TryReadWrite(cap_fd); + TryReadWrite(child_cap_fd); // Child: acknowledge that we have received and tested the file descriptor SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_FD_RECEIVED); @@ -1024,7 +1026,7 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) { cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CMSG_LEN(sizeof(int)); - *(int *)CMSG_DATA(cmptr) = cap_fd; + memcpy(CMSG_DATA(cmptr), &cap_fd, sizeof(cap_fd)); buffer1[0] = 0; iov[0].iov_len = 1; int rc = sendmsg(sock_fds[1], &mh, 0); diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc index 89aa8f653dfc..60dabeb165a1 100644 --- a/tests/sys/capsicum/capmode.cc +++ b/tests/sys/capsicum/capmode.cc @@ -158,7 +158,7 @@ FORK_TEST_F(WithFiles, AllowedSocketSyscalls) { if (rc < 0) { EXPECT_EQ(EAGAIN, errno); } - char ch; + char ch = 'a'; EXPECT_OK(write(fd_file_, &ch, sizeof(ch))); // These calls will fail for lack of e.g. a proper name to send to, diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h index 9cb3149a05a4..82ee9cf9d91c 100644 --- a/tests/sys/capsicum/capsicum-freebsd.h +++ b/tests/sys/capsicum/capsicum-freebsd.h @@ -4,15 +4,15 @@ * FreeBSD Capsicum Functionality. ************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif +#include + +__BEGIN_DECLS /* FreeBSD definitions. */ -#include #include #include #include +#include #define AT_SYSCALLS_IN_CAPMODE #define HAVE_CAP_RIGHTS_GET @@ -27,9 +27,7 @@ typedef unsigned long cap_ioctl_t; #define HAVE_OPENAT_INTERMEDIATE_DOTDOT -#ifdef __cplusplus -} -#endif +__END_DECLS // Use fexecve_() in tests to allow Linux variant to bypass glibc version. #define fexecve_(F, A, E) fexecve(F, A, E) @@ -50,4 +48,7 @@ typedef unsigned long cap_ioctl_t; // FreeBSD generates a capability from sctp_peeloff(cap_fd,...). #define CAP_FROM_PEELOFF +#define HAVE_PIPE2 +#define HAVE_SEND_RECV_MMSG + #endif /*__CAPSICUM_FREEBSD_H__*/ diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc index 308c121a0281..a39e192aa385 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -75,12 +75,16 @@ std::string capsicum_test_bindir; // Adds a directory to $PATH. static void AddDirectoryToPath(const char *dir) { char *new_path, *old_path; + int rc [[maybe_unused]]; old_path = getenv("PATH"); assert(old_path); - assert(asprintf(&new_path, "%s:%s", dir, old_path) > 0); - assert(setenv("PATH", new_path, 1) == 0); + rc = asprintf(&new_path, "%s:%s", dir, old_path); + assert(rc != -1); + rc = setenv("PATH", new_path, 1); + assert(rc == 0); + free(new_path); } int main(int argc, char* argv[]) { diff --git a/tests/sys/capsicum/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h index 7433814b31c8..5503a7ef260f 100644 --- a/tests/sys/capsicum/capsicum-test.h +++ b/tests/sys/capsicum/capsicum-test.h @@ -67,7 +67,7 @@ const char *TmpFile(const char *pathname); // Implemented as a macro to allow access to the test case instance's // HasFailure() method, which is reported as the forked process's // exit status. -#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) \ +#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) do { \ pid_t pid = force_nofork ? 0 : fork(); \ if (pid == 0) { \ INNERCODE; \ @@ -95,10 +95,13 @@ const char *TmpFile(const char *pathname); strerror(errno), errno); \ ADD_FAILURE() << "Failed to wait for child"; \ } else { \ - int rc = WIFEXITED(status) ? WEXITSTATUS(status) : -1; \ - EXPECT_EQ(0, rc); \ + int exit_status = \ + WIFEXITED(status) ? WEXITSTATUS(status) : -1; \ + EXPECT_EQ(0, exit_status); \ } \ - } + } \ +} while (0) + #define _RUN_FORKED_MEM(THIS, TESTFN, TESTCASENAME, TESTNAME) \ _RUN_FORKED(MaybeRunWithThread(THIS, &TESTFN), TESTCASENAME, TESTNAME); #define _RUN_FORKED_FN(TESTFN, TESTCASENAME, TESTNAME) \ @@ -137,15 +140,28 @@ const char *TmpFile(const char *pathname); // Emit errno information on failure #define EXPECT_OK(v) EXPECT_LE(0, v) << " errno " << errno << " " << strerror(errno) -// Expect a syscall to fail with the given error. -#define EXPECT_SYSCALL_FAIL(E, C) \ +// Expect a syscall to fail with the given error (inner). +// +// This is required because unfortunately googletest "computes" trace variables +// using line numbers instead of another unique ID and 2 calls to +// `SCOPED_TRACE(..)` via the same macro results in `-Wshadow`-related compiler +// errors: https://github.com/google/googletest/issues/5143 +#define EXPECT_SYSCALL_FAIL_NO_TRACE(E, C) \ do { \ - SCOPED_TRACE(#C); \ EXPECT_GT(0, C); \ EXPECT_EQ(E, errno) << "expected '" << strerror(E) \ << "' but got '" << strerror(errno) << "'"; \ } while (0) +// Expect a syscall to fail with the given error (with tracing). +// +// See the comment above (for `EXPECT_SYSCALL_FAIL_NO_TRACE`). +#define EXPECT_SYSCALL_FAIL(E, C) \ + do { \ + SCOPED_TRACE(#C); \ + EXPECT_SYSCALL_FAIL_NO_TRACE((E), (C)); \ + } while (0) + // Expect a syscall to fail with anything other than the given error. #define EXPECT_SYSCALL_FAIL_NOT(E, C) \ do { \ @@ -169,9 +185,9 @@ const char *TmpFile(const char *pathname); SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \ const int result = openat((fd), (path), (flags)); \ if (((flags) & O_BENEATH) == O_BENEATH) { \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_O_BENEATH, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_O_BENEATH, result); \ } else { \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \ } \ if (result >= 0) { close(result); } \ } while (0) @@ -180,7 +196,7 @@ const char *TmpFile(const char *pathname); do { \ SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \ const int result = openat((fd), (path), (flags)); \ - EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ + EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \ if (result >= 0) { close(result); } \ } while (0) #endif diff --git a/tests/sys/capsicum/fexecve.cc b/tests/sys/capsicum/fexecve.cc index 86df2af06388..6ff5a657c35a 100644 --- a/tests/sys/capsicum/fexecve.cc +++ b/tests/sys/capsicum/fexecve.cc @@ -32,9 +32,9 @@ class Execve : public ::testing::Test { if (exec_fd_ < 0) { fprintf(stderr, "Error! Failed to open %s\n", exec_prog_.c_str()); } - argv_checkroot_[0] = (char*)exec_prog_.c_str(); - argv_fail_[0] = (char*)exec_prog_.c_str(); - argv_pass_[0] = (char*)exec_prog_.c_str(); + argv_checkroot_[0] = __DECONST(char*, exec_prog_.c_str()); + argv_fail_[0] = __DECONST(char*, exec_prog_.c_str()); + argv_pass_[0] = __DECONST(char*, exec_prog_.c_str()); } ~Execve() { if (exec_fd_ >= 0) { @@ -43,9 +43,9 @@ class Execve : public ::testing::Test { } } protected: - char* argv_checkroot_[3] = {nullptr, (char*)"--checkroot", nullptr}; - char* argv_fail_[3] = {nullptr, (char*)"--fail", nullptr}; - char* argv_pass_[3] = {nullptr, (char*)"--pass", nullptr}; + char* argv_checkroot_[3] = {nullptr, __DECONST(char*, "--checkroot"), nullptr}; + char* argv_fail_[3] = {nullptr, __DECONST(char*, "--fail"), nullptr}; + char* argv_pass_[3] = {nullptr, __DECONST(char*, "--pass"), nullptr}; std::string exec_prog_, exec_prog_noexec_, exec_prog_setuid_; int exec_fd_; }; diff --git a/tests/sys/capsicum/procdesc.cc b/tests/sys/capsicum/procdesc.cc index aabc0446553b..72027d5037bc 100644 --- a/tests/sys/capsicum/procdesc.cc +++ b/tests/sys/capsicum/procdesc.cc @@ -995,6 +995,8 @@ TEST_F(PipePdfork, PassProcessDescriptor) { if (verbose) fprintf(stderr, "[%d] about to fork()\n", getpid_()); pid_t child2 = fork(); if (child2 == 0) { + int pd; + // Child: close our copy of the original process descriptor. close(pd_); SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_STARTED); @@ -1004,7 +1006,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) { EXPECT_OK(rc); EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen); cmptr = CMSG_FIRSTHDR(&mh); - int pd = *(int*)CMSG_DATA(cmptr); + memcpy(&pd, CMSG_DATA(cmptr), sizeof(pd)); EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len); cmptr = CMSG_NXTHDR(&mh, cmptr); EXPECT_TRUE(cmptr == NULL); @@ -1036,7 +1038,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) { cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CMSG_LEN(sizeof(int)); - *(int *)CMSG_DATA(cmptr) = pd_; + memcpy(CMSG_DATA(cmptr), &pd_, sizeof(pd_)); buffer1[0] = 0; iov[0].iov_len = 1; if (verbose) fprintf(stderr, "[%d] send process descriptor %d on socket\n", getpid_(), pd_); diff --git a/tests/sys/capsicum/sctp.cc b/tests/sys/capsicum/sctp.cc index aa84653c5b2a..a36a242f8c9b 100644 --- a/tests/sys/capsicum/sctp.cc +++ b/tests/sys/capsicum/sctp.cc @@ -92,13 +92,13 @@ TEST(Sctp, Socket) { addr.sin_family = AF_INET; addr.sin_port = htons(0); addr.sin_addr.s_addr = htonl(INADDR_ANY); - socklen_t len = sizeof(addr); + socklen_t addr_len = sizeof(addr); // Can only bind the fully-capable socket. - EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, len)); - EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, len)); + EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, addr_len)); + EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, addr_len)); - EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &len)); + EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &addr_len)); int port = ntohs(addr.sin_port); // Now we know the port involved, fork off children to run clients. @@ -128,43 +128,43 @@ TEST(Sctp, Socket) { EXPECT_OK(listen(cap_sock_all, 3)); // Can only do socket operations on the fully-capable socket. - len = sizeof(addr); - EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &len)); + addr_len = sizeof(addr); + EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &addr_len)); struct sctp_event_subscribe events; memset(&events, 0, sizeof(events)); events.sctp_association_event = 1; events.sctp_data_io_event = 1; EXPECT_NOTCAPABLE(setsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events))); - len = sizeof(events); - EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &len)); + socklen_t eventslen = sizeof(events); + EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen)); memset(&events, 0, sizeof(events)); events.sctp_association_event = 1; events.sctp_data_io_event = 1; EXPECT_OK(setsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events))); - len = sizeof(events); - EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &len)); + eventslen = sizeof(events); + EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen)); - len = sizeof(addr); + addr_len = sizeof(addr); memset(&addr, 0, sizeof(addr)); - EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &len)); + EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &addr_len)); EXPECT_EQ(AF_INET, addr.sin_family); EXPECT_EQ(htons(port), addr.sin_port); struct sockaddr_in client_addr; - socklen_t addr_len = sizeof(client_addr); + socklen_t client_addr_len = sizeof(client_addr); unsigned char buffer[1024]; struct sctp_sndrcvinfo sri; memset(&sri, 0, sizeof(sri)); int flags = 0; EXPECT_NOTCAPABLE(sctp_recvmsg(cap_sock_wo, buffer, sizeof(buffer), - (struct sockaddr*)&client_addr, &addr_len, + (struct sockaddr*)&client_addr, &client_addr_len, &sri, &flags)); while (true) { retry: memset(&sri, 0, sizeof(sri)); int len = sctp_recvmsg(cap_sock_rw, buffer, sizeof(buffer), - (struct sockaddr*)&client_addr, &addr_len, + (struct sockaddr*)&client_addr, &client_addr_len, &sri, &flags); if (len < 0 && errno == EAGAIN) goto retry; EXPECT_OK(len); diff --git a/tests/sys/capsicum/socket.cc b/tests/sys/capsicum/socket.cc index 5bb7e9d3e180..ff21d3020a83 100644 --- a/tests/sys/capsicum/socket.cc +++ b/tests/sys/capsicum/socket.cc @@ -166,26 +166,26 @@ TEST(Socket, TCP) { AWAIT_INT_MESSAGE(pipefds[1], MSG_PARENT_CHILD_SHOULD_RUN); // Create sockets - int sock = socket(AF_INET, SOCK_STREAM, 0); - EXPECT_OK(sock); - if (sock < 0) return; - int cap_sock_rw = dup(sock); - EXPECT_OK(cap_sock_rw); - EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw)); - int cap_sock_all = dup(sock); - EXPECT_OK(cap_sock_all); - EXPECT_OK(cap_rights_limit(cap_sock_all, &r_all)); - close(sock); + int child_sock = socket(AF_INET, SOCK_STREAM, 0); + EXPECT_OK(child_sock); + if (child_sock < 0) return; + int child_cap_sock_rw = dup(child_sock); + EXPECT_OK(child_cap_sock_rw); + EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw)); + int child_cap_sock_all = dup(child_sock); + EXPECT_OK(child_cap_sock_all); + EXPECT_OK(cap_rights_limit(child_cap_sock_all, &r_all)); + close(child_sock); // Connect socket - struct sockaddr_in addr; - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); // Pick unused port - addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - socklen_t len = sizeof(addr); - EXPECT_NOTCAPABLE(connect_(cap_sock_rw, (struct sockaddr *)&addr, len)); - EXPECT_OK(connect_(cap_sock_all, (struct sockaddr *)&addr, len)); + struct sockaddr_in child_addr; + memset(&child_addr, 0, sizeof(child_addr)); + child_addr.sin_family = AF_INET; + child_addr.sin_port = htons(port); // Pick unused port + child_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + socklen_t child_addr_len = sizeof(child_addr); + EXPECT_NOTCAPABLE(connect_(child_cap_sock_rw, (struct sockaddr *)&child_addr, child_addr_len)); + EXPECT_OK(connect_(child_cap_sock_all, (struct sockaddr *)&child_addr, child_addr_len)); exit(HasFailure()); } @@ -291,15 +291,15 @@ TEST(Socket, UDP) { pid_t child = fork(); if (child == 0) { - int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - EXPECT_OK(sock); - int cap_sock_rw = dup(sock); - EXPECT_OK(cap_sock_rw); - EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw)); - int cap_sock_connect = dup(sock); + int child_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + EXPECT_OK(child_sock); + int child_cap_sock_rw = dup(child_sock); + EXPECT_OK(child_cap_sock_rw); + EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw)); + int cap_sock_connect = dup(child_sock); EXPECT_OK(cap_sock_connect); EXPECT_OK(cap_rights_limit(cap_sock_connect, &r_connect)); - close(sock); + close(child_sock); // Can only sendmsg(2) to an address over a socket with CAP_CONNECT. unsigned char buffer[256]; @@ -313,25 +313,25 @@ TEST(Socket, UDP) { mh.msg_iov = &iov; mh.msg_iovlen = 1; - struct sockaddr_in addr; - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - mh.msg_name = &addr; - mh.msg_namelen = sizeof(addr); + struct sockaddr_in child_addr; + memset(&child_addr, 0, sizeof(child_addr)); + child_addr.sin_family = AF_INET; + child_addr.sin_port = htons(port); + child_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + mh.msg_name = &child_addr; + mh.msg_namelen = sizeof(child_addr); - EXPECT_NOTCAPABLE(sendmsg(cap_sock_rw, &mh, 0)); + EXPECT_NOTCAPABLE(sendmsg(child_cap_sock_rw, &mh, 0)); EXPECT_OK(sendmsg(cap_sock_connect, &mh, 0)); #ifdef HAVE_SEND_RECV_MMSG struct mmsghdr mv; memset(&mv, 0, sizeof(mv)); memcpy(&mv.msg_hdr, &mh, sizeof(struct msghdr)); - EXPECT_NOTCAPABLE(sendmmsg(cap_sock_rw, &mv, 1, 0)); + EXPECT_NOTCAPABLE(sendmmsg(child_cap_sock_rw, &mv, 1, 0)); EXPECT_OK(sendmmsg(cap_sock_connect, &mv, 1, 0)); #endif - close(cap_sock_rw); + close(child_cap_sock_rw); close(cap_sock_connect); exit(HasFailure()); } From nobody Mon Nov 23 05:57:35 2026 X-Original-To: dev-commits-src-branches@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 4jXwFr2xNKz720m9 for ; Mon, 23 Nov 2026 05:57:36 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFq6jmFz4W8Q for ; Mon, 23 Nov 2026 05:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413455; 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=UHdZPaQzifaB8QeIpSnd93s+yGr5zkiFyh8l6Tb53+I=; b=RjJMGJl/T7kRtX8DRV2yup48buEjYIQYQyUvvuqouZZJFHUWFUAp5c7f2Bi5Z6VoClCz0Q 9BtsiZ/FIUzlrmUSNwhYSqP5ZLZYBpbJWKCG6oJfBPezk7fBPnS1ZWoHXQmEf4Cg6HbZ5e InQZzNx+tgedgzLcypuorQEhGtd8T0KCcpcmNHg5F65EnWSccXzdlRsMIbfM8Gmo3q/1uP Kms/a9ib6GWX6QseE/dFVk1b17PnGcm8IOJM8ZKGS/pwglVcChaWRzS8guCvuApP+thRBk MLfbhL+bReOrkk0JGFyi2t0ojRCdtFRr0TQKAgB0BEzppja9RTZVWQqu4fVIxg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413455; b=nhnDRkCYG/CKH7HXmn0/oMLlvp20FDEGO+kxVVow3j5qfhNYVRqbYM9uzLLZ1nHbQ+6FrF zF1baiwCNJ42iw20YcyRq3Eilyfd6GSxPSdROxc4VSbF4qPS80sFOHw8tDaPKmcou8T53y bMAlG2S0okZnmjukOGJOxJMeIdGYTODSsi9dUAAh9FoStfgOEbm9iYMfeFMB0Tolk31gxF 5Nf588EFxZoLRRHSEpRpRW5Q2xhNA7EVCyuWzBK84TweflOOQOMys+GmcCUqc0nkN5WHBu XnZ8ROtRw3s9at2iyUck85rSJkxpWEih0h4FreIoKVnx8HD5kt9ofOWErmF7/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413455; 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=UHdZPaQzifaB8QeIpSnd93s+yGr5zkiFyh8l6Tb53+I=; b=JXjIC2yzvdJ2Cmb9LdXmAM/TBd3E0N0dQI75nppuBQXv058K/nUKXM8KAvuQ4P6bbCsKRT kP44dwyxDupbWmkDxSzMjZ6tqRUNPmmYcRM48wFnCxpUM14AvoK/OgaDy77Smyy7+r5h9R d4MURIzRSDjdv1QFXhQnNmzkUv2TY3dO/7b43cZtAqz9ov+ZDo3hzx+7t2F9M19tOOyPYK 3u9BeI6HgkPM2K20u7L7nA/eooP50P87c9kN+3xeuLtaVKO4eLF1WOUdsUZ6qOA/ooZBgZ 4PEujoiBzG89prK/CNuqjiMfgDek56L/PCVQaCsQ9PVPNqkdur9kFlQ3ZRzbjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFq6LCmzfJn for ; Mon, 23 Nov 2026 05:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: f8dc8330cf0c - stable/14 - capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:35 +0000 Message-Id: <6b03d5cf.1e1e5.1254a2d8@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a commit f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a Author: Enji Cooper AuthorDate: 2026-11-10 02:05:33 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:29 +0000 capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again 04c4b2084eb9 accidentally added some changes from another WIP commit into that diff. Instead of wholesale reverting the change, just revert the part that's currently broken (`HAVE_SEND_RECV_MMSG`). While some of the related tests pass, one of the testcases (`capmode.cc:AllowedMmsgSendRecv`) doesn't currently pass. Revert the change to make the CI run more green again. MFC after: 1 week Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean") (cherry picked from commit 71eddb44d7dfa60e43f77c90b51bd091f0693f85) --- tests/sys/capsicum/capsicum-freebsd.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h index 82ee9cf9d91c..ea14dd76a505 100644 --- a/tests/sys/capsicum/capsicum-freebsd.h +++ b/tests/sys/capsicum/capsicum-freebsd.h @@ -49,6 +49,10 @@ __END_DECLS #define CAP_FROM_PEELOFF #define HAVE_PIPE2 + +/* capmode.cc:AllowedMmsgSendRecv: the tests don't pass on FreeBSD (yet?). */ +#if 0 #define HAVE_SEND_RECV_MMSG +#endif #endif /*__CAPSICUM_FREEBSD_H__*/ From nobody Mon Nov 23 05:57:36 2026 X-Original-To: dev-commits-src-branches@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 4jXwFs5w17z720v6 for ; Mon, 23 Nov 2026 05:57:37 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFs12n8z4W8y for ; Mon, 23 Nov 2026 05:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413457; 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=GG+HdH2B/oq9/yfhpvqUxlGETNdx1937EG7DQIOhW0w=; b=b0LQXK/8LOrsVOxZcQZJA4rUwK2CGFZC7DCq3hyqh0/Jv5ukBR73hTC3jMbvRFaBT+KRJ6 72L0aIOvktRdpNTQEdnCMoYTegYh/nsxPpjKSwTPzh2Duvk+pEZI5IV6yRvJhmKyUh4iXh n/rA2QcBHFrTKvOWB/+ddAefy+EbzokmdyDhWGL8JjSXLWGm3tKZVJylAY7MBLGTYm+xWo Jfuw8whKINfdLCzxAWSmXHYpKBabkyGI0GM/R6OP4E3G/H4yYPzGOhzXKLRn9lCxtuG+Fx wPNqdtKmcvxFMzC6FkyfgmVMAWzlUpJ20sVbtLW6Mw5X92EKYnXhbS0dBPTSgQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413457; b=gCOe1lF0RArqrNia1q6rcxMA6kl94tttivb8QHk08stJqOjPV41lNDVXPQOK/ibnb0kKdi yMLLnRyyQkKHMdqMKwi9/CkEXs43tQYzqcEM48/YNpQoIz2nkZZ4PcJAhK9JaQXzqAeuC9 LdgGWl0LARAe8ByOAjGndyie0V9K5u/bwHQUKPixeFBlaJ6AWVml5cPQCq9c927FeWJUAw v8KB/sTMcrY0U9v6R2qs4hp6uqgEpkYTQ6n82E9JSbvyO2crFswLLxZDe2bvxHdhiyIic1 MGexacAT/q3mjge5/h8fCpLoUcfqHUfqPGlQqIzyHFM+5It49F4xRUeBVF8Hhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413457; 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=GG+HdH2B/oq9/yfhpvqUxlGETNdx1937EG7DQIOhW0w=; b=iGVe5ZWq5lrQVjrHCu4LL+FfaweUmJJfupCvbEGAvxDxBlXfntT/mMaKqbjKLw4hSIY7dK IwL/H0GlzT+rqS/uUoD8suRMunOWRcvb78QiINBk0ZunhUALIlLovVkb28i4XiZNS5DfQt krNDf2UaDEgNx+gdhmf/3BkDtRFh+xN8Vtw6KQ+4vadB4UDw9+foRjDYCxaI+KX8RoM6gX aZcd0Pag3FMDpL3+6Xn3e/bUbiaIeaPJzHAKgmpwBNgpApcZdXj1SA19f4zqwqB81kBjxV kMXAKZtqWSDFVfwpoYNywcmQsnx8O5Lt0PpQwrnLtgzsBYEXWyEqC10lz1e0ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFr6hQfzfjv for ; Mon, 23 Nov 2026 05:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: e39fcd57b839 - stable/14 - tests/sys/capsicum: Fix -Wshadow issue with `fd_set` List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e39fcd57b83900a8fc7bd17709516f5fd7738f40 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:36 +0000 Message-Id: <6b03d5d0.1e1e9.3b396c77@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=e39fcd57b83900a8fc7bd17709516f5fd7738f40 commit e39fcd57b83900a8fc7bd17709516f5fd7738f40 Author: Enji Cooper AuthorDate: 2026-11-10 05:17:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:29 +0000 tests/sys/capsicum: Fix -Wshadow issue with `fd_set` `fd_set` is defined in `sys/select.h`, and prior to this change, was in fcntl.cc as well. This change renames `fd_set` to `fd_set_` to avoid the name collision. MFC after: 1 week Reported by: gcc 14 Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean") (cherry picked from commit a479301abb2c7b384f574fcc641e502f70654835) --- tests/sys/capsicum/fcntl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/capsicum/fcntl.cc b/tests/sys/capsicum/fcntl.cc index 1ae33c2e051e..a9349b153cdc 100644 --- a/tests/sys/capsicum/fcntl.cc +++ b/tests/sys/capsicum/fcntl.cc @@ -332,17 +332,17 @@ TEST(Fcntl, FLSubRights) { // Check operations that need CAP_FCNTL with specific subrights. int fd_get = dup(fd); - int fd_set = dup(fd); + int fd_set_ = dup(fd); EXPECT_OK(cap_fcntls_limit(fd_get, CAP_FCNTL_GETFL)); - EXPECT_OK(cap_fcntls_limit(fd_set, CAP_FCNTL_SETFL)); + EXPECT_OK(cap_fcntls_limit(fd_set_, CAP_FCNTL_SETFL)); fd_flag = fcntl(fd_get, F_GETFL, 0); EXPECT_OK(fd_flag); - EXPECT_NOTCAPABLE(fcntl(fd_set, F_GETFL, 0)); - EXPECT_OK(fcntl(fd_set, F_SETFL, fd_flag)); + EXPECT_NOTCAPABLE(fcntl(fd_set_, F_GETFL, 0)); + EXPECT_OK(fcntl(fd_set_, F_SETFL, fd_flag)); EXPECT_NOTCAPABLE(fcntl(fd_get, F_SETFL, fd_flag)); close(fd_get); - close(fd_set); + close(fd_set_); // Check operations that need CAP_FCNTL with no subrights => ENOTCAPABLE. EXPECT_OK(cap_fcntls_limit(fd, 0)); From nobody Mon Nov 23 05:57:37 2026 X-Original-To: dev-commits-src-branches@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 4jXwFt4Yq9z720pP for ; Mon, 23 Nov 2026 05:57:38 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFt1FJXz4Vpc for ; Mon, 23 Nov 2026 05:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413458; 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=8Qn8Ar/IW/CbJFxE7mysk8vfJWk7dqJOGq0BmKGEFrE=; b=QD+Y2qprNG5XlzKSArSFXletgu1E5keFmO20ve+yoCC/1/0vIkl84JH61JanpkjJYNEqBq jI47hsOasuxVqCqEYNj8GaTZawNL9OeBKA8t3nGuMtak212iJmQd06X4exc+fHraPwtX1x ovq5AwW6tDW8GRU8jfj1sh9MqvzklT4lxwqlIQvpcSydOOa6iZlixwuZXy2FgMSjpRQGEz jLB7T6la5nza/RHULJt1wDJJ/ARFPId5paKqUf40w7BN7RxyLHoAv7xgV3dhwNUtEFFNXa O66y87tIT22GdqEsUOXNomcVcSmeRLvpy4VbekGOkOFPs8O8re9EefbBcK1FhA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413458; b=Mq1kYZwwP7/YgM6KCXQ+La18VOdg5YMOZGed7MNrvlzZyypvjqO5tbbPFyzi0UDFpcmU5P lTIyZZmqmbEJG/lS97K5owiUMFfEE8mm4EzXL1RAPGMx+7gwUf2X9bhhWm3vW2QBxhpyst eRZx/Hg7vQwIP2QoY4bmgrx3gviXKbR4qYSE+LmeE7efe5qlky6lcd+Z84xirYrPyq/7LV rTjRX8j/KfOYjOBf83SCpP23YCS38g5Xez0m0EdOJOgR/Z2g32/d1yW0sAoXu9w2ncW8+0 ScJm0x5hzjKGdDTGetXPS2w0nx3k1umR+Mdj60pKdbKZZPZkkxSL13WYWlZoRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413458; 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=8Qn8Ar/IW/CbJFxE7mysk8vfJWk7dqJOGq0BmKGEFrE=; b=qjxATEESMzJbxUl9HOk8Kkik4UR/XMAsCIGpUknmricElqJUmAFmbw5FhWwBlK74hEXuS7 WFYVUmRAHyn2DhCz/1diOcEO5p0z60mYCU9+F14tJZebkBwJH5Q3CPOdUIju6T7XIde5kR Lc62HhOxyJIjd/S6W4C34huTYyy5EQnKwDA+PUGgvJU/JnNzpqUFdnWC4LhHwyipPhurk3 reBWh5cLXjhQezBfzSvrrJ8B5I5p6XcVd3OLJrpkOIp+6CbfxbMDaJCbEKJSjM202crg4G P9bAClpSbXYYrdfSoS09NT0nfNfBO5HzPucEtQQ8fFBpohm4YyZes99t7nL/qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFt01SyzfJq for ; Mon, 23 Nov 2026 05:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 62664f2f0940 - stable/14 - contrib/kyua: update to 0.15.2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62664f2f0940e548e97845d45baf7f0f4aeb4006 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:37 +0000 Message-Id: <6b03d5d1.fc5.77e0360e@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=62664f2f0940e548e97845d45baf7f0f4aeb4006 commit 62664f2f0940e548e97845d45baf7f0f4aeb4006 Author: Enji Cooper AuthorDate: 2026-11-19 07:02:06 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:29 +0000 contrib/kyua: update to 0.15.2 This change contains a few bugfixes to the test executor. MFC after: 1 week Merge commit 'dab80d5deaf7d998d587b99f7941890237960638' (cherry picked from commit c16da33701d07751bbe6871ad39582006d5281fc) --- contrib/kyua/NEWS | 18 ++ contrib/kyua/README.md | 4 +- contrib/kyua/config.h | 3 + contrib/kyua/utils/Kyuafile | 1 - contrib/kyua/utils/auto_array.hpp | 102 ---------- contrib/kyua/utils/auto_array.ipp | 227 ---------------------- contrib/kyua/utils/auto_array_fwd.hpp | 43 ---- contrib/kyua/utils/auto_array_test.cpp | 312 ------------------------------ contrib/kyua/utils/cmdline/parser.cpp | 16 +- contrib/kyua/utils/datetime.cpp | 88 +++++++++ contrib/kyua/utils/datetime.hpp | 28 +++ contrib/kyua/utils/datetime_fwd.hpp | 1 + contrib/kyua/utils/datetime_test.cpp | 117 +++++++++++ contrib/kyua/utils/fs/operations.cpp | 16 +- contrib/kyua/utils/process/systembuf.cpp | 7 +- contrib/kyua/utils/signals/timer.cpp | 75 +++++-- contrib/kyua/utils/signals/timer.hpp | 8 +- contrib/kyua/utils/signals/timer_test.cpp | 111 +++++++++-- contrib/kyua/utils/text/regex.cpp | 33 ++-- contrib/kyua/utils/text/templates.cpp | 2 +- 20 files changed, 442 insertions(+), 770 deletions(-) diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS index 50a2c8257370..3b7099fc6dbd 100644 --- a/contrib/kyua/NEWS +++ b/contrib/kyua/NEWS @@ -1,5 +1,23 @@ # Major changes between releases +## Changes in version 0.15.2 + +**Released on 2026/11/19.** + +### Bugfixes + +* #345: Use monotonic time for timer deadlines +* #352: Get rid of utils::auto_array +* #355: Use absolute deadlines in some timer activation tests +* #357: Fix UB related to iterator lifetime in text templates +* #360: fix(ci): update LLVM toolchains on macOS and Ubuntu + +### Developer Workflow Changes + +* #361: Port over dev workflow items from ATF project (commit-check, pre-commit) + +**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.1...kyua-0.15.2 + ## Changes in version 0.15.1 **Released on 2026/10/25.** diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md index b8b54d0413de..a5bc8db0509b 100644 --- a/contrib/kyua/README.md +++ b/contrib/kyua/README.md @@ -27,9 +27,9 @@ This is not an official Google product. ## Download -The latest version of Kyua is 0.15.0 and was released on October 7th, 2026. +The latest version of Kyua is 0.15.1 and was released on October 25th, 2026. -Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0). +Download: [kyua-0.15.1](../../releases/tag/kyua-0.15.1). See the [release notes](NEWS) for information about the changes in this and all previous releases. diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index eba9c9cb1448..cccfe36ae3a2 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -4,6 +4,9 @@ /* Define to the optind value to reset getopt processing */ #define GETOPT_OPTIND_RESET_VALUE 1 +/* Define to 1 if you have the 'clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + /* define if the compiler supports basic C++20 syntax */ #define HAVE_CXX20 1 diff --git a/contrib/kyua/utils/Kyuafile b/contrib/kyua/utils/Kyuafile index 042ad77a3fe4..4955349f2ac9 100644 --- a/contrib/kyua/utils/Kyuafile +++ b/contrib/kyua/utils/Kyuafile @@ -2,7 +2,6 @@ syntax(2) test_suite("kyua") -atf_test_program{name="auto_array_test"} atf_test_program{name="datetime_test"} atf_test_program{name="env_test"} atf_test_program{name="memory_test"} diff --git a/contrib/kyua/utils/auto_array.hpp b/contrib/kyua/utils/auto_array.hpp deleted file mode 100644 index 93b3e20223cf..000000000000 --- a/contrib/kyua/utils/auto_array.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/// \file utils/auto_array.hpp -/// Provides the utils::auto_array class. -/// -/// The class is provided as a separate module on its own to minimize -/// header-inclusion side-effects. - -#if !defined(UTILS_AUTO_ARRAY_HPP) -#define UTILS_AUTO_ARRAY_HPP - -#include "utils/auto_array_fwd.hpp" - -#include - -namespace utils { - - -namespace detail { - - -/// Wrapper class to provide reference semantics for utils::auto_array. -/// -/// This class is internally used, for example, to allow returning a -/// utils::auto_array from a function. -template< class T > -class auto_array_ref { - /// Internal pointer to the dynamically-allocated array. - T* _ptr; - - template< class > friend class utils::auto_array; - -public: - explicit auto_array_ref(T*); -}; - - -} // namespace detail - - -/// A simple smart pointer for arrays providing strict ownership semantics. -/// -/// This class is the counterpart of std::unique_ptr for arrays. The semantics of -/// the API of this class are the same as those of std::unique_ptr. -/// -/// The wrapped pointer must be NULL or must have been allocated using operator -/// new[]. -template< class T > -class auto_array { - /// Internal pointer to the dynamically-allocated array. - T* _ptr; - -public: - auto_array(T* = NULL) throw(); - auto_array(auto_array< T >&) throw(); - auto_array(detail::auto_array_ref< T >) throw(); - ~auto_array(void) throw(); - - T* get(void) throw(); - const T* get(void) const throw(); - - T* release(void) throw(); - void reset(T* = NULL) throw(); - - auto_array< T >& operator=(auto_array< T >&) throw(); - auto_array< T >& operator=(detail::auto_array_ref< T >) throw(); - T& operator[](int) throw(); - const T& operator[](int) const throw(); - operator detail::auto_array_ref< T >(void) throw(); -}; - - -} // namespace utils - - -#endif // !defined(UTILS_AUTO_ARRAY_HPP) diff --git a/contrib/kyua/utils/auto_array.ipp b/contrib/kyua/utils/auto_array.ipp deleted file mode 100644 index fd29311def8c..000000000000 --- a/contrib/kyua/utils/auto_array.ipp +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#if !defined(UTILS_AUTO_ARRAY_IPP) -#define UTILS_AUTO_ARRAY_IPP - -#include "utils/auto_array.hpp" - -namespace utils { - - -namespace detail { - - -/// Constructs a new auto_array_ref from a pointer. -/// -/// \param ptr The pointer to wrap. -template< class T > inline -auto_array_ref< T >::auto_array_ref(T* ptr) : - _ptr(ptr) -{ -} - - -} // namespace detail - - -/// Constructs a new auto_array from a given pointer. -/// -/// This grabs ownership of the pointer unless it is NULL. -/// -/// \param ptr The pointer to wrap. If not NULL, the memory pointed to must -/// have been allocated with operator new[]. -template< class T > inline -auto_array< T >::auto_array(T* ptr) throw() : - _ptr(ptr) -{ -} - - -/// Constructs a copy of an auto_array. -/// -/// \param ptr The pointer to copy from. This pointer is invalidated and the -/// new copy grabs ownership of the object pointed to. -template< class T > inline -auto_array< T >::auto_array(auto_array< T >& ptr) throw() : - _ptr(ptr.release()) -{ -} - - -/// Constructs a new auto_array form a reference. -/// -/// Internal function used to construct a new auto_array from an object -/// returned, for example, from a function. -/// -/// \param ref The reference. -template< class T > inline -auto_array< T >::auto_array(detail::auto_array_ref< T > ref) throw() : - _ptr(ref._ptr) -{ -} - - -/// Destructor for auto_array objects. -template< class T > inline -auto_array< T >::~auto_array(void) throw() -{ - if (_ptr != NULL) - delete [] _ptr; -} - - -/// Gets the value of the wrapped pointer without releasing ownership. -/// -/// \return The raw mutable pointer. -template< class T > inline -T* -auto_array< T >::get(void) throw() -{ - return _ptr; -} - - -/// Gets the value of the wrapped pointer without releasing ownership. -/// -/// \return The raw immutable pointer. -template< class T > inline -const T* -auto_array< T >::get(void) const throw() -{ - return _ptr; -} - - -/// Gets the value of the wrapped pointer and releases ownership. -/// -/// \return The raw mutable pointer. -template< class T > inline -T* -auto_array< T >::release(void) throw() -{ - T* ptr = _ptr; - _ptr = NULL; - return ptr; -} - - -/// Changes the value of the wrapped pointer. -/// -/// If the auto_array was pointing to an array, such array is released and the -/// wrapped pointer is replaced with the new pointer provided. -/// -/// \param ptr The pointer to use as a replacement; may be NULL. -template< class T > inline -void -auto_array< T >::reset(T* ptr) throw() -{ - if (_ptr != NULL) - delete [] _ptr; - _ptr = ptr; -} - - -/// Assignment operator. -/// -/// \param ptr The object to copy from. This is invalidated after the copy. -/// \return A reference to the auto_array object itself. -template< class T > inline -auto_array< T >& -auto_array< T >::operator=(auto_array< T >& ptr) throw() -{ - reset(ptr.release()); - return *this; -} - - -/// Internal assignment operator for function returns. -/// -/// \param ref The reference object to copy from. -/// \return A reference to the auto_array object itself. -template< class T > inline -auto_array< T >& -auto_array< T >::operator=(detail::auto_array_ref< T > ref) throw() -{ - if (_ptr != ref._ptr) { - delete [] _ptr; - _ptr = ref._ptr; - } - return *this; -} - - -/// Subscript operator to access the array by position. -/// -/// This does not perform any bounds checking, in particular because auto_array -/// does not know the size of the arrays pointed to by it. -/// -/// \param pos The position to access, indexed from zero. -/// -/// \return A mutable reference to the element at the specified position. -template< class T > inline -T& -auto_array< T >::operator[](int pos) throw() -{ - return _ptr[pos]; -} - - -/// Subscript operator to access the array by position. -/// -/// This does not perform any bounds checking, in particular because auto_array -/// does not know the size of the arrays pointed to by it. -/// -/// \param pos The position to access, indexed from zero. -/// -/// \return An immutable reference to the element at the specified position. -template< class T > inline -const T& -auto_array< T >::operator[](int pos) const throw() -{ - return _ptr[pos]; -} - - -/// Internal conversion to a reference wrapper. -/// -/// This is used internally to support returning auto_array objects from -/// functions. The auto_array is invalidated when used. -/// -/// \return A new detail::auto_array_ref object holding the pointer. -template< class T > inline -auto_array< T >::operator detail::auto_array_ref< T >(void) throw() -{ - return detail::auto_array_ref< T >(release()); -} - - -} // namespace utils - - -#endif // !defined(UTILS_AUTO_ARRAY_IPP) diff --git a/contrib/kyua/utils/auto_array_fwd.hpp b/contrib/kyua/utils/auto_array_fwd.hpp deleted file mode 100644 index e1522a25bf7d..000000000000 --- a/contrib/kyua/utils/auto_array_fwd.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/// \file utils/auto_array_fwd.hpp -/// Forward declarations for utils/auto_array.hpp - -#if !defined(UTILS_AUTO_ARRAY_FWD_HPP) -#define UTILS_AUTO_ARRAY_FWD_HPP - -namespace utils { - - -template< class > class auto_array; - - -} // namespace utils - -#endif // !defined(UTILS_AUTO_ARRAY_FWD_HPP) diff --git a/contrib/kyua/utils/auto_array_test.cpp b/contrib/kyua/utils/auto_array_test.cpp deleted file mode 100644 index 041eb65863ba..000000000000 --- a/contrib/kyua/utils/auto_array_test.cpp +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "utils/auto_array.ipp" - -extern "C" { -#include -} - -#include - -#include - -#include "utils/defs.hpp" - -using utils::auto_array; - - -namespace { - - -/// Mock class to capture calls to the new and delete operators. -class test_array { -public: - /// User-settable cookie to disambiguate instances of this class. - int m_value; - - /// The current balance of existing test_array instances. - static ssize_t m_nblocks; - - /// Captures invalid calls to new on an array. - /// - /// \return Nothing; this always fails the test case. - void* - operator new(const size_t /* size */) - { - ATF_FAIL("New called but should have been new[]"); - return new int(5); - } - - /// Obtains memory for a new instance and increments m_nblocks. - /// - /// \param size The amount of memory to allocate, in bytes. - /// - /// \return A pointer to the allocated memory. - /// - /// \throw std::bad_alloc If the memory cannot be allocated. - void* - operator new[](const size_t size) - { - void* mem = ::operator new(size); - m_nblocks++; - std::cout << "Allocated 'test_array' object " << mem << "\n"; - return mem; - } - - /// Captures invalid calls to delete on an array. - /// - /// \return Nothing; this always fails the test case. - void - operator delete(void* /* mem */) - { - ATF_FAIL("Delete called but should have been delete[]"); - } - - /// Deletes a previously allocated array and decrements m_nblocks. - /// - /// \param mem The pointer to the memory to be deleted. - void - operator delete[](void* mem) - { - std::cout << "Releasing 'test_array' object " << mem << "\n"; - if (m_nblocks == 0) - ATF_FAIL("Unbalanced delete[]"); - m_nblocks--; - ::operator delete(mem); - } -}; - - -ssize_t test_array::m_nblocks = 0; - - -} // anonymous namespace - - -ATF_TEST_CASE(scope); -ATF_TEST_CASE_HEAD(scope) -{ - set_md_var("descr", "Tests the automatic scope handling in the " - "auto_array smart pointer class"); -} -ATF_TEST_CASE_BODY(scope) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(copy); -ATF_TEST_CASE_HEAD(copy) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' copy " - "constructor"); -} -ATF_TEST_CASE_BODY(copy) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2(t1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(copy_ref); -ATF_TEST_CASE_HEAD(copy_ref) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' copy " - "constructor through the auxiliary ref object"); -} -ATF_TEST_CASE_BODY(copy_ref) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(get); -ATF_TEST_CASE_HEAD(get) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' get " - "method"); -} -ATF_TEST_CASE_BODY(get) -{ - test_array* ta = new test_array[10]; - auto_array< test_array > t(ta); - ATF_REQUIRE_EQ(t.get(), ta); -} - - -ATF_TEST_CASE(release); -ATF_TEST_CASE_HEAD(release) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' release " - "method"); -} -ATF_TEST_CASE_BODY(release) -{ - test_array* ta1 = new test_array[10]; - { - auto_array< test_array > t(ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - test_array* ta2 = t.release(); - ATF_REQUIRE_EQ(ta2, ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - delete [] ta1; -} - - -ATF_TEST_CASE(reset); -ATF_TEST_CASE_HEAD(reset) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' reset " - "method"); -} -ATF_TEST_CASE_BODY(reset) -{ - test_array* ta1 = new test_array[10]; - test_array* ta2 = new test_array[10]; - ATF_REQUIRE_EQ(test_array::m_nblocks, 2); - - { - auto_array< test_array > t(ta1); - ATF_REQUIRE_EQ(test_array::m_nblocks, 2); - t.reset(ta2); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - t.reset(); - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(assign); -ATF_TEST_CASE_HEAD(assign) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' " - "assignment operator"); -} -ATF_TEST_CASE_BODY(assign) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2; - t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(assign_ref); -ATF_TEST_CASE_HEAD(assign_ref) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' " - "assignment operator through the auxiliary ref " - "object"); -} -ATF_TEST_CASE_BODY(assign_ref) -{ - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2; - t2 = t1; - ATF_REQUIRE_EQ(test_array::m_nblocks, 1); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); - } - ATF_REQUIRE_EQ(test_array::m_nblocks, 0); -} - - -ATF_TEST_CASE(access); -ATF_TEST_CASE_HEAD(access) -{ - set_md_var("descr", "Tests the auto_array smart pointer class' access " - "operator"); -} -ATF_TEST_CASE_BODY(access) -{ - auto_array< test_array > t(new test_array[10]); - - for (int i = 0; i < 10; i++) - t[i].m_value = i * 2; - - for (int i = 0; i < 10; i++) - ATF_REQUIRE_EQ(t[i].m_value, i * 2); -} - - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, scope); - ATF_ADD_TEST_CASE(tcs, copy); - ATF_ADD_TEST_CASE(tcs, copy_ref); - ATF_ADD_TEST_CASE(tcs, get); - ATF_ADD_TEST_CASE(tcs, release); - ATF_ADD_TEST_CASE(tcs, reset); - ATF_ADD_TEST_CASE(tcs, assign); - ATF_ADD_TEST_CASE(tcs, assign_ref); - ATF_ADD_TEST_CASE(tcs, access); -} diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp index 29dd4612f6ad..32fb14c25e97 100644 --- a/contrib/kyua/utils/cmdline/parser.cpp +++ b/contrib/kyua/utils/cmdline/parser.cpp @@ -39,8 +39,8 @@ extern "C" { #include #include #include +#include -#include "utils/auto_array.ipp" #include "utils/cmdline/exceptions.hpp" #include "utils/cmdline/options.hpp" #include "utils/format/macros.hpp" @@ -61,7 +61,7 @@ struct getopt_data : utils::noncopyable { std::string short_options; /// Representation of the long options as expected by getopt_long(3). - utils::auto_array< ::option > long_options; + std::vector< ::option > long_options; /// Auto-generated identifiers to be able to parse long options. std::map< int, const cmdline::base_option* > ids; @@ -78,7 +78,7 @@ options_to_getopt_data(const cmdline::options_vector& options, getopt_data& data) { data.short_options.clear(); - data.long_options.reset(new ::option[options.size() + 1]); + data.long_options.resize(options.size() + 1); int cur_id = 512; @@ -189,7 +189,7 @@ find_option_name(const getopt_data& data, const int getopt_optopt, const char ch = static_cast< char >(getopt_optopt); return F("-%s") % ch; } else { - for (const ::option* opt = &data.long_options[0]; opt->name != NULL; + for (const ::option* opt = data.long_options.data(); opt->name != NULL; opt++) { if (opt->val == getopt_optopt) return F("--%s") % opt->name; @@ -284,11 +284,11 @@ cmdline::parse(const cmdline::args_vector& args, { PRE_MSG(args.size() >= 1, "No progname or command name found"); - utils::auto_array< const char* > argv(new const char*[args.size() + 1]); + std::vector< const char* > argv(args.size() + 1); for (args_vector::size_type i = 0; i < args.size(); i++) argv[i] = args[i].c_str(); - argv[args.size()] = NULL; - return parse(static_cast< int >(args.size()), argv.get(), options); + argv.back() = nullptr; + return parse(static_cast< int >(args.size()), argv.data(), options); } @@ -342,7 +342,7 @@ cmdline::parse(const int argc, const char* const* argv, while ((ch = ::getopt_long(mutable_argc, mutable_argv, ("+:" + data.short_options).c_str(), - data.long_options.get(), NULL)) != -1) { + data.long_options.data(), NULL)) != -1) { if (ch == ':' ) { const std::string name = find_option_name( data, ::optopt, mutable_argv, ::optind); diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp index 174d830031d2..62101637b3b9 100644 --- a/contrib/kyua/utils/datetime.cpp +++ b/contrib/kyua/utils/datetime.cpp @@ -612,3 +612,91 @@ datetime::operator<<(std::ostream& output, const timestamp& object) { return (output << object.to_microseconds() << "us"); } + + +/// Constructs a monotonic time point measured in microseconds. +/// +/// \param useconds Microseconds since the monotonic clock's origin. +datetime::monotonic_timestamp::monotonic_timestamp(const int64_t useconds) : + _useconds(useconds) +{ +} + + +/// Constructs a monotonic time point from a count of microseconds. +/// +/// \param useconds Microseconds since the monotonic clock's origin. +/// +/// \return A new monotonic time point. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::from_microseconds(const int64_t useconds) +{ + return monotonic_timestamp(useconds); +} + + +/// Constructs a time point representing the current monotonic time. +/// +/// The monotonic clock is independent of calendar clock adjustments. +/// +/// \return A new monotonic time point. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::now(void) +{ + ::timespec data; + if (::clock_gettime(CLOCK_MONOTONIC, &data) == -1) + UNREACHABLE_MSG("clock_gettime(CLOCK_MONOTONIC) failed"); + return monotonic_timestamp(static_cast< int64_t >(data.tv_sec) * 1000000 + + data.tv_nsec / 1000); +} + + +/// Returns the number of microseconds since the monotonic clock's origin. +/// +/// \return A number of microseconds, unrelated to the calendar epoch. +int64_t +datetime::monotonic_timestamp::to_microseconds(void) const +{ + return _useconds; +} + + +/// Calculates the addition of a delta to a monotonic time point. +/// +/// \param other The delta to add. +/// +/// \return A new monotonic time point at the resulting deadline. +datetime::monotonic_timestamp +datetime::monotonic_timestamp::operator+(const datetime::delta& other) const +{ + return monotonic_timestamp(_useconds + other.to_microseconds()); +} + + +/// Calculates the delta between two monotonic time points. +/// +/// \param other The subtrahend. +/// +/// \return The difference between this object and the other object. +/// +/// \throw std::runtime_error If the subtraction would result in a negative time +/// delta, which is not supported. +datetime::delta +datetime::monotonic_timestamp::operator-( + const monotonic_timestamp& other) const +{ + return delta::from_microseconds(_useconds - other._useconds); +} + + +/// Injects the object into a stream. +/// +/// \param output The stream into which to inject the object. +/// \param object The object to format. +/// +/// \return The output stream. +std::ostream& +datetime::operator<<(std::ostream& output, const monotonic_timestamp& object) +{ + return output << object.to_microseconds() << "us"; +} diff --git a/contrib/kyua/utils/datetime.hpp b/contrib/kyua/utils/datetime.hpp index 0c24f332f6d3..83ff866dc9c8 100644 --- a/contrib/kyua/utils/datetime.hpp +++ b/contrib/kyua/utils/datetime.hpp @@ -38,6 +38,7 @@ extern "C" { #include } *** 740 LINES SKIPPED *** From nobody Mon Nov 23 05:57:39 2026 X-Original-To: dev-commits-src-branches@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 4jXwFv6NQJz720v9 for ; Mon, 23 Nov 2026 05:57: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFv0q7mz4Vpq for ; Mon, 23 Nov 2026 05:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413459; 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=SVv5SZDC8awk2TOyT0m8XkWwnF+9pPpTc0OCn7N+qBY=; b=KHUhK0LtTLnWhwQdnz6ZHDaR6TVMrsYbqA4h/COQVIpDBEHsc5TZVDTndETF7kpQz8qOj5 vuJVC/gE5sw+BZEGtT2nKMdYh8pz/6u6j39tFaIsF07ug2XNVrP2Trwo0Ymwy4XiiVWxwc WojiW7j4gNo8rh+Ggrx2hUyxy2M+JPlXEW6qb+MBafpPIwr9BrsoXoRZqoXupx7rQfgj8/ nbH+JX0rEsBkbjSipOz0vG9GzukExpSEEiPMTeyvd8wyQZvIGW1CaojxzeiIIVvA3vc4il vFlKGpqdD7yCgQ6EzLycM5zNK1LmlJJwB1yD6AQ5JVatw10LQXDqVRo16NSF5g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413459; b=pPp6jK5MaOhJL060L+I9zKdjxdHIq+OLbIHTNsbVqzPd0rViLawMQ2cnWyZb+LID63qfbo p2Woad2+o+PBCqDeQxeC36KoUes45tpMyhqUkqMnVaugX86TvkzW9OPz+jb8xYVFQ4DcXD hMmQ6VoIqiW+68o/U8AaqDzhWRGslFskh+t0mfRaBf6ppNZjRN0zLj6vp2a5zdFejzK8ZW Dc++o4a1KzYv5nxuYzFyDU/hweS3NOTD/ymMMQoTD9bumNOkcL4ftkZMXRemBvbe+W5M6G Gqm8TtCXKOOi+R1kiDMVwp/CsrS1J0imdOwPhuPziTgAJ1kS2/N6U9+MLsscjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795413459; 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=SVv5SZDC8awk2TOyT0m8XkWwnF+9pPpTc0OCn7N+qBY=; b=CBbZfZjo9FPbXPrUgjBK072kZOhSWGL/hpfXp97AACz7NOTH8Z4n6lVa1rw1CqfGLqXPvX IVtiuEOiSdA00Z/HFRvTRWkH34034W50f8S35zRsHc5nDan9BJ5hBdrA0yzx/469xEnz/n otTrLiUcfwN1Odv/6uTszGIIH1cPIs4uHFCxGhJN39wlpaU6KAX+e0wzhCLuSIt4XzqVjk 20earfNbDBoKz9gTm24GKSUrXypXsg7ARO1vxrMrFoQHykfHpcs9E5hkeNubg5xfc73kwC VK7+Blj4bGUrcC1aU/+7fQ6eABTYorvBs4iDTZcLrkUmLkH+UE9JYmMh1ixpeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFv0L6hzfjy for ; Mon, 23 Nov 2026 05:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 05:57:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 70a30af2e0f2 - stable/14 - contrib/kyua: update config.h for 0.15.1 -> 0.15.2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 70a30af2e0f2e9ad5896077d221f8190dd2fe1b7 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 05:57:39 +0000 Message-Id: <6b03d5d3.a2b.66d3ac0f@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=70a30af2e0f2e9ad5896077d221f8190dd2fe1b7 commit 70a30af2e0f2e9ad5896077d221f8190dd2fe1b7 Author: Enji Cooper AuthorDate: 2026-11-20 00:03:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 05:50:29 +0000 contrib/kyua: update config.h for 0.15.1 -> 0.15.2 This was accidentally missed in the prior commit. This commit addresses a largely cosmetic issue. MFC after: 6 days MFC with: c16da33701d0 Fixes: c16da33701d0 contrib/kyua: update to 0.15.2 (cherry picked from commit d9daf5ae796518af1793f919156fb6feba05959d) --- contrib/kyua/config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h index cccfe36ae3a2..d456545697b3 100644 --- a/contrib/kyua/config.h +++ b/contrib/kyua/config.h @@ -122,7 +122,7 @@ #define PACKAGE_NAME "Kyua" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Kyua 0.15.1" +#define PACKAGE_STRING "Kyua 0.15.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "kyua" @@ -131,7 +131,7 @@ #define PACKAGE_URL "https://github.com/freebsd/kyua/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.15.1" +#define PACKAGE_VERSION "0.15.2" /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -139,4 +139,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.15.1" +#define VERSION "0.15.2" From nobody Mon Nov 23 06:20:02 2026 X-Original-To: dev-commits-src-branches@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 4jXwlk6szMz7234l for ; Mon, 23 Nov 2026 06:20:02 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwlk2y19z4bt6 for ; Mon, 23 Nov 2026 06:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795414802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnO+Ot5L4NReNmhRL41i+2V2E77NbJAOQF76bn0rY2U=; b=IzB1l400Fzp2HjQRudVL9qgJf7Z1H0lvvLHZ4RjMCNlavA/uQ5R8gLW9++rD0MWDRsqkE/ hvaUNskZtGDi1vGlXq2SUxvlAYDPqL+TaXEx8pbAlBcQTDAeWPeMFm1utzMPG2ogXebtmO EHvrxQBRXSBWdXeaPpSizGV/7V58OG8FiVdPSXx/gUUUkDqTaG5dR7w/AzpsEeZ6uf+oBM gWUsIwhnorArhnvqsovgh+bfPo1p9giZQNOiR08+VgXYV977BIeZncPLJcrC0bqeifOP6h 72u+vIc2sHQ5e/TVBpA98UqDy2Ypg+hhDmimMMwDMYw31Jg1KgG21EaW4EJTMw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795414802; b=SKZRldMqd6qCplMLVLgneqZ297+xuuxx5KtuLXn99ad7wIxwm6kBh/+22iorwVGrHNFVze UlojqMmwlVGlb3rBi9/II0Z+I7pxAyZ9AlZK2rlzzEmP6R7rTVtZuDc5qL8Lr43AOdrexz arg6naFj++nfNAl7n2sv1lNsAHj0l/kzXKwHijObtucNpIsGeIH1W4jGQJc+YoWJxAFPro +nF1fyVyrG+jGovn68WHgRqJuK2KPMFS0CFd+LqVv1Sf2quFVkE69PzzNEb4R81aJLl/lB e3zmtIzjxMzbodw84HTsvXQgEUOdCyua8/etW4OKnuhdyCd8UiDuB9s/g+Q6EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795414802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnO+Ot5L4NReNmhRL41i+2V2E77NbJAOQF76bn0rY2U=; b=JUw575glJ6xCb5bdzR168FAgp/ItEbkf3kL/+Yenjw+O7kCincPY2W7b0upWA0eAhUHsYC MDYZFGHn9KBwzUO7PKQ3JNe9QxOKFU3TBVC4A6SjR3ik7iztUQq/Yeq2o8pPb2sbrDsekc vZqdBBTSPUURDc0UDnttCyiR/MzjEmCb8d66WA/Kfup54cRqOX0NCz/uxfAMuLfEPI5jbt b0uxi39NOTBxEH/IetdKkYDuXOhgXkZ6erRkUfrXmND1UmIli8cTTylO5aqLt2yTDJFmSD 5k7nxX1CxEK2S15X/Dil0IgSfmDhOkOI3yhZ9xDNT1bygVo70oqVahZXd9jkMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwlk29s4zgGZ for ; Mon, 23 Nov 2026 06:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 13e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 06:20:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Igor Ostapenko From: Enji Cooper Subject: git: 806d881109aa - stable/14 - atf-sh: fix comment typo List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 806d881109aa0228752900fe33f997792a49a984 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 06:20:02 +0000 Message-Id: <6b03db12.13e4.1a8517b3@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=806d881109aa0228752900fe33f997792a49a984 commit 806d881109aa0228752900fe33f997792a49a984 Author: Igor Ostapenko AuthorDate: 2023-12-26 23:21:54 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 06:19:00 +0000 atf-sh: fix comment typo Signed-off-by: Igor Ostapenko Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/895 (cherry picked from commit d4d14d965fb92d2bceb744be41310dc47f27ab80) --- contrib/atf/atf-sh/libatf-sh.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/atf/atf-sh/libatf-sh.subr b/contrib/atf/atf-sh/libatf-sh.subr index ae73be2f5907..35810a63bae3 100644 --- a/contrib/atf/atf-sh/libatf-sh.subr +++ b/contrib/atf/atf-sh/libatf-sh.subr @@ -383,7 +383,7 @@ atf_require_kmod() # # Sets the test case's variable 'varname' to the specified values # which are concatenated using a single blank space. This function -# is supposed to be called form the test case's head only. +# is supposed to be called from the test case's head only. # atf_set() { From nobody Mon Nov 23 15:01:21 2026 X-Original-To: dev-commits-src-branches@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 4jY8KG07cCz6w85c for ; Mon, 23 Nov 2026 15:01:22 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jY8KF4Mj0z4pBp for ; Mon, 23 Nov 2026 15:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795446081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=; b=Y7YGrTvgoCalYocMtrA7UA2cg9m98jiRcgHjm6NWV6Hc+uQvESC88nJc62FS+jgHHmy4jR mWz/5NpBAqQmImblMFCr1P9iixAiGd1BOsUbJwMOUMPhJem5m8mZnjyx3EHNax6Ine+OCn oJNBfIThT3Fv1J2qFHFbaSs6tGfSHw3pavMtdOg9dIEKe1CMiOfWbM21bcVodf42pQipVG AYjq1TCZB87QML6KRtffoZT/2anzIStDwJc1dyqKD3mFsvUsK+oG5HR7GVXv3Oa0lM/Hfb rphaFLkgHHO7O4gSSh8mpB0BYw8wtfUiK2KuJI47kmoHuvGlckXNR73hPKn6vA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795446081; b=HZqEORSVfOEp7AY6CK6bkWJjWxbLzmXTV9/f9gmOSTQgH8a3NJfE0BF0aSi+pR+gYNShBP ga8GuSCkP+8br9KILcnzvDUfLoy6kNzUr+unt2/eJfEAubDcBigoUuazsXQ0wJNExSBWS1 MgS4exzbq9hV/PktUIvveK2gZSDtBldFEJYBpva1jICNmVK3LihMOCV+q9PBx2wI/PCNLX Rc0UPE9PM9/jHsx0QmuCXE/IX70OJAx+uetvhcMG5l3nGloqGo5uS/+93u/b8xBb+qof8d JPznFKgL6/h+3n4PaT3F5Mfeni+5APv1S7Q01rUXgRgeiKSF48hAa9MXJgg8GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795446081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=; b=e6bjKRqZMyAOzncEcZBdLhTwHkNdVeeFOfU0Iq8p7ixUbcWcqVx6yO2tzH3JM5qoZ5RNrh aS0PME3SE7d208yu+uwIH4ammxa4Btgp33t2W1X1OCvBCst6IUSBFeY3dwNE48GsFKDw7z xoraxWBByOwvTb6yZbFgsD0GzK1e7/87KmbPNiwBHbunk48EPhOvnZSO2dIJGi0StFYebr JeLVk9SFw/LnZKEi7n8NLj1eMibfSvI2T1vqKJ8HnlOCx3U8wpb+lkGV0kAR4A7/K1vpmU rQ3IB9Q/K2Nen3QPagJfQ2EoDXHsP6dKhrXUVqvw7MxLl28joQefJsOqblffKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY8KF3Vvqzwk6 for ; Mon, 23 Nov 2026 15:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11c6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 15:01:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ryan Moeller From: Igor Ostapenko Subject: git: 5d6bdb30a792 - stable/15 - dnode_sync: Relax constraint on indirect freeing List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5d6bdb30a792358efeb5a14255d399236627d6ef Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 15:01:21 +0000 Message-Id: <6b045541.11c6b.682d63d5@gitrepo.freebsd.org> The branch stable/15 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6bdb30a792358efeb5a14255d399236627d6ef commit 5d6bdb30a792358efeb5a14255d399236627d6ef Author: Ryan Moeller AuthorDate: 2026-06-12 18:43:58 +0000 Commit: Igor Ostapenko CommitDate: 2026-11-23 14:16:51 +0000 dnode_sync: Relax constraint on indirect freeing One of the roles of the dnode sync thread is freeing. There are two modes of this operation: freeing a portion of an object, and freeing the object itself. Freeing is handled by `free_children()`. This function verifies that if the dnode has children there must be at least one marked as dirty before proceeding to recursively free the tree of block pointers. As described in a comment, this VERIFY is overly strict. In practice, children may not be marked as dirty when the dnode itself is being freed. Relax the VERIFY slightly by avoiding the VERIFY when indirect blocks are to be immediately freed, to more closely match the comment motivating the VERIFY. While here, clarify the logic of the test by using VERIFY_IMPLY instead of chaining multiple tests. Sponsored-by: Cybersecure Pty Ltd Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Ryan Moeller Closes #18822 (cherry picked from commit 242105f01012bf07cc896a4fb5cdb1385ef58220) --- sys/contrib/openzfs/module/zfs/dnode_sync.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/dnode_sync.c b/sys/contrib/openzfs/module/zfs/dnode_sync.c index 0e070c69dcd6..199ac045679d 100644 --- a/sys/contrib/openzfs/module/zfs/dnode_sync.c +++ b/sys/contrib/openzfs/module/zfs/dnode_sync.c @@ -305,9 +305,12 @@ free_children(dmu_buf_impl_t *db, uint64_t blkid, uint64_t nblks, * ancestor of the first or last block to be freed. The first and * last L1 indirect blocks are always dirtied by dnode_free_range(). */ - db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG); - VERIFY(BP_GET_FILL(db->db_blkptr) == 0 || db->db_dirtycnt > 0); - dmu_buf_unlock_parent(db, dblt, FTAG); + if (!free_indirects) { + db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG); + VERIFY_IMPLY(BP_GET_FILL(db->db_blkptr) > 0, + db->db_dirtycnt > 0); + dmu_buf_unlock_parent(db, dblt, FTAG); + } dbuf_release_bp(db); bp = db->db.db_data; From nobody Mon Nov 23 17:17:53 2026 X-Original-To: dev-commits-src-branches@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 4jYCLp2g5Sz716D0 for ; Mon, 23 Nov 2026 17:17:54 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCLn71Dlz56yy for ; Mon, 23 Nov 2026 17:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795454274; 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=BoKDWBGBZqdcXpv+9beazQGo+KqE1e4f2qPQu176f/0=; b=TI3yF/4HC0eTqHHVNLvX3h/xiPuElzIGhw9QaeA+m0WSMYi+csouvSZwmVkU/kX6/UAsfU mtod4TrG6I1AMCPkuAlPzpM3XNvOouR60iwHdK/Nz/t5659aHbaPw/PO7/3TPqmoplIgPV s/Sf/T/hp1MTEKzdUnKLT6U/yFr4mU2LAi0QKMXJc+cDieBVyCJGUglP9r1A7QqCXAqr6q dwomhUkE5tnY147P83UifrAtfCDHPHrXnKXlquBKWSNlSYdERmS8pZE56m68lHwsK7PvHy u1rr9kEoKee/4AJa9mjwG+GDxB4Udvx1owY18C7jlx7lrgFP6dAI36x6LvXWBA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795454274; b=idqnLZrYq0bn0tuGKH3YarBkrySbtiPLZl+2LLK1/ZqKSApfyy9bmFhvjssWt21es1bV/i 1mpqXqCF7dTBm6/xhscFt4pRH7bhfyWL3qNPmkLMtjfXiKtdkxY+CMphc8Bk/EYGeNM8Tp Qfhf/hlYn9o5zeY7QJMcbncNSqBxfM+c68VUfGz+KxhmpTk81iKiy9m2COMvmatDvGIvnb xzFRQZiME7M96Kec7nHx1daGyJIN8LVvM0InCADa6S8tqrz6D9TK3cI9fujsfxByf2kwBA ctBAXs5FbZHbKEzE0+0Nb08QP9AmOQB2B0+ywvTeYpGsOl9kYqRflueMowtwFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795454274; 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=BoKDWBGBZqdcXpv+9beazQGo+KqE1e4f2qPQu176f/0=; b=bL9GmmAc4vaKRUD5xZVjjnEmFkJTp6IOuf44U+cz89b2ahUddznoTNrEkp8ozz5ZkaEZe8 iNQ0M5YhHeQq0veN73tCiQL0I00iQA2dYdrDyXRmNZdZWiJNkItlIR1y3tTTZEHVxZi7Yl /G+dOEcKmE2qc74M6xXY7Y2fKv1IhefyNSznSxdaY6b8Eqr7UUJhI4nJIJp/czBvqcsCOx uC/3C0bCWr6PDMQ26ERatXsjGomUZW5agWZLPehZudoOqipgRuOz4UQIAGgr91pfJN2YS5 veT0Asf6yRQe86Uzs1h12+w+xwFX136pYyorUJHtZv2VcRhh/FzB4wkI/sN1Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLn5zRzz10XN for ; Mon, 23 Nov 2026 17:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f533 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 17:17:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roman Bogorodskiy Subject: git: 0f821cea8070 - stable/15 - bhyve.8: mention config files for VM parameters List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0f821cea807064c1685771fc9806c3c6b2641cef Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 17:17:53 +0000 Message-Id: <6b047541.1f533.1ec5b1de@gitrepo.freebsd.org> The branch stable/15 has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=0f821cea807064c1685771fc9806c3c6b2641cef commit 0f821cea807064c1685771fc9806c3c6b2641cef Author: Roman Bogorodskiy AuthorDate: 2026-11-18 17:42:48 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-11-23 17:13:19 +0000 bhyve.8: mention config files for VM parameters Mention that virtual CPUs, memory and other options can be configured with a configuration file, and refer to the -k option. Reviewed by: ziaee MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61718 (cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306) --- usr.sbin/bhyve/bhyve.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index e5a9cf2a5d37..f0f5ab6b6831 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 3, 2026 +.Dd November 19, 2026 .Dt BHYVE 8 .Os .Sh NAME @@ -99,7 +99,9 @@ virtual machine. It can run guests on amd64 and arm64 platforms with suitable hardware support. .Pp Parameters such as the number of virtual CPUs, amount of guest memory, and -I/O connectivity can be specified with command-line parameters. +I/O connectivity can be specified with command-line parameters or +with a configuration file +.Pq see Fl k . .Pp .Nm is typically used with a boot ROM that can load the guest operating system. From nobody Mon Nov 23 17:17:54 2026 X-Original-To: dev-commits-src-branches@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 4jYCLq0TLrz716G1 for ; Mon, 23 Nov 2026 17:17:55 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCLp65BZz5701 for ; Mon, 23 Nov 2026 17:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795454274; 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=bHrr9Rxg50LNPu6pQExDHQnlk9BjOortA8F2SOkAMfc=; b=TjMLpKxBW+r1HGxNcRt+Abwr4fE5bOnuVVu8nliaCzfCmlGykerriSPwkbFeYuVrbWps64 vYvC2ohicC7fWOgJFCWyBUXDRGflnB7xH8ZQ4Y+sM4nWtWC3EzV1xXx/Rag70a3/YHakxp 4YNgxnYXKgNjEUklkgFZJvdd6NTmu1sUVAgo7U5sXP5ZnKP+Zrfs6s6nZKi8Z3JTzqpT+6 /cRCB3U5xen7XvOB3kjA18+6Np5pMsQSiCMQn+2BLohaYQIqf+8ZfgTwFRgDPJ6peGQgkp HkFaoCuInrfdg0OS2Uw5WImDuLiz0VwfV9M5FUuV6mZ/ddmaIfO1O0O+J/3/IQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795454274; b=nL4RRZCKmlOkC5VmNLiwQ7/kKNtu1s8tLdH6q+FR0y1jeB8gqzRfTdCwKF4mp7cKr8pfb9 7FEd5O+GEs81Mh3EYn8ZCM7BnDSwYngwXlAJVYSuSPDl5fHUe1OJcAZ0sCnYeSArN1nNzL 6EjNNwM1LK7qonUeRwyoJmlmsZiXr0+adp9CHj+2SkYY1uESUZlEdh5siwRxACNreHlhYo 1+yxDUa/+s9Yqf9b3iMHK0iHPp6CXtGIdqYiJ88ptaShYBNaN6Wu1LU8YUAcvXAIDOqDx9 R9ZpUrSpaWw1Xk8udziSn8CKC8ayr8WaR+NMn74Ld4WzP1TmNSXgQUkfe8IK1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795454274; 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=bHrr9Rxg50LNPu6pQExDHQnlk9BjOortA8F2SOkAMfc=; b=tzmXyKp/jQVQ67TdNz6YgJbcrL0uHAHDX7u838cWr5LOEAslEbxhAG6Q3Uj1klcJ5bfReI XPMrLnnLiIyDfDSUUXUB0ta8jo/6Qfk774xgzZjdPtIDJAi83717h9oYD1IoTGe8q1yrbk IQ70V4HQ0n7xHxi1ytLWiVI89wngx6gfbYY92kSsg8iFvIpNuiEDMz6uAHBHQbF8ARN3zd +nkFC/e+Azpw1Tv6fs4GmQP2wHrBldYQP1G7DhCxU5qKLLbvtYWyzFdwsxlNz3x64RknxU 1DgMBHx05ziTmGfMxorh9QwhDVv729LYi7eNvibHJW3EIj31oRAbmmdz1rkccg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLp5lzsz119D for ; Mon, 23 Nov 2026 17:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f69d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 17:17:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roman Bogorodskiy Subject: git: 19e3de6e1c80 - stable/15 - bhyve.8: mention VM nodes in /dev/vmm List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 17:17:54 +0000 Message-Id: <6b047542.1f69d.c28cac5@gitrepo.freebsd.org> The branch stable/15 has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e commit 19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e Author: Roman Bogorodskiy AuthorDate: 2026-11-16 14:22:09 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-11-23 17:13:59 +0000 bhyve.8: mention VM nodes in /dev/vmm Currently, VM nodes in /dev/vmm are only described in the EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8 to make this information easier to find. Update the bhyvectl.8 example to say "Existing VMs" instead of "Running VMs" as the VMs listed in /dev/vmm are not necessarily running. Update bhyvectl.8 to refer to vmm(4). Reviewed by: ziaee MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61623 (cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3) --- usr.sbin/bhyve/bhyve.8 | 5 +++++ usr.sbin/bhyvectl/bhyvectl.8 | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index f0f5ab6b6831..b73d0dae32ab 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -1166,6 +1166,11 @@ deals with the following signals: .It SIGTERM Trigger ACPI poweroff for a VM .El +.Sh FILES +.Bl -tag -width "/dev/vmm/*" +.It Pa /dev/vmm/* +Device interface for individual virtual machines. +.El .Sh EXIT STATUS Exit status indicates how the VM was terminated: .Pp diff --git a/usr.sbin/bhyvectl/bhyvectl.8 b/usr.sbin/bhyvectl/bhyvectl.8 index 550c4f10d8e6..8dcd3f4e27fd 100644 --- a/usr.sbin/bhyvectl/bhyvectl.8 +++ b/usr.sbin/bhyvectl/bhyvectl.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2025 +.Dd November 19, 2026 .Dt BHYVECTL 8 .Os .Sh NAME @@ -96,13 +96,14 @@ Destroy the VM called fbsd10: .Pp .Dl bhyvectl --vm=fbsd10 --destroy .Pp -Running VMs will be visible in +Existing VMs will be visible in .Pa /dev/vmm/ . .Sh COMPATIBILITY The snapshot file format is not yet stable and is subject to future changes. Backwards compatibility support for the current snapshot file format is not guaranteed when future changes are made. .Sh SEE ALSO +.Xr vmm 4 , .Xr bhyve 8 , .Xr bhyveload 8 .Sh HISTORY From nobody Mon Nov 23 17:30:05 2026 X-Original-To: dev-commits-src-branches@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 4jYCcs1HsCz717Wb for ; Mon, 23 Nov 2026 17:30:05 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCcs0cz6z3Fv7 for ; Mon, 23 Nov 2026 17:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795455005; 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=hey7Xds247oX2SWYkkHoFNpWOLu7Ft6EBWupx2cFS0E=; b=nr7MzEPpL8HjZNYU+EA7TXJ8JVOzRag3u2SdJpoFZVvcGOnBxnvkCcZjCngeLSQA8Talt6 3b089PrL0VkS5kNbipyBGJ1n6cXtSgxTfIlNxR75P7gh7Ax3N30BomNoq55hVyv7TGsV+t YytnOqKDuEiqWW3g8WLScndYY5oD/BjQtCX1M/Kgv5QOYMlW7vG0EDTXeEZzv5JZ4oMfxL J42r6TuSO6O3RSNWAjwI+/X4NRGaIRTUrAZVa4P+Ao31UfSJGuGYseS8rdZSVg4h8cSvxI qxo08/6Rgb3LqjHU2VLSoKeEoLwFT/GQwH6jGcU9Jvs3RpXQHiZ4wSHyPhWc5g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795455005; b=Uc2i3zLry5juKP1FvP/EjnyNlduu4Gk+D4Xnae6/SRAGeafU3Ewd+ModkykvGni6IVU+/q ex+6fIpZtnDI7Do0rjNz5qNXWP//LXKlifJz6UwC6v6iFXWngnOzV/6CzY3yKzFTWvVIQT KjIyIGpEzZrvRtldrDqZsr/KnbrjNi2vWVXF/aNIoNXL5MMfl9yGHvoyXjiUPXKrJiOJVY HNMK28J9G3xkM3vx1HrVFOaPxd7wPPqhvdq03iCnKBOp8ZBZ7ylcMRvVrtcLF3DZbz4EeR Z3erEhtIaczR6kjVhzX4zFG7OUet/SzUksy23zlxuA00t2nrVkc3VwXV1Yue2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795455005; 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=hey7Xds247oX2SWYkkHoFNpWOLu7Ft6EBWupx2cFS0E=; b=JL7FLip+301aCAIJDsVedwnKPN1QmMJpmf/rahXx1oxs3RJIES8vBI8Bz3Dmi5GpdjS3eX mbsRO+ITKqbA1qlVoPNfR3Z0nqGqPs232FMD6OD8lILy9PsQ3pqbp8tAU+O5An3oiJWS2G 1JmowX015a4/ElqvLU4/DsAr/IqCxNd8S8vnTID5dipkpycN8oEts50tiAJ6eDDjjKvip8 TMFMkpqhxcBpSEPlcBnNa3tiH7z859F6auzyWRDuU4xnhYu1iULVL3/0xIsstcIF6Gm2Ae MGbbkCeBfny/klg3IMpOyKU62C/ItZGyLggjBQ2ipUdnCf+qOT5jm4z4qSoX5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCcs0GLZz1155 for ; Mon, 23 Nov 2026 17:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8c5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 17:30:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roman Bogorodskiy Subject: git: 846dd52a6539 - stable/14 - bhyve.8: mention config files for VM parameters List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 846dd52a65396c1344b9be31db795a395d7cc413 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 17:30:05 +0000 Message-Id: <6b04781d.8c5.746396d9@gitrepo.freebsd.org> The branch stable/14 has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=846dd52a65396c1344b9be31db795a395d7cc413 commit 846dd52a65396c1344b9be31db795a395d7cc413 Author: Roman Bogorodskiy AuthorDate: 2026-11-18 17:42:48 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-11-23 17:25:12 +0000 bhyve.8: mention config files for VM parameters Mention that virtual CPUs, memory and other options can be configured with a configuration file, and refer to the -k option. Reviewed by: ziaee MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61718 (cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306) --- usr.sbin/bhyve/bhyve.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index c8adfb6a8947..7f90a2c984bd 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2026 +.Dd November 19, 2026 .Dt BHYVE 8 .Os .Sh NAME @@ -98,7 +98,9 @@ is a hypervisor that runs guest operating systems inside a virtual machine. .Pp Parameters such as the number of virtual CPUs, amount of guest memory, and -I/O connectivity can be specified with command-line parameters. +I/O connectivity can be specified with command-line parameters or +with a configuration file +.Pq see Fl k . .Pp If not using a boot ROM, the guest operating system must be loaded with .Xr bhyveload 8 From nobody Mon Nov 23 17:30:06 2026 X-Original-To: dev-commits-src-branches@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 4jYCct1dq3z717ZN for ; Mon, 23 Nov 2026 17:30:06 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCct0yBRz3Fyx for ; Mon, 23 Nov 2026 17:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795455006; 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=d9scB9Hf/QR/tLiJvVsusJjDs63medPDd7ODBhUOelE=; b=NnGn0AWd0pfwHTQQqRVJYyxCHii2mOGjDYOX9mfplrxRpvCLsv58YF2xZZz2y0CegBla+h DDvToUQT61DIQbquW4merL22PA+FNd/CmI08mi/pnCFXSzJOCXzMCKjFghqoLkGmgtO7kp tQ4uZEYyKDpSIa1ZV+oGLYzCxG4keFuf0eze5Dzq26GpgbiJUCyw29t9hP7M7UpPfYB3Zx dktoOUM7JitXwDEWjQoR2WQCBTqwR9jc96UZ7EzCaMhKr9T8CBFrZS774yBdWYes1LCvMM wQGYem570J5u8i+aIneOTqsNsTFgoY/XYTesIbudSew2QqUHjn1I+1OWnrlwVA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795455006; b=tV901fvUW9z/EXe/npJPzskh9scikRG8HsmXziofBf7LMFp8ltKoKd7ab0jUDHBmbtvT58 hnM131oGxUYxyKedqsKav4v4SINTtGfZ4uY91qW/EezeXI4erbq9SnMjNvKQtKkItvQESX ikFw5SiJXE/8n28yv8///wxRu3B4X8jVtq+8w3RceJXcngmAY0/YilnL71uFHwEH9EMbMP eQthUvD8NHhWY7uvWc+qOXZ1AKMn70XLAQbH+btJKQ1XLKpmn/dMWEWlSi5yUry6v2PEH/ diGgB4rOo95A7CvU/K5nCNNhaFTpgNsxtmCLk5ELc2UwVrV6wVnflQp0i9kz9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795455006; 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=d9scB9Hf/QR/tLiJvVsusJjDs63medPDd7ODBhUOelE=; b=LD4D6lok3EOKGlbbplzueI4LLiV1E/i0eNBy7xSsGuYsrUdOE6cywRD3GEWckGmi7INSe/ /hylpo4uQJuOLaos7th+NEvhA+GY34FVwzsdIVbAoUveNM29Y+90p6aMfAP4acJSq2pYnJ +auhFRL4pEDEupgqEfcTjb0X0zrFmlBtfGOybx7cLFAaDKJGhFmpeaUUJuQrKLMRCuX59B nmrEHPBOl5IifpoE5WgkKT9yO3lkncm+g0bKAXMrFoLbSZQm0r2NxG7kFP7IQWw94PL0j+ iZE6gYs1mJH9ZwlShfTNYZygTTIp7fHvYQ830MYjxOB+YONSpXe0ZRxh6WqtsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCct0cwzz10qC for ; Mon, 23 Nov 2026 17:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 17:30:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roman Bogorodskiy Subject: git: 4457feb4f650 - stable/14 - bhyve.8: mention VM nodes in /dev/vmm List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4457feb4f650043505345d964cdde7aeb310d888 Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 17:30:06 +0000 Message-Id: <6b04781e.18ab.430226f1@gitrepo.freebsd.org> The branch stable/14 has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=4457feb4f650043505345d964cdde7aeb310d888 commit 4457feb4f650043505345d964cdde7aeb310d888 Author: Roman Bogorodskiy AuthorDate: 2026-11-16 14:22:09 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-11-23 17:25:27 +0000 bhyve.8: mention VM nodes in /dev/vmm Currently, VM nodes in /dev/vmm are only described in the EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8 to make this information easier to find. Update the bhyvectl.8 example to say "Existing VMs" instead of "Running VMs" as the VMs listed in /dev/vmm are not necessarily running. Update bhyvectl.8 to refer to vmm(4). Reviewed by: ziaee MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61623 (cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3) --- usr.sbin/bhyve/bhyve.8 | 5 +++++ usr.sbin/bhyvectl/bhyvectl.8 | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 7f90a2c984bd..e4bcf3efea3e 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -1016,6 +1016,11 @@ deals with the following signals: .It SIGTERM Trigger ACPI poweroff for a VM .El +.Sh FILES +.Bl -tag -width "/dev/vmm/*" +.It Pa /dev/vmm/* +Device interface for individual virtual machines. +.El .Sh EXIT STATUS Exit status indicates how the VM was terminated: .Pp diff --git a/usr.sbin/bhyvectl/bhyvectl.8 b/usr.sbin/bhyvectl/bhyvectl.8 index 550c4f10d8e6..8dcd3f4e27fd 100644 --- a/usr.sbin/bhyvectl/bhyvectl.8 +++ b/usr.sbin/bhyvectl/bhyvectl.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2025 +.Dd November 19, 2026 .Dt BHYVECTL 8 .Os .Sh NAME @@ -96,13 +96,14 @@ Destroy the VM called fbsd10: .Pp .Dl bhyvectl --vm=fbsd10 --destroy .Pp -Running VMs will be visible in +Existing VMs will be visible in .Pa /dev/vmm/ . .Sh COMPATIBILITY The snapshot file format is not yet stable and is subject to future changes. Backwards compatibility support for the current snapshot file format is not guaranteed when future changes are made. .Sh SEE ALSO +.Xr vmm 4 , .Xr bhyve 8 , .Xr bhyveload 8 .Sh HISTORY From nobody Mon Nov 23 22:07:24 2026 X-Original-To: dev-commits-src-branches@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 4jYKmr2xwZz71h6j for ; Mon, 23 Nov 2026 22:07:24 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKmr2TH2z3Jll for ; Mon, 23 Nov 2026 22:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795471644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KTVQVqGS23LxcnN23dMqiyEsYkAhQ0aWJ9IiQG4uv3Q=; b=pH/ieXoDBLpz7L+SDNmW722aP6OE5ITrhnXJLdyNQxyo+bScPIRjdL8bM6JMhY9BAGLd8J 3leYnmpamqruVH4zYU2+/pwDPWs2b9HvjsY6ntQPveq9ILfpB91KQy3yq5hUUluADSOppc bKBVLV6oZSYl374vS+lqXeDW+IS1F4ybYwRKZ0+Xbsqn3HdMmQqlV/8fm76PcpfAGlfh3O 0vFNSOqvFq0yG7MovN8VSKDzH/FhOnBbJokHGqsXOBEwxntcH3ywE81bGcyOuurw/oB05O BxqLLMZPB8v0BNRtV4oQBhfLpp093KLtVC2Mtqx8IwpzdKXhAL3hQhFSq9SnzA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795471644; b=DUrOqQXNORUZLB0x8EgTxRseVbHokvrPS9myU+3Snl6H1vpKIhcO3BqTvkjDABPHsCJzMQ a+mNdW27trGlEV4U0JOBgbqiGWiwdXoeh6azjGdv3Jl0NDQLQSE3zqYt8Zr+rAWwzbPuQy z8saaUwHdSOC/yj1gc8zWOn0ZxznD279U0dnYlYqn+4xBbs/CMhEE3Fk0Rbq1Ueg+gkayu xMzv8gjKeJpo/UWA0fmxaMp1s940ubgUeWepkEc0ICB0Io+qdOMNUOgITGegh7xoWnAo8E z9EG+gkWDGpGxZddQ84E/kM13vzvrJaRsdWfLuEkymWqqJjleOALfEW4KgOipQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795471644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KTVQVqGS23LxcnN23dMqiyEsYkAhQ0aWJ9IiQG4uv3Q=; b=vVUc7L5s4FEA+U6fmFUxrHPP8xl3chWa5zESjhXrlimmCBqjmjZyZWL0lB1tA72gQvtxlD R9pyQ1EGO1YWl6W9gnCiDSMArQQanIIhCMdjtkY90yrgkp/Gae4w9xDok0jTiXHtHPznsm zTjhrQ0Qhn/XydvmXbfF5PBbt7rSqQFTFPKz0+ME3zh6lvSwhBxI5lB2+r5jsMABaae/I5 KNeAWMvrgQX4xJ6zwaP9eBUO/oPiUPh8Ku6YCe8xL+zUYVRp5UCxJCTjOuj5Yq05r0RSf3 TO0VoK66MWdqbWFd+nEreyFxB6vfEwUzT56dXkmfoET1B+vRGQawkWa7RdqcYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKmr27t6z18MD for ; Mon, 23 Nov 2026 22:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c949 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 22:07:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Enji Cooper Subject: git: 905120141436 - stable/14 - fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9051201414360ecd0fafb1637a71b834c4151cdd Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 22:07:24 +0000 Message-Id: <6b04b91c.1c949.67579895@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=9051201414360ecd0fafb1637a71b834c4151cdd commit 9051201414360ecd0fafb1637a71b834c4151cdd Author: John Baldwin AuthorDate: 2025-04-11 19:12:58 +0000 Commit: Enji Cooper CommitDate: 2026-11-23 22:07:16 +0000 fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning tests/sys/fs/fusefs/xattr.cc:572:50: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size] 572 | strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); | ~~~~~~~^~~~~~~ The warning is correct in that the size is the size of the source, but that is intended in this case. Use memcpy() instead of strlcpy() to match the same code in the size_only_race_smaller test above. Differential Revision: https://reviews.freebsd.org/D49786 (cherry picked from commit faae895fec6571242ae05b11bc7eba0dff83fa49) --- tests/sys/fs/fusefs/xattr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/xattr.cc b/tests/sys/fs/fusefs/xattr.cc index a348315265c2..b863bdbc06e6 100644 --- a/tests/sys/fs/fusefs/xattr.cc +++ b/tests/sys/fs/fusefs/xattr.cc @@ -642,7 +642,7 @@ TEST_F(Listxattr, size_only_race_smaller) })); expect_listxattr(ino, sizeof(attrs0), ReturnImmediate([&](auto in __unused, auto& out) { - strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); + memcpy((char*)out.body.bytes, attrs1, sizeof(attrs1)); out.header.len = sizeof(fuse_out_header) + sizeof(attrs1); }) From nobody Tue Nov 24 00:21:44 2026 X-Original-To: dev-commits-src-branches@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 4jYNlr67YLz71w9w for ; Tue, 24 Nov 2026 00:21: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNlr4l7Kz4SxV for ; Tue, 24 Nov 2026 00:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0qYFACekUIqrRVH83JAKeKX3/WZVARwZmQgkivXvYdk=; b=ZiDd4LnbyY2u2AMZGB8iOnqo/IQ5IQ4T2kiKXqtUYXnG5Poz1V0nA3pYgolgDR4d2X9yW1 QWPNpYthU3oJck2zBpb/75H/Ofj3d7ox7DIwNe2F/EfGr6/126y7rIAAGnNisbP8q75Zfd ljQLU0HKjpvnYfwbOgi+haZ8nZsrvbIaiOj0lbB2TjkYFjNTqwBBj5h6F/2GKeO2JnjcI9 xGXD5Xzg1YmS3ee42YElN0QJQAgyNFEK+8tmbMTsGROjW8TW8FHlVvpH78JWIughLk8Jpg 9z9oHsUQY4feCzYIeou1gsUq+hbKLokjSoUKsXX8zHP9eqQOs3tMHTggpxUpZg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479704; b=k2phVpgcMjWCVoucH8opl/RiSja/YroAhg7NzND/BnKbFZjs3JxaBAisBrlk2w2vezL5XU 65hFZljPK92Uj5bw4fgK8zHqgSZKagMBVEFKpaR/0LtY+cZ27dAefAiHeVsLdnKCL7syfv qezc3BbcS96S+T8d3b74bAF2AZgC3zn82UYtmyY4hXuSaG7r/jk7+KleelAMAo2+VpV5Iw as32tiirRAaW4lPobV2097NQOl0KkIzgMe3R5xUFHzyfMZj+jWLLb41qdnDDBJb7d3WEmT idgaWhHytDnBBTS+gizNXr1FidfMxOS6mGY6g7UPD76yF4nOJyfr9x3r8wWkow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0qYFACekUIqrRVH83JAKeKX3/WZVARwZmQgkivXvYdk=; b=A56fNV2fNJ32Wo2RBNWwvd4wz6AnQ+U20MKoh4yrw3CDycgdBFNc9+zDmzeB+bC3NHr/rV RfWdtDSgc4EVe5LOfgcGg2VblTzpgXlo/Yjz8bWU4Jn0EgCgPTueiydX2k6xcG64MQzI08 yFm7mY4IDZtlgg5eVVFKy/NlvOTb0lwDxoqSQf5ZjN4XB9wzaFbs9kt0ITRO/Ik/pT3KeD +OLfB+AGgVUYiLo3Vzq1QDoM3mhfwzE5XpcEo12TdoVz14Co0T6bekP+Z+AP6hgxkwrufs TgWlRbl4HloIhGR8f8FcNM8DZCgSwGkeFIy0jiE+uYM/FGc42x7m+bluL/SO2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNlr4QMMzDrN for ; Tue, 24 Nov 2026 00:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ca72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:21:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Enji Cooper Subject: git: ec5fcc711384 - stable/14 - makefs: tests: Double the timeout of ZFS compression test List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ec5fcc711384df7ce72e9f24874034ef9d80937f Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:21:44 +0000 Message-Id: <6b04d898.ca72.72b158a2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ec5fcc711384df7ce72e9f24874034ef9d80937f commit ec5fcc711384df7ce72e9f24874034ef9d80937f Author: Jose Luis Duran AuthorDate: 2026-01-05 20:31:40 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:19:53 +0000 makefs: tests: Double the timeout of ZFS compression test The test makefs_zfs_tests:compression is timing out on ci.freebsd.org. Double the default timeout to allow it to finish. While here, check if the file exists before cleaning up, otherwise, cat may fail. Reported by: Jenkins Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54424 (cherry picked from commit 9f28e92637e9a29124f407b74d7665a921865a53) --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 22b81d93267d..6f7b568531a0 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -41,14 +41,18 @@ common_cleanup() # Try to force a TXG, this can help catch bugs by triggering a panic. sync - pool=$(cat $TEST_ZFS_POOL_NAME) - if zpool list "$pool" >/dev/null; then - zpool destroy "$pool" + if [ -f "$TEST_ZFS_POOL_NAME" ]; then + pool=$(cat $TEST_ZFS_POOL_NAME) + if zpool list "$pool" >/dev/null; then + zpool destroy "$pool" + fi fi - md=$(cat $TEST_MD_DEVICE_FILE) - if [ -c /dev/"$md" ]; then - mdconfig -d -u "$md" + if [ -f "$TEST_MD_DEVICE_FILE" ]; then + md=$(cat $TEST_MD_DEVICE_FILE) + if [ -c /dev/"$md" ]; then + mdconfig -d -u "$md" + fi fi } @@ -128,6 +132,12 @@ basic_cleanup() # Try configuring various compression algorithms. # atf_test_case compression cleanup +compression_head() +{ + # Double the default timeout to make it pass on emulated architectures + # on ci.freebsd.org + atf_set "timeout" 600 +} compression_body() { create_test_inputs From nobody Tue Nov 24 00:21:45 2026 X-Original-To: dev-commits-src-branches@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 4jYNls5vz5z71wCT for ; Tue, 24 Nov 2026 00:21:45 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNls50j0z4TMQ for ; Tue, 24 Nov 2026 00:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSF9eyIpLT9ujl11m+vG6Y2tCLJDA9U+KtQ+ioBPNU4=; b=MyQLvZEtnjmIs/1cStD1caWx8bkxrCcooN5LexEOfW47JuGc762ySD8CG+aaDM+XKxMki6 OCU9LJ8TKiiXMzke1F45QoLhXRr1Kuh+s9dgyovwUwLkZNlIJuM5Q+/UgwetnGc3UKC7zP hVz/aBovewJ0BZyggkwWaVCyIUzxBz53q2Nkup28WZk+zj3lIR0zRESTzU1mxpHFDrZzID xnvyY+vons5vFj5ztZvUvluCDSdRpVZe3RlGSUxbUt+lAg8AgyvobC0Xk1BdvW08lFR6du CLmG3mtzwf/3cJ6HMBwsbXjHmH1D0Tn8br7kvD4VGmDvHWhG2uSi3UO4jFzL3Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479705; b=dBaXMfw1ut5BksT5l9ZLOKOQiuLfI+RXpJB2LPtWDvKZ+YE9uw3xxgGXIgaTSQNbawIVwN jGs6Bw+jx6rnvifvkvoq6P0ii8lpsAiesJIHPRjZsljQQZVk1hHbH4vaud58lg6KSkHWjA Q39pndf5m/vYERlCIcC3NUkU8fiJ/FCBxghHs+wsHKMIJpVLfF42iXFG3qTdVlWnt/v781 LD6hEX7w+6AxZVcjQryIQgGNJnD/2Ye/K+iwSsrrumFgXoL+TW+Re5LxtwA32JRWP1uKgq nLD5q/Cslp9V949X4j+D9pT79XvYEX9zjZBpCmRKFhf6a0thVgxKcxRucTuiGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSF9eyIpLT9ujl11m+vG6Y2tCLJDA9U+KtQ+ioBPNU4=; b=Z6xOpI0DAFJ0NQa789hJx6gZEjp7sbaSIRbcNMmfxqpoL9WMAIk+xjEaov5kx7eCuwt4a2 Qm7fl8cFGdeq3CesUiFPZ71A3/O/9RcrqX+Y70oY40NSgzMeDt10J1AQkTqsXGeQ61V+oI jdU6LdytccXYy645+awcCOYBWJZvkRnzJ2rwIWSegHMEf/0fVDSucmBgZtPbb52QGLLyfw bAdU/op66/Rwqp+m3jLhzyfgEq7FyR75ZSB4qHhp1u4MUqWeAFB611AQWM9gm2XtiUcB4B qml+/xToGn5ZkvLdFQKLwiOEiDeuZrH6QxUQ96MA+IB/LRT8B1b8B8zl+tAgJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNls4gcbzF3Z for ; Tue, 24 Nov 2026 00:21:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id bdbd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:21:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Enji Cooper Subject: git: 95f994ed7bb0 - stable/14 - makefs: tests: Double the timeout of ZFS file_extend test List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 95f994ed7bb019011c9c9a6126ab74c36bcad981 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:21:45 +0000 Message-Id: <6b04d899.bdbd.602c5dee@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=95f994ed7bb019011c9c9a6126ab74c36bcad981 commit 95f994ed7bb019011c9c9a6126ab74c36bcad981 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:32:24 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:20:01 +0000 makefs: tests: Double the timeout of ZFS file_extend test The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org. Double the default timeout to allow it to finish. Reported by: Jenkins Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54425 (cherry picked from commit 065f02174f76a49fbf537ee51ed8068d3d398b08) --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 6f7b568531a0..d3cd0e0e4be3 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -312,6 +312,12 @@ empty_fs_cleanup() } atf_test_case file_extend cleanup +file_extend_head() +{ + # Double the default timeout to make it pass on emulated architectures + # on ci.freebsd.org + atf_set "timeout" 600 +} file_extend_body() { local i start From nobody Tue Nov 24 00:24:57 2026 X-Original-To: dev-commits-src-branches@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 4jYNqZ0rQVz71wqw for ; Tue, 24 Nov 2026 00:24:58 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqY5MySz4V1G for ; Tue, 24 Nov 2026 00:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HUqddlmJoMXDpAfQWKTHkS+NXg0b5dOxbU4HmQB+os=; b=mdl8hcFIdW2HqJTzU0dRaoCrYfrQMnFrTg0WTNcFsDblVZO1P27nxt5CO9aXJgfN3GFEPd tRc5OOFEK5/oqQnrN1NEIlYYc+fK/7I64qtKk9lph5ftJFoWG8H7nR9vTZuztY4hkj35dI K4yagjIg+FAX8zQDoUww15rh+INWehE0s4GTO0N2PJfkjqbz6k7IB0bpIJcXCBcPclMnmg 0Q+FNnmhp41ez7qd5C73C7u/Tqo+BV9tFmll11h8eGcHJjHmWcy1FRudNiuWn309sTCxyS LANdwRufiLNgtpWknZj4b++OzsdsRyJXWlLB3lzEpbtWD2K0F9pAmu50j0wnWw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479897; b=e4amUyWcPdLcZXPZm72Di/6fkJt33LnF84zq+mAd5UXGjsXQY4rJkHIDWVWVgdixvYLAQN JlS0UHNAYv7UfM3j1tzt85i1G67S/FO4xseY1/0ytg48WizKwIT1BbbO2yelpbBgqzQlZR PTjwgf9o0wBZulDByFMAgzGEy5lRSBofA5ME8wr4XmcuZfw/1TwUkdb39KW6q8D0eyO9tQ IonuKtVyjkDhrZA3Ut+DHus0XPjIsDqY3+mdZuFn8saYtEN4+/n/rGFE/BE2G7FezS63hs IzFYmiXPKbjuHF5MeOIhwLpsa34QcypYMyIVr4HXWEhIZy7Tzwf2z+do2H8fng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HUqddlmJoMXDpAfQWKTHkS+NXg0b5dOxbU4HmQB+os=; b=SrDWR6LArB5p7Orqb2NRSToqM0aeKPc8nrSdrynZjTlr733NVB/haHe/3FsJBLLdy7EvRV a7ESUBTMWl4OfSREfq/spn16WCvjAy7ibp76HTT9CtJHVkuCbS6ClkPOqdLg/FtodCOk+r MnMmBC3eBL0NNixDdlVufcHVjk2ah879sqnwBoYHeBO1eIUEh739B6Y5ki0diHhRHC8llR GOJGyMX3AY08SY/4CgrL/OyxS6j8MAGEaxlNYxEA4jSBoZ/DnCXDYlypBE5HOOtZxs9NG6 roaiTesily2dJxq0JEA39IBSA9WpWxevEALN86F1dMcOTAdLeAWRBe3Mh7QQEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqY4mq5zFBC for ; Tue, 24 Nov 2026 00:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c2ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:24:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Enji Cooper Subject: git: b308cbd55841 - stable/14 - pf tests: give rules_counter:4G more time List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b308cbd558410a75b1cabee522344fb52c1d6e58 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:24:57 +0000 Message-Id: <6b04d959.c2ea.6ec717ff@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=b308cbd558410a75b1cabee522344fb52c1d6e58 commit b308cbd558410a75b1cabee522344fb52c1d6e58 Author: Kristof Provost AuthorDate: 2025-10-09 07:29:14 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:24:15 +0000 pf tests: give rules_counter:4G more time Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 8217075f9ecb12fa9a4cf746541b9d3e1dc57e79) --- tests/sys/netpfil/pf/rules_counter.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/rules_counter.sh b/tests/sys/netpfil/pf/rules_counter.sh index 60878c2bd99c..43bff3706f15 100644 --- a/tests/sys/netpfil/pf/rules_counter.sh +++ b/tests/sys/netpfil/pf/rules_counter.sh @@ -153,6 +153,7 @@ keepcounters_pool_head() { atf_set descr 'Test keepcounters for a rule with an interface pool' atf_set require.user root + atf_set timeout 900 } keepcounters_pool_body() From nobody Tue Nov 24 00:24:58 2026 X-Original-To: dev-commits-src-branches@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 4jYNqZ6x9Rz71wl9 for ; Tue, 24 Nov 2026 00:24:58 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqZ5Vhtz4V3h for ; Tue, 24 Nov 2026 00:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVhrxYpOL4AkKO+lvsHOsZ1oMSmOTpZrnNWkURlA42w=; b=j8ntxeuIMoXl5aFMD4I69bJdrooVd4oF3dn6GaZxNvaKXd13/Jy7hlg2P7MRQNleJCutWk afMbqiCC+iYV4yqoCuEZFFcZx0KotUHi7tcChFq/6cdU1UvQEbITmSOwESia9z5IBHh6hS xVp819OYI/1zY7ct64EFfbkzROw1cjP5vMm1ReZHFRfWDi+AIbZt5lJ2rUjfBHjk+FwoC+ hRCDrYfJgNf64U07HForO5DFJLA2u/5rXWmK/Ai5hcLLrHLCyDqS7ObLANZtcKql8kN+14 dYriEofLo16ZreIZbDWiyQ542Ws7aNEk19KlIW8xT/mkkg+e3XCDpVv0LIS85Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479898; b=MLBWCyzoUwtEv12Td58HtH84NNrfriN4BmydyDcRVANxFagLH0n7m+Ey2AfkOchkKWXqDZ GqFiJ4tMOGkO4VuT/4DvBfSghICUX0SL/sp24ihpF7US+XActAWfGt0FQ0v0TxNEZr0ygt qdqo5xFIEMfGNE4JQ+eiI3dCnuZ8mtS2w2UnH4G3arCvARJac1icK0N6PalHFrPCDxnK2C 0z2fjb+90ADL12koxw/P7KElJkdRlBQoAtDKjNeqwfuJ6ScOOxEevNPlKkrCDxW0h14R/t +65Icqwv9m666fS/vOLf/poduGLFCjJw63W5v67IXhueSV51DCWhkalQarPgpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVhrxYpOL4AkKO+lvsHOsZ1oMSmOTpZrnNWkURlA42w=; b=YyuKR9VVVL6volVHSMFvTP/snW8/WHiE9Frcs+BAybdkQGZbpUmQ8dCmCEhYRK4Vb5DlzX vtYX2w72OvaMK6uz2d08OMRiwUVHY8g60Z8f6dUf2g+L+nCEq/M9D/aH/VFMvm9I/i2PLU xqd3cet1FdNrP40/M/vY9Ppmg8XiZ901gOttjeT9vEqQflyYTKcXg9hPOXeXInscRf7a50 9yvAsVs4xcXJue8iAQlLeleuYwUQ6ZiLKWVSIPaucoknVS9HnFBUOazGxN9yq/yf7Is9xa gdjvJ+VmQeIUBpoQUpZK1zuvvAT4HZwKTR9MGH3MDyug+zpE+9aIhRM3QcbNUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqZ55RMz1Cjn for ; Tue, 24 Nov 2026 00:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ca77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:24:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Enji Cooper Subject: git: b596b02a98d7 - stable/14 - tests: Increase timeout List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b596b02a98d701b5a5586765d201cb37fc815d19 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:24:58 +0000 Message-Id: <6b04d95a.ca77.2db37d04@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=b596b02a98d701b5a5586765d201cb37fc815d19 commit b596b02a98d701b5a5586765d201cb37fc815d19 Author: Jose Luis Duran AuthorDate: 2026-01-07 17:52:26 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:24:15 +0000 tests: Increase timeout Bump the timeout value, to avoid cutoff on emulated architectures on ci.freebsd.org. Reported by: Jenkins Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54550 (cherry picked from commit 47015e4546619151f9bff548a3758b72286d04ed) --- tests/sys/fs/fusefs/Makefile | 2 +- tests/sys/fs/tarfs/tarfs_test.sh | 2 +- tests/sys/geom/class/eli/online_resize_test.sh | 1 + tests/sys/geom/class/eli/reentrancy_test.sh | 2 +- tests/sys/kern/jailmeta.sh | 2 +- tests/sys/mac/portacl/Makefile | 2 +- tests/sys/netpfil/pf/rules_counter.sh | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index a8035a3bd7a4..2b73df8bd30a 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -76,7 +76,7 @@ TEST_METADATA.ctl+= required_kmods="ctl fusefs" TEST_METADATA.ctl+= is_exclusive="true" TEST_METADATA.ctl+= required_user="root" -TEST_METADATA+= timeout=10 +TEST_METADATA+= timeout=20 TEST_METADATA+= required_kmods="fusefs" FUSEFS= ${SRCTOP}/sys/fs/fuse diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index 505bfc5325f0..3a95263aeda9 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -401,7 +401,7 @@ tarfs_large_head() { atf_set "descr" "Test support for large files" atf_set "require.user" "root" atf_set "require.kmods" "tarfs" - atf_set "timeout" "600" + atf_set "timeout" "900" } tarfs_large_body() { tarfs_setup diff --git a/tests/sys/geom/class/eli/online_resize_test.sh b/tests/sys/geom/class/eli/online_resize_test.sh index e137a7305122..ae73848f7fde 100755 --- a/tests/sys/geom/class/eli/online_resize_test.sh +++ b/tests/sys/geom/class/eli/online_resize_test.sh @@ -7,6 +7,7 @@ online_resize_head() { atf_set "descr" "online resize of geli providers" atf_set "require.user" "root" + atf_set "timeout" 600 } online_resize_body() { diff --git a/tests/sys/geom/class/eli/reentrancy_test.sh b/tests/sys/geom/class/eli/reentrancy_test.sh index 92a85d4df10a..f70c574d5965 100755 --- a/tests/sys/geom/class/eli/reentrancy_test.sh +++ b/tests/sys/geom/class/eli/reentrancy_test.sh @@ -42,7 +42,7 @@ init_head() { atf_set "descr" "Initialize a geli provider on top of another" atf_set "require.user" "root" - atf_set "timeout" 600 + atf_set "timeout" 900 } init_body() { diff --git a/tests/sys/kern/jailmeta.sh b/tests/sys/kern/jailmeta.sh index 2d46abe0d07e..236690ffddcb 100644 --- a/tests/sys/kern/jailmeta.sh +++ b/tests/sys/kern/jailmeta.sh @@ -543,7 +543,7 @@ keyvalue_contention_head() atf_set descr 'Try to stress metadata read/write mechanism with some contention' atf_set require.user root atf_set execenv jail - atf_set timeout 30 + atf_set timeout 60 } keyvalue_stresser() { diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile index 8e23775c62c8..b0c1aa803940 100644 --- a/tests/sys/mac/portacl/Makefile +++ b/tests/sys/mac/portacl/Makefile @@ -11,7 +11,7 @@ TAP_TESTS_SH+= root_test .for t in ${TAP_TESTS_SH} TEST_METADATA.$t+= required_kmods="mac_portacl" TEST_METADATA.$t+= required_user="root" -TEST_METADATA.$t+= timeout="450" +TEST_METADATA.$t+= timeout="600" TEST_METADATA.$t+= is_exclusive="true" .endfor diff --git a/tests/sys/netpfil/pf/rules_counter.sh b/tests/sys/netpfil/pf/rules_counter.sh index 43bff3706f15..11afcde9dcc8 100644 --- a/tests/sys/netpfil/pf/rules_counter.sh +++ b/tests/sys/netpfil/pf/rules_counter.sh @@ -153,7 +153,7 @@ keepcounters_pool_head() { atf_set descr 'Test keepcounters for a rule with an interface pool' atf_set require.user root - atf_set timeout 900 + atf_set timeout 1200 } keepcounters_pool_body() From nobody Tue Nov 24 00:24:59 2026 X-Original-To: dev-commits-src-branches@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 4jYNqc1c8Dz71wtF for ; Tue, 24 Nov 2026 00:25:00 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqb5sxFz4TyB for ; Tue, 24 Nov 2026 00:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RvcND/bojwhcmLKgioYFvVn708g1pyJkTYmnC+/lfIs=; b=yoRWvNBn2sPUYpT0l/tlvGXiZi1VJcyL+BFSqFkko0JEI1nZs57RXDyy18C1Y2atCBkqd7 eqvr2mSSqpw1D7bBVX8mpKFmRgp9kdUZpYt5wPYg3CQRYB2aN1YDlBHITsDW5s2BgjPh4g /uUJpG+zpX/QxwiEsdf/U3clo2NOaCsy3HjVZf6ARNRDw3WvHo5F8pEaDrhxM+9/Qp6V8f xDMcQH+DTUNy4vN0CPP6eXq8c2vzO5ypxdeKWJyIVrqrb8PkKhRf7XmV3SnBSvLAZgrWEq M9JmGSYrSk8W/QGllqSFqHyuPvW0R6Zid6/UpYFua8e3j39IcUsYNiD3lmeBig== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479899; b=K+hnwI++R+VNOLvFG10L/TU7OYbv1DKwQbHxnl10dfRFa2b1r97bYoxwX8C/hQ1Fm2lt2y FWeZ3Tm7CzF0TLD9XydKkFH7j/oNpUu0N8LbTbBGZygIvkJyW84Q4ORALBafHE7ZtcWI6e 3bjKqT4IMyHs1+uwHdnKTyntLuTkiHYG875X2fJWFnMnCytJ+QmCwGXp7NQ0rbqr+WcANY 0KkBTeZKhPGWOdmCaCuna009745dhlQAZABnShSHzrpOxUeHfKDpjTWf4Lqf3J2dyahNf3 +2OsPmh/rC9Qlo3eNqIaFAawl/5A97nOT1UnCAW8KrG1+BFEarBZ5Npn7U4ZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RvcND/bojwhcmLKgioYFvVn708g1pyJkTYmnC+/lfIs=; b=LrPTHHHBzgcInKFEVUh6dnpA0TPNqpBA402waVNab/tV+DI/MNppm9A/kjCH81o90VVd2s hmGvZLdcYf1fwK9k1uSpQNrYEOVbcVQeufE+hM28jktU0kVqk8q/O/QMTOM52blUdSuEYu 40HfYf/yg+1n49ZkFvsprwKiDS8u2YC+pR3Tf3gRnh56uHbZJdX3LIDrZ4nyB99fZgfbf9 4BtU11/6XG98SQRfFdXfUC6oVcbQ1GelRXn3hvzlFCiNpJ5SFj/yLpk7OVovxCqxLXRkCb ikyTxAHVIEZLYg5PmCR2vmW2Cb/QINQ6MXtSl5lrn1O4HUFEUTlzfPQ5bRa/+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqb5QSvzF9P for ; Tue, 24 Nov 2026 00:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id cb95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:24:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Enji Cooper Subject: git: f3d13e071740 - stable/14 - tarfs: tests: Increase timeout (again) List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f3d13e071740defdb24a630e0d4dd6a1fb435882 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:24:59 +0000 Message-Id: <6b04d95b.cb95.7c16c8df@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f3d13e071740defdb24a630e0d4dd6a1fb435882 commit f3d13e071740defdb24a630e0d4dd6a1fb435882 Author: Jose Luis Duran AuthorDate: 2026-01-12 18:15:10 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:24:16 +0000 tarfs: tests: Increase timeout (again) Bump the timeout value (a little more), to avoid cutoff on emulated architectures on ci.freebsd.org. Reported by: Jenkins Fixes: 47015e454661 ("tests: Increase timeout") MFC after: 3 days (cherry picked from commit a551b0524953cbfa4f1035c6d968623e64f4436a) --- tests/sys/fs/tarfs/tarfs_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index 3a95263aeda9..9405697ab21f 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -401,7 +401,7 @@ tarfs_large_head() { atf_set "descr" "Test support for large files" atf_set "require.user" "root" atf_set "require.kmods" "tarfs" - atf_set "timeout" "900" + atf_set "timeout" "1200" } tarfs_large_body() { tarfs_setup From nobody Tue Nov 24 00:25:00 2026 X-Original-To: dev-commits-src-branches@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 4jYNqd3dWDz71wfW for ; Tue, 24 Nov 2026 00:25:01 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqc67Lwz4Tsm for ; Tue, 24 Nov 2026 00:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjOzLuyYCcnO+l4Ni1PWQDzS4wFhQd0VuD4Hv/2dFxM=; b=qDD3vwubLdp7r7p3134R4JJn4eIFf4P6B0O+rZsk/gTbURpkFGdRUiZgdxefziJtAuMqPE ybo2x8UIIprqT3gLDCU1di16avmjM/oYCjE+iLss0hvjzB4dEMl29U9f8IgL5ZrVbQKAqP dTmzAePwOazEaaoxf0VJ64Qj8uyfjv39LxafKNRr+5KWDQ07CUnI5dU+5g5cw4wAu3MCv0 rmtwSEQR0Qoy3oY/yM2X6j5zlUxQpZ4bPRiqe5VHhUbkqnauBPhV38FdPBWYN5zrgkfTLj VHGbIymYjfHayaKtJHmM136d4mOMyqLUvaxCAY9VR0KGh4G5oRrdyS7OTtSdrg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479900; b=up5hL4mWEG7Cqywdb1ThzEK4pQkcfrgDybLRanYIHCWOph44cc712UVsxxaxp6jvLCYGEU lzMV/Wrh3MM7DrYCAvM3akjMmAxTGqFXXAslpvaVIZE224BlepVgpE/vxLEYMvoBkmSa98 wIz8vum+p2s9s+u1pBMJFne2gF9/knJSfH6Ci3uXuY2mST/dUftYIuuWywY/01q0n4lWRx LzGrOh6fjkEVnR1SH8hMU8mvi2rkeyXIN5+98P6sjLoFk4YU8v+77+Fy0qupkd9EcQyfEq /a6ZrQGt6O1iso6rxYF4XOT9LfEw8KojoLsKJh50qST1EGKMJHuwwJ9u5+s1PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795479900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjOzLuyYCcnO+l4Ni1PWQDzS4wFhQd0VuD4Hv/2dFxM=; b=k6IcBQl6s7vFp2I5SyAtNpAy11XUINYIdq9Kba7CQZ7x+HuPDxskqCQEauO9LQ46czTKJA fNBhFk+YTBrZz+aaEwImcXRxq0jN9jh2lbsmabtdxjyox1OrLrvucpqx6GEru0Vk1hYFeK QRelBCMvIITE3x5XlUkcliPTgDuqxk3yMZDwzC+XdBTwfBE2IokUKk90paFlDY+P/x/dmU q+bD/Yhe2A2SnSEnrMr6fjXHZhxVVZ1hftPmHOsORS2DsztRJh4xK9Xje9cYhrLv+D8Yk2 xZRHTJiTMA1GbYtRu33TOfuhguttp1qhJqQOv2cQ3CySp1RamxU4u34+omPKAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqc5mYqz1Cjp for ; Tue, 24 Nov 2026 00:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id da07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:25:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jose Luis Duran From: Enji Cooper Subject: git: 8976206bfb10 - stable/14 - tarfs: tests: Increase timeout (again 2) List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8976206bfb1052b8d4fc67bbfa37e7ee7967dfab Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:25:00 +0000 Message-Id: <6b04d95c.da07.399315dd@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=8976206bfb1052b8d4fc67bbfa37e7ee7967dfab commit 8976206bfb1052b8d4fc67bbfa37e7ee7967dfab Author: Jose Luis Duran AuthorDate: 2026-01-14 17:48:43 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:24:16 +0000 tarfs: tests: Increase timeout (again 2) Bump the timeout value (for the third time), to avoid cutoff on emulated architectures on ci.freebsd.org. One of the runners will take considerably more time to complete this test. Reported by: Jenkins Fixes: a551b0524953 ("tarfs: tests: Increase timeout (again)") MFC after: 3 days (cherry picked from commit a4f0a60e05293f3f517324f3ebc41046a79a9feb) --- tests/sys/fs/tarfs/tarfs_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index 9405697ab21f..c8579781b51c 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -401,7 +401,7 @@ tarfs_large_head() { atf_set "descr" "Test support for large files" atf_set "require.user" "root" atf_set "require.kmods" "tarfs" - atf_set "timeout" "1200" + atf_set "timeout" "2400" } tarfs_large_body() { tarfs_setup From nobody Tue Nov 24 00:34:11 2026 X-Original-To: dev-commits-src-branches@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 4jYP2C2Byxz71wyc for ; Tue, 24 Nov 2026 00:34:11 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYP2C0QlPz4WKN for ; Tue, 24 Nov 2026 00:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795480451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYhlWjccAR2ES0jy5MW9Pmv6xKURRSfw0jFwKTKf4dE=; b=hRm5hBtklWisNy5SN6ZEURiDMY92sVYZvJ+WKbmwkbmpBoPuAfU0SAztAX1GWVPiiUg5yq 70Jwxb9duWpX2m6bYoDjH/f8ds/Esv8bpWGNRxrZSNDYo1vTDGs/2AXJil8XkTDWhKNtQF AT7lUmPgVj57SUmajJd+A4PQiLjGVy50P4/7NOcmZXORG9Uei8BFBwnHDQjuWGnPC2j8ry 05EfqCvMl5JUSFYBKwU8bF4xBLFBOd35VIoYbjJMFdIi+2PMZ7VNxPaG8gQSAZ2EaFLD3E zEGqlpJ4uzCPjLCcQPmEDUA29f3es6ANbbegegogH8ZJ2rLeFQ+sFWk9xX+P1w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795480451; b=D4O09JXYsnhAGngJrcNCIpfw6txVKbFD4W1FXQmorHOrsy1cjXgjxMjpBO8jenajESays6 L+oXEfU5FgFs2V6nVV3uxloWv8gPxE8kl2p9gblpyJjkiyOLngp4LASJaRbxOP6pWRaqaY lAen6HXWQHhj+g2P+NwSB+x+SJJk/9b9QqYGPvAm7sQoKy2XsXsGYzEzPwekO7+gT3o7+p UIeMIk5Vqd9RAjffUxFkH5U1LNYwwe+Fpwt8PBIImfMCE7RW704kCDmruD0Pvgh9CEjDCr 1M4VHBbYDT5AKrtjxteWQI0daa1/8l6JsgiKDt0qAgbObj3Jexv4pXku/uhjZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795480451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYhlWjccAR2ES0jy5MW9Pmv6xKURRSfw0jFwKTKf4dE=; b=VLokeogiQRfA0GjiNZH/PX5MSPN41TgW8MOG8cOOgO2JotXOtNLZVzWOjkZlHfyZV10SNm Q/RqIxcU9CNrr9OzFCtsgSPfK0hkGiJFARYDjxjUzIhNksvO4s0FxO1QjlNU+P6GMzoWYU XPrUuG0IeUOq14XjGEmBs/7m14Wv30p3iiKZ48ia42buVkmU4F3F2HmlLdpiHaEVkCn/Qv HojEX/Jp2g5MJ2xCiKlB/CxMRcWac/fsgzbn/0B4QdXq+zlK+2+ZSk/GRlpaoYWaJvnnBL 3ybT7oJiAcKEnvETdbQCIxmjKn/ZMQYpBVgzoQsGnrkY4BGjTS7hJo9HjF4ycQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYP2C04cwzDmF for ; Tue, 24 Nov 2026 00:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id cbc7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 00:34:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Enji Cooper Subject: git: 49e8ec6ea7ca - stable/14 - secure: Add ssh-sk-client to all consumers of libssh List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 00:34:11 +0000 Message-Id: <6b04db83.cbc7.74069e0b@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88 commit 49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88 Author: John Baldwin AuthorDate: 2025-04-22 02:05:28 +0000 Commit: Enji Cooper CommitDate: 2026-11-24 00:33:42 +0000 secure: Add ssh-sk-client to all consumers of libssh These all failed to link with ld.bfd used by GCC due to Fssh_sshsk_sign being an unresolved symbol. Fixes: 65d8491719bb ("secure: Adapt Makefile to ssh-sk-client everywhere") (cherry picked from commit a098111a28ed59e1ab1101ad09913f0235ebd28f) --- secure/libexec/sftp-server/Makefile | 2 +- secure/usr.bin/scp/Makefile | 2 +- secure/usr.bin/sftp/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile index 00570268ffe6..5d32c8ae9660 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -3,7 +3,7 @@ .include "${SRCTOP}/secure/ssh.mk" PROG= sftp-server -SRCS= sftp-common.c sftp-server.c sftp-server-main.c +SRCS= sftp-common.c sftp-server.c sftp-server-main.c $(SKSRCS) MAN= sftp-server.8 LIBADD= ssh diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index 8d38d815d3fb..ba9c1472936f 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -2,7 +2,7 @@ .include "${SRCTOP}/secure/ssh.mk" PROG= scp -SRCS= scp.c progressmeter.c $(SFTP_CLIENT_SRCS) +SRCS= scp.c progressmeter.c $(SFTP_CLIENT_SRCS) $(SKSRCS) PACKAGE= ssh LIBADD= ssh diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index cc13a86794c5..3f6fbeef695c 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -2,7 +2,7 @@ .include "${SRCTOP}/secure/ssh.mk" PROG= sftp -SRCS= sftp.c sftp-usergroup.c progressmeter.c $(SFTP_CLIENT_SRCS) +SRCS= sftp.c sftp-usergroup.c progressmeter.c $(SFTP_CLIENT_SRCS) $(SKSRCS) PACKAGE= ssh LIBADD= ssh edit From nobody Tue Nov 24 10:38:26 2026 X-Original-To: dev-commits-src-branches@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 4jYfRR2Q1wz6w510 for ; Tue, 24 Nov 2026 10:38:27 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfRQ6jbtz3CZs for ; Tue, 24 Nov 2026 10:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795516706; 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=PHNzVwc1k3paRPMtuAqC1DoGwe9dkXIFDlOSF9dM81g=; b=dn4/xeuoo71oxbOZXsTaIJEbctMaJL3T/F3CHxAYAyGPR2ENqTGu7wBabxBCG7J6oPGsqQ V3bQCqz3W90MgwAae3wycv1EU5c2I2ZxvcIZBxPuu9ppH4Fx28eGfLuM5hq1LSWB3l3hd1 dAA8Ni7gS0rHZVrkQT1xK1kEErG5guy8Id1l9vXVbOb061Ye6+EPmeHm/y8edmuizMW+Yu 5FRckeowuwqPDXfOtIhkSkuCiqnqd7ZiscOn/YaH6bllnxWSlm9P9M/pCVhUDyAV6pVSJ8 jkUgoyiO5T7xDc5lm+r+nAnhFdxVdMPUyzFzLPtiHvVAzJms4wH47AKyCgnmMA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795516706; b=L89WvBCTcftEsTCj3deJ/9Tbq/L0akbUYHyzspVbl6Lq0uGrEVOgFOlqa38fddWDGBZO1X VFlpYqEcI64i7kpk0Gk8EO7Zh4x+hQTHCFMRUHazRwOsSXP3A+SVAGEX7YjkzkXLN+bAbm KxWfJY/gGOe6MJf0xPYN9dFsMKZikMl7CS3ALd+UpVCNW33ZzlKxv5RN09eZ1m7Gb1ayQc YFjiBhfYxChpKXSRoSMIfVP2gFK5RkT5M0gMzphd/y47hpIbEIE5GAuGF2Jclnyqeea3Vo Ik4mfrOq6Gb3YZrag86VmqWkRfaao4GlDsLvEcthoKHsNorglixROTdDew0kjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795516706; 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=PHNzVwc1k3paRPMtuAqC1DoGwe9dkXIFDlOSF9dM81g=; b=W5zy5SDr1KSbBGS6kdluaPjQ1Mf6PPOZz+zdcL8F6dsCHLzNfYz3qSKdETpg/FsnWc8Len jHKG1V9bQvoTy/JB1yEtFSzNdPZaywZZxYGN2p4e6rRpWeCzJ27EMFa/72Cgumf/2kHvSi XdoZ+DBAoIGjua1rvBUVNY8D2qH/r2Wk5nP1eNHCeUXArbGHaf+YKUQTq8WlmlDC8pirFX T2tBVILlSAANkR5EiG8cZn63lRkNixJQeYqnyyJyqOoiP+cBFKc1lySdOGrGOH3pSnlhdI VEhr1csBQUYlqAM/T6Mzi44x2kK3EDvF9+UKBS+nNwJI0zjSC9vLPgM70L1PIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfRQ5tbSzbyR for ; Tue, 24 Nov 2026 10:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 5af2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:38:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c8ca5fa512fb - stable/15 - tcp bbr: cleanup List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:38:26 +0000 Message-Id: <6b056922.5af2.4cabee74@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b commit c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b Author: Michael Tuexen AuthorDate: 2026-11-14 17:36:42 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:49:34 +0000 tcp bbr: cleanup No functional change intended. Sponsored by: Netflix, Inc. (cherry picked from commit 34436bb7cf971dba1c0dcdb1d45f22fff1a4b6c1) --- sys/netinet/tcp_stacks/bbr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 1bd87ad9bc31..dd17cefe1449 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -4902,8 +4902,7 @@ bbr_remxt_tmr(struct tcpcb *tp) * With this option, we will rack out * in 1ms increments the rest of the packets. */ - rsm->r_flags |= BBR_SACK_PASSED | BBR_MARKED_LOST; - rsm->r_flags &= ~BBR_WAS_SACKPASS; + rsm->r_flags |= BBR_SACK_PASSED; } else { /* * With this option we only mark them lost @@ -4912,10 +4911,10 @@ bbr_remxt_tmr(struct tcpcb *tp) * us to eventually send more based on what * ack's come in. */ - rsm->r_flags |= BBR_MARKED_LOST; - rsm->r_flags &= ~BBR_WAS_SACKPASS; rsm->r_flags &= ~BBR_SACK_PASSED; } + rsm->r_flags |= BBR_MARKED_LOST; + rsm->r_flags &= ~BBR_WAS_SACKPASS; } trsm = rsm; } From nobody Tue Nov 24 10:43:01 2026 X-Original-To: dev-commits-src-branches@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 4jYfXj4lrRz6w5lw for ; Tue, 24 Nov 2026 10:43:01 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfXj3zB0z3DqP for ; Tue, 24 Nov 2026 10:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795516981; 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=+X8VUybOxvXNG6QNVNjfE2lnHwC00BjneEwtJqUVmeI=; b=f68njYCX6jrv4UdBhq6nF9+GZ7Fwwtnzl85a5sE68UdJXMJ3nEQrG9WLlBeCoUsi7TcMm5 GRfh1SBAqzcpnup2eomHeXZYmu+1lFI7rpy8FDT57+Lvz9YwBp/zt/plS1+rm1scnSP1se GDqPptEmchmCTfoE+88b2AdxRmutgEu9FXNG8mWGfXpo/54NqwOQzvvIXf9qD0K/+2tf/T Fep5n04LkffSwhFNiZm/rPrWl7BQC/BBZCoODzVJkYoSyzqi7nQSXK5+BemkZztXJcqr4z 1E8zGAJ/20VwyUWQ4DI58x2BojPLwFgfcHRlaSuUbMe5T22re346WbWlf4dB8Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795516981; b=Z6K7L930g/+yf2EGg7AKQAHT1uLYbSZGz4oQ8LdkYoB1E8aPv52PJNNT5Z7WfMGC6n4nhi XkSL/EX/K8f3cRdGWiUcqN73OUk7JwuZwEuWoiRjnJ+B75UuvMhu5VxV8FgxbmSeR5bo/r BaCxziE+/A/aMnBYPrY36pwP79G3/NY6FZuPTkHE0CxscSH31l3Ix3J9/Y09EUH+logetc AzpGArwcW23LhLORWN5GGjDmfcOl1J9UBX6udXSjTnmdspPqwNa4pUSGWhdWdZZY5tkGrq JR9j2bx7t4Y3VyKEe5+ACHkRi4VaL4PA0y7/SV1h2Fn7bSr61GGaPQ+P8n8Mog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795516981; 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=+X8VUybOxvXNG6QNVNjfE2lnHwC00BjneEwtJqUVmeI=; b=cTVrvBQiFaUmkR5u8moQgF8b+dS2112fX/ScU9O+mmw2ADeM532RWojH+B6DPwLRUcMkGl yLVkHM/22qRn7omcaW9FQ6dLUR82tlgLGWoo1pubNYKqIly90EX4DPUYqkEURbDiIlb83V 2SMw+FV5tcwZs9tYJ9nOITYFLIdyd46FM5JVaOMCCVjjtTNrt0zoaxNbuYe0usm6u/q8B7 E6Gj1OhA9aMHfelfWWocczGkncwOp+MOBy6vYPwPRtSuOb81Oe7L1PmpLEDeM3lj0VFcp2 B718c9TpiX6+BQm7PMHaDFVu5b6R8AxUAtCp/xMLnQMVrzJlPYAH5j5ucZTB/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfXj3dl9zc57 for ; Tue, 24 Nov 2026 10:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 64c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:43:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 158dcb8e415d - stable/15 - tcp bbr: improve invalidating rtt List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 158dcb8e415d84caf6ebc30841ed4bfc3148bc32 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:43:01 +0000 Message-Id: <6b056a35.64c6.2f092eb6@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=158dcb8e415d84caf6ebc30841ed4bfc3148bc32 commit 158dcb8e415d84caf6ebc30841ed4bfc3148bc32 Author: Michael Tuexen AuthorDate: 2026-11-15 18:56:25 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:54:18 +0000 tcp bbr: improve invalidating rtt Invalidate the rtt based on t_rxtshift instead of resetting t_srtt to 0, because using the latter also affects the retransmission timeout. Reviewed by: Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61585 (cherry picked from commit 8018d75601dfe804a8d70f4f08bdb0e4e3a8c5c9) --- sys/netinet/tcp_stacks/bbr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index dd17cefe1449..f2ab0a291c5e 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -5151,15 +5151,13 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) * move the current srtt into rttvar to keep the current retransmit * times until then. */ - if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { + if (tp->t_rxtshift > TCP_RTT_INVALIDATE) { #ifdef INET6 if (bbr->r_is_v6) in6_losing(inp); else #endif in_losing(inp); - tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); - tp->t_srtt = 0; } sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una); tp->snd_recover = tp->snd_max; @@ -6315,7 +6313,7 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts) } /* Round it up */ rtt_ticks = USEC_2_TICKS((rtt + (USECS_IN_MSEC - 1))); - if (tp->t_srtt != 0) { + if (tp->t_srtt != 0 && tp->t_rxtshift <= TCP_RTT_INVALIDATE) { /* * srtt is stored as fixed point with 5 bits after the * binary point (i.e., scaled by 8). The following magic is From nobody Tue Nov 24 10:43:43 2026 X-Original-To: dev-commits-src-branches@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 4jYfYW5Rc3z6w5jQ for ; Tue, 24 Nov 2026 10:43:43 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfYW4pFpz3DsP for ; Tue, 24 Nov 2026 10:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517023; 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=v0Sl4ysV0UTbKWvalemx+I22ZZOrcrRYh3qPqCG5hZo=; b=nsz4WYCHHnny/GDS+o/9G2z1kNnPyLzVxnFwQSUvSTNtaxYWNqM71qxnmh/Apnu0fhpHVQ qmhkQ2DXIGwK/XPfdVUGniC3Ov9T/I4P8dKt2ZqIeTvePQ+Ns08c39NUkBEBow5gE3jblZ JxmGUYLk2cxMiFSNmNGt83loUiq8jYysbDxnlaR+gq4G5fMx0pywwbduzsoySICpTnwJE5 FWe0CqS1fONb8leDpuLWLJFsy48hKHsdMRfDLTG2YqdaTP5ZtkgBF7D84Cxz1U4M8e9OWe uqu/Q1Ii3QnOYa3aKJTDs6LP4tdBmUVo5t+tHIBUbgz0+So/7iRbx9FcdgTh5w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517023; b=ggJEskgraqdexBiwn15aKr+ZBYAbBB2kUwrmtWg4iPHQIMD/ornMzbtP9MYsKbJrLGxV/9 exqapbv5DNkMQ1WzNE4JZGaIpmJhN56Q616bwXZ0RLKP2kzep2Qnl6dNElr9yLgo4bdb+2 SAEurnmScfWxz6gO2DAb0OUx3bzeDEtqb5//VKOPNA6l25rZvFLWTXbwHiPMs7jIj8tVLG hfQ9mmofS1Asq/ENsz5TdEUAWDPgPPeRRwaU+nWBFipzPFhMcKknffsRAnTIAZbM0JhjHs BWdGTsia2RipKhGbxC9cBui8BHPGVOUQJi5vYdwH/e6vD43Smb+uHxa9G6UCtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517023; 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=v0Sl4ysV0UTbKWvalemx+I22ZZOrcrRYh3qPqCG5hZo=; b=CR4/q+FcUrt2GuE3jzoX2Ksjep68JcN526fUWTlijNMafqhxrQAnzH5ewI/zAMpStHOqwC +X5V3Hly03wQ3/u4NuvquJMYEmaKrLSxPCReYOq/QYJn3Yeng2LaXRAbjAA6DDsFyCL0sb vw1n+SVdj4f8VY9C1e4N0y//r5XdxH+6jE511iqoCDbf5N83XpLJpuXdEAqCtD7Lkp2Rgu MkA9nFJ54fppkZcaS1l/b3jJKRRh5GbUVgPEAhLepxY4+dCkXMzZuqDiB4qUO9JqvWPH/D j7UMSIxF6B185MS269Q/q3ozEDUB4TQ4A9nllkLYVxKeeCggtoWA2w7ajN0rPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfYW4RVCzbnV for ; Tue, 24 Nov 2026 10:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 692b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:43:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: ccf8e3762c39 - stable/15 - tcp bbr: improve retransmit timout calculation List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ccf8e3762c3948446263ae3ef0dd98391ef9f97e Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:43:43 +0000 Message-Id: <6b056a5f.692b.5d0e67a2@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ccf8e3762c3948446263ae3ef0dd98391ef9f97e commit ccf8e3762c3948446263ae3ef0dd98391ef9f97e Author: Michael Tuexen AuthorDate: 2026-11-15 19:04:33 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:55:03 +0000 tcp bbr: improve retransmit timout calculation The retransmission timeout should the srtt + 4 * rttvar. The srtt is using 5 bits of fractions and rttvar is using 4 bits of fractions, some specific shifting is required. Reviewed by: Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61581 (cherry picked from commit 2f98793a13fe3e69cf6b698fa469550b4ba0fea1) --- sys/netinet/tcp_stacks/bbr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f2ab0a291c5e..034de828e478 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -594,8 +594,7 @@ activate_rxt: if (tp->t_srtt == 0) tov = BBR_INITIAL_RTO; else - tov = ((uint64_t)(TICKS_2_USEC(tp->t_srtt) + - ((uint64_t)TICKS_2_USEC(tp->t_rttvar) * (uint64_t)4)) >> TCP_RTT_SHIFT); + tov = TICKS_2_USEC(tp->t_srtt + (tp->t_rttvar << (TCP_RTT_SHIFT - TCP_DELTA_SHIFT))) >> TCP_RTT_SHIFT; if (tp->t_rxtshift) tov *= tcp_backoff[tp->t_rxtshift]; if (tov > time_since_sent) From nobody Tue Nov 24 10:45:03 2026 X-Original-To: dev-commits-src-branches@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 4jYfb31hs5z6w5dF for ; Tue, 24 Nov 2026 10:45:03 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfb312Mlz3FQX for ; Tue, 24 Nov 2026 10:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517103; 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=nEWK36ST3sIL4BBjBbmmZcKV7RWIV3i0Pf6JT7su6NQ=; b=yZXB8QTCXwF1TkSKAYvzTxnrwafmfdR7Zw59k93P7fJ6IhfYh20xz/fqyPkArgIHGADDXy 1lf6ePsdmt2xGft5H/b16hpaud1nG9PVOPKreTvYo8lrsgGeFZScrrl9ChoAgQB1tisn1+ s0abdXe3j9XuUTCcpltjjG9sPCkpH/01MG5f9qSDuUfqkeHUYzWuUKyufFun9p/RMliKFv zmtHNLWqQg6u9g1V7RdzIhmkIOVeVzob8/mvZzgHGXouRtrXJY7lLstdk3Hc8I1IF648z1 IaAu8zC91WQ9LWi2o00cKLvLKGlDdwn1aSW4NNMG1tKdnoV6zLckjN/2SaBbVQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517103; b=Y7N3eeU3h3+zQoWTntVfdNYSWT0SIAMQ3jbtTkvZIg1Bt6IOHmVLlkr8Yoqn0izpoEO6ii RBNRKIGIY3gv/gzWDlX2HT9hzZ9dZe+GJeNvmJ6CmZDYpoyPIXN00KxD/LpkU8fJ2MBVcq rVGCKfnCK+Xzq3vwsIszL9DZEk+ZOdaRnVw3/ZmQQhKMeOQtLk/JXn6xc18Zr0nobX8kJP QRryW7hg3n8onSQyHsMSc1jCD+c/6K+42xFt57DcS9O/CzhxOdw+NmcUT0zUsQkjdPzNlb w1JsNYyTotZbXNQmHKkk0f7uF2ryMSt6v7MpjOzoF4FBq6TQmaygDoeYgkfc0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517103; 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=nEWK36ST3sIL4BBjBbmmZcKV7RWIV3i0Pf6JT7su6NQ=; b=EckrLHgnV9l9Zkwl6vYpc6ObrwqKjxTqRhzOkDKmdolA2mmPArXfM6ptFeDR1762ZTkOAd tWFjQCzmcmcSMLLFssWReXdHS9Gaz/+QI8Vbu7UpluXEaEAbaMWtoOL+Uv2hsvYexUDKts BAFUpOLl9T/a+ymkXbIEWPVAikGJthblmrwXHxH9W7qWTuYYKbTTe95A5vqv8P2Hnr/8Kp QAS8B2AbUiZncDLqsu2Cj3i4FbtH091FLTs6hKxcAwWkPtHX83PcmYYPGWJqAKAFDWKuB5 C0BgU77WakiQgDl1xuBoUJUw1Pgn/4lTzaZL7s8F3t7BsIZ77+TbXqGdCubTUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb30hRlzcKC for ; Tue, 24 Nov 2026 10:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 668f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:45:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 3e74519d5136 - stable/15 - tcp bbr: improve persits timeout computation List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3e74519d5136d4eb0fee56148ff30c66607a3eac Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:45:03 +0000 Message-Id: <6b056aaf.668f.385fa462@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3e74519d5136d4eb0fee56148ff30c66607a3eac commit 3e74519d5136d4eb0fee56148ff30c66607a3eac Author: Michael Tuexen AuthorDate: 2026-11-15 20:21:14 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:55:42 +0000 tcp bbr: improve persits timeout computation t_srtt and t_rttvar use different lengths of fractions, therefore use the appropriate shift value. Reviewed by: Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61600 (cherry picked from commit 751882926dc0bb1f7a4834c4b5e8d951cee61c7c) --- sys/netinet/tcp_stacks/bbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 034de828e478..9dc560ca5643 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -540,7 +540,7 @@ bbr_get_persists_timer_val(struct tcpcb *tp, struct tcp_bbr *bbr) var = 0; } else { srtt = ((uint64_t)TICKS_2_USEC(tp->t_srtt) >> TCP_RTT_SHIFT); - var = ((uint64_t)TICKS_2_USEC(tp->t_rttvar) >> TCP_RTT_SHIFT); + var = ((uint64_t)TICKS_2_USEC(tp->t_rttvar) >> TCP_RTTVAR_SHIFT); } TCPT_RANGESET_NOSLOP(ret_val, ((srtt + var) * tcp_backoff[tp->t_rxtshift]), bbr_persist_min, bbr_persist_max); From nobody Tue Nov 24 10:45:04 2026 X-Original-To: dev-commits-src-branches@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 4jYfb428Z8z6w5v0 for ; Tue, 24 Nov 2026 10:45:04 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfb41S8Xz3FLQ for ; Tue, 24 Nov 2026 10:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517104; 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=DKAUtDhoZ7oPa7zlu79H3T48qer4Toajzg2o6vpYRbA=; b=qwad0emIKqr8uoU3Kxrr3CXCiD+jWIi0nYytRZiaKqOYX/3vynH6ODY/vrgi0qAIGUHNJa dUG9OIp0fPE17IU1eo15Lxdd4UofztTGZC6LNka4MNQNMuMA6P3EZ8aM16jmsLcSjGmakl aP5Bbbg9O+uNRLa+KoFgavVbX0RNmBIXGh1JMml23x8sbfO26s5Pv47XlTymzBzj127CSm 8tFkLDzgJYdOICxB9r18BSfqKH8nkiDYxwzOrb7u5bbt6ZiEsgf3WOfMwSdfhCdTWpEsc3 8FR4598kvbN8L+ezBYBbiWKpO5MAtDfTUtK1rVqpaPwAXwyU2NiLtEy31bU6PA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517104; b=fci+0Q6JrAGD2iciBzAyVbnOUzCGnol2qT/Cq68cOc7Fgeiubdy8xQpF9Q27iP8FCvtoAY mtzqaBwAD8TvK6/Ljn5TlR2spe06Ab6vuPvhIVjlxMLiFDCYpBcCc0XwEGaEPMDmsiBTWk Ddmmb+ajoBdQcf5WZaWhX3+3k525ihZEhEpuza27kFiBkEJzZIpR11RQbJ+41SXirUh0wP opNz62SyJCXnepfjtktrSoZE84GkZZmDXcyi12J6XczvwiNn5sMHPFQLLO0lNO+cXjelGF kIFFdAZcW+x2h/g/ZROo28nkCuF/U8zf0BsMtmQrR3dCiZ9omBegPzbHMtbNBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517104; 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=DKAUtDhoZ7oPa7zlu79H3T48qer4Toajzg2o6vpYRbA=; b=fFNziSTap3PCNnbIQl/9vtKCxjfkWk7GcRH4NrM/mIim2fJACmF6dmWpzWlvV4MKs4c8Np dp3YXwFv4AP1+70UPoOJvJhAuw3P5eWQ8AuMhr8DXUcmQa3kYlNsEjDCCnt4TRVrrvcDr4 jCqO5FHpKE3LZcc6J1X6ZstFanUuaMovWjQ7SLEB/ILRlsdSpl54AQFAMYcr7IVl4kz9g2 an8KMUtLtHlcbYN8SUOLfCdx8aT+wRCOWtl6ZfDWwKmlk+g0xokSwXtxhn3Sy8wv9IJhzU 7gn1m3ANZ5Lftj64jsZfrnLGH1CC1t2+YaOa/XdzKLx/r2bthviZgSyIff5Nag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb416VVzcKD for ; Tue, 24 Nov 2026 10:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 7313 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:45:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: cbd17b66e64e - stable/15 - tcp bbr: improve handling of retransmissions in LAST-ACK List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:45:04 +0000 Message-Id: <6b056ab0.7313.413f970d@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9 commit cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9 Author: Michael Tuexen AuthorDate: 2026-11-15 21:13:50 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:56:21 +0000 tcp bbr: improve handling of retransmissions in LAST-ACK When performing a timer based retransmission, clear the BBR_RWND_COLLAPSED flag. If it sticks, t_rxtshift is never incremented resulting in unlimited retransmissions in the LAST-ACK state. Reported by: Illia Vynohradov Reviewed by: Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61586 (cherry picked from commit 3c6fd437b1824caeddb5f0d4570d43cf0c999c14) --- sys/netinet/tcp_stacks/bbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 9dc560ca5643..275728d29e8a 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -4913,7 +4913,7 @@ bbr_remxt_tmr(struct tcpcb *tp) rsm->r_flags &= ~BBR_SACK_PASSED; } rsm->r_flags |= BBR_MARKED_LOST; - rsm->r_flags &= ~BBR_WAS_SACKPASS; + rsm->r_flags &= ~(BBR_WAS_SACKPASS | BBR_RWND_COLLAPSED); } trsm = rsm; } From nobody Tue Nov 24 10:46:13 2026 X-Original-To: dev-commits-src-branches@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 4jYfcP3DDKz6w5db for ; Tue, 24 Nov 2026 10:46:13 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfcP2T4Jz3G4H for ; Tue, 24 Nov 2026 10:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517173; 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=b75ZHFZEjHI7G8maKxut0nEhUVmkOcAs6WzzybAVi4o=; b=BcqE3QwyZhK1mY75uu4St0h8CQWhXx+IyxVmQjHDrYqwhizMDw29rIOvlhCmENWaVbxbgT EQii+laHPAFyYVyIW06LYTsZh9IVeYZtex472x2euwvvgWo5afRdao/Yx7CtI+sE9wTAHx ZNmhaXj4FeqsMASeHkY8Sfk8bYe+0A2G6SZEQExEU/SS7s0OIXow1Ycvj6ERlaL7dGNrKn wS3YpIuIIjjNON93zffWOmTVDPCc6C8GVx74QiM1OhPxHJWe2NxyIrJG5WIlvDoBBe+XFS BpXb27YvYK51EOpHaVrDQxLB8e9HrCyXZPB0QPaGlWC4l0tFIwS9PJNS8AINzw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517173; b=yOHBWUbMGU70SRTBgqRhAcvxAO/f/buBX+HVyGXdDWMtiUBKnRTb53coTYgVCYec6jC+uY BuA5pS9QVKhSiz/htC8iLWNQ23hBXPwiKhkCu4yedflysYsRMFjvMWYs7uAjHMv4MaEjg9 Ht49nzMOLAdPTh2wy1Hht685f9PqVt1RxQIgqX6Q6ySB3KkTARlc29RnVhZL9AJ5sqYOUZ YyvlLzSTDcaaUQyEv/Hk9QrxVEYhZEc9Eo/boAy696RMZnfvGmDzPQ1m43WKiacdh06mwK mRCZLL81zE3U2MXV2s/iMjJiiiyyrGPWiOuNiTso0A2PYadjooG4sez/lC9ZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517173; 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=b75ZHFZEjHI7G8maKxut0nEhUVmkOcAs6WzzybAVi4o=; b=RC1680mgJiaiFAx0TjoX+0Heg9gju+kOauO0vuOFJFxyP6m8sQ/GqQ4sY5Firn0jlMJNSa qpeHQLU7gbQ2so3OF3izQqXjTlfwPnQfCYj4CztaAtOz18fRv+NHkdZcHY3BKYLFA4DJSn r1ksCg7fl/yEBGpBTWxfI2ebQi+XQPOFhIa9QP4fVpUt90DAkigui/ybFgYASgsdCVQPoE dtTfjnd/f333K1wcbzXnHzoGRX1PqCmsPn3MGof4iAb5S3QWm39Y2wjAVOWtk/6QXGbMYF k4fwWPU/RYlz31bJzYJkMKKZ3hj++6bb3wcHwllrStmtsAI827JALVMiEnkvBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfcP274czcHr for ; Tue, 24 Nov 2026 10:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 6018 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:46:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 13357c1ee34f - stable/15 - tcp: improve sender side SWS avoidance List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 13357c1ee34f9f8655375714c60da8bf4881493a Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:46:13 +0000 Message-Id: <6b056af5.6018.3abfd91c@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=13357c1ee34f9f8655375714c60da8bf4881493a commit 13357c1ee34f9f8655375714c60da8bf4881493a Author: Michael Tuexen AuthorDate: 2026-11-16 17:25:32 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 09:57:01 +0000 tcp: improve sender side SWS avoidance When checking for a full sized segment, take all TCP options that will be included into account. This fixes a bug which can trigger the "sent too much" KASSERT related to limited transmit. Reported by: olivier Reviewed by: rscheff, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61605 (cherry picked from commit d174085f9f895ed444bd95120da3eff481a58f1a) --- sys/netinet/tcp_output.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 55a8090cf7e2..fee4aa38f48f 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -587,19 +587,7 @@ after_sack_rexmit: if (len) { if (len >= tp->t_maxseg) goto send; - /* - * As the TCP header options are now - * considered when setting up the initial - * window, we would not send the last segment - * if we skip considering the option length here. - * Note: this may not work when tcp headers change - * very dynamically in the future. - */ - if ((((tp->t_flags & TF_SIGNATURE) ? - PADTCPOLEN(TCPOLEN_SIGNATURE) : 0) + - ((tp->t_flags & TF_RCVD_TSTMP) ? - PADTCPOLEN(TCPOLEN_TIMESTAMP) : 0) + - len) >= tp->t_maxseg) + if (len >= tcp_maxseg(tp)) goto send; /* * NOTE! on localhost connections an 'ack' from the remote From nobody Tue Nov 24 10:52:55 2026 X-Original-To: dev-commits-src-branches@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 4jYfm80LRFz6w70P for ; Tue, 24 Nov 2026 10:52:56 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfm76rhkz3Jvr for ; Tue, 24 Nov 2026 10:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517576; 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=/UFVHo5p+uQqGAkroafrXLPJg2Qv1kOhiLW/vR18xTM=; b=w7w649wgpIDGuG3VHUHeG5JhSfzyCKzr6PK9aW6phU2CxLF03lrk82dKTb2IELVlQ4OCEG aZrnUxP4/QhLVMHXfLMjAgYFAXItM6kbWL+XiCPsHZANFcaxMgdyg8zCNrjdpGbUdikgDy q+q2noDdz2F6JVR/fKXF28UfOpAg5ryefa7zfs61gQ/8b7p9YH/dSDjk5c1urNQSrt1xeE uxHXUKN1orqkaZXM0bUuNrp+4lXqw54833bmc09lpIrE/hpc+apTxJEOh/s08JDte7Ch8G ejq9rrmv6koFJVgBqQqBUg0qx8r2bSpKi8KTCpofa3ZYaBrTmJizqqnk1c+XKA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517576; b=Vg6ZlHBCEDY5dZ+MfpzbJ8bxNJxquOWuNKP+bOIqnztwpyPG3SWQESsKa1N9oiBk92gPn4 U8Hou+UwfjPiBFjkpylchIMMXcU4NhlRH6IYnL5JyZvXI+Ev4zVJLSe9pDihKme+o6wAiU FgzsdLsnvbVcEvwwBOtSfvK95JlCDPVOfODQND9suP4lUpUdRUmt1wApkD9xgquldBdeih /yPvxC8kRQWXSrVlm0wGFsCiQxlFQ4oYJJO7ZzRaRxOk9QhGtHEK2/1Lg8b4kpcFrhie4a uxsmcKw87lnIB/NEr1TFy0vVjJ00YpJDoC/hKfzrRXiZUX+6p4LxXJtFQ7QncA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517576; 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=/UFVHo5p+uQqGAkroafrXLPJg2Qv1kOhiLW/vR18xTM=; b=d8I5iQM0y8mk2sqQ5++gFtZaYlhz9XzmvAimZSkTKGeLgJw8LskknOy2wyGl4JEfVyw4sR ESzINWZAqX4MOFvWhhASWy9vlmzj22GuO2onfv1og5h9NDk1r7JYsQJa9Xg9vow4sU29tK iHBW6aJLJxA6aix7zPQcshLWT0fK0l9v25LIHnjKhtRh3W5bkUgSDFwMfD8XTnjijKdD53 EE9W3VcWN90xJD7ZuMjUGJWvwmduLXKDys1aNL22RxMQ+qZoASlxh2x0tIP9l0gEKvz8DY 7tYbRHfKYvuH3XD/2O1Rv0vMuTmTJb18IjrDc3fBIvYHB2pEqQghd/wqcubvsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfm76W48zcYS for ; Tue, 24 Nov 2026 10:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 6046 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:52:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a170546cb8d1 - stable/15 - tcp: make ghost ACK handling more conformant List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a170546cb8d13a67ee3062114228d3df4744bbee Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:52:55 +0000 Message-Id: <6b056c87.6046.5f82c6ba@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a170546cb8d13a67ee3062114228d3df4744bbee commit a170546cb8d13a67ee3062114228d3df4744bbee Author: Michael Tuexen AuthorDate: 2026-07-23 16:03:39 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 10:03:00 +0000 tcp: make ghost ACK handling more conformant The latest version of draft-ietf-tcpm-tcp-ghost-acks changed a condition. This should make no substantial difference, but makei it compliant to the latest version of the specification. Reviewed by: rscheff, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D58411 (cherry picked from commit fa2ad70a4511e7b379e81de82c9e51b2e0994295) --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 03c9117891e8..0085a3cd1939 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2439,7 +2439,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * Ack processing. */ - if (SEQ_GEQ(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) { + if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) { /* Checking SEG.ACK against ISS is definitely redundant. */ tp->t_flags2 |= TF2_NO_ISS_CHECK; } From nobody Tue Nov 24 10:54:59 2026 X-Original-To: dev-commits-src-branches@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 4jYfpW582Gz6w6s7 for ; Tue, 24 Nov 2026 10:54:59 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfpW4cmzz3K7C for ; Tue, 24 Nov 2026 10:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517699; 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=Zs2pZzCqX5WoSwB89+lhn+XuMq2RAnTLOE9Tsnn1ydE=; b=Qs+0rR/r3P2gYuW/ekG//qSLGL9WmXXoiqg8YAarIVr4rJK5X2RcHr0tqyCohvsx/pqikC CBGlLRUZ2lZZscaEvaPaOmhlYjVSR+6au0/LLy9sSPsDaDGpCUXFOeU0Hho18gIKpKb7f6 ZvDHy+jHZnG88ckp80HQ4XuxqWf81Ks7c/jSKcGcGKCMDau0fgfQEnPd3yur5pLhmH7dRc hIGiOjCllRaAL/JEXXg5nQalmL3LiHh1S31FbVEmw0gIuSwzuIz29G7fp917FOwgB1VJLe 2Liyn5D3S6NrNVsMsX8/o3laqOTUg+tOKpDmYgSYfBrggDw/LHgB4bHev5tjJA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517699; b=UrYeU18WowZWMCCyQiExj7b+9E4kucX14UaV6q3LI2ESZonnnQyxDNWZ7Nhm9wbucs+tw6 6qKWgX1LqRy+XYfGpLV2sfjcCMfuBUGl7M7cCim16OKVwzmniJPv+cmi/6Rgs7sr8YtYXn 7K9dGuRuACJ17M1rRfN2Zwcn/nAZfeCzbmCwUuPAWcQ1qU71g7kKTdlEX8wj0ONuQuhWZW 1ynmVE3HfXIQAPbMitMNBJ6IrjVR12J1dMQq/6IfdzSptggSvR7NFABF/xXFbliUdrK4xJ EIvNOiRi8px2V7trx3eCGoe1ogPHHoJJRJwHggpQZwU2emHr1/klBQnSnP2zBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795517699; 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=Zs2pZzCqX5WoSwB89+lhn+XuMq2RAnTLOE9Tsnn1ydE=; b=uXLHnKvdvjly4cr2ozGj4kuJKlOB9wHjnijN4q56G3zSEWwTHVlhycuYJdMt9LU8dGoLis FSOUrn5zJ0hjrnlceezmZ/gA2O+L6xsck/i3i3GaMUp7LuePf+Dag5ibTB7XC6g6KEph7p UXjbTxw93eNgtmF0mEAA2eUyONDYfEZbfRNcw6rhq/V9m9ufMGpANXN7mtQfADSKfMnHA9 C526HbcUioCbk+DVUebtzR1GbpCc5aMbfQp4Xm5VX79qPZ+hG6ExhEpeEppXFbY3TuU5mv OYma28KZ9rxsaz12QyOqJr1+sg8Apuz+5Y2M4f2wzzVBGXtNhNcjlANI6eHiDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfpW4HdxzbpC for ; Tue, 24 Nov 2026 10:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 69c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 10:54:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 73929d1dc3b4 - stable/15 - tcp: improve consistency List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 10:54:59 +0000 Message-Id: <6b056d03.69c3.236776a8@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318 commit 73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318 Author: Michael Tuexen AuthorDate: 2026-11-17 19:42:36 +0000 Commit: Michael Tuexen CommitDate: 2026-11-24 10:05:02 +0000 tcp: improve consistency Use an inline function tcp_adapt_iss_check() to perform the check consistently instead of replicating the code multiple times. These checks already became inconsistent. A fix for PR 298560 requires more calls to tcp_adapt_iss_check(). Reviewed by: Peter Lei Fixes: fa2ad70a4511 ("tcp: make ghost ACK handling more conformant") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D61685 (cherry picked from commit e3483dbc91b59b5b2c73a4bc792fbb834c3dc111) --- sys/netinet/tcp_input.c | 5 +---- sys/netinet/tcp_stacks/bbr.c | 5 +---- sys/netinet/tcp_stacks/rack.c | 5 +---- sys/netinet/tcp_var.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 0085a3cd1939..9ce14e3019ca 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2439,10 +2439,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* * Ack processing. */ - if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) { - /* Checking SEG.ACK against ISS is definitely redundant. */ - tp->t_flags2 |= TF2_NO_ISS_CHECK; - } + tcp_adapt_iss_check(tp); if (!V_tcp_insecure_ack) { tcp_seq seq_min; bool ghost_ack_check; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 275728d29e8a..6e4535a87bb6 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -7686,10 +7686,7 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, bbr = (struct tcp_bbr *)tp->t_fb_ptr; lost = bbr->r_ctl.rc_lost; nsegs = max(1, m->m_pkthdr.lro_nsegs); - if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { - /* Checking SEG.ACK against ISS is definitely redundant. */ - tp->t_flags2 |= TF2_NO_ISS_CHECK; - } + tcp_adapt_iss_check(tp); if (!V_tcp_insecure_ack) { tcp_seq seq_min; bool ghost_ack_check; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 1a2f6653ab79..503c172f78e5 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -11602,10 +11602,7 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, INP_WLOCK_ASSERT(tptoinpcb(tp)); rack = (struct tcp_rack *)tp->t_fb_ptr; - if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) { - /* Checking SEG.ACK against ISS is definitely redundant. */ - tp->t_flags2 |= TF2_NO_ISS_CHECK; - } + tcp_adapt_iss_check(tp); if (!V_tcp_insecure_ack) { tcp_seq seq_min; bool ghost_ack_check; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index bbf11bfafd90..8fa7f077acf9 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -34,6 +34,7 @@ #include #include +#include #ifdef _KERNEL #include @@ -1619,6 +1620,15 @@ tcp_fields_to_net(struct tcphdr *th) th->th_win = htons(th->th_win); th->th_urp = htons(th->th_urp); } + +static inline void +tcp_adapt_iss_check(struct tcpcb *tp) +{ + if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) { + /* Checking SEG.ACK against ISS is definitely redundant. */ + tp->t_flags2 |= TF2_NO_ISS_CHECK; + } +} #endif /* _KERNEL */ #endif /* _NETINET_TCP_VAR_H_ */ From nobody Tue Nov 24 17:21:30 2026 X-Original-To: dev-commits-src-branches@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 4jYqNW3th4z71ZpT for ; Tue, 24 Nov 2026 17:21:31 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNV6ldYz3JNV for ; Tue, 24 Nov 2026 17:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540891; 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=yLLyclAMlNLJKFGmPMoQgThSmuM5ezpralaLdJUfZrk=; b=iIjt513iL6ruoqavY4biwGLz0k8leQTMgQ6MvHcK0pafBil1kH7PGmmFq3J5v94ENUVhTO oNgmhDHceSPLzf2Dd/rCGFZrZEbJFZSfqvRB2lCa7Qg9hk/yT9gEQCpdUBIaWNgAMMRcxs ZK+ngCfDwcrH5thwuxOAG0IpNOJJSYCU5LzlMLgn9AMj0QhL5mshSy17yOFvqvant6mgxf Hit1ixhBhy6cfxpGVTzDsCNv3+5ll2OSlgFPWGapITJzH5pQCREmi0ZgvgIpNy76VsFSBP VufFmZ2csjtvdsbGRgEvLuDBV56bFv+3SkrOfK1wT0yETq2J78FhRtVY140AxA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540891; b=nGPUAAKUdSstSSg3p+mX3q2EXjBAmZlMjRr2WliZJDwYJAhhX0Wc3ofSGpgG5PpXKUrTsd vIl0qYVQPV11shFC7kNJl5iYG7Y8GyBfTPBisCvDqP+uBluU6UBO0Mc+tD8Zh8NnrNquck rlUdN7UyesFmRdjGP28zqXvu9opW2E8GtPJbG+gWrLqxGNhMl6CDEnJ7nnx/s9QJh0p3SU 8LwQPxdZ/2GnMlCi7jHqQU8DagUxtaRvfazbQfOfJJVnT0oHy3THxvBxIkMPXc9T86uJPZ 91goMiNuj0dfkV/6a4xGRy6SWrClZLdOyVDTtUg3yksG4b0ivb9vfRWeDDAYQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540891; 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=yLLyclAMlNLJKFGmPMoQgThSmuM5ezpralaLdJUfZrk=; b=RcRMz3UJN7yEpin/sjEgVCYA4TZSr7Ts/3erEHW44CC3d3WLzzGMeBt9Xu2j4LlrbTZygM GoBRKrcg7DUGAnUalBV0yLnZeIDRs8ZSgwfvjzB5d4Zug8GcswBQRU/qOAhEG7ciHKtyQW vAL7m11lsDW8UTcvHWOcTiZ0X6kRTTv5i63clAw93ds7Q3yyOWQPbYwy4LkymMj1JRF5xO X+OREQADPYfT6rJH87+ffH+EjFPDfwExzuQzgsgPKzVYFJ6WglTdH59boDjR1OAFebQlbL XSVGRUYshvAFnKW05RJQMjZLErLblEtBC98BB0Ns29g4alDUgZkb7XSyKw7IVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNV6PQvznrn for ; Tue, 24 Nov 2026 17:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 119c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: c411e13ce133 - stable/14 - powerpc: move get_pcpu() to machine/pcpu.h List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c411e13ce133a27ea25aac054d740c938cb9bd11 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:30 +0000 Message-Id: <6b05c79a.119c6.260a558c@gitrepo.freebsd.org> The branch stable/14 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=c411e13ce133a27ea25aac054d740c938cb9bd11 commit c411e13ce133a27ea25aac054d740c938cb9bd11 Author: Piotr Kubaj AuthorDate: 2026-11-07 21:12:48 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:11 +0000 powerpc: move get_pcpu() to machine/pcpu.h Every other arch defines get_pcpu() in machine/pcpu.h, powerpc has it in machine/cpufunc.h, which is entirely under _KERNEL. lsof includes sys/systm.h without _KERNEL first on purpose, so on powerpc cpufunc.h turns into an empty header and pcpup later expands to a call of an undeclared get_pcpu(). Since sys/mount.h started pulling in sys/proc.h this breaks the lsof build on powerpc64 and powerpc64le. Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61305 (cherry picked from commit 4b3364a4bceb61c5870f50b75bf56272ca850944) --- sys/powerpc/include/cpufunc.h | 10 ---------- sys/powerpc/include/pcpu.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 19a7ae01df0c..0754b51df1b9 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -246,16 +246,6 @@ intr_restore(register_t msr) mtmsr(msr); } -static __inline struct pcpu * -get_pcpu(void) -{ - struct pcpu *ret; - - __asm __volatile("mfsprg %0, 0" : "=r"(ret)); - - return (ret); -} - /* "NOP" operations to signify priorities to the kernel. */ static __inline void nop_prio_vlow(void) diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h index 1e60a78bb204..28edd0f46987 100644 --- a/sys/powerpc/include/pcpu.h +++ b/sys/powerpc/include/pcpu.h @@ -145,6 +145,16 @@ struct pvo_entry; #ifdef _KERNEL +static __inline struct pcpu * +get_pcpu(void) +{ + struct pcpu *ret; + + __asm __volatile("mfsprg %0, 0" : "=r"(ret)); + + return (ret); +} + #define pcpup (get_pcpu()) static __inline __pure2 struct thread * From nobody Tue Nov 24 17:21:31 2026 X-Original-To: dev-commits-src-branches@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 4jYqNX2s4Fz71bHD for ; Tue, 24 Nov 2026 17:21:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNX0H09z3JJd for ; Tue, 24 Nov 2026 17:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540892; 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=G8NOy+EVA+7soHAuEsAQyuLB3MqXilNopmFCQ67/hE8=; b=SF/CyA4zFOqTkGT413ZLiq5ML2vXVIbv73398qKwmiJR9VOuWbNxT2CAMoDxkDB5dPCKYX MXePwOfB1wMfUK4dROlygHdKLfeD169UPGa28G/21g7h1p90UUpwlT7+Wml7j5YalS3cXR WnBmaJotc7KfOKCXuFLcodSDVkkvUgG4KfpmrIBku884nrTpSlL1kuC2V4pAqYl+bKuBCQ YrDM62U21lE38OIUS4sib1HleRT/5gr1DrhU18YReFyX5IhVF076NKnXBJKrMBgfEXJQte 50LQNcPJOwcTTkU/RsO1GNCeBp/dl8Bf7XqH66frwgnUqonWXvdSfXNoWTdhqg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540892; b=umWxF8RAOAQEDl5tzNokZxXcA8ckWs8y4YxhCpej4fuZZDB9vdPs8Bopw5YmO+MQmHV6LP d06Y751Kklk/o05AUYXVx//pAHQfCsI69G1zTI9ZGZYyGQQV4pfFTWnk+aal/bPPqp7fWV uzhpcTRO/YXSquU/ANXLSY3MBPUbS8xrHMjm/Iugk3azn1gEpDeK5Wmti0Q1nSWtgflu65 XIxsM2ywZ/hlYKnpD5iEp3zbN3jQHq801gAdsg0GP/S6gmOT+XU3jdawM8lr5Nk5c0XXwu uAws1u3H6ZVkojM2ZA4B/u2zGzg8jaPhE4mVx61JRmSIxRrTw+ljYNKQuT4j9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540892; 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=G8NOy+EVA+7soHAuEsAQyuLB3MqXilNopmFCQ67/hE8=; b=BRt0+KFyFzYNm9sMDaoiq+3TBy0FwcNK/8LdLTGLPLP/qMZAjl82Me1H6HCvFEvNaR1ryZ Cw/YwVUyOFZ6W8zzqL8B5FMznt5+Tb4I3Q7jcaDuCa29olM6n1QwE8LtSDvfKxjaVdxVog 7N0o99+Z5KATrzaA7tBw6cJiNEqC8YWepOWxB/czIG36TO/ODqySyPEfMmK2T5tSX+Bqdr 2x4UOteazcfn9nMKDE8o72FcAmcEamhzk2DDwX4XXyVO2NoEHtsjNj7emNpKrOlN1L5qmj S4XI6iSKp9iuTvPEqfKzZd8LMhF1/F/4JGEtRLIW4CEe5Wr3Eptizsn6D+0SSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNW6lrTzp3M for ; Tue, 24 Nov 2026 17:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f6fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 9745bab3cd30 - stable/14 - powerpc: save and restore VRSAVE with the vector state List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9745bab3cd30d715fd2173dc72346b85f5522df0 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:31 +0000 Message-Id: <6b05c79b.f6fb.586e9cd7@gitrepo.freebsd.org> The branch stable/14 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=9745bab3cd30d715fd2173dc72346b85f5522df0 commit 9745bab3cd30d715fd2173dc72346b85f5522df0 Author: Piotr Kubaj AuthorDate: 2026-10-18 10:41:40 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:12 +0000 powerpc: save and restore VRSAVE with the vector state VRSAVE was never saved or restored, although user code can write it and the mcontext carries it, so every process saw the value the previous process on that CPU had left there. Two processes pinned to the same CPU and writing different values to VRSAVE each read back the other's; each reads back its own now. Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61544 (cherry picked from commit 26b47fd4b63c4e67a952f9a4f0ceb89bcb6a24ac) --- sys/powerpc/powerpc/altivec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/powerpc/powerpc/altivec.c b/sys/powerpc/powerpc/altivec.c index e0f807cc0b53..25622988320b 100644 --- a/sys/powerpc/powerpc/altivec.c +++ b/sys/powerpc/powerpc/altivec.c @@ -40,8 +40,10 @@ #include #include +#include #include #include +#include static void save_vec_int(struct thread *td) @@ -81,6 +83,7 @@ save_vec_int(struct thread *td) */ __asm __volatile("mfvscr 0; vspltw 0,0,3; stvewx 0,0,%0" :: "b"(&pcb->pcb_vec.vscr)); + pcb->pcb_vec.vrsave = mfspr(SPR_VRSAVE); /* * Disable vector unit again @@ -127,6 +130,8 @@ enable_vec(struct thread *td) msr = mfmsr(); mtmsr(msr | PSL_VEC); + mtspr(SPR_VRSAVE, pcb->pcb_vec.vrsave); + /* * Restore VSCR by first loading it into a vector and then into VSCR. * (this needs to done before loading the user's vector registers From nobody Tue Nov 24 17:21:33 2026 X-Original-To: dev-commits-src-branches@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 4jYqNY4nvMz71Zrv for ; Tue, 24 Nov 2026 17:21:33 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNY1DN6z3JNv for ; Tue, 24 Nov 2026 17:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540893; 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=6txhjkEAPREzHHI7+ta0MD3SSBZSiFJ3Eqa5YJHB12Q=; b=TDqpArg4PgFZrW9kqLI7GxoFvbXxMVLHy3hxTaduYN/HLrsoYZYjXcQD8DUlN5sjjEnPXi gZK+KjDJPq7OviBdgN1rTgW+FG+aWWhboO2z5JqWkPwn/9wRA4gPeT4Wy1pbi0hdR6r1Ed 45HS+vJB4l9PahULNBmyoQ0t/3Hr34MZxZ2YFJqgeakd38BnovWqL47CfDHjbxTWxOHc8q 4X6MboL72ftbrkhT0319g+bIQR3tDlI9h2BFEQHqTru/Rq1k9jca8Cgy0kAbMveRCCrHfU 9jGxhZ0s0DHQ4JX8c+N+/BZtWu1VAujnm9QrsnGqvDGY+Naq/B0+4w81Dv+gww== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540893; b=TKfVM0Ipzq9P2BUWNl2gMxRYKDbcgjPGUWtRa5dR+fRnsottWJixs5ljeQFTygdUH0sDwn iUsdHDcXDZUleR7A7WAADjF9k81WBVPzCTd07JQpw9BjAQet6+PM7bHL58j3V2IzfZ8s89 Acxt+EE7kjVwRDX1XT8rEbX9UAVJ+mqxc2d7FhsmlPuWj/JKQX3FCPhdCbxY4WPHTQhV6L qSqD6pfrY9zXoy/0RgjNhhv9uWVPE9Uc4ztSAKLfMYHYGuBqGWgYthEvzyXpxIQkOieVtJ ncoMd3iZtxvwpDEBDWbjZ4TK3PnixX5uVtq9BGlryra/f5bbUpINOWe9C70yAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540893; 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=6txhjkEAPREzHHI7+ta0MD3SSBZSiFJ3Eqa5YJHB12Q=; b=Gi779Tk/Zz99wCKwGWgqojLt4VnAwacTui662dKuXkQr2sBtwumB/FOuLDc3r60JJuT8af 3/fWyM24DejPgdBzA5nidkqhlSuFfon9E1HH2UYZzS+6QrB8r0a7ZEUC8JSb1iJAcb/m/v 1MrsAkz8lIu3Q6MA2HPOvqQZXF1auodCds2pHYaV9F6NhqRXf0HyBcDE9W+L+PCBqY7N6T 3iWfWttYso0HWhlscVxhAjqC8tFGnH1YlftXiy4skccU2SWgZRE19XpV6z5XJVzTLEWAMO t8Obefn87NbvdQMhAyjVOylf4WYVs5DDPkKlePmZi/lXx23JT0o46lBCImpkJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNY03rSzp3P for ; Tue, 24 Nov 2026 17:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11c69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 4d0163d6063c - stable/14 - Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj): List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4d0163d6063c67a0062c1ed9a29cb84da0b6eb41 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:33 +0000 Message-Id: <6b05c79d.11c69.35c0ddf@gitrepo.freebsd.org> The branch stable/14 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=4d0163d6063c67a0062c1ed9a29cb84da0b6eb41 commit 4d0163d6063c67a0062c1ed9a29cb84da0b6eb41 Author: Piotr Kubaj AuthorDate: 2026-11-17 16:28:06 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:13 +0000 Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj): [PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336) FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same 16-byte stack alignment as Linux. The explicit vector alignment is a backend workaround that does not depend on the OS. There is no reason for the layouts to differ. llvm 21 still keeps the data layout in two places, so the check is changed in both the PowerPC backend and clang. They have to match, or clang errors out with a data layout mismatch. Reviewed by: dim MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D61678 (cherry picked from commit d1470ac7f365a1846b8cc565b76592c7a79a22e3) --- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 2 +- contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h index 9f3a4cd2da71..2eee8688db47 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h @@ -473,7 +473,7 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } - if (Triple.isOSAIX() || Triple.isOSLinux()) + if (Triple.isOSAIX() || Triple.isOSLinux() || Triple.isOSFreeBSD()) DataLayout += "-S128-v256:256:256-v512:512:512"; resetDataLayout(DataLayout); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index b5c6ac111dff..484fbbebf060 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -195,7 +195,9 @@ static std::string getDataLayoutString(const Triple &T) { // Specify the vector alignment explicitly. For v256i1 and v512i1, the // calculated alignment would be 256*alignment(i1) and 512*alignment(i1), // which is 256 and 512 bytes - way over aligned. - if (is64Bit && (T.isOSAIX() || T.isOSLinux())) + // FreeBSD uses the ELFv2 ABI and has the same 16-byte stack alignment as + // Linux. + if (is64Bit && (T.isOSAIX() || T.isOSLinux() || T.isOSFreeBSD())) Ret += "-S128-v256:256:256-v512:512:512"; return Ret; From nobody Tue Nov 24 17:21:53 2026 X-Original-To: dev-commits-src-branches@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 4jYqNx5jRSz71ZyH for ; Tue, 24 Nov 2026 17:21:53 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNx3vvMz3Jsf for ; Tue, 24 Nov 2026 17:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540913; 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=ZoAcwyRfEswQ/l/K/OIVIQgKp6r2MgjqzakSB897/ag=; b=Yk8zlFT5y0VDUUZ1i8JYojK8KgwBSuP89QZzJ/eBBXnc5Buv6fa75tpf0xhZiaZJnLIZju WHg5nKGL4YekyVmXW1u/+lzbJtL7uTHDhYZa2i9ajeA4cKuBUfaxhihYv5qfOSLeVw7vTk dyt2mc4OV+x87W1cE2RP5d7zyKRDVdQajQOkqRzE0I24NF+uoMdcc+KLUsaY961hHHW07p UJPS8YPJe+Bo01fdACjZcy9y/Rpl5M/mPb1hSUoNw44nwnYgoMOsEBv5qz4OkWtzySp6tb A4D0LNQrj8Mphhn3HLyBCBociwnEg0E7Fmo/D+7PCWCzhHKNQ0x/54STlCY+WQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540913; b=Q+cr8zXrPBToYuX/vWDPEjjlK2V4+k1DOrkTCD7r+sAy+GPF3KDEi4TwE4Rxg1xNSwD+3m hXht7MLHXQKybfFTAUrgLJfPnToSBIRLLMFW5nwrklEOkPcMKBvgL5phlWGjKqSgLBGzrg q34Oc9vVhZOKoQqtFDMfxmCgKK/RQCeIfEwDZ39tbSHjuQJcCi/lagQw6TTj+o8dr5Y8ld 7kwmzI80HcMXSSrbjjCQik0u58xscUyMNrjNcwvzjn5VK7417FVNi/XfS+yUUamCaK5Kod eOZ/oeWhjK7iscovrzivFQ5ElCJsW9iEIeVWgsBhlGZRT+FBAy/5TAxuNbaieg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540913; 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=ZoAcwyRfEswQ/l/K/OIVIQgKp6r2MgjqzakSB897/ag=; b=WG5qU4mgknt+953sEMws8zncoadEX5TFp0JtV6gSkG6xfegihkhOasdMeqcPuyR8ihDqCP xS3H4AEIhd/0XSFJJDM4dvF/9DjQlACMw8Ry2JUozUHs0cKnrGhvqu+m7sX8agZ0CzmE1D QEXUS7qnkhDkeWwxVYRg/cWfhcJSO95pZ6uVoIIs5eQZolITLBPcXpmnFTcCP1/Mz8/q4B /SSeloQc6RyIEMpN3i3UjDk8KmSi6QyIRznesKtQBpDeo41KkwZpbW7bxDiF2iUd39riU+ sPPGlD/T3OWjQ2Dxg23FSSlqw0yqFEzUP3q0Wb66tH8mlWTuR8VsMsAdpPSJDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNx3Tr2zp7P for ; Tue, 24 Nov 2026 17:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 108be by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 496ed837bc27 - stable/15 - powerpc: move get_pcpu() to machine/pcpu.h List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 496ed837bc27af467d4fb94a78fa63a61b6162cf Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:53 +0000 Message-Id: <6b05c7b1.108be.63f9e828@gitrepo.freebsd.org> The branch stable/15 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=496ed837bc27af467d4fb94a78fa63a61b6162cf commit 496ed837bc27af467d4fb94a78fa63a61b6162cf Author: Piotr Kubaj AuthorDate: 2026-11-07 21:12:48 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:18 +0000 powerpc: move get_pcpu() to machine/pcpu.h Every other arch defines get_pcpu() in machine/pcpu.h, powerpc has it in machine/cpufunc.h, which is entirely under _KERNEL. lsof includes sys/systm.h without _KERNEL first on purpose, so on powerpc cpufunc.h turns into an empty header and pcpup later expands to a call of an undeclared get_pcpu(). Since sys/mount.h started pulling in sys/proc.h this breaks the lsof build on powerpc64 and powerpc64le. Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61305 (cherry picked from commit 4b3364a4bceb61c5870f50b75bf56272ca850944) --- sys/powerpc/include/cpufunc.h | 10 ---------- sys/powerpc/include/pcpu.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 19a7ae01df0c..0754b51df1b9 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -246,16 +246,6 @@ intr_restore(register_t msr) mtmsr(msr); } -static __inline struct pcpu * -get_pcpu(void) -{ - struct pcpu *ret; - - __asm __volatile("mfsprg %0, 0" : "=r"(ret)); - - return (ret); -} - /* "NOP" operations to signify priorities to the kernel. */ static __inline void nop_prio_vlow(void) diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h index 1e60a78bb204..28edd0f46987 100644 --- a/sys/powerpc/include/pcpu.h +++ b/sys/powerpc/include/pcpu.h @@ -145,6 +145,16 @@ struct pvo_entry; #ifdef _KERNEL +static __inline struct pcpu * +get_pcpu(void) +{ + struct pcpu *ret; + + __asm __volatile("mfsprg %0, 0" : "=r"(ret)); + + return (ret); +} + #define pcpup (get_pcpu()) static __inline __pure2 struct thread * From nobody Tue Nov 24 17:21:54 2026 X-Original-To: dev-commits-src-branches@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 4jYqNz0q6sz71ZwL for ; Tue, 24 Nov 2026 17:21:55 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNy4Hnzz3Jfl for ; Tue, 24 Nov 2026 17:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540914; 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=IkD4dIxyXY7CWBZ/xUVEs5DU43l/2OrHVe2OoZYX4pM=; b=M1kdQ08uKOKTuPb0OyGpobyYqxQaDhyyzrMEm1TFjUvnabtmmX4yTLn5pr8IgsU/WkwJTQ YSeXEcKWxd9h6zJgQfGrZaLTGXK8Uqn6bYMYghD8HWcdb0iIvmIEpUccyuvgwo0wvV0s1a J30i9mPvOKf9/LmokERCFXL4gi6/ErJlZ1b4iBkvoIvMQBm7iGkdddyK/Yu8eZNKleNz2U t/04kJqCYvIX5b9t3xwRjHBaOXfYPPceqBbELDfld46obvlRRbXoHdxIh3LHRjJA3oSep1 y7f7BMG0oO+6zS4+aC/t4dsHetFCVSTFVEJNO0Zxvt6cytaWdzzm7vs8vJEgcA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540914; b=tQCQVoovByFzO4WbfsZCz/weptA14eClEgkeaK4mv5KRFfNTvaGchKIu/qyCOe7MALy8rk ZMIf9IdmVAE+zqgS6KibEFDMgCSXfMaOUQFTY+uSjGK+3vUdZ/C3DEDGQlzw51/+YbD41h /gjD/Ifw8tWouCtp265/Yr4yfvG3bfR2YJsCAHZbD7gfbXFak6ph8/Dc+ncYHnsBamDj3J muvOPfSsKXdGhY1uyq+PwHjFXlX0raO3KQiCkSh1g9HUzPVwk4zPygBAzIDwjFwHk8Sk7g p3JwOV5mNbfEHTi6l/G4BRiAcBl7oqRpYT2GJSqjPQ0nEsevsaAZY2wZekhIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540914; 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=IkD4dIxyXY7CWBZ/xUVEs5DU43l/2OrHVe2OoZYX4pM=; b=BCP6nqBPXHaeaRih/C3MysXcUoEJ6jaV5CKw8p9JNEqB4ld/OUUyMYk1UZU893bngub7QH V5QiEU4R/0gKoSP1eQsOxGNlu2pGnPEB0kh8DeRHWSOl827VF31smHE1T5fiXnV2IHRMEg koD377GZt9dFerGGFuG3F51f4BwjkBsCga1N+96MxZFe8XCEu1eZ8RMLx2iuQe/cQuuU5P x+jhlHyDocMgaVGqSjwdFle4fmZinCo6jHroDK+CirMLckijUzwVAEIxzJIOtya+Cpj/9z LT4zLXFJVwXPox4wHEyMvRql4yzCdRspaymKxI9a0xIXqVjhemODeEC9CA9cYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNy3sWTznQ6 for ; Tue, 24 Nov 2026 17:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11f42 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: aa462d88f9e5 - stable/15 - powerpc: save and restore VRSAVE with the vector state List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: aa462d88f9e595fcfda633a30c0be7afb4793ae7 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:54 +0000 Message-Id: <6b05c7b2.11f42.6d4a41c1@gitrepo.freebsd.org> The branch stable/15 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa462d88f9e595fcfda633a30c0be7afb4793ae7 commit aa462d88f9e595fcfda633a30c0be7afb4793ae7 Author: Piotr Kubaj AuthorDate: 2026-10-18 10:41:40 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:18 +0000 powerpc: save and restore VRSAVE with the vector state VRSAVE was never saved or restored, although user code can write it and the mcontext carries it, so every process saw the value the previous process on that CPU had left there. Two processes pinned to the same CPU and writing different values to VRSAVE each read back the other's; each reads back its own now. Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61544 (cherry picked from commit 26b47fd4b63c4e67a952f9a4f0ceb89bcb6a24ac) --- sys/powerpc/powerpc/altivec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/powerpc/powerpc/altivec.c b/sys/powerpc/powerpc/altivec.c index 928e5cf2f0eb..b847a2e5f12e 100644 --- a/sys/powerpc/powerpc/altivec.c +++ b/sys/powerpc/powerpc/altivec.c @@ -39,8 +39,10 @@ #include #include +#include #include #include +#include static void save_vec_int(struct thread *td) @@ -80,6 +82,7 @@ save_vec_int(struct thread *td) */ __asm __volatile("mfvscr 0; vspltw 0,0,3; stvewx 0,0,%0" :: "b"(&pcb->pcb_vec.vscr)); + pcb->pcb_vec.vrsave = mfspr(SPR_VRSAVE); /* * Disable vector unit again @@ -126,6 +129,8 @@ enable_vec(struct thread *td) msr = mfmsr(); mtmsr(msr | PSL_VEC); + mtspr(SPR_VRSAVE, pcb->pcb_vec.vrsave); + /* * Restore VSCR by first loading it into a vector and then into VSCR. * (this needs to done before loading the user's vector registers From nobody Tue Nov 24 17:21:55 2026 X-Original-To: dev-commits-src-branches@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 4jYqP05BmFz71bHm for ; Tue, 24 Nov 2026 17:21:56 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNz4bDPz3Jsy for ; Tue, 24 Nov 2026 17:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540915; 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=MOzoZpdiCfoJIOSnw8F1xR4BgH4b1PcHuK81+rKOQjM=; b=JDdk9cZ6QHOS9gJF/ZXb78p34qzftIjxd1Ve+vDKw41mBwmhMDn5Rvmdlr00/yf3Iky1Lo 1fcSGZvNzhD9JXNwuoCUe54IJLWY7hulZh/GPzFGWEQ8MqAxeUbtNmo2CRrY880CRQz4kW Qv/eW7F/F3vSlD2xEIo6ofO4eiterPLaq+NSHmySdkJ/gw9qZVtaZxUMRbesxkaThHLkPr FL2r+jbY3F/AoaQMnquToPbUZvGqXJFW/oLML44ZvrjBo1ZaKkKUVQ39T785CNWdt1RcwE 2XSGXY/v5j1w8MyUo0jvNPJEqa9hDzH1PFncQL4hFi4rBiBwod8rCeMr8TSkMQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540915; b=cYs+74nCBI/YVbIW7aVGFTQvLrX83adVbQsl2aToaBaJAVof1dc74KJekMUGghMfD24JMP IOnNveq9trIhqp+ByI4PRHx40ioODZR9hcKMm/qwnbdw8mX1DcdhGufLZ19XSHdyWdNfBq Fk81pewWGAeyf06kA0Jr2Wqg8jzXtjUDYSypEL1XdWuNlNZy8dmCFhiYvgxnIBG38U5AzQ i5/xNbi3/JwxThi1+PKf5hmbtpRuIvfno5WuFB4XAd818wjSU0Gb9DDJtugl4jL6iSlvBS 3m+fpeQVBYntFkBxuRZzjrmP4LW+4WjOXwQNIFXD4T980wxI0waReCtMHnzkiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795540915; 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=MOzoZpdiCfoJIOSnw8F1xR4BgH4b1PcHuK81+rKOQjM=; b=kIz7+HKdI1kXloIPI/t2Wl9BnWlTO1VASXmGwvDNs/aOZ3kXQKo3Y3/RFUA8OPOLCpzYG/ etJx1oF1AV7cr5jpT9uAbt6hCcSuSQBBhaJsnWYvboE9Xk5ofKvtHut2+vhtCZKDwtw7v7 CshVprLddU013c9P6I4hR/T0ZmQdT2HOK8CW/M1U3Fvd0AULPV6zhYGR+5U4H46auqq20j Inl9Eanfs1gj5I34k2yTFT6IZAXvVV5LL/Y6RhXmMNO7EuxwFkBNptPAhQ42vpMl7n6WmW 1uSmGJ+75LKQuchEL6LWQ2NsPd7MgoAXOF5FaK2KyXt6dGVhuQdtyHbiob7Z7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNz4FQ8zp4v for ; Tue, 24 Nov 2026 17:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 10ecc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:21:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: d3899081b93f - stable/15 - Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj): List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d3899081b93f8ba19d21a01ad42e67b4f5f0a559 Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:21:55 +0000 Message-Id: <6b05c7b3.10ecc.606a26b6@gitrepo.freebsd.org> The branch stable/15 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=d3899081b93f8ba19d21a01ad42e67b4f5f0a559 commit d3899081b93f8ba19d21a01ad42e67b4f5f0a559 Author: Piotr Kubaj AuthorDate: 2026-11-17 16:28:06 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-24 16:11:19 +0000 Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj): [PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336) FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same 16-byte stack alignment as Linux. The explicit vector alignment is a backend workaround that does not depend on the OS. There is no reason for the layouts to differ. llvm 21 still keeps the data layout in two places, so the check is changed in both the PowerPC backend and clang. They have to match, or clang errors out with a data layout mismatch. Reviewed by: dim MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D61678 (cherry picked from commit d1470ac7f365a1846b8cc565b76592c7a79a22e3) --- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 2 +- contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h index 9f3a4cd2da71..2eee8688db47 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h @@ -473,7 +473,7 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } - if (Triple.isOSAIX() || Triple.isOSLinux()) + if (Triple.isOSAIX() || Triple.isOSLinux() || Triple.isOSFreeBSD()) DataLayout += "-S128-v256:256:256-v512:512:512"; resetDataLayout(DataLayout); diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index b5c6ac111dff..484fbbebf060 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -195,7 +195,9 @@ static std::string getDataLayoutString(const Triple &T) { // Specify the vector alignment explicitly. For v256i1 and v512i1, the // calculated alignment would be 256*alignment(i1) and 512*alignment(i1), // which is 256 and 512 bytes - way over aligned. - if (is64Bit && (T.isOSAIX() || T.isOSLinux())) + // FreeBSD uses the ELFv2 ABI and has the same 16-byte stack alignment as + // Linux. + if (is64Bit && (T.isOSAIX() || T.isOSLinux() || T.isOSFreeBSD())) Ret += "-S128-v256:256:256-v512:512:512"; return Ret; From nobody Tue Nov 24 17:23:36 2026 X-Original-To: dev-commits-src-branches@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 4jYqQw2cqjz71bLc for ; Tue, 24 Nov 2026 17:23:36 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqQw22PKz3MLr for ; Tue, 24 Nov 2026 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795541016; 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=5EmX901eodt8OdhLPoujVEZYNpEy0oPiT8V4emoF/vE=; b=Xd1OtusF4MWDc5cvV1af6wWUEwCtEP2567UwU+sLVC6zKLez+ZeNeolSfXFS5h9hsACk7H LZwnLM4l2K6P4ejATcWVnrZxoX2OtgcrHrrS68kjwucTW+GGreSaWbEVpOy+Qpj6PkOp2w M+0aq+mgMXwzPTseevlkiuVQoC2kQO8I/BwrfW5lO6zEMuaWonHdAXE8jPMQOJtA1oH5iO Yc203HcXEBB7sQRwcQPie6SS1NLyM7mN7HPJnDrsNobZCm9lrkLmI+DGO5+mKiqSjuor9/ CwNmZ2FHtw3SuJ6sFSzGDjG2q+QqDJFiqdQScfIS0F8h1GHfQr5OvN3Bip2cLg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795541016; b=GwqSDhY7MAHKC6jbN3us4w3548d9cOTfbkn29IXFuPs+h5vgFqkXE+hq6mwW/Oz+O8yqJX EZBp+vHWta3qzBBdLVDLP/kCK0MekoPkgK6OvL9sYHsvClzrci10TDHffIMERsBvBmmeYV zTUFDk1DveH6bYp0clFlNuDucz4dRg0EzS8Vr7ahFekAlwf9yxlzp96HEtOMH7qtXxn1fX NI51/WSkUaLe2oPoxnyaPkDwAborsj4lDqpaIAy8z4eR5Czwi1Hr2TrEk2ikxG8hsBEKmx NdVCW1e9v6hW5UqIuabDNRjbMVpDK46wolxEEUJ68N1S6EJu/XOnnqrLucbdNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795541016; 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=5EmX901eodt8OdhLPoujVEZYNpEy0oPiT8V4emoF/vE=; b=HdkChyi05fhUoQcRkKwuPpajKUBXqQzQnQJm5t82VLvIuRUy56RW1L09E2loprm6AnRxk+ uZDRWz33wAoDqvZmAidjzgIy/JtX+asRzJkxE59XLDnT7W0o6w2tGXimI7PREhFUNDDi2g e9uTd0YxxZdBjzSLM4XA3w5+l99CM9iz0JbKWOFT6XK3g3itDw6pBQ4238vpvNH8KVD8bh gjXCx66lIBcox5JNCOhBvbcPYa2O95XRgItgNuYdTMjtqLDnnor2vQqru2sgsmVhKc5FWO YN1kGQiacYipIg7stYaJ5zEjVGl+nU+0Msr873DCPH7JA0a0hi++IvuYsPcMSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqQw1j0SzpFm for ; Tue, 24 Nov 2026 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1189b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Nov 2026 17:23:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Roman Bogorodskiy Subject: git: 5ec1d41902cc - stable/15 - bhyve: add command to list config options List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5ec1d41902cc1f331f590bac8777c62e81e90d3f Auto-Submitted: auto-generated Date: Tue, 24 Nov 2026 17:23:36 +0000 Message-Id: <6b05c818.1189b.26affe3c@gitrepo.freebsd.org> The branch stable/15 has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=5ec1d41902cc1f331f590bac8777c62e81e90d3f commit 5ec1d41902cc1f331f590bac8777c62e81e90d3f Author: Roman Bogorodskiy AuthorDate: 2026-07-22 16:08:09 +0000 Commit: Roman Bogorodskiy CommitDate: 2026-11-24 17:22:47 +0000 bhyve: add command to list config options For a software built on top of bhyve(8) and/or managing bhyve(8), it is very convenient to know what specific features the given binary supports. Currently, bhyve(8) provides some of this information, and it could be retrieved by parsing `bhyve -h`, `bhyve -s help`, `bhyve -l help`. Sometimes it is not enough, for example, the recently added "oemstrings" feature cannot be fully probed using these commands. Over time, some workarounds were suggested. Specifically: - Mapping features to __FreeBSD_version. I see at least two issues with that: * __FreeBSD_version does not directly map to bhyve(8) features, so this is simply not accurate. * bhyve(8) might be updated separately from the system, which is not so uncommon, especially for development purposes. Then such a probing will be inaccurate. - Manual pages parsing. I see more disadvantages with that: * Manual pages are meant to be read by a human. Extracting information from it by a machine is not the most convenient thing. Especially understanding side notes like: "Note, feature 'foo' is arm64-only!". * Manual pages might be inaccurate, they might miss options. * bhyve(8) could be used in an environment where manual pages are not installed. This commit attempts to close this gap by introducing the "bhyve -o help" command which prints all the supported configuration variables. In my opinion, it is, in combination with the other commands mentioned above, sufficient to retrieve most of the capabilities of the given bhyve(8) binary. The current implementation defines a simple configuration schema for common and machdep code and prints out a list of supported configuration variables for the current architecture. The next step as I see it would be extending set_config*() functions to validate the user provided values against the schema, so users get notified early on incorrect or misspelled configuration variables. It would also be nice to allow users to only validate their configuration, think of 'nginx configtest / -t'. Reviewed by: chuck (previous revision), bnovkov MFC after: 1 month MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58419 (cherry picked from commit e809c7d810ced2307741a7c0c135a8b1bef1851b) --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/aarch64/bhyverun_machdep.c | 22 ++++ usr.sbin/bhyve/amd64/bhyverun_machdep.c | 94 +++++++++++++++ usr.sbin/bhyve/bhyve.8 | 4 + usr.sbin/bhyve/block_if.c | 17 +++ usr.sbin/bhyve/block_if.h | 3 + usr.sbin/bhyve/config_schema.c | 193 ++++++++++++++++++++++++++++++ usr.sbin/bhyve/config_schema.h | 40 +++++++ usr.sbin/bhyve/pci_nvme.c | 20 ++++ usr.sbin/bhyve/riscv/bhyverun_machdep.c | 18 +++ 10 files changed, 412 insertions(+) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 25fb71b5768f..03f9eb53f9e2 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -25,6 +25,7 @@ SRCS= \ block_if.c \ bootrom.c \ config.c \ + config_schema.c \ console.c \ crc16.c \ ctl_nvme_all.c \ diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c index b1dd906da254..816eba561d42 100644 --- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c @@ -46,6 +46,7 @@ #include "bhyve_machdep.h" #include "bhyverun.h" #include "config.h" +#include "config_schema.h" #include "debug.h" #include "fdt.h" #include "mem.h" @@ -54,6 +55,23 @@ #include "rtc_pl031.h" #include "uart_emul.h" +static const struct config_option config_options_machdep[] = { + { "gdb.address", CONFIG_OPTION_STRING }, + { "gdb.port", CONFIG_OPTION_INTEGER }, + { "gdb.wait", CONFIG_OPTION_BOOL }, + { "rtc.use_localtime", CONFIG_OPTION_BOOL }, + { "console", CONFIG_OPTION_STRING }, + { "fdt.bootargs", CONFIG_OPTION_STRING }, +}; + +void +config_schema_merge_options_machdep(struct config_schema *schema) +{ + + config_schema_merge_options(schema, NULL, config_options_machdep, + nitems(config_options_machdep)); +} + /* Start of mem + 1M */ #define FDT_BASE 0x100000 #define FDT_SIZE (64 * 1024) @@ -151,6 +169,10 @@ bhyve_optparse(int argc, char **argv) set_config_value("memory.size", optarg); break; case 'o': + if (strcmp(optarg, "help") == 0) { + print_config_options(); + exit(0); + } if (!bhyve_parse_config_option(optarg)) { errx(EX_USAGE, "invalid configuration option '%s'", diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index a31c1512dbc3..51140fe51a18 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -26,10 +26,13 @@ * SUCH DAMAGE. */ +#include + #include #include #include #include +#include #include #include @@ -39,6 +42,7 @@ #include "bhyverun.h" #include "bootrom.h" #include "config.h" +#include "config_schema.h" #include "debug.h" #include "e820.h" #include "fwctl.h" @@ -53,6 +57,92 @@ #include "smbiostbl.h" #include "xmsr.h" +static const struct config_option config_options_machdep[] = { + { "bootvars", CONFIG_OPTION_STRING }, + { "acpi_tables", CONFIG_OPTION_BOOL }, + { "acpi_tables_in_memory", CONFIG_OPTION_BOOL }, + + { "gdb.address", CONFIG_OPTION_STRING }, + { "gdb.port", CONFIG_OPTION_INTEGER }, + { "gdb.wait", CONFIG_OPTION_BOOL }, + { "keyboard.layout", CONFIG_OPTION_STRING }, + { "rtc.use_localtime", CONFIG_OPTION_BOOL }, + + { "bios.vendor", CONFIG_OPTION_STRING }, + { "bios.version", CONFIG_OPTION_STRING }, + { "bios.release_date", CONFIG_OPTION_STRING }, + { "system.family_name", CONFIG_OPTION_STRING }, + { "system.manufacturer", CONFIG_OPTION_STRING }, + { "system.product_name", CONFIG_OPTION_STRING }, + { "system.serial_number", CONFIG_OPTION_STRING }, + { "system.sku", CONFIG_OPTION_STRING }, + { "system.version", CONFIG_OPTION_STRING }, + { "board.manufacturer", CONFIG_OPTION_STRING }, + { "board.product_name", CONFIG_OPTION_STRING }, + { "board.version", CONFIG_OPTION_STRING }, + { "board.serial_number", CONFIG_OPTION_STRING }, + { "board.asset_tag", CONFIG_OPTION_STRING }, + { "board.location", CONFIG_OPTION_STRING }, + { "chassis.manufacturer", CONFIG_OPTION_STRING }, + { "chassis.version", CONFIG_OPTION_STRING }, + { "chassis.serial_number", CONFIG_OPTION_STRING }, + { "chassis.asset_tag", CONFIG_OPTION_STRING }, + { "chassis.sku", CONFIG_OPTION_STRING }, + + { "x86.mptable", CONFIG_OPTION_BOOL }, + { "x86.x2apic", CONFIG_OPTION_BOOL }, + { "x86.strictio", CONFIG_OPTION_BOOL }, + { "x86.strictmsr", CONFIG_OPTION_BOOL }, + { "x86.verbosemsr", CONFIG_OPTION_BOOL }, + { "x86.vmexit_on_hlt", CONFIG_OPTION_BOOL }, + { "x86.vmexit_on_pause", CONFIG_OPTION_BOOL }, + + { "pci.B.S.F.wait", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.rfb", CONFIG_OPTION_STRING }, + { "pci.B.S.F.vga", CONFIG_OPTION_STRING }, + { "pci.B.S.F.w", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.h", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.password", CONFIG_OPTION_STRING }, + { "pci.B.S.F.tcp", CONFIG_OPTION_STRING }, + + { "lpc.com1.path", CONFIG_OPTION_STRING }, + { "lpc.com1.tcp", CONFIG_OPTION_STRING }, + { "lpc.com2.path", CONFIG_OPTION_STRING }, + { "lpc.com2.tcp", CONFIG_OPTION_STRING }, + { "lpc.com3.path", CONFIG_OPTION_STRING }, + { "lpc.com3.tcp", CONFIG_OPTION_STRING }, + { "lpc.com4.path", CONFIG_OPTION_STRING }, + { "lpc.com4.tcp", CONFIG_OPTION_STRING }, + { "lpc.fwcfg", CONFIG_OPTION_STRING }, + { "lpc.pc-testdev", CONFIG_OPTION_BOOL }, + { "lpc.pcireg.*", CONFIG_OPTION_INTEGER }, + { "lpc.pcireg.vendor", CONFIG_OPTION_INTEGER }, + { "lpc.pcireg.device", CONFIG_OPTION_INTEGER }, + { "lpc.pcireg.revid", CONFIG_OPTION_INTEGER }, + { "lpc.pcireg.subvendor", CONFIG_OPTION_INTEGER }, + { "lpc.pcireg.subdevice", CONFIG_OPTION_INTEGER }, + + { "tpm.path", CONFIG_OPTION_STRING }, + { "tpm.type", CONFIG_OPTION_STRING }, + { "tpm.version", CONFIG_OPTION_STRING }, + { "tpm.intf", CONFIG_OPTION_STRING }, + { "tpm.ppi", CONFIG_OPTION_STRING }, + + { "pci.B.S.F.bus", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.slot", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.func", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.pptdev", CONFIG_OPTION_STRING }, + { "pci.B.S.F.rom", CONFIG_OPTION_STRING }, +}; + +void +config_schema_merge_options_machdep(struct config_schema *schema) +{ + + config_schema_merge_options(schema, NULL, config_options_machdep, + nitems(config_options_machdep)); +} + void bhyve_init_config(void) { @@ -206,6 +296,10 @@ bhyve_optparse(int argc, char **argv) errx(EX_USAGE, "NUMA emulation requires ACPI"); break; case 'o': + if (strcmp(optarg, "help") == 0) { + print_config_options(); + exit(0); + } if (!bhyve_parse_config_option(optarg)) { errx(EX_USAGE, "invalid configuration option '%s'", diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index b73d0dae32ab..7400c99b3529 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -91,6 +91,8 @@ .Nm .Fl l Cm help .Nm +.Fl o Cm help +.Nm .Fl s Cm help .Sh DESCRIPTION .Nm @@ -324,6 +326,8 @@ See the flag in .Xr cpuset 1 for a list of valid NUMA memory allocation policies and their formats. +.It Fl o Cm help +Print a list of supported configuration variables. .It Fl o Ar var Ns Cm = Ns Ar value Set the configuration variable .Ar var diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index 0a4f76ae197d..311809f0c0e5 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -57,6 +57,7 @@ #include "bhyverun.h" #include "config.h" +#include "config_schema.h" #include "debug.h" #include "mevent.h" #include "pci_emul.h" @@ -67,6 +68,22 @@ #define BLOCKIF_NUMTHR 8 #define BLOCKIF_MAXREQ (BLOCKIF_RING_MAX + BLOCKIF_NUMTHR) +static const struct config_option blockif_config_options[] = { + { "path", CONFIG_OPTION_STRING }, + { "nocache", CONFIG_OPTION_BOOL }, + { "nodelete", CONFIG_OPTION_BOOL }, + { "sync", CONFIG_OPTION_BOOL }, + { "direct", CONFIG_OPTION_BOOL }, + { "ro", CONFIG_OPTION_BOOL }, + { "sectorsize", CONFIG_OPTION_STRING }, + { "bootindex", CONFIG_OPTION_INTEGER }, +}; + +const struct config_option_set blockif_config_option_set = { + .options = blockif_config_options, + .count = nitems(blockif_config_options), +}; + enum blockop { BOP_READ, BOP_WRITE, diff --git a/usr.sbin/bhyve/block_if.h b/usr.sbin/bhyve/block_if.h index 9a1a65a1bfe9..afe56570035b 100644 --- a/usr.sbin/bhyve/block_if.h +++ b/usr.sbin/bhyve/block_if.h @@ -40,8 +40,11 @@ #include #include +struct config_option_set; struct vm_snapshot_meta; +extern const struct config_option_set blockif_config_option_set; + /* * BLOCKIF_IOV_MAX is the maximum number of scatter/gather entries in diff --git a/usr.sbin/bhyve/config_schema.c b/usr.sbin/bhyve/config_schema.c new file mode 100644 index 000000000000..ced31250bed7 --- /dev/null +++ b/usr.sbin/bhyve/config_schema.c @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2026 The FreeBSD Foundation + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "config_schema.h" + +SET_DECLARE(config_option_set, struct config_option_set); + +struct config_schema_option { + RB_ENTRY(config_schema_option) entry; + char *name; + enum config_option_type type; +}; + +RB_HEAD(config_schema, config_schema_option); + +static int +config_schema_option_compare(struct config_schema_option *a, + struct config_schema_option *b) +{ + + return (strcmp(a->name, b->name)); +} + +RB_GENERATE_STATIC(config_schema, config_schema_option, entry, + config_schema_option_compare); + +static const struct config_option config_options[] = { + { "name", CONFIG_OPTION_STRING }, + { "cpus", CONFIG_OPTION_INTEGER }, + { "cores", CONFIG_OPTION_INTEGER }, + { "threads", CONFIG_OPTION_INTEGER }, + { "sockets", CONFIG_OPTION_INTEGER }, + { "memory.guest_in_core", CONFIG_OPTION_BOOL }, + { "memory.size", CONFIG_OPTION_STRING }, + { "memory.wired", CONFIG_OPTION_BOOL }, + { "bootrom", CONFIG_OPTION_STRING }, + { "destroy_on_poweroff", CONFIG_OPTION_BOOL }, + { "pci.enable_bars", CONFIG_OPTION_BOOL }, + { "uuid", CONFIG_OPTION_STRING }, + { "virtio_msix", CONFIG_OPTION_BOOL }, + { "config.dump", CONFIG_OPTION_BOOL }, + + { "vcpu.N.cpuset", CONFIG_OPTION_STRING }, + { "domains.N.size", CONFIG_OPTION_STRING }, + { "domains.N.domain_policy", CONFIG_OPTION_STRING }, + { "domains.N.cpus", CONFIG_OPTION_STRING }, + + { "pci.B.S.F.device", CONFIG_OPTION_STRING }, + { "pci.B.S.F.vendor", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.devid", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.pcireg.*", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.pcireg.vendor", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.pcireg.device", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.port.N.type", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.path", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.nocache", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.port.N.nodelete", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.port.N.sync", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.port.N.direct", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.port.N.ro", CONFIG_OPTION_BOOL }, + { "pci.B.S.F.port.N.sectorsize", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.nmrr", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.port.N.ser", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.rev", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.model", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.bootindex", CONFIG_OPTION_INTEGER }, + + { "pci.B.S.F.backend", CONFIG_OPTION_STRING }, + { "pci.B.S.F.type", CONFIG_OPTION_STRING }, + { "pci.B.S.F.peerhook", CONFIG_OPTION_STRING }, + { "pci.B.S.F.socket", CONFIG_OPTION_STRING }, + { "pci.B.S.F.hook", CONFIG_OPTION_STRING }, + { "pci.B.S.F.hostfwd", CONFIG_OPTION_STRING }, + { "pci.B.S.F.mac", CONFIG_OPTION_STRING }, + { "pci.B.S.F.mtu", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.play", CONFIG_OPTION_STRING }, + { "pci.B.S.F.rec", CONFIG_OPTION_STRING }, + + { "pci.B.S.F.serial", CONFIG_OPTION_STRING }, + { "pci.B.S.F.sharename", CONFIG_OPTION_STRING }, + { "pci.B.S.F.port.N.name", CONFIG_OPTION_STRING }, + + { "pci.B.S.F.dev", CONFIG_OPTION_STRING }, + { "pci.B.S.F.iid", CONFIG_OPTION_INTEGER }, + { "pci.B.S.F.slot.N.device", CONFIG_OPTION_STRING }, +}; + +static const char * +config_option_type_name(enum config_option_type type) +{ + + switch (type) { + case CONFIG_OPTION_BOOL: + return ("bool"); + case CONFIG_OPTION_INTEGER: + return ("integer"); + case CONFIG_OPTION_STRING: + return ("string"); + } + errx(EX_SOFTWARE, "invalid configuration option type"); +} + +void +config_schema_merge_options(struct config_schema *schema, const char *prefix, + const struct config_option *options, size_t count) +{ + struct config_schema_option *existing, *option; + char *name; + size_t i; + + if (prefix == NULL) + prefix = ""; + for (i = 0; i < count; i++) { + if (asprintf(&name, "%s%s", prefix, options[i].name) == -1) + err(EX_OSERR, "asprintf"); + option = malloc(sizeof(*option)); + if (option == NULL) + err(EX_OSERR, "malloc"); + option->name = name; + option->type = options[i].type; + + existing = RB_INSERT(config_schema, schema, option); + if (existing == NULL) + continue; + if (existing->type != option->type) { + errx(EX_SOFTWARE, + "conflicting types for configuration option " + "'%s': %s and %s", option->name, + config_option_type_name(existing->type), + config_option_type_name(option->type)); + } + free(option->name); + free(option); + } +} + +static void +config_schema_merge_option_set(struct config_schema *schema, + const struct config_option_set *set, const char *inherited_prefix) +{ + const char *prefix; + + prefix = set->prefix != NULL ? set->prefix : inherited_prefix; + if (set->base != NULL) + config_schema_merge_option_set(schema, set->base, prefix); + config_schema_merge_options(schema, prefix, set->options, set->count); +} + +static void +config_schema_destroy(struct config_schema *schema) +{ + struct config_schema_option *option, *tmp; + + RB_FOREACH_SAFE(option, config_schema, schema, tmp) { + RB_REMOVE(config_schema, schema, option); + free(option->name); + free(option); + } +} + +void +print_config_options(void) +{ + struct config_schema_option *option; + struct config_option_set **setp; + struct config_schema schema; + + RB_INIT(&schema); + config_schema_merge_options(&schema, NULL, config_options, + nitems(config_options)); + SET_FOREACH(setp, config_option_set) { + config_schema_merge_option_set(&schema, *setp, NULL); + } + config_schema_merge_options_machdep(&schema); + + RB_FOREACH(option, config_schema, &schema) { + printf("%s\n", option->name); + } + config_schema_destroy(&schema); +} diff --git a/usr.sbin/bhyve/config_schema.h b/usr.sbin/bhyve/config_schema.h new file mode 100644 index 000000000000..2a6890ac6675 --- /dev/null +++ b/usr.sbin/bhyve/config_schema.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2026 The FreeBSD Foundation + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef __CONFIG_SCHEMA_H__ +#define __CONFIG_SCHEMA_H__ + +#include +#include + +enum config_option_type { + CONFIG_OPTION_BOOL, + CONFIG_OPTION_INTEGER, + CONFIG_OPTION_STRING, +}; + +struct config_option { + const char *name; + enum config_option_type type; +}; + +struct config_option_set { + const char *prefix; + const struct config_option_set *base; + const struct config_option *options; + size_t count; +}; + +struct config_schema; + +#define CONFIG_OPTION_SET(x) DATA_SET(config_option_set, x) + +void config_schema_merge_options(struct config_schema *, const char *, + const struct config_option *, size_t); +void config_schema_merge_options_machdep(struct config_schema *); +void print_config_options(void); + +#endif /* !__CONFIG_SCHEMA_H__ */ diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index c8e74434b3ae..8862b625b80b 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -55,6 +55,7 @@ #include #include +#include #include #include #include @@ -79,9 +80,28 @@ #include "bhyverun.h" #include "block_if.h" #include "config.h" +#include "config_schema.h" #include "debug.h" #include "pci_emul.h" +static const struct config_option pci_nvme_config_options[] = { + { "maxq", CONFIG_OPTION_INTEGER }, + { "qsz", CONFIG_OPTION_INTEGER }, + { "ioslots", CONFIG_OPTION_INTEGER }, + { "sectsz", CONFIG_OPTION_INTEGER }, + { "ser", CONFIG_OPTION_STRING }, + { "eui64", CONFIG_OPTION_INTEGER }, + { "dsm", CONFIG_OPTION_STRING }, + { "ram", CONFIG_OPTION_INTEGER }, +}; + +static const struct config_option_set pci_nvme_config_option_set = { + .prefix = "pci.B.S.F.", + .base = &blockif_config_option_set, + .options = pci_nvme_config_options, + .count = nitems(pci_nvme_config_options), +}; +CONFIG_OPTION_SET(pci_nvme_config_option_set); static int nvme_debug = 0; #define DPRINTF(fmt, args...) if (nvme_debug) PRINTLN(fmt, ##args) diff --git a/usr.sbin/bhyve/riscv/bhyverun_machdep.c b/usr.sbin/bhyve/riscv/bhyverun_machdep.c index 942044157bbb..31a7dcad3e70 100644 --- a/usr.sbin/bhyve/riscv/bhyverun_machdep.c +++ b/usr.sbin/bhyve/riscv/bhyverun_machdep.c @@ -49,6 +49,7 @@ #include "bhyverun.h" #include "config.h" +#include "config_schema.h" #include "debug.h" #include "fdt.h" #include "mem.h" @@ -57,6 +58,19 @@ #include "uart_emul.h" #include "riscv.h" +static const struct config_option config_options_machdep[] = { + { "console", CONFIG_OPTION_STRING }, + { "fdt.bootargs", CONFIG_OPTION_STRING }, +}; + +void +config_schema_merge_options_machdep(struct config_schema *schema) +{ + + config_schema_merge_options(schema, NULL, config_options_machdep, + nitems(config_options_machdep)); +} + #define FDT_SIZE (64 * 1024) #define FDT_DTB_ALIGN 8 @@ -142,6 +156,10 @@ bhyve_optparse(int argc, char **argv) set_config_value("memory.size", optarg); break; case 'o': + if (strcmp(optarg, "help") == 0) { + print_config_options(); + exit(0); + } if (!bhyve_parse_config_option(optarg)) { errx(EX_USAGE, "invalid configuration option '%s'",