From: Christian Couder <christian.couder@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2 1/6] t1300: make tests more robust with non-default ref backends
Date: Mon, 29 Jan 2024 11:32:53 +0100 [thread overview]
Message-ID: <CAP8UFD2ZoV74jx3B_adwYENGtp9fCH_oVjW4QJXTZQJ0=_aeEA@mail.gmail.com> (raw)
In-Reply-To: <ZbDP4ntRqrxX08yk@tanuki>
On Wed, Jan 24, 2024 at 9:52 AM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Tue, Jan 23, 2024 at 05:15:48PM +0100, Christian Couder wrote:
> > On Wed, Jan 10, 2024 at 10:01 AM Patrick Steinhardt <ps@pks.im> wrote:
> > >
> > > The t1300 test suite exercises the git-config(1) tool. To do so we
> > > overwrite ".git/config" to contain custom contents.
> >
> > Here "we" means "tests in t1300" I guess.
> >
> > > While this is easy
> > > enough to do, it may create problems when using a non-default repository
> > > format because we also overwrite the repository format version as well
> > > as any potential extensions.
> >
> > But I am not sure that "we" in the above sentence is also "tests in
> > t1300". I think overwriting the repo format version and potential
> > extensions is done by other tests, right? Anyway it would be nice to
> > clarify this.
> >
> > > With the upcoming "reftable" ref backend
> > > the result is that we may try to access refs via the "files" backend
> > > even though the repository has been initialized with the "reftable"
> > > backend.
> >
> > Not sure here also what "we" is. When could refs be accessed via the
> > "files" backend even though the repo was initialized with the
> > "reftable" backend?
>
> Yeah, I've rephrased all of these to sey "the tests" or something
> similar.
>
> > Does this mean that some of the tests in t1300 try to access refs via
> > the "files" backend while we may want to run all the tests using the
> > reftable backend?
>
> Exactly. We overwrite the ".git/config", which contains the "refStorage"
> extension that tells us to use the "reftable" backend. So the extension
> is gone, and thus Git would fall back to use the "files" backend
> instead, which will fail.
Let's take a look at this test:
test_expect_success 'check split_cmdline return' "
git config alias.split-cmdline-fix 'echo \"' &&
test_must_fail git split-cmdline-fix &&
echo foo > foo &&
git add foo &&
git commit -m 'initial commit' &&
git config branch.main.mergeoptions 'echo \"' &&
test_must_fail git merge main
"
I don't really see how it overwrites anything. When putting some debug
commands before and after that test, it looks like the config file
contains the following before that test:
---
[section "sub=section"]
val1 = foo=bar
val2 = foo\nbar
val3 = \n\n
val4 =
val5
[section]
val = foo \t bar
---
and the following after that test:
---
[section "sub=section"]
val1 = foo=bar
val2 = foo\nbar
val3 = \n\n
val4 =
val5
[section]
val = foo \t bar
[alias]
split-cmdline-fix = echo \"
[branch "main"]
mergeoptions = echo \"
---
So it doesn't look like it overwrites anything. To me it just adds
stuff at the end of the file.
> > > Refactor tests which access the refdb to be more robust by using their
> > > own separate repositories, which allows us to be more careful and not
> > > discard required extensions.
> >
> > Not sure what exactly is discarding extensions. Also robust is not
> > very clear. It would be better to give at least an example of how
> > things could fail.
>
> Hm. I don't really know how to phrase this better. The preceding
> paragraph already explains why we're discarding the extension and what
> the consequence is. I added a sentence saying ", which will cause
> failures when trying to access any refs."
To me the preceding paragraph said that we are overwriting the config
file, but I just don't see how for example the above test overwrites
anything. So maybe I am missing something obvious, or maybe you don't
quite mean "overwrite", but I don't see how the extension would be
discarded by the test which only seems to add stuff.
next prev parent reply other threads:[~2024-01-29 10:33 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 12:17 [PATCH 0/6] t: mark "files"-backend specific tests Patrick Steinhardt
2024-01-09 12:17 ` [PATCH 1/6] t1300: mark tests to require default repo format Patrick Steinhardt
2024-01-09 18:41 ` Taylor Blau
2024-01-10 7:15 ` Patrick Steinhardt
2024-01-09 19:35 ` Eric Sunshine
2024-01-10 7:17 ` Patrick Steinhardt
2024-01-09 12:17 ` [PATCH 2/6] t1301: mark test for `core.sharedRepository` as reffiles specific Patrick Steinhardt
2024-01-09 12:17 ` [PATCH 3/6] t1302: make tests more robust with new extensions Patrick Steinhardt
2024-01-09 18:43 ` Taylor Blau
2024-01-09 12:17 ` [PATCH 4/6] t1419: mark test suite as files-backend specific Patrick Steinhardt
2024-01-09 19:40 ` Eric Sunshine
2024-01-10 7:30 ` Patrick Steinhardt
2024-01-10 16:27 ` Junio C Hamano
2024-01-11 5:05 ` Patrick Steinhardt
2024-01-09 12:17 ` [PATCH 5/6] t5526: break test submodule differently Patrick Steinhardt
2024-01-09 19:23 ` Eric Sunshine
2024-01-10 7:41 ` Patrick Steinhardt
2024-01-09 12:17 ` [PATCH 6/6] t: mark tests regarding git-pack-refs(1) to be backend specific Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 0/6] t: mark "files"-backend specific tests Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 1/6] t1300: make tests more robust with non-default ref backends Patrick Steinhardt
2024-01-23 13:41 ` Toon Claes
2024-01-23 15:22 ` Patrick Steinhardt
2024-01-23 16:43 ` Justin Tobler
2024-01-23 16:15 ` Christian Couder
2024-01-24 8:52 ` Patrick Steinhardt
2024-01-29 10:32 ` Christian Couder [this message]
2024-01-29 10:49 ` Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 2/6] t1301: mark test for `core.sharedRepository` as reffiles specific Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 3/6] t1302: make tests more robust with new extensions Patrick Steinhardt
2024-01-23 14:08 ` Toon Claes
2024-01-23 15:18 ` Patrick Steinhardt
2024-01-23 16:15 ` Christian Couder
2024-01-24 8:52 ` Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 4/6] t1419: mark test suite as files-backend specific Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 5/6] t5526: break test submodule differently Patrick Steinhardt
2024-01-10 9:01 ` [PATCH v2 6/6] t: mark tests regarding git-pack-refs(1) to be backend specific Patrick Steinhardt
2024-01-23 16:20 ` [PATCH v2 0/6] t: mark "files"-backend specific tests Christian Couder
2024-01-24 8:45 ` [PATCH v3 " Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 1/6] t1300: make tests more robust with non-default ref backends Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 2/6] t1301: mark test for `core.sharedRepository` as reffiles specific Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 3/6] t1302: make tests more robust with new extensions Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 4/6] t1419: mark test suite as files-backend specific Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 5/6] t5526: break test submodule differently Patrick Steinhardt
2024-01-24 8:45 ` [PATCH v3 6/6] t: mark tests regarding git-pack-refs(1) to be backend specific Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 0/6] t: mark "files"-backend specific tests Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 1/6] t1300: make tests more robust with non-default ref backends Patrick Steinhardt
2024-01-29 12:00 ` Christian Couder
2024-01-29 11:07 ` [PATCH v4 2/6] t1301: mark test for `core.sharedRepository` as reffiles specific Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 3/6] t1302: make tests more robust with new extensions Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 4/6] t1419: mark test suite as files-backend specific Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 5/6] t5526: break test submodule differently Patrick Steinhardt
2024-01-29 11:07 ` [PATCH v4 6/6] t: mark tests regarding git-pack-refs(1) to be backend specific Patrick Steinhardt
2024-01-29 12:03 ` [PATCH v4 0/6] t: mark "files"-backend specific tests Christian Couder
2024-01-29 20:38 ` Junio C Hamano
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='CAP8UFD2ZoV74jx3B_adwYENGtp9fCH_oVjW4QJXTZQJ0=_aeEA@mail.gmail.com' \
--to=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=ps@pks.im \
--cc=sunshine@sunshineco.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).