[PATCH] restructure messaging

Jeremy Allison jra at samba.org
Wed Oct 12 20:24:10 UTC 2016


On Wed, Oct 12, 2016 at 09:43:54PM +0200, Volker Lendecke wrote:
> Jeremy Allison <jra at samba.org> writes:
> 
> > On Wed, Oct 12, 2016 at 04:54:28PM +0200, Volker Lendecke wrote:
> > Oh, it survived a local make test TESTS=local.messaging
> > for me, wouldn't have pushed it otherwise !
> 
> 't was a race. See attached. Phew, it was in the tests, not in the core
> code :-)

Oh, good catch - RB+


> From 47240b276a9645a2f48e6073dcd838af546aa24d Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 12 Oct 2016 21:42:02 +0200
> Subject: [PATCH] torture: Fix local.messaging
> 
> Stop sharing the tevent signal fd between parent and child :-)
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  source4/lib/messaging/tests/messaging.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c
> index 2c9f4cc..ba58978 100644
> --- a/source4/lib/messaging/tests/messaging.c
> +++ b/source4/lib/messaging/tests/messaging.c
> @@ -157,6 +157,9 @@ static bool test_messaging_overflow(struct torture_context *tctx)
>  	}
>  
>  	if (child == 0) {
> +		ret = tevent_re_initialise(tctx->ev);
> +		torture_assert(tctx, ret == 0, "tevent_re_initialise failed");
> +
>  		msg_ctx = imessaging_init(tctx, tctx->lp_ctx,
>  					  cluster_id(getpid(), 0),
>  					  tctx->ev);
> @@ -279,6 +282,9 @@ static bool test_messaging_overflow_check(struct torture_context *tctx)
>  		struct overflow_parent_child child_state = { .done = false };
>  		DATA_BLOB retblob = { .data = final, .length = sizeof(final) };
>  
> +		ret = tevent_re_initialise(tctx->ev);
> +		torture_assert(tctx, ret == 0, "tevent_re_initialise failed");
> +
>  		MD5Init(&child_state.md5ctx);
>  
>  		msg_ctx = imessaging_init(tctx, tctx->lp_ctx,
> -- 
> 2.1.4
> 




More information about the samba-technical mailing list