All of lore.kernel.org
 help / color / mirror / Atom feed
* t3700 broken on pu on Cygwin
@ 2017-08-08 15:18 Adam Dinwoodie
  2017-08-08 15:32 ` René Scharfe
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Dinwoodie @ 2017-08-08 15:18 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, René Scharfe, Emily Xie

The t3700-add.sh test is currently failing on the pu branch on Cygwin.
To my surprise, the problem appears to have been introduced by a merge,
867fa1d6a.  Both parents of that merge have the test succeeding, but
it's failing on that merge commit.

Failing test output below:

    $ ./t3700-add.sh -i --verbose-only=41 -x
    Initialized empty Git repository in /home/add/vcs/git/x64/t/trash directory.t3700-add/.git/
    ok 1 - Test of git add
    ok 2 - Post-check that foo is in the index
    ok 3 - Test that "git add -- -q" works
    ok 4 - git add: Test that executable bit is not used if core.filemode=0
    ok 5 - git add: filemode=0 should not get confused by symlink
    ok 6 - git update-index --add: Test that executable bit is not used...
    ok 7 - git add: filemode=0 should not get confused by symlink
    ok 8 - git update-index --add: Test that executable bit is not used...
    ok 9 - .gitignore test setup
    ok 10 - .gitignore is honored
    ok 11 - error out when attempting to add ignored ones without -f
    ok 12 - error out when attempting to add ignored ones without -f
    ok 13 - error out when attempting to add ignored ones but add others
    ok 14 - add ignored ones with -f
    ok 15 - add ignored ones with -f
    ok 16 - add ignored ones with -f
    ok 17 - .gitignore with subdirectory
    ok 18 - check correct prefix detection
    ok 19 - git add with filemode=0, symlinks=0, and unmerged entries
    ok 20 - git add with filemode=0, symlinks=0 prefers stage 2 over stage 1
    ok 21 - git add --refresh
    ok 22 - git add --refresh with pathspec
    ok 23 # skip git add should fail atomically upon an unreadable file (missing SANITY of POSIXPERM,SANITY)
    ok 24 # skip git add --ignore-errors (missing SANITY of POSIXPERM,SANITY)
    ok 25 # skip git add (add.ignore-errors) (missing SANITY of POSIXPERM,SANITY)
    ok 26 # skip git add (add.ignore-errors = false) (missing SANITY of POSIXPERM,SANITY)
    ok 27 # skip --no-ignore-errors overrides config (missing SANITY of POSIXPERM,SANITY)
    ok 28 # skip git add 'fo\[ou\]bar' ignores foobar (missing BSLASHPSPEC)
    ok 29 - git add to resolve conflicts on otherwise ignored path
    ok 30 - "add non-existent" should fail
    ok 31 - git add -A on empty repo does not error out
    ok 32 - "git add ." in empty repo
    ok 33 - git add --dry-run of existing changed file
    ok 34 - git add --dry-run of non-existing file
    ok 35 - git add --dry-run of an existing file output
    ok 36 - git add --dry-run --ignore-missing of non-existing file
    ok 37 - git add --dry-run --ignore-missing of non-existing file output
    ok 38 - git add empty string should fail
    ok 39 - git add --chmod=[+-]x stages correctly
    ok 40 - git add --chmod=+x with symlinks

    expecting success:
    		git reset --hard &&
    		echo foo >foo3 &&
    		git add foo3 &&
    		git add --chmod=+x foo3 &&
    		test_mode_in_index 100755 foo3 &&
    		echo foo >xfoo3 &&
    		chmod 755 xfoo3 &&
    		git add xfoo3 &&
    		git add --chmod=-x xfoo3 &&
    		test_mode_in_index 100644 xfoo3

    ++ git reset --hard
    HEAD is now at d12df1f commit all
    ++ echo foo
    ++ git add foo3
    ++ git add --chmod=+x foo3
    ++ test_mode_in_index 100755 foo3
    ++ case "$(git ls-files -s "$2")" in
    +++ git ls-files -s foo3
    ++ echo pass
    pass
    ++ echo foo
    ++ chmod 755 xfoo3
    ++ git add xfoo3
    ++ git add --chmod=-x xfoo3
    cannot chmod 'xfoo3'++ test_mode_in_index 100644 xfoo3
    ++ case "$(git ls-files -s "$2")" in
    +++ git ls-files -s xfoo3
    ++ echo fail
    fail
    ++ git ls-files -s xfoo3
    120000 c5c4ca97a3a080c32920941b665e94a997901491 0       xfoo3
    ++ return 1
    + test_eval_ret_=1
    + want_trace
    + test t = t
    + test t = t
    + set +x
    error: last command exited with $?=1
    not ok 41 - git add --chmod=[+-]x changes index with already added file
    #
    #               git reset --hard &&
    #               echo foo >foo3 &&
    #               git add foo3 &&
    #               git add --chmod=+x foo3 &&
    #               test_mode_in_index 100755 foo3 &&
    #               echo foo >xfoo3 &&
    #               chmod 755 xfoo3 &&
    #               git add xfoo3 &&
    #               git add --chmod=-x xfoo3 &&
    #               test_mode_in_index 100644 xfoo3
    #

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: t3700 broken on pu on Cygwin
  2017-08-08 15:18 t3700 broken on pu on Cygwin Adam Dinwoodie
@ 2017-08-08 15:32 ` René Scharfe
  2017-08-08 17:25   ` Adam Dinwoodie
  0 siblings, 1 reply; 4+ messages in thread
From: René Scharfe @ 2017-08-08 15:32 UTC (permalink / raw)
  To: Adam Dinwoodie, git; +Cc: Junio C Hamano, Emily Xie

Am 08.08.2017 um 17:18 schrieb Adam Dinwoodie:
> The t3700-add.sh test is currently failing on the pu branch on Cygwin.
> To my surprise, the problem appears to have been introduced by a merge,
> 867fa1d6a.  Both parents of that merge have the test succeeding, but
> it's failing on that merge commit.
> 
> Failing test output below:

>      expecting success:
>      		git reset --hard &&
>      		echo foo >foo3 &&
>      		git add foo3 &&
>      		git add --chmod=+x foo3 &&
>      		test_mode_in_index 100755 foo3 &&
>      		echo foo >xfoo3 &&
>      		chmod 755 xfoo3 &&
>      		git add xfoo3 &&
>      		git add --chmod=-x xfoo3 &&
>      		test_mode_in_index 100644 xfoo3
> 
>      ++ git reset --hard
>      HEAD is now at d12df1f commit all
>      ++ echo foo
>      ++ git add foo3
>      ++ git add --chmod=+x foo3
>      ++ test_mode_in_index 100755 foo3
>      ++ case "$(git ls-files -s "$2")" in
>      +++ git ls-files -s foo3
>      ++ echo pass
>      pass
>      ++ echo foo
>      ++ chmod 755 xfoo3
>      ++ git add xfoo3
>      ++ git add --chmod=-x xfoo3
>      cannot chmod 'xfoo3'++ test_mode_in_index 100644 xfoo3
>      ++ case "$(git ls-files -s "$2")" in
>      +++ git ls-files -s xfoo3
>      ++ echo fail
>      fail
>      ++ git ls-files -s xfoo3
>      120000 c5c4ca97a3a080c32920941b665e94a997901491 0       xfoo3
>      ++ return 1
>      + test_eval_ret_=1
>      + want_trace
>      + test t = t
>      + test t = t
>      + set +x
>      error: last command exited with $?=1
>      not ok 41 - git add --chmod=[+-]x changes index with already added file
>      #
>      #               git reset --hard &&
>      #               echo foo >foo3 &&
>      #               git add foo3 &&
>      #               git add --chmod=+x foo3 &&
>      #               test_mode_in_index 100755 foo3 &&
>      #               echo foo >xfoo3 &&
>      #               chmod 755 xfoo3 &&
>      #               git add xfoo3 &&
>      #               git add --chmod=-x xfoo3 &&
>      #               test_mode_in_index 100644 xfoo3
>      #
> 

That's strange.  The two changes don't seem to be related at all:

  diff --git a/t/t3700-add.sh b/t/t3700-add.sh
  index f3a4b4a913..06e3835efb 100755
  --- a/t/t3700-add.sh
  +++ b/t/t3700-add.sh
  @@ -331,9 +331,8 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out
          test_i18ncmp expect.err actual.err
   '
  
  -test_expect_success 'git add empty string should invoke warning' '
  -       git add "" 2>output &&
  -       test_i18ngrep "warning: empty strings" output
  +test_expect_success 'git add empty string should fail' '
  +       test_must_fail git add ""
   '
  
   test_expect_success 'git add --chmod=[+-]x stages correctly' '
  @@ -355,7 +354,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
   '
  
   test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
  -       rm -f foo3 xfoo3 &&
  +       git reset --hard &&
          echo foo >foo3 &&
          git add foo3 &&
          git add --chmod=+x foo3 &&

The only difference I can see being introduced with the first change
is that the file "output" is gone now.

Does it help to add the "rm -f foo3 xfoo3 &&" back, in addition to
the "git reset --hard"?

Thanks,
René

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: t3700 broken on pu on Cygwin
  2017-08-08 15:32 ` René Scharfe
@ 2017-08-08 17:25   ` Adam Dinwoodie
  2017-08-09  9:47     ` Adam Dinwoodie
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Dinwoodie @ 2017-08-08 17:25 UTC (permalink / raw)
  To: René Scharfe; +Cc: git, Junio C Hamano, Emily Xie

On Tue, Aug 08, 2017 at 05:32:21PM +0200, René Scharfe wrote:
> Am 08.08.2017 um 17:18 schrieb Adam Dinwoodie:
> > The t3700-add.sh test is currently failing on the pu branch on Cygwin.
> > To my surprise, the problem appears to have been introduced by a merge,
> > 867fa1d6a.  Both parents of that merge have the test succeeding, but
> > it's failing on that merge commit.
> > 
> > Failing test output below:
> 
> >      expecting success:
> >      		git reset --hard &&
> >      		echo foo >foo3 &&
> >      		git add foo3 &&
> >      		git add --chmod=+x foo3 &&
> >      		test_mode_in_index 100755 foo3 &&
> >      		echo foo >xfoo3 &&
> >      		chmod 755 xfoo3 &&
> >      		git add xfoo3 &&
> >      		git add --chmod=-x xfoo3 &&
> >      		test_mode_in_index 100644 xfoo3
> > 
> >      ++ git reset --hard
> >      HEAD is now at d12df1f commit all
> >      ++ echo foo
> >      ++ git add foo3
> >      ++ git add --chmod=+x foo3
> >      ++ test_mode_in_index 100755 foo3
> >      ++ case "$(git ls-files -s "$2")" in
> >      +++ git ls-files -s foo3
> >      ++ echo pass
> >      pass
> >      ++ echo foo
> >      ++ chmod 755 xfoo3
> >      ++ git add xfoo3
> >      ++ git add --chmod=-x xfoo3
> >      cannot chmod 'xfoo3'++ test_mode_in_index 100644 xfoo3
> >      ++ case "$(git ls-files -s "$2")" in
> >      +++ git ls-files -s xfoo3
> >      ++ echo fail
> >      fail
> >      ++ git ls-files -s xfoo3
> >      120000 c5c4ca97a3a080c32920941b665e94a997901491 0       xfoo3
> >      ++ return 1
> >      + test_eval_ret_=1
> >      + want_trace
> >      + test t = t
> >      + test t = t
> >      + set +x
> >      error: last command exited with $?=1
> >      not ok 41 - git add --chmod=[+-]x changes index with already added file
> >      #
> >      #               git reset --hard &&
> >      #               echo foo >foo3 &&
> >      #               git add foo3 &&
> >      #               git add --chmod=+x foo3 &&
> >      #               test_mode_in_index 100755 foo3 &&
> >      #               echo foo >xfoo3 &&
> >      #               chmod 755 xfoo3 &&
> >      #               git add xfoo3 &&
> >      #               git add --chmod=-x xfoo3 &&
> >      #               test_mode_in_index 100644 xfoo3
> >      #
> > 
> 
> That's strange.  The two changes don't seem to be related at all:
> 
>   diff --git a/t/t3700-add.sh b/t/t3700-add.sh
>   index f3a4b4a913..06e3835efb 100755
>   --- a/t/t3700-add.sh
>   +++ b/t/t3700-add.sh
>   @@ -331,9 +331,8 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out
>           test_i18ncmp expect.err actual.err
>    '
>   
>   -test_expect_success 'git add empty string should invoke warning' '
>   -       git add "" 2>output &&
>   -       test_i18ngrep "warning: empty strings" output
>   +test_expect_success 'git add empty string should fail' '
>   +       test_must_fail git add ""
>    '
>   
>    test_expect_success 'git add --chmod=[+-]x stages correctly' '
>   @@ -355,7 +354,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
>    '
>   
>    test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
>   -       rm -f foo3 xfoo3 &&
>   +       git reset --hard &&
>           echo foo >foo3 &&
>           git add foo3 &&
>           git add --chmod=+x foo3 &&
> 
> The only difference I can see being introduced with the first change
> is that the file "output" is gone now.

Yep!  I thought it was strange too.  I spent some time undoing and
redoing the changes to check the problem was reproducible.

> Does it help to add the "rm -f foo3 xfoo3 &&" back, in addition to
> the "git reset --hard"?

Apparently so.  Including only the output from that test:

    expecting success:
            rm -f foo3 xfoo3 &&
            git reset --hard &&
            echo foo >foo3 &&
            git add foo3 &&
            git add --chmod=+x foo3 &&
            test_mode_in_index 100755 foo3 &&
            echo foo >xfoo3 &&
            chmod 755 xfoo3 &&
            git add xfoo3 &&
            git add --chmod=-x xfoo3 &&
            test_mode_in_index 100644 xfoo3
    
    ++ rm -f foo3 xfoo3
    ++ git reset --hard
    HEAD is now at 02bfd98 commit all
    ++ echo foo
    ++ git add foo3
    ++ git add --chmod=+x foo3
    ++ test_mode_in_index 100755 foo3
    ++ case "$(git ls-files -s "$2")" in
    +++ git ls-files -s foo3
    ++ echo pass
    pass
    ++ echo foo
    ++ chmod 755 xfoo3
    ++ git add xfoo3
    ++ git add --chmod=-x xfoo3
    ++ test_mode_in_index 100644 xfoo3
    ++ case "$(git ls-files -s "$2")" in
    +++ git ls-files -s xfoo3
    ++ echo pass
    pass
    + test_eval_ret_=0
    + want_trace
    + test t = t
    + test t = t
    + set +x
    ok 41 - git add --chmod=[+-]x changes index with already added file

I'm running a bisect overnight to try to isolate the commit on the left
merge parent that seems to be interacting badly with the commit on the
right, and will send in the results from that when I have them.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: t3700 broken on pu on Cygwin
  2017-08-08 17:25   ` Adam Dinwoodie
@ 2017-08-09  9:47     ` Adam Dinwoodie
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Dinwoodie @ 2017-08-09  9:47 UTC (permalink / raw)
  To: René Scharfe; +Cc: git, Junio C Hamano, Emily Xie

On Tue, Aug 08, 2017 at 06:25:24PM +0100, Adam Dinwoodie wrote:
> I'm running a bisect overnight to try to isolate the commit on the left
> merge parent that seems to be interacting badly with the commit on the
> right, and will send in the results from that when I have them.

For the sake of interest, I've tracked down the problem to commit
v2.9.0-3-g9e4e8a64c.  That changed t3700 so it would no longer add all
extant paths to the index, meaning a later `git reset --hard` wouldn't
remove them.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-09  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 15:18 t3700 broken on pu on Cygwin Adam Dinwoodie
2017-08-08 15:32 ` René Scharfe
2017-08-08 17:25   ` Adam Dinwoodie
2017-08-09  9:47     ` Adam Dinwoodie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.