Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 15, 2018, 15:02 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1810151657080.4546@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CAE5ih79cNkVVQOkaeJifSqkcp=HGmRb3a=jJC=g08iV8dYRyXg@mail.gmail.com>
Hi Luke,
On Mon, 15 Oct 2018, Luke Diamand wrote:
Show 11 quoted lines
> On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget > <gitgitgadget@gmail.com> wrote: > > > > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > > > This should be more reliable than the current method, and prepares the > > test suite for a consistent way to clean up before re-running the tests > > with different options. > > > > I'm finding that it's leaving p4d processes lying around.
That's a bummer!
Show 6 quoted lines
> e.g. > > $ ./t9820-git-p4-editor-handling.sh > <passes> > $ ./t9820-git-p4-editor-handling.sh > <fails>
Since I do not currently have a setup with p4d installed, can you run that with `sh -x ...` and see whether this code path is hit?
test_done () {
GIT_EXIT_OK=t+ test -n "$immediate" || test_atexit_handler
+
if test -n "$write_junit_xml" && test -n "$junit_xml_path"
thenShow 5 quoted lines
> And also > > $ ./t9800-git-p4-basic.sh > <starts running tests, but I get bored easily> > Ctrl-C
Oh, you're right. I think I need to do something in this line:
trap 'exit $?' INT
in t/test-lib.sh, something like
trap 'exit_code=$?; test_atexit_handler; exit $exit_code' INT
would you agree? (And: could you test?)
Thanks, Dscho
Show 9 quoted lines
> $ ./t9800-git-p4-basic.sh > <fails> > > $ ps | grep p4d > 21392 pts/1 00:00:00 p4d <<<<< > > > Luke >