Jeff King [off-list ref] writes:
On Tue, Mar 31, 2009 at 10:32:14AM -0700, Junio C Hamano wrote:
quoted
My point was if I belong only to my personal group and git.git work tree
is owned by junio.junio to begin with, you would never be able to notice
any breakage with such a test.
Ah, I see. Yes, you would need to belong to at least two groups to make
such a test feasible.
Such a requirement is generally outside the scope of running the
test suite; do you want to just ditch the g+s test, then, or do you want
me to work up something conditional based on the Makefile flag?
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.
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 <redacted>
---
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