From: Junio C Hamano Date: Tue, 14 Oct 2008 22:32:13 GMT Subject: Re: [PATCH try 2] t1301-shared-repo.sh: don't let a default ACL interfere with the test Message-ID: <7vzll66c5u.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1224022216.2699.5.camel@mattlaptop2.local> Matt McCutchen writes: > This test creates files with several different umasks and expects the files to > be permissioned according to the umasks, so a default ACL on the test dir causes Is "to permission" a verb? > the test to fail. To avoid that, remove the default ACL if possible with > setfacl(1). (Will work on many systems.) It is not clear in the comment in parentheses what provision you have made not to harm people on systems without setfacl. I think "if possible" which you already have is a good enough description (i.e. "if setfacl fails we do not barf and if you do not have the command you probably are not running with a funky default ACL to see this issue anyway"), so I'd rather drop the comment in parentheses. > Signed-off-by: Matt McCutchen > --- > This time with a signoff. > > t/t1301-shared-repo.sh | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh > index dc85e8b..2275caa 100755 > --- a/t/t1301-shared-repo.sh > +++ b/t/t1301-shared-repo.sh > @@ -7,6 +7,9 @@ test_description='Test shared repository initialization' > > . ./test-lib.sh > > +# Remove a default ACL from the test dir if possible. > +setfacl -k . 2>/dev/null > + 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?