Re: [BUG] make test (t3600-rm.sh) fails

From: Panagiotis Issaris <takis@issaris.org>
Date: 2006-03-24 23:05:02
Hi,

Junio C Hamano wrote:

>...
>But that does not mean fakeroot is buggy.  Fakeroot is doing
>what it is designed to do.
>
>That does not mean running our tests under fakeroot is stupidity
>on your part.  We do not advertise that the tests should not be
>run as root.
>
>The test is buggy -- it tries to make sure the command fails
>when underlying rm fails, but is not aware that "chmod u-w ."
>is not a good way to make ./foo undeletable if you run it as
>root.  At least it should skip those two tests if it is run by
>root.
>  
>
Something like this?


diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index d1947e1..52a1e99 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -56,6 +56,7 @@ test "$test_tabs" = y && test_expect_suc
     "git-rm -f 'space embedded' 'tab   embedded' 'newline
 embedded'"

+if test `whoami` != "root"; then
 if test "$test_tabs" = y; then
 chmod u-w .
 test_expect_failure \
@@ -63,6 +64,7 @@ test_expect_failure \
     'git-rm -f baz'
 chmod u+w .
 fi
+fi

 test_expect_success \
     'When the rm in "git-rm -f" fails, it should not remove the file from the index' \






-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 24 23:05:48 2006

This archive was generated by hypermail 2.1.8 : 2006-03-24 23:06:02 EST