threads / patch / 17720

patchDisable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

Subject: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

## tl;dr

6 messages between Feb 11, 2009 and Feb 11, 2009. Diffs are folded; open one to read it.

replies: 5people: 3as markdown or json

Alex Riesen· Feb 11, 2009, 09:51 UTC · lore
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

I'm honestly sorry for my contributions. They seem to be exclusively in the "make Git work in Windows" area. Depressing.

 t/t3400-rebase.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
From f41b99bbdf10249c0dfcb54545709f0a8dd00484 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Wed, 11 Feb 2009 10:45:43 +0100
Subject: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t3400-rebase.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Show changes to t/t3400-rebase.sh +5 −0
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 8c0c5f5..a229276 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -70,6 +70,10 @@ test_expect_success \
      test 3 = $(git rev-list master.. | wc -l)
 '
 
+if test "$(git config --bool core.filemode)" = false
+then
+    say 'skipping rebase filemode tests (no filesystem support)'
+else
 test_expect_success 'rebase a single mode change' '
      git checkout master &&
      echo 1 > X &&
@@ -94,5 +98,6 @@ test_expect_success 'Show verbose error when HEAD could not be detached' '
      test_must_fail git rebase topic 2> output.err > output.out &&
      grep "Untracked working tree file .B. would be overwritten" output.err
 '
+fi
 
 test_done
-- 
1.6.2.rc0.28.g1f0fe8
Junio C Hamano· Feb 11, 2009, 10:09 UTC · re: Alex Riesen · lore

Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

Alex Riesen <raa.lkml@gmail.com> writes:
Show 8 quoted lines
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
>
> I'm honestly sorry for my contributions. They seem to be exclusively
> in the "make Git work in Windows" area.  Depressing.
>
>  t/t3400-rebase.sh |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

I wonder if you should be fixing the tests with "update-index --chmod" instead...

Alex Riesen· Feb 11, 2009, 11:05 UTC · re: Junio C Hamano · lore

Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

2009/2/11 Junio C Hamano <gitster@pobox.com>:
Show 14 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
>> ---
>>
>> I'm honestly sorry for my contributions. They seem to be exclusively
>> in the "make Git work in Windows" area.  Depressing.
>>
>>  t/t3400-rebase.sh |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> I wonder if you should be fixing the tests with "update-index --chmod"
> instead...
>

Well, mostly these should work independent of the filesystem (except for the cases when the index is checked out later). They seem to, and they look like they should, too. See t4014-format-patch, for one.

But you're right. I should have reviewed them earlier. Anyway, there is not many tests which have "--chmod" in them: t4006-diff-mode.sh, t4014-format-patch.sh, t6031-merge-recursive.sh, and t9500-gitweb-standalone-no-errors.sh. The t4006 does not bother to look at working tree (good), t4014 is good (looks like its ignoring modes altogether), t6031 uses --chmod to augment the chmod useless on FAT-like fs (seem to be an earlier fix for the same problem).

What's more interesting is the use of chmod for index mode change purpose, which should be reviewed regularly (and I do that only when it breaks. Lazy boom, I am...)

Johannes Sixt· Feb 11, 2009, 10:09 UTC · re: Alex Riesen · lore

Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

Alex Riesen schrieb:
Show 8 quoted lines
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> 
> I'm honestly sorry for my contributions. They seem to be exclusively
> in the "make Git work in Windows" area.  Depressing.
> 
>  t/t3400-rebase.sh |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

Very interesting. This test works unmodified here. On the other hand, I have to skip the entire t4129-apply-samemode.sh.

-- Hannes
Alex Riesen· Feb 11, 2009, 10:53 UTC · re: Johannes Sixt · lore

Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

2009/2/11 Johannes Sixt <j.sixt@viscovery.net>:
Show 11 quoted lines
> Alex Riesen schrieb:
>>
>> I'm honestly sorry for my contributions. They seem to be exclusively
>> in the "make Git work in Windows" area.  Depressing.
>>
>>  t/t3400-rebase.sh |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> Very interesting. This test works unmodified here. On the other hand, I
> have to skip the entire t4129-apply-samemode.sh.
>

hmm... These seem to work here. I have to use Cygwin. Do you use the native port?

Johannes Sixt· Feb 11, 2009, 11:30 UTC · re: Alex Riesen · lore

Re: [PATCH] Disable filemode rebase tests in t3400-rebase.sh if no filesystem mode support

Alex Riesen schrieb:
Show 13 quoted lines
> 2009/2/11 Johannes Sixt <j.sixt@viscovery.net>:
>> Alex Riesen schrieb:
>>> I'm honestly sorry for my contributions. They seem to be exclusively
>>> in the "make Git work in Windows" area.  Depressing.
>>>
>>>  t/t3400-rebase.sh |    5 +++++
>>>  1 files changed, 5 insertions(+), 0 deletions(-)
>> Very interesting. This test works unmodified here. On the other hand, I
>> have to skip the entire t4129-apply-samemode.sh.
>>
> 
> hmm... These seem to work here. I have to use Cygwin. Do you use the
> native port?

Yes. And the reason why the test does not fail here is because the mode change is outright ignored, and the test doesn't check whether the result meets the expectations.

-- Hannes

← back to recent threads