[dpdk-dev] [PATCH v3] test: fix missing NULL pointer checks

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Jan 30 11:18:19 CET 2015


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 <danielx.t.mrzyglod at intel.com>
>   
> 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.

-- 
Thomas


More information about the dev mailing list