From c91cfd19160be63e97f28dce8c9af421b61c9938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 6 Aug 2010 22:09:09 +0000 Subject: tests: A SANITY test prereq for testing if we're root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some tests depend on not being able to write to files after chmod -w. This doesn't work when running the tests as root. Change test-lib.sh to test if this works, and if so it sets a new SANITY test prerequisite. The tests that use this previously failed when run under root. There was already a test for this in t3600-rm.sh, added by Junio C Hamano in 2283645 in 2006. That check now uses the new SANITY prerequisite. Some of this was resurrected from the "Tests in Cygwin" thread in May 2009: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t7300-clean.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 't/t7300-clean.sh') diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 7d8ed68bef..fe8abf6fd9 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -388,16 +388,15 @@ test_expect_success 'core.excludesfile' ' ' -test_expect_success 'removal failure' ' +test_expect_success SANITY 'removal failure' ' mkdir foo && touch foo/bar && (exec