git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Subject: t7300 "removal failure" broken on Windows
Date: Tue, 26 Feb 2008 21:22:27 +0100	[thread overview]
Message-ID: <20080226202227.GA1245@steel.home> (raw)

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
 

             reply	other threads:[~2008-02-26 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 20:22 Alex Riesen [this message]
2008-03-03 23:48 ` [PATCH] Fix test for cleanup failure in t7300 on Windows Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080226202227.GA1245@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).