From nobody Thu Apr 21 22:38:20 2022 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 AB0FA199680B; Thu, 21 Apr 2022 22:38: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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KksrX5gPmz4Wm6; Thu, 21 Apr 2022 22:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650580701; 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=xySGlFRRDFtMfftchSWAgb8dcHcnQMUPGxU7G3bN0PE=; b=iN4b6hlyDRWR8eC/RfuS5mK4p/u/bf/W8p20bdEtgwyvRjc6oN0OpnQnEs2wd8jis8uUK7 C6rk2BSrTms1wSHGgYIEAsQn/b3yfbuiWUvRi04RU60b8QQVir9IyeEroe/ETucbmP+sZ6 5H2eOQ/6YZ0SfJfVEu2mkdpWrrXxjGwTekLbVJv+JtmPl1Nqagv9TIVxEYjbcHLg4UbHi6 15owKNBh/B1TxZN0cKnEEnmyAUB3Ag6hCv8HWvWx29tuEjaNpB91aaxs9MxVmS6fzl0oEu jDNVUr3NYPm6YmnM6/+6W+auatNOPunXkewuHeqWgp7FTWL9fvlLoyp9SaPSXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93F9B11ABD; Thu, 21 Apr 2022 22:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23LMcKUE019531; Thu, 21 Apr 2022 22:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LMcKAE019530; Thu, 21 Apr 2022 22:38:20 GMT (envelope-from git) Date: Thu, 21 Apr 2022 22:38:20 GMT Message-Id: <202204212238.23LMcKAE019530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6182c7881829 - stable/13 - diff: tests: loosen up requirements for report_identical List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6182c7881829bc1285a93c24a2a77a9543c5b3a9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650580701; 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=xySGlFRRDFtMfftchSWAgb8dcHcnQMUPGxU7G3bN0PE=; b=hB1Qow+ML8JhI1Z7WCNoM2NaC4AzYsoU96sEdUDtl4CBLEMrGDxWuM4jzcuMKuEVrJxKvM jes+HniSyoiWKj+VyGV5zQjED3oArDx2iuvvqTioCAkUGh9wUgI4P8LKskgtqKM1gCClcE JPdxt3P7DEmQu84xxkeaktoVJ2aIeKvc3dHqANGAEM4OPsVSAv2OeC9YLaRodztJA16T/y 2qZ4bRQyD+PBz12PpaoATPSN6sA6cFu0aC9R7Ri8IfkdOGneayCzLLzgRBkCIClhl8uoK3 8hhiWXj0M6FNZBpxD3lnVVu9GL80iEkgJJDsSeziemUyOIRtMOdzb4WlAYPMVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650580701; a=rsa-sha256; cv=none; b=m53UcbiUWzINXPJhOORWZurYZP6ApVjzU185cpuqCMpERoN7ebJ1F6ggM58SYBRkZoXYHl j5uDyqUa8vJ27/AkJuXHgTkp+dQdpCEhmky1Exrx0M1T3AfilqwQg/NrEfjyxDmtkkLt8F ZkMqpgb/grzbRffSy+WPtYliSNVydowY6YDADYEXQssln7NFntSfsFUpLCjF57ndbHSqGZ Lva6lC1GSzn1eMy9VHXSn9+rXqb714gVxEWVHW7XKYILhNG+Xa+a3WpTEvStnk/7YLSpbZ MDwguMvifdbSpGFXTWxBoIZXwQ3MpolyZ0kXbm99ed82aUJb/GyURCUIgzstLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6182c7881829bc1285a93c24a2a77a9543c5b3a9 commit 6182c7881829bc1285a93c24a2a77a9543c5b3a9 Author: Kyle Evans AuthorDate: 2022-04-19 04:04:13 +0000 Commit: Kyle Evans CommitDate: 2022-04-21 22:38:00 +0000 diff: tests: loosen up requirements for report_identical This test cannot run without an unprivileged_user being specified anyways, so just run as the unprivileged user. Revoking read permisions works just as well if you're guaranteed non-root. Reviewed by: pstef Sponsored by: Klara, Inc. (cherry picked from commit efba49ee5a64f8f56f49e58887484284d785d542) --- usr.bin/diff/tests/diff_test.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index d96dd8c2a33e..5026ab5bc63d 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -240,16 +240,15 @@ label_body() report_identical_head() { - atf_set "require.config" unprivileged_user + atf_set "require.user" unprivileged } report_identical_body() { - UNPRIVILEGED_USER=$(atf_config_get unprivileged_user) printf "\tA\n" > A printf "\tB\n" > B chmod -r B atf_check -s exit:2 -e inline:"diff: B: Permission denied\n" \ - -o empty su -m "$UNPRIVILEGED_USER" -c 'diff -s A B' + -o empty diff -s A B } non_regular_file_body()