Re: [PATCH] t2027: avoid using pipes

2017-03-09 Thread Christian Couder
On Thu, Mar 9, 2017 at 8:03 PM, Prathamesh Chavan wrote: > From: Prathamesh > > Whenever a git command is present in the upstream of a pipe, its failure > gets masked by piping and hence it should be avoided for testing the > upstream git command. By writing

[PATCH] t2027: avoid using pipes

2017-03-09 Thread Prathamesh Chavan
From: Prathamesh Whenever a git command is present in the upstream of a pipe, its failure gets masked by piping and hence it should be avoided for testing the upstream git command. By writing out the output of the git command to a file, we can test the exit codes of both the

[PATCH] t2027: avoid using pipes

2017-03-09 Thread Prathamesh Chavan
From: Prathamesh Whenever a git command is present in the upstream of a pipe, its failure gets masked by piping and hence it should be avoided for testing the upstream git command. By writing out the output of the git command to a file, we can test the exit codes of both the

Re: [PATCH] t2027: avoid using pipes

2017-03-09 Thread Prathamesh Chavan
On Thu, Mar 9, 2017 at 1:38 PM, Christian Couder wrote: > On Wed, Mar 8, 2017 at 4:13 PM, Prathamesh Chavan wrote: >> The exit code of the upstream of a pipe is ignored thus we should avoid >> using it. > > You might want to say more specifically

Re: [PATCH] t2027: avoid using pipes

2017-03-09 Thread Christian Couder
On Wed, Mar 8, 2017 at 4:13 PM, Prathamesh Chavan wrote: > The exit code of the upstream of a pipe is ignored thus we should avoid > using it. You might want to say more specifically that we should avoid piping a git command into another one as this could mask a failure of the

Re: [PATCH] t2027: avoid using pipes

2017-03-08 Thread Prathamesh Chavan
Whenever a test suite is executed, after finishing every test, after running all tests, the function test_done is called. You may find this function in test-lib.sh . This function displays the result of the test and also removes the trash created by running the test. On Wed, Mar 8, 2017 at 9:14

Re: [PATCH] t2027: avoid using pipes

2017-03-08 Thread Prathamesh Chavan
But when I read the function carefully, it only removes the trash files created when test_failure is equal to zero. But as far as I know, I can see the files being removed even when a test_failure is non-zero for some test script. On Thu, Mar 9, 2017 at 3:08 AM, Prathamesh Chavan

Re: [PATCH] t2027: avoid using pipes

2017-03-08 Thread Jon Loeliger
So, like, Prathamesh Chavan said: > The exit code of the upstream of a pipe is ignored thus we should avoid > using it. By writing out the output of the git command to a file, we > can test the exit codes of both the commands. > > Signed-off-by: Prathamesh > --- >