From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E24CC5DF60 for ; Fri, 8 Nov 2019 10:23:09 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id DDCE02178F for ; Fri, 8 Nov 2019 10:23:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="zSIGV9xu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDCE02178F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6EB6A1C11C; Fri, 8 Nov 2019 11:21:48 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id A91411C114 for ; Fri, 8 Nov 2019 11:21:45 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA8AFsTi006980; Fri, 8 Nov 2019 02:21:44 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=KCgk/D2mWkdvwSsr8gN0hjYP5rlSu3QcbNZJO3o88fs=; b=zSIGV9xu73zUQH/8AfjxUgKa8hf7yLVznIfJ6yoJt+sR1PoHvosG45vZrCHoew+GiVBP 4LXgbdOnNX7XgtVdHiXbhjdn5WJtbppCAdLQeRz4f9R598tUk86pMNdPPU+4SlPQGk9B TI39Ly6Q/DXy0rqOuGMG/041td+agkSjqKoafaQQmBa0lmpKzsVggExTcJYh+tMJfSCE REW3yEzwi2JXEMvDUVL/S4vqjmdITUh1b9NQhU4iALomDDNrF7od3lHRmKHkf6rSgMeX lxPWuoJDDA3Xic+0OOFctYBavdl0cIPSqVlLuCb8o1Ac3ArRtAYRo/EXSGBxw/kuW1yc jw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2w4fq6whvg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Nov 2019 02:21:44 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 8 Nov 2019 02:21:43 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 8 Nov 2019 02:21:43 -0800 Received: from kk-box-0.marvell.com (unknown [10.95.130.41]) by maili.marvell.com (Postfix) with ESMTP id 820DE3F7041; Fri, 8 Nov 2019 02:21:42 -0800 (PST) From: To: , , Date: Fri, 8 Nov 2019 11:21:32 +0100 Message-ID: <20191108102135.7249-1-kkanas@marvell.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-08_02:2019-11-07,2019-11-08 signatures=0 Subject: Re: [dpdk-dev] [PATCH v3 0/3] test: fix timeout in flags autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi David, Thanks for review, hopefully this patch will addresses most of the sutff. Rest I will address here. > > > + const char *procdir = "/proc/self/fd/"; > > self is a Linux thing. > This won't work on FreeBSD. IMHO original code didn't worked on FreeBSD as well. I have created function to adress in third patch > No need to set status, this (forked) process will panic. I am using status to save errno as it value can be overwritten on unlikely event of closedir failure. --- v3 changes: add missing closedir fix strtol string validation test removed empty line remove unecssary initalization add check for '.' and '..' to avoid errors in parsing entries fix commit message add FreeBSD function for closing files v2 changes: fix commit message Krzysztof Kanas (3): test: fix timeout in flags autotest test: move close files to separate function test: fix FreeBSD file closing function process.h | 183 ++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 138 insertions(+), 45 deletions(-)