git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 4/5] t6022, t6046: test expected behavior instead of testing a proxy for it
Date: Fri, 13 Mar 2020 10:18:29 -0700	[thread overview]
Message-ID: <CABPp-BGt4xaqG+3m3q=PfMTmfotjvze2TPp5JhthE2YHsLa=-Q@mail.gmail.com> (raw)
In-Reply-To: <20200313171248.GA613@szeder.dev>

On Fri, Mar 13, 2020 at 10:12 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:
>
> On Thu, Feb 27, 2020 at 12:14:23AM +0000, Elijah Newren via GitGitGadget wrote:
> > diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh
> > index 6f196aaf276..d97cf48495b 100755
> > --- a/t/t6022-merge-rename.sh
> > +++ b/t/t6022-merge-rename.sh
> > @@ -242,12 +242,23 @@ test_expect_success 'merge of identical changes in a renamed file' '
> >       rm -f A M N &&
> >       git reset --hard &&
> >       git checkout change+rename &&
> > +
> > +     test-tool chmtime =31337 B &&
> > +     test-tool chmtime --get B >old-mtime &&
>
> Here you compare the mtime of 'B' before ...
>
> >       GIT_MERGE_VERBOSITY=3 git merge change >out &&
> > -     test_i18ngrep "^Skipped B" out &&
> > +
> > +     test-tool chmtime --get B >new-mtime &&
> > +     test_cmp old-mtime new-mtime &&
>
> ... and after the merge.
>
> > +
> >       git reset --hard HEAD^ &&
> >       git checkout change &&
> > +
> > +     test-tool chmtime =-1 M &&
> > +     test-tool chmtime --get M >old-mtime &&
>
> Here, however, you compare the mtime of 'M' before the merge ...
>
> >       GIT_MERGE_VERBOSITY=3 git merge change+rename >out &&
> > -     test_i18ngrep ! "^Skipped B" out
> > +
> > +     test-tool chmtime --get B >new-mtime &&
> > +     test $(cat old-mtime) -lt $(cat new-mtime)
>
> ... with the mtime of 'B' after the merge, i.e. the mtimes of two
> different files.
>
> Is that right?

No, sounds like a copy-and-paste-and-forget-to-update bug.  Thanks for
spotting it.  Since you found it, do you want to submit a patch with
the fix?

  reply	other threads:[~2020-03-13 17:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  0:14 [PATCH 0/5] Testcase cleanups (merge related) Elijah Newren via GitGitGadget
2020-02-27  0:14 ` [PATCH 1/5] t602[1236], t6034: modernize test formatting Elijah Newren via GitGitGadget
2020-02-27  0:14 ` [PATCH 2/5] t6020, t6022, t6035: update merge tests to use test helper functions Elijah Newren via GitGitGadget
2020-02-27  0:14 ` [PATCH 3/5] t3035: prefer test_must_fail to bash negation for git commands Elijah Newren via GitGitGadget
2020-02-27  0:14 ` [PATCH 4/5] t6022, t6046: test expected behavior instead of testing a proxy for it Elijah Newren via GitGitGadget
2020-03-12 13:20   ` SZEDER Gábor
2020-03-12 16:48     ` Elijah Newren
2020-03-12 17:35       ` Elijah Newren
2020-03-12 20:01         ` SZEDER Gábor
2020-03-13 17:17           ` SZEDER Gábor
2020-03-13 17:45             ` Elijah Newren
2020-03-13 17:12   ` SZEDER Gábor
2020-03-13 17:18     ` Elijah Newren [this message]
2020-03-13 17:30       ` SZEDER Gábor
2020-03-13 18:11       ` Elijah Newren
2020-02-27  0:14 ` [PATCH 5/5] t6020: new test with interleaved lexicographic ordering of directories Elijah Newren via GitGitGadget

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CABPp-BGt4xaqG+3m3q=PfMTmfotjvze2TPp5JhthE2YHsLa=-Q@mail.gmail.com' \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=szeder.dev@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).