git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bsd group semantics

From
Jeff King <peff@peff.net>
Date
Mar 31, 2009, 20:36 UTC
Message-ID
<20090331203600.GA24340@coredump.intra.peff.net>
In-Reply-To
<7vy6ul4exy.fsf@gitster.siamese.dyndns.org>
On Tue, Mar 31, 2009 at 01:26:01PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> 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@peff.net>
---
 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “bsd group semantics”
  1. Jeff KingMar 31, 2009
  2. Junio C HamanoMar 31, 2009
  3. Jeff KingMar 31, 2009
  4. Junio C HamanoMar 31, 2009
  5. Jeff KingMar 31, 2009
  6. Junio C HamanoMar 31, 2009
  7. Jeff KingMar 31, 2009
  8. Junio C HamanoMar 31, 2009
  9. Jeff KingMar 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.