From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 4073E9AC3 for ; Tue, 24 Feb 2015 21:55:28 +0100 (CET) Received: by mail-wi0-f175.google.com with SMTP id r20so28690817wiv.2 for ; Tue, 24 Feb 2015 12:55:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=gk7GCvwllIQ+l8kTMwgfiQdBGjH0aLuZ7UjfRQovupU=; b=O0osRwO4t5ax2DvrcI+hzm5qFVM0XJxtjzAm49t8MPFIToaHVz42dMYxX+7oS79CKn DyZtkSMlbWte+C6A0G98WXwVKXuk/PlPhPBqJe/PtyOcI5u6nU3WORDkMhpPhx9WdYHK vI862tWHkipo17Wio8sJj32NeVFLWqxgkV353Ue+u8wqnZ0M/xDvT//Ne1WAgPSO4WJu Rz5Jp9BGgaATQTbmhDNmzWyoSzPP0nvpUsHHy5ywh8jVKX2JhnZI/nCfK2zSiyhxPj9z BdIAjjo7xUrzW+DOmd/26HvLh/8a9vCtR773ClVyTN1JeVeDCxiFxWDprI8w0r+vujRH rW+A== X-Gm-Message-State: ALoCoQkQyEunQ83pxlGHwXT3Qccx4Rr0RDRmF3JnDHhu/q7PeS1tSnKW5z2zHZdMX8LcFLolL62+ X-Received: by 10.180.188.41 with SMTP id fx9mr33476045wic.93.1424811328046; Tue, 24 Feb 2015 12:55:28 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id mb20sm22114963wic.18.2015.02.24.12.55.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 12:55:27 -0800 (PST) From: Thomas Monjalon To: Daniel Mrzyglod Date: Tue, 24 Feb 2015 21:54:53 +0100 Message-ID: <4814181.SJr1RJ5GXF@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150210114638.GB18684@bricha3-MOBL3> References: <1422373493-9816-1-git-send-email-danielx.t.mrzyglod@intel.com> <1692949.19G84kSIeU@xps13> <20150210114638.GB18684@bricha3-MOBL3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] test: fix missing NULL pointer checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2015 20:55:28 -0000 2015-02-10 11:46, Bruce Richardson: > On Fri, Jan 30, 2015 at 11:18:19AM +0100, Thomas Monjalon wrote: > > 2015-01-27 13:06, Neil Horman: > > > On Tue, Jan 27, 2015 at 04:44:53PM +0100, Daniel Mrzyglod wrote: > > > > In test_sched, we are missing NULL pointer checks after create_mempool() > > > > and rte_pktmbuf_alloc(). Add in these checks using TEST_ASSERT_NOT_NULL macros. > > > > > > > > VERIFY macro was removed and replaced by standard test ASSERTS from "test.h" header. > > > > This provides additional information to track when the failure occured. > > > > > > > > v3 changes: > > > > - remove VERIFY macro > > > > - fix spelling error. > > > > - change unproper comment > > > > > > > > v2 changes: > > > > - Replace all VERIFY macros instances by proper TEST_ASSERT* macros. > > > > - fix description > > > > > > > > v1 changes: > > > > - first iteration of patch using VERIFY macro. > > > > > > > > Signed-off-by: Daniel Mrzyglod > > > > > > These TEST_ASSERT macros are no better than the VERIFY macro, they contain > > > exaxtly the same return issue that I outlined in my first post on the subject. > > > > Neil, you are suggesting to rework the assert macros of the unit tests. > > It should be another patch. > > Here, Daniel is improving the sched test with existing macros. > > I think it should be applied. > > > > +1 > I agree with Thomas here. Having looked at the V4 patch, I believe this V3 is > better, and that other cleanup should be done in separate patches. Applied, thanks