From: Ben Peart <peartben@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Alex Vandiver <alexmv@dropbox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/6] fsmonitor: Make output of test-dump-fsmonitor more concise
Date: Mon, 8 Jan 2018 15:33:24 -0500 [thread overview]
Message-ID: <af33fb18-fd31-727b-efcc-b3873c6e58f1@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1.1801042331590.32@MININT-6BKU6QN.europe.corp.microsoft.com>
On 1/4/2018 5:33 PM, Johannes Schindelin wrote:
> Hi Alex,
>
> On Tue, 2 Jan 2018, Alex Vandiver wrote:
>
>> Rather than display one very long line, summarize the contents of that
>> line. The tests do not currently rely on any content except the first
>> line ("no fsmonitor" / "fsmonitor last update").
>
> The more interesting part would be the entries with outdated ("invalid")
> information. I thought that this information was pretty useful for
> debugging. Maybe we could still keep at least that part, or at least
> trigger outputting it via a command-line flag?
>
During the development and testing of fsmonitor, I found the '+-' to be
helpful (especially since it is in index order). I could touch a file
and verify that it showed up as invalid and that it was the file I
expected by its placement in the index.
I'd hate to have to add options to a test program for more/less output.
I do like your additions of the time since updated and the final counts.
I prefer more information rather than less in my test tools - how
about this?
diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c
index 5d61b0d621..8503da288d 100644
--- a/t/helper/test-dump-fsmonitor.c
+++ b/t/helper/test-dump-fsmonitor.c
@@ -20,11 +20,13 @@ int cmd_main(int ac, const char **av)
(uintmax_t)istate->fsmonitor_last_update,
(now - istate->fsmonitor_last_update)/1.0e9);
- for (i = 0; i < istate->cache_nr; i++)
+ for (i = 0; i < istate->cache_nr; i++) {
+ printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID)
? "+" : "-");
if (istate->cache[i]->ce_flags & CE_FSMONITOR_VALID)
valid++;
+ }
- printf(" valid: %d\n", valid);
+ printf("\n valid: %d\n", valid);
printf(" invalid: %d\n", istate->cache_nr - valid);
return 0;
> Ciao,
> Johannes
>
next prev parent reply other threads:[~2018-01-08 20:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 3:04 [PATCH v2 0/6] Minor fsmonitor bugfixes, use with `git diff` Alex Vandiver
2018-01-03 3:04 ` [PATCH 1/6] Fix comments to agree with argument name Alex Vandiver
2018-01-03 3:04 ` [PATCH 2/6] fsmonitor: Stop inline'ing mark_fsmonitor_valid / _invalid Alex Vandiver
2018-01-04 22:27 ` Johannes Schindelin
2018-01-08 20:27 ` Ben Peart
2018-01-03 3:04 ` [PATCH 3/6] fsmonitor: Update helper tool, now that flags are filled later Alex Vandiver
2018-01-04 23:03 ` Johannes Schindelin
2018-01-03 3:04 ` [PATCH 4/6] fsmonitor: Make output of test-dump-fsmonitor more concise Alex Vandiver
2018-01-04 22:33 ` Johannes Schindelin
2018-01-08 20:33 ` Ben Peart [this message]
2018-01-03 3:04 ` [PATCH 5/6] fsmonitor: Remove debugging lines from t/t7519-status-fsmonitor.sh Alex Vandiver
2018-01-03 3:04 ` [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff` Alex Vandiver
2018-01-04 22:46 ` Johannes Schindelin
2018-01-05 22:22 ` Junio C Hamano
2018-01-08 20:58 ` Ben Peart
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=af33fb18-fd31-727b-efcc-b3873c6e58f1@gmail.com \
--to=peartben@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=alexmv@dropbox.com \
--cc=git@vger.kernel.org \
/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).