On Thu, Sep 26, 2019 at 01:04:48PM +0200, Johannes Schindelin wrote:
> > > > > Also, things like the code tracing via `-x` (which relies on Bash
> > > > > functionality in order to work properly,
> > > >
> > > > Not really.
> > >
> > > To work properly. What I meant was the trick we need to play with
> > > `BASH_XTRACEFD`.
> >
> > I'm still unsure what BASH_XTRACEFD trick you mean.  AFAICT we don't
> > play any tricks with it to make '-x' work properly, and indeed '-x'
> > tracing works properly even without BASH_XTRACEFD (and to achive that
> > we did have to play some tricks, but not any with BASH_XTRACEFD;
> > perhaps these tricks are what you meant?).
> 
> It works okay some of the time.

As far as I can tell it works all the time.

(Well, Ok, with the exception of t1510, but only because back then I
couldn't be bothered to figure out how that test script works.  But
even that script handles '-x' without BASH_XTRACEFD gracefully, and
it's safe to run the whole test suite with '-x'.)

>  But IIRC `-x -V` requires the `BASH_XTRACEFD` trick.

No, it doesn't; '-V' should have no effect on the '-x' trace
whatsoever.

As soon as I fixed running the test suite with '-x' and /bin/sh I
added GIT_TEST_OPTS="--verbose-log -x" to my 'config.mak' and to our
CI scripts.  The default shell running the test suite in our Linux CI
jobs is dash, and in our macOS jobs it's an ancient Bash version that
doesn't yet have BASH_XTRACEFD.  As far as I know they all work as
they should.

> However, I start to feel like I am distracted deliberately from my main
> argument

That was definitely not my intention.  However, if there are any open
issues with '-x', then I do want to know about it and fix it sooner
rather than later.  Alas, I still don't have the slightest clue about
what your issue actually is.

> I forgot a crucial tidbit: if you run with `-x` and a lazy prereq is
> evaluated, not only is the output disruptive, the trace is also turned
> off after the lazy prereq, _before_ the actual test case is run. So you
> don't see any trace of the actual test case.

Tracing is always turned on before running the test case,
independently from whether a lazy prereq was evaluated or not, so we
do always see the trace of the actual test case.  Notice the '+ true'
and '++ true' lines in my earlier reply including the test traces:
those lines are the trace of the actual test case.

  https://public-inbox.org/git/20190917120230.ga27...@szeder.dev/

Reply via email to