From: Jeff Hostetler Date: Tue, 09 Feb 2021 15:45:41 GMT Subject: Re: [PATCH v2 09/14] simple-ipc: add t/helper/test-simple-ipc and t0052 Message-ID: <7a84352f-1b86-ff3d-27f0-131b873573b5@jeffhostetler.com> In-Reply-To: <20210202213523.GD2091@szeder.dev> On 2/2/21 4:35 PM, SZEDER Gábor wrote: > On Mon, Feb 01, 2021 at 07:45:42PM +0000, Jeff Hostetler via GitGitGadget wrote: >> diff --git a/t/t0052-simple-ipc.sh b/t/t0052-simple-ipc.sh >> new file mode 100755 >> index 00000000000..69588354545 >> --- /dev/null >> +++ b/t/t0052-simple-ipc.sh >> @@ -0,0 +1,129 @@ >> +#!/bin/sh >> + >> +test_description='simple command server' >> + >> +. ./test-lib.sh >> + >> +test-tool simple-ipc SUPPORTS_SIMPLE_IPC || { >> + skip_all='simple IPC not supported on this platform' >> + test_done >> +} >> + >> +stop_simple_IPC_server () { >> + test -n "$SIMPLE_IPC_PID" || return 0 >> + >> + kill "$SIMPLE_IPC_PID" && >> + SIMPLE_IPC_PID= >> +} >> + >> +test_expect_success 'start simple command server' ' >> + { test-tool simple-ipc daemon --threads=8 & } && >> + SIMPLE_IPC_PID=$! && >> + test_atexit stop_simple_IPC_server && >> + >> + sleep 1 && > > This will certainly lead to occasional failures when the daemon takes > longer than that mere 1 second delay under heavy load or in CI jobs. Good point. Thanks! > >> + >> + test-tool simple-ipc is-active >> +'