From nobody Tue Nov 10 01:50:51 2026 X-Original-To: dev-commits-src-main@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 4jNqP81WFpz70rlg for ; Tue, 10 Nov 2026 01:50:52 +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 4jNqP80Vmvz4W8F for ; Tue, 10 Nov 2026 01:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794275452; 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=JYXoWJiaw+Qj9LIfC+CijmXCK2JdEvK9NjgQN6YAnPw=; b=Tez9H1A8vD56jexoe7SD51Ti1ar+m1QYJ9EKG0AEH2f1H0gf5ZNq6UatgE34p/rqF1h+H+ o8Y61tJcNp/jxC5+qw+TUWi9wuL2808UsA7k9unCdkBsZ2qPRO+FCL/09VZDJGqCrDXezh P6pluYhLAylvfUaVkY1ZlSy4WwCXw1KU/h6aSMAwe9vjfzTgsAfY/MDcOTYUebpWK29tTR o/YwFLMs7RWfNb+ugiwTMI9QWrfvWqIQP+KRsKuP6irbYn3H05bgglBq9hM8V06/EyXGhW 6XKqtojEDR5E+HjpdeU8JTWKwbxA0WRtWO++yfDNH7YbOTl+tNBGBVh6g5xtbA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794275452; b=g2CwOzyWlq33P6ud7RlhIwPRoStWSheCAXtbQ+KsutgnPh+7KetS3BcTj7tKfj8c4vpkjV DrLcYrOEim6XY/VvvUoWVBF4yt81KmKQcu7afPUCGKiDa2+n0MWwCOwbO5fk5XnkycvTVn +0pWBPOJmu5+BbYO+93qScXxoRG+OsK8bRyNdXQNLtbJGWPgXDsi9mYgnL9Q8WH4hklaFF AQoyEKlK142yC5hdvUsSOrSpXx8Bru/ureiDIKmctfjGv36mjXftpyX/CV9adlycXxs2y2 W2jOwXKXzLZjkZOh0FgO5iK0ceXIdiKiNMvBYN6mEaSj2PO/rUvQBZlS3ufnKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794275452; 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=JYXoWJiaw+Qj9LIfC+CijmXCK2JdEvK9NjgQN6YAnPw=; b=leq0wNEPaHO68y9p1FgGJusxvzJSHz1vHbR/EUjkvv4yUDeH1Xf66mgWRUzvebno0ddd0m KjhJmmo8RvPR0hAbnyKN4031aWAWm7sbpr2TggkX4lM99mM1V8Z5r7HZGBsemUJ99kxTec /EGTg9jRVi5gLwkOSCQ8srLt+czBnAq4v8UeHcqUXKjdx0SYX8RmVN/7jJKaKXxJpl6+U1 dquoP/P/yn6TaWtGvcEGw8tbrc/GU9P7RTZPO2ZXgn2TB7Pyfe3NzkZxwu1MwoY6AH6Vmd S6FSFkXXvzpD0OfKX+43lfbtmwAFxSAIFUtX9HOWL7zNzg0bBQP+o8nMh3n9eQ== 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 4jNqP72pVyz161m for ; Tue, 10 Nov 2026 01:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18851 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Nov 2026 01:50:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 83fc6f5bdf81 - main - Revert "tests/sys/capsicum: restore test coverage with root user" List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch of the 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/main X-Git-Reftype: branch X-Git-Commit: 83fc6f5bdf8133359ec5526b9e359fd7d35c12c8 Auto-Submitted: auto-generated Date: Tue, 10 Nov 2026 01:50:51 +0000 Message-Id: <6af2787b.18851.631c17a1@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=83fc6f5bdf8133359ec5526b9e359fd7d35c12c8 commit 83fc6f5bdf8133359ec5526b9e359fd7d35c12c8 Author: Enji Cooper AuthorDate: 2026-11-10 01:49:25 +0000 Commit: Enji Cooper CommitDate: 2026-11-10 01:49:37 +0000 Revert "tests/sys/capsicum: restore test coverage with root user" The wrong patch was applied for D61080. Both changes must go. This reverts commit dda15b669d021346682009f38acc6db2639fb99f. --- tests/sys/capsicum/Makefile | 27 +++++++++------------------ tests/sys/capsicum/capsicum-test-main.cc | 24 ------------------------ 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index daf508ba7f30..9a88c9cf0ec1 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -9,11 +9,14 @@ CFLAGS+= -I${SRCTOP}/tests .if ${MK_GOOGLETEST} != no -GTESTS+= capsicum-test_privileged -GTESTS+= capsicum-test_unprivileged +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" -# SRCS required for `capsicum-test*`. -SRCS.capsicum-test= \ +SRCS.capsicum-test+= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ @@ -33,20 +36,8 @@ SRCS.capsicum-test= \ overhead.cc \ rename.cc -.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" +LIBADD.capsicum-test+= gtest pthread procstat +TEST_METADATA.capsicum-test= 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 308c121a0281..2a2c75000039 100644 --- a/tests/sys/capsicum/capsicum-test-main.cc +++ b/tests/sys/capsicum/capsicum-test-main.cc @@ -136,30 +136,6 @@ 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(); }