git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Derrick Stolee <stolee@gmail.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, me@ttaylorr.com,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH v2 1/2] t5319: replace 'touch -m' with 'test-tool chmtime'
Date: Thu, 02 Apr 2020 09:36:16 -0700	[thread overview]
Message-ID: <xmqqo8s94zgf.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: 20200402125113.GA3091800@coredump.intra.peff.net

Jeff King <peff@peff.net> writes:

> On Wed, Apr 01, 2020 at 08:06:47PM -0400, Derrick Stolee wrote:
>
> I wonder if that would run afoul of the same "mtime and system clock are
> not quite the same" issue we saw recently in [1].

I had the exact thing in mind, which was why I suggested "chmtime"
in the first place (the second reason was that it was easy to do
relative time using the tool than "date + touch"), but I missed that
the tool has a mode that uses timestamp relative to system clock.

> I think it might not because we're only comparing mtimes set
> through the same mechanism (find the system time, subtract from
> it, and assign to mtime). If system time is monotonically
> increasing at any rate, that would produce the desired effect.

But in this particular case, I think, even though setting the
filesystem timestamp based on something that was obtained from the
system clock feels as if we are asking for trouble, the values we
later read back from the filesystem for executing the codepath being
tested (namely, expiration logic) get compared with another value
that is derived from from the system clock (i.e. expiration cutoff),
so in that sense you might be able to argue that it is even more
correct ;-)


  reply	other threads:[~2020-04-02 16:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 18:11 [PATCH] commit-graph: fix buggy --expire-time option Derrick Stolee via GitGitGadget
2020-04-01 18:17 ` Derrick Stolee
2020-04-01 18:56   ` Taylor Blau
2020-04-01 19:27 ` Taylor Blau
2020-04-01 19:36   ` Eric Sunshine
2020-04-01 19:47 ` SZEDER Gábor
2020-04-01 19:49 ` Junio C Hamano
2020-04-01 19:57   ` Jeff King
2020-04-01 20:33     ` Junio C Hamano
2020-04-01 20:51       ` Derrick Stolee
2020-04-01 20:14   ` Derrick Stolee
2020-04-01 21:00 ` [PATCH v2 0/2] " Derrick Stolee via GitGitGadget
2020-04-01 21:00   ` [PATCH v2 1/2] t5319: replace 'touch -m' with 'test-tool chmtime' Derrick Stolee via GitGitGadget
2020-04-01 21:35     ` Junio C Hamano
2020-04-02  0:06       ` Derrick Stolee
2020-04-02 12:51         ` Jeff King
2020-04-02 16:36           ` Junio C Hamano [this message]
2020-04-01 21:00   ` [PATCH v2 2/2] commit-graph: fix buggy --expire-time option Derrick Stolee via GitGitGadget
2020-04-01 21:05   ` [PATCH v2 0/2] " Junio C Hamano
2020-04-01 23:33     ` Derrick Stolee

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=xmqqo8s94zgf.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    --cc=stolee@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).