Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2022 22:38:20 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6182c7881829 - stable/13 - diff: tests: loosen up requirements for report_identical
Message-ID:  <202204212238.23LMcKAE019530@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=6182c7881829bc1285a93c24a2a77a9543c5b3a9

commit 6182c7881829bc1285a93c24a2a77a9543c5b3a9
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2022-04-19 04:04:13 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
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()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204212238.23LMcKAE019530>