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

Re: [PATCH try 2] t1301-shared-repo.sh: don't let a default ACL interfere with the test

From
Matt McCutchen <matt@mattmccutchen.net>
Date
Oct 15, 2008, 14:34 UTC
Message-ID
<1224081242.2935.13.camel@mattlaptop2.local>
In-Reply-To
<48F589EC.6050307@viscovery.net>
On Wed, 2008-10-15 at 08:13 +0200, Johannes Sixt wrote:
Show 9 quoted lines
> Junio C Hamano schrieb:
> > Makes me wonder why this is _not_ inside test-lib.sh where it creates the
> > test (trash) directory.  That way, you would cover future tests that wants
> > to see a saner/simpler POSIX permission behaviour, wouldn't you?
> 
> But that would also paper over unanticipated bad interactions with strange
> ACLs that people might set, wouldn't it? By not placing this into
> test-lib.sh there is a higher chance that such an interaction is revealed,
> and we can react on it (educate users or fix the code).

A default ACL on the working tree does not interfere with git's operation. If the repository is shared, git will explicitly set the permissions of every file as configured; otherwise, new files will simply take their permissions from the default ACL instead of the creating process's umask. This is exactly the behavior that a user who sets a default ACL would expect. There is no need to modify adjust_shared_perm or to warn users not to use default ACLs.

The only problem here is that a default ACL prevents t1301-shared-repo.sh from testing the interaction between the umask and the sharedRepository setting, since the test case expects new files to be created according to the umask it set but the default ACL is overriding the umask. Removing the trash directory's default ACL is a perfectly legitimate way for t1301-shared-repo.sh to test what it wants to test. Another option would be to modify the trash directory's default ACL instead of modifying the umask.

Other tests will not care whether test-lib.sh clears a default ACL for them because they are not specifically testing file permissions. Therefore, I thought it best to leave the default ACL alone so that the trash directories get the permissions the user has specified in the default ACL in case he/she cares about sharing the trash directories with others.

Matt
Previous: Matt McCutchen
Message 17 of 17 in “t1301-shared-repo.sh: don't let a default ACL interfere with the test”
  1. t1301-shared-repo.sh: don't let a default ACL interfere with the testMatt McCutchen, Oct 14, 2008
  2. t1301-shared-repo.sh: don't let a default ACL interfere with the testMatt McCutchen, Oct 14, 2008
  3. Junio C HamanoOct 14, 2008
  4. Matt McCutchenOct 14, 2008
  5. Deskin MillerOct 14, 2008
  6. Johannes SixtOct 15, 2008
  7. Junio C HamanoOct 15, 2008
  8. Johannes SixtOct 15, 2008
  9. Junio C HamanoOct 15, 2008
  10. Johannes SixtOct 15, 2008
  11. Junio C HamanoOct 16, 2008
  12. Matt McCutchenOct 17, 2008
  13. Junio C HamanoOct 17, 2008
  14. Matt McCutchenOct 17, 2008
  15. t1301-shared-repo.sh: don't let a default ACL interfere with the testMatt McCutchen, Oct 17, 2008
  16. t1301-shared-repo.sh: don't let a default ACL interfere with the testMatt McCutchen, Oct 17, 2008
  17. Matt McCutchenOct 15, 2008

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.