Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15

t7300 "removal failure" broken on Windows

From: Alex Riesen <hidden>
Date: 2016-06-15 22:44:17
Subsystem: the rest · Maintainer: Linus Torvalds

Just a heads-up.

The test is fails because it uses "chmod 0" to enforce an error while
deleting files by "git clean -f -d". This does not work on windows,
because the directories even without write permission on them can be
freely modified (the contained names can be removed). Maybe even the
removal of list permission does not mean a thing either to cygwin or
windows (that last one being more likely the case: it is more wrong).

So git-clean succeeds and the test fails.

It probably can be worked around by opening the file and keeping it open.

The patch below may fix it (haven't tested yet).
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 3840364..85341af 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -320,6 +320,7 @@ test_expect_success 'removal failure' '
 
 	mkdir foo &&
 	touch foo/bar &&
+	exec <foo/bar &&
 	chmod 0 foo &&
 	! git clean -f -d
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help