git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Git Test Coverage Report (Thurs. June 27)
Date: Fri, 28 Jun 2019 16:47:20 +0700	[thread overview]
Message-ID: <CACsJy8C7Qr3JauRqUkB957ZDzVVZ0+wofzs7N2NzCbu+e00JnQ@mail.gmail.com> (raw)
In-Reply-To: <14689d27-eecd-2e0a-715d-796b20d573e5@gmail.com>

On Fri, Jun 28, 2019 at 12:35 AM Derrick Stolee <stolee@gmail.com> wrote:
> > dir.c
> > 3b2385cf 2840) static void jw_object_untracked_cache_dir(struct json_writer *jw,
> > 3b2385cf 2845) jw_object_bool(jw, "valid", ucd->valid);
> > 3b2385cf 2846) jw_object_bool(jw, "check-only", ucd->check_only);
> > 3b2385cf 2847) jw_object_stat_data(jw, "stat", &ucd->stat_data);
> > 3b2385cf 2848) jw_object_string(jw, "exclude-oid", oid_to_hex(&ucd->exclude_oid));
> > 3b2385cf 2849) jw_object_inline_begin_array(jw, "untracked");
> > 3b2385cf 2850) for (i = 0; i < ucd->untracked_nr; i++)
> > 3b2385cf 2851) jw_array_string(jw, ucd->untracked[i]);
> > 3b2385cf 2852) jw_end(jw);
> > 3b2385cf 2854) jw_object_inline_begin_object(jw, "dirs");
> > 3b2385cf 2855) for (i = 0; i < ucd->dirs_nr; i++) {
> > 3b2385cf 2856) jw_object_inline_begin_object(jw, ucd->dirs[i]->name);
> > 3b2385cf 2857) jw_object_untracked_cache_dir(jw, ucd->dirs[i]);
> > 3b2385cf 2858) jw_end(jw);
> > 3b2385cf 2860) jw_end(jw);
> > 3b2385cf 2861) }
> > 3b2385cf 2958) jw_object_inline_begin_object(jw, "root");
> > 3b2385cf 2959) jw_object_untracked_cache_dir(jw, uc->root);
> > 3b2385cf 2960) jw_end(jw);
>
> Duy: I know you were working on some tests for these options. This is specifically
> in the "untracked cache" mode, so enabling the cache with at least one entry and
> running --debug-json should be sufficient.

It's a bit more complicated than that, but I see your point. I
initially looked at the output and saw "something" and moved on. I
should have examined the json output more carefully.

> > read-cache.c
> > 8eeabe15 1752) ret = error(_("index uses %.4s extension, which we do not understand"),
> > ee70c128 1754) if (advice_unknown_index_extension) {
> > ee70c128 1755) warning(_("ignoring optional %.4s index extension"), ext);
> > ee70c128 1756) advise(_("This is likely due to the file having been written by a newer\n"
> > 272b3f2a 2026) jw_object_true(jw, "assume_unchanged");
> > 272b3f2a 2030) jw_object_true(jw, "skip_worktree");
> > 272b3f2a 2032) jw_object_intmax(jw, "stage", ce_stage(ce));
> > f0f544da 2309) ieot = read_ieot_extension(istate, mmap, mmap_size, extension_offset);
> > f0f544da 3651) static struct index_entry_offset_table *read_ieot_extension(
> > f0f544da 3673) return do_read_ieot_extension(istate, index, extsize);
>
> Duy: more JSON output cases that could be interesting to cover.

This is because I changed the function signature, I think. Both IEOT
and EOIE extensions, if I'm not mistaken, are never tested in the test
suite. You need to set GIT_TEST_INDEX_THREADS, then the last three
lines should be covered.
-- 
Duy

  parent reply	other threads:[~2019-06-28  9:47 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 17:05 Git Test Coverage Report (Thurs. June 27) Derrick Stolee
2019-06-27 17:35 ` Derrick Stolee
2019-06-28  6:41   ` Jeff King
2019-06-28  9:37     ` [PATCH 0/6] easy bulk commit creation in tests Jeff King
2019-06-28  9:39       ` [PATCH 1/6] test-lib: introduce test_commit_bulk Jeff King
2019-06-28 12:35         ` Derrick Stolee
2019-06-28 18:05           ` Junio C Hamano
2019-06-29  0:09           ` Jeff King
2019-06-28 17:53         ` Junio C Hamano
2019-06-29  0:14           ` Jeff King
2019-06-28 18:44         ` Ævar Arnfjörð Bjarmason
2019-06-29  0:19           ` Jeff King
2019-06-28 21:32         ` Eric Sunshine
2019-06-28 23:04           ` SZEDER Gábor
2019-06-28 23:46             ` Eric Sunshine
2019-06-29  0:26               ` Jeff King
2019-06-29  8:24               ` SZEDER Gábor
2019-07-01 17:42                 ` Junio C Hamano
2019-06-29  0:25           ` Jeff King
2019-06-28  9:39       ` [PATCH 2/6] t5310: increase the number of bitmapped commits Jeff King
2019-06-28  9:41       ` [PATCH 3/6] t3311: use test_commit_bulk Jeff King
2019-06-28  9:41       ` [PATCH 4/6] t5702: " Jeff King
2019-06-28  9:42       ` [PATCH 5/6] t5703: " Jeff King
2019-06-28  9:42       ` [PATCH 6/6] t6200: " Jeff King
2019-06-28 12:53       ` [PATCH 0/6] easy bulk commit creation in tests Johannes Schindelin
2019-06-29  0:30         ` Jeff King
2019-06-29 16:38           ` Elijah Newren
2019-06-30  6:34             ` Jeff King
2019-06-28 18:49       ` Ævar Arnfjörð Bjarmason
2019-06-29  0:45         ` Jeff King
2019-06-29  4:53       ` [PATCH v2 1/6] test-lib: introduce test_commit_bulk Jeff King
2019-07-01 22:24         ` Junio C Hamano
2019-07-02  5:16           ` Jeff King
2019-07-01 22:28         ` Junio C Hamano
2019-07-02  5:22           ` Jeff King
2019-06-28  6:45   ` Git Test Coverage Report (Thurs. June 27) Jeff King
2019-06-28 12:23     ` Derrick Stolee
2019-06-28 23:59       ` Jeff King
2019-06-29  1:36         ` Derrick Stolee
2019-06-29  5:15           ` Jeff King
2019-06-28  9:47   ` Duy Nguyen [this message]
2019-06-28 12:39     ` Derrick Stolee
2019-06-28 13:39   ` Christian Couder

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=CACsJy8C7Qr3JauRqUkB957ZDzVVZ0+wofzs7N2NzCbu+e00JnQ@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --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).