threads / discuss / 48040

Running some tests with -x fails

Subject: Running some tests with -x fails

## tl;dr

2 messages between Mar 14, 2018 and Mar 14, 2018.

replies: 1people: 2as markdown or json

Christian Couder· Mar 14, 2018, 14:30 UTC · lore

I don't know if this is well known already, but when when I run some tests using -x on master they consistently fail (while they consistently pass without -x).

For example:
./t5500-fetch-pack.sh -x
gives: # failed 3 among 353 test(s)
./t0008-ignores.sh -x
gives: # failed 208 among 394 test(s)
Are we interested in trying to fix those failures or are we ok with them?
Jeff King· Mar 14, 2018, 14:50 UTC · re: Christian Couder · lore

Re: Running some tests with -x fails

On Wed, Mar 14, 2018 at 03:30:30PM +0100, Christian Couder wrote:
Show 15 quoted lines
> I don't know if this is well known already, but when when I run some
> tests using -x on master they consistently fail (while they
> consistently pass without -x).
> 
> For example:
> 
> ./t5500-fetch-pack.sh -x
> 
> gives: # failed 3 among 353 test(s)
> 
> ./t0008-ignores.sh -x
> 
> gives: # failed 208 among 394 test(s)
> 
> Are we interested in trying to fix those failures or are we ok with them?

This is known; the issue is tests that run shell functions or subshells and capture their stderr (which then get polluted by "-x" output). You can either:

  - run the tests with bash, which uses BASH_XTRACEFD to send output
    directly to the terminal (see TEST_SHELL_PATH in recent versions)
  - try 'next'; Gábor has done some work recently to clean up tests so
    that this works even with non-bash shells. See the sg/test-x and
    sg/cvs-tests-with-x topics.
-Peff

← back to recent threads