Re: [PATCH] multi-pack-index: fix --object-dir from outside repo
- From
Johannes Berg <johannes@sipsolutions.net>
- Date
- Aug 23, 2021, 13:40 UTC
- Message-ID
- <746f574d20c54b5f7d1eaae74f54a624573ad6bc.camel@sipsolutions.net>
- In-Reply-To
- <414ed641-2bd3-1316-8189-ad542988d091@gmail.com>
On Mon, 2021-08-23 at 09:19 -0400, Derrick Stolee wrote:
Show 13 quoted lines
> > We just add subshells this way: > > test_expect_success 'test name' ' > prep_step && > ( > # now in a subshell > cd wherever && > do things > # don't need to cd again > ) && > continue test > '
Sure. I know how to do subshells :)
My point was that inside the subshell you cannot do test_path_is_file and similar, because the subshell didn't import the libs.
Show 9 quoted lines
> > More importantly, how do you feel about the "cd /"? > > > > The tests are always run in a place where there's a parent git folder > > (even if it's git itself), so you cannot reproduce the segfault in a > > test without the "cd /", though I guess "cd /tmp" would also work or > > something, but "cd /" felt pretty safe, hopefully not many people have > > "/.git" on their system. > > Don't leave the directory your test is set up to run in.
I was specifically asking Junio ;-)
But realistically, if this is the requirement you want to impose, then you _cannot_ test for the segfault within git's test suite. Your loss.
johannes