Re: bsd group semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 31, 2009 at 01:26:01PM -0700, Junio C Hamano wrote:

> For now, I'd suggest teaching the test not to care about g+s bit.
> After all, they are about giving correct mode bits to files and
> directories.  Correct mode bits for group do not mean anything if you make
> them owned by a wrong group, but that is not something we have tested so
> far, and can be a separate test anyway.

Makes sense. How about this?

-- >8 --
Subject: [PATCH] t1301: loosen test for forced modes

One of the aspects of the test checked explicitly for the
g+s bit to be set on created directories. However, this is
only the means to an end (the "end" being having the correct
group set). And in fact, on systems where
DIR_HAS_BSD_GROUP_SEMANTICS is set, we do not even need to
use this "means" at all, causing the test to fail.

This patch removes that part of the test. In an ideal world
it would be replaced by a test to check that the group was
properly assigned, but that is difficult to automate because
it requires the user running the test suite be a member of
multiple groups.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 t/t1301-shared-repo.sh |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index 11ef302..9b18507 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -147,9 +147,6 @@ test_expect_success 'forced modes' '
 	# Everything must be unaccessible to others
 	test -z "$(sed -n -e "/^.......---/d" actual)" &&
 
-	# All directories must have 2770
-	test -z "$(sed -n -e "/^drwxrws---/d" -e "/^d/p" actual)" &&
-
 	# post-update hook must be 0770
 	test -z "$(sed -n -e "/post-update/{
 		/^-rwxrwx---/d
-- 
1.6.2.1.591.geb450

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux