From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] test: fix hang on FreeBSD Date: Mon, 21 May 2018 15:16:45 +0200 Message-ID: <2472085.2sczoQJf8F@xps> References: <1526902547-12710-1-git-send-email-radu.nicolau@intel.com> <5146448.Vdf9GQnNb8@xps> <8ed23c52-4b88-b40a-ccc5-31c6993654a1@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org To: Radu Nicolau Return-path: In-Reply-To: <8ed23c52-4b88-b40a-ccc5-31c6993654a1@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/05/2018 14:58, Radu Nicolau: > > On 5/21/2018 1:30 PM, Thomas Monjalon wrote: > > 21/05/2018 13:35, Radu Nicolau: > >> Fixes: af75078fece3 ("first public release") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Radu Nicolau > >> --- > >> @@ -34,7 +34,8 @@ test_panic(void) > >> printf("Fork Failed\n"); > >> return -1; > >> } > >> - wait(&status); > >> + sleep(1); > >> + waitpid(pid, &status, WNOHANG); > > Please give an explanation why you are adding this sleep. > > > To give a chance to the child process to complete before calling waitpid. One second in an unit test is a lot. When I was asking for explanation, I mean usual explanations in commit message: - what is the issue - what is the root cause - what is the reasoning behind the fix