{"thread":{"id":"12332","subject":"t7300 \"removal failure\" broken on Windows","startedAt":"2008-02-26T20:22:27Z","lastAt":"2008-03-03T23:48:56Z","messageCount":2,"participants":["Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70023","messageId":"20080226202227.GA1245@steel.home","threadId":"12332","inReplyTo":null,"subject":"t7300 \"removal failure\" broken on Windows","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-02-26T20:22:27Z","receivedAt":"2008-02-26T20:22:27Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Just a heads-up.\n\nThe test is fails because it uses \"chmod 0\" to enforce an error while\ndeleting files by \"git clean -f -d\". This does not work on windows,\nbecause the directories even without write permission on them can be\nfreely modified (the contained names can be removed). Maybe even the\nremoval of list permission does not mean a thing either to cygwin or\nwindows (that last one being more likely the case: it is more wrong).\n\nSo git-clean succeeds and the test fails.\n\nIt probably can be worked around by opening the file and keeping it open.\n\nThe patch below may fix it (haven't tested yet).\n\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 3840364..85341af 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -320,6 +320,7 @@ test_expect_success 'removal failure' '\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n+\texec <foo/bar &&\n \tchmod 0 foo &&\n \t! git clean -f -d\n \n"},{"id":"70856","messageId":"20080303234856.GB28158@steel.home","threadId":"12332","inReplyTo":"20080226202227.GA1245@steel.home","subject":"[PATCH] Fix test for cleanup failure in t7300 on Windows","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-03-03T23:48:56Z","receivedAt":"2008-03-03T23:48:56Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Keep the file open to: the OS does not allow removal of open files.\nThe saner systems just have a saner permission model and chmod 0\nis enough for the test.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\nAlex Riesen, Tue, Feb 26, 2008 21:22:27 +0100:\n> Just a heads-up.\n> \n> The test is fails because it uses \"chmod 0\" to enforce an error while\n> deleting files by \"git clean -f -d\". This does not work on windows,\n> because the directories even without write permission on them can be\n> freely modified (the contained names can be removed). Maybe even the\n> removal of list permission does not mean a thing either to cygwin or\n> windows (that last one being more likely the case: it is more wrong).\n> \n> So git-clean succeeds and the test fails.\n> \n> It probably can be worked around by opening the file and keeping it open.\n> \n> The patch below may fix it (haven't tested yet).\n> \n\nIt is tested now.\n\n t/t7300-clean.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 3840364..4037142 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -320,8 +320,9 @@ test_expect_success 'removal failure' '\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n+\texec <foo/bar &&\n \tchmod 0 foo &&\n-\t! git clean -f -d\n+\ttest_must_fail git clean -f -d\n \n '\n chmod 755 foo\n-- \n1.5.4.3.469.gf84e2\n\n"}]}