From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by dpdk.org (Postfix) with ESMTP id 591C45A31 for ; Mon, 26 Jan 2015 22:27:18 +0100 (CET) Received: by mail-we0-f179.google.com with SMTP id q59so11485369wes.10 for ; Mon, 26 Jan 2015 13:27:17 -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=8CcOev+2GfWZW0oQwqQ8wm4n9k5WXjDr++FOIZPcy8I=; b=EglUY6PkRQ2ylKj4xFpn3huknCHQuXc9MeF5u2Uvpd/aXrrr6XYKvNCW94G2WQvbyJ CF2ekahm9Zqlad2zTJxvXEHk3D+Eqc2zC5gdmZ6/EQrvLAyERRBu47Go1irpwOInKmZ3 H2haytVCgXiL9dI8EpBv9sYivuVKsy/qc+Qap0pqL1Pd+6y7N098gJmezznd8EHPKmBt gVCG9bpo3M1Quk7xNNacOsc+kJI1UM+lzrK0F0+FQtyExYAkzqwvpCNAE8PHTd/FT/VF frNbm/eI6f35ytYqrl4LAY6adj3zOViZ4lLBoao3UYSflAaP3jh5HwIxXaL1ZOXQYNDj OCsw== X-Gm-Message-State: ALoCoQmmZipPJA9WzYcg+7ZLYjGdMc7bZPNviBCN61nGj6LbspXjS+9RhA+4mqXtpZE+2vNF8Fca X-Received: by 10.194.158.5 with SMTP id wq5mr49729399wjb.85.1422307637148; Mon, 26 Jan 2015 13:27:17 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id qg11sm15490979wic.17.2015.01.26.13.27.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 13:27:16 -0800 (PST) From: Thomas Monjalon To: Daniel Mrzyglod Date: Mon, 26 Jan 2015 22:26:46 +0100 Message-ID: <5122600.hXUxZ4V3cS@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.18.2-2-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <20867625.qP6gkIlEQ3@xps13> References: <1418895707-468-1-git-send-email-danielx.t.mrzyglod@intel.com> <20867625.qP6gkIlEQ3@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] 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: Mon, 26 Jan 2015 21:27:18 -0000 Ping. What next for this patch? 2014-12-18 22:05, Thomas Monjalon: > 2014-12-18 09:41, Daniel Mrzyglod: > > In test_sched, we are missing NULL pointer checks after calls to create the > > mempool and to allocate an mbuf. Add in these checks using VERIFY macros. > > > > Signed-off-by: Daniel Mrzyglod > > --- > > app/test/test_sched.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/app/test/test_sched.c b/app/test/test_sched.c > > index c957d80..9b6e037 100644 > > --- a/app/test/test_sched.c > > +++ b/app/test/test_sched.c > > @@ -166,6 +166,7 @@ test_sched(void) > > int err; > > > > mp = create_mempool(); > > + VERIFY(mp != NULL,"Error create mempool\n"); > > A space is missing after the comma. > Is "Error creating mempool" more correct? > > > port_param.socket = 0; > > port_param.rate = (uint64_t) 10000 * 1000 * 1000 / 8; > > @@ -184,6 +185,7 @@ test_sched(void) > > > > for (i = 0; i < 10; i++) { > > in_mbufs[i] = rte_pktmbuf_alloc(mp); > > + VERIFY(in_mbufs[i] != NULL, "Bad packet allocation"); > > An \n is missing. > "Packet allocation failed" seems more appropriate.