{"thread":{"id":"48040","subject":"Running some tests with -x fails","startedAt":"2018-03-14T14:30:37Z","lastAt":"2018-03-14T14:50:57Z","messageCount":2,"participants":["Christian Couder","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"341634","messageId":"CAP8UFD29eFPfiW2PjOr4evjB2X=yDWULOgUx2NRM83Mt0FDXUw@mail.gmail.com","threadId":"48040","inReplyTo":null,"subject":"Running some tests with -x fails","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2018-03-14T14:30:30Z","receivedAt":"2018-03-14T14:30:37Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"I don't know if this is well known already, but when when I run some\ntests using -x on master they consistently fail (while they\nconsistently pass without -x).\n\nFor example:\n\n./t5500-fetch-pack.sh -x\n\ngives: # failed 3 among 353 test(s)\n\n./t0008-ignores.sh -x\n\ngives: # failed 208 among 394 test(s)\n\nAre we interested in trying to fix those failures or are we ok with them?\n"},{"id":"341635","messageId":"20180314145050.GA15531@sigill.intra.peff.net","threadId":"48040","inReplyTo":"CAP8UFD29eFPfiW2PjOr4evjB2X=yDWULOgUx2NRM83Mt0FDXUw@mail.gmail.com","subject":"Re: Running some tests with -x fails","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-03-14T14:50:50Z","receivedAt":"2018-03-14T14:50:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 14, 2018 at 03:30:30PM +0100, Christian Couder wrote:\n\n> I don't know if this is well known already, but when when I run some\n> tests using -x on master they consistently fail (while they\n> consistently pass without -x).\n> \n> For example:\n> \n> ./t5500-fetch-pack.sh -x\n> \n> gives: # failed 3 among 353 test(s)\n> \n> ./t0008-ignores.sh -x\n> \n> gives: # failed 208 among 394 test(s)\n> \n> Are we interested in trying to fix those failures or are we ok with them?\n\nThis is known; the issue is tests that run shell functions or subshells\nand capture their stderr (which then get polluted by \"-x\" output). You\ncan either:\n\n  - run the tests with bash, which uses BASH_XTRACEFD to send output\n    directly to the terminal (see TEST_SHELL_PATH in recent versions)\n\n  - try 'next'; Gábor has done some work recently to clean up tests so\n    that this works even with non-bash shells. See the sg/test-x and\n    sg/cvs-tests-with-x topics.\n\n-Peff\n"}]}