From: Duy Nguyen <pclouds@gmail.com>
To: Eric Wong <e@80x24.org>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Christian Couder" <christian.couder@gmail.com>,
"Torsten Bögershausen" <tboegi@web.de>,
"Stefan Beller" <sbeller@google.com>,
"David Turner" <novalis@novalis.org>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: t7063 failure on FreeBSD 10.3 i386/amd64
Date: Sat, 30 Jul 2016 15:31:03 +0200 [thread overview]
Message-ID: <20160730133102.GA4871@duynguyen> (raw)
In-Reply-To: <CACsJy8D9Cy1bjzXddCTOOT7X3smBBB3xccEg7CHaOKAZruHVag@mail.gmail.com>
On Wed, Jul 27, 2016 at 07:33:17PM +0200, Duy Nguyen wrote:
> On Tue, Jul 19, 2016 at 6:12 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> > On Tue, Jul 19, 2016 at 12:54 AM, Eric Wong <e@80x24.org> wrote:
> >> Oops, forgot to Cc some folks who worked on this :x
> >>
> >> Filesystem is ufs and it fails regardless of whether
> >> soft-updates is enabled or not.
> >
> > Nothing stands out to my eyes, so I'm going to install freebsd this
> > weekend. I hope ufs does not have any nasty surprise for me. Stay
> > tuned.
>
> The good news is it looks like a false alarm due to a racy test (and
> it happens on ext2 too, zfs not tested), no big flaw or anything
> (phew!). The bad news is, I still have no idea what's happening and
> why is_racy_stat() returns true in this particular case. It'll take
> some more time...
I give up. FreeBSD behaves so weird in this case.
The code of interest is this
test_expect_success 'test sparse status with untracked cache' '
: >../trace &&
avoid_racy &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
...
'
For some reason mtime of current directory is always latest time when
git makes the stat call. Even if I make avoid_racy sleep longer,
several seconds, mtime of "." will be the latest time.
But cwd stat info is _not_ supposed to change! We haven't touched it
while avoid_racy is running. avoid_racy is just a wrapper of
sleep. And sleep does not change cwd's mtime from the shell prompt. I
tried running the script with bash too (suspecting problem with
default shell) and replaced avoid_racy with /bin/sleep. Nothing.
Does our test framework run something in background??? No, it
can't be.
If a stat call is made before avoid_racy, then mtime is pinned down
and does not change anymore. So a "fix" is something like this. I
tried a minimal program that just does "stat" to make sure it's stat
that does it, not some side effect from 'ls'.
diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
index 38b3890..fd199a0 100755
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -421,6 +421,7 @@ test_expect_success 'create/modify files, some of which are gitignored' '
test_expect_success 'test sparse status with untracked cache' '
: >../trace &&
+ ls -d . &&
avoid_racy &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
--
Duy
next prev parent reply other threads:[~2016-07-30 13:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 22:30 t7063 failure on FreeBSD 10.3 i386/amd64 Eric Wong
2016-07-18 22:54 ` Eric Wong
2016-07-19 16:12 ` Duy Nguyen
2016-07-20 3:02 ` Eric Wong
2016-07-20 14:57 ` Duy Nguyen
2016-07-27 17:33 ` Duy Nguyen
2016-07-30 13:31 ` Duy Nguyen [this message]
2016-07-30 13:54 ` Duy Nguyen
2016-07-30 18:20 ` [PATCH] t7063: work around FreeBSD's lazy mtime update feature Nguyễn Thái Ngọc Duy
2016-07-31 0:15 ` Eric Wong
2016-07-31 1:07 ` Eric Wong
2016-07-31 14:30 ` Duy Nguyen
2016-08-01 1:37 ` Torstem Bögershausen
2016-08-01 17:10 ` Duy Nguyen
2016-08-01 21:04 ` Junio C Hamano
2016-08-02 15:37 ` Duy Nguyen
2016-08-02 17:17 ` Junio C Hamano
2016-08-03 16:05 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2016-08-03 16:16 ` Junio C Hamano
2016-08-03 16:25 ` Duy Nguyen
2016-08-03 17:45 ` [PATCH v3] " Nguyễn Thái Ngọc Duy
2016-08-03 17:52 ` Junio C Hamano
2016-08-03 19:07 ` Junio C Hamano
2016-08-04 15:46 ` Duy Nguyen
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=20160730133102.GA4871@duynguyen \
--to=pclouds@gmail.com \
--cc=christian.couder@gmail.com \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=novalis@novalis.org \
--cc=sbeller@google.com \
--cc=tboegi@web.de \
/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).