Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luke,

On Mon, 15 Oct 2018, Luke Diamand wrote:

> On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget
> <gitgitgadget@xxxxxxxxx> wrote:
> >
> > From: Johannes Schindelin <johannes.schindelin@xxxxxx>
> >
> > 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!

> 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"
        then

> 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

> $ ./t9800-git-p4-basic.sh
> <fails>
> 
> $ ps | grep p4d
> 21392 pts/1    00:00:00 p4d  <<<<<
> 
> 
> Luke
> 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux