app/test: check for mbuf allocation failure
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 16 Dec 2014 15:03:50 +0000 (15:03 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Dec 2014 00:04:06 +0000 (01:04 +0100)
commit6f78a6651f2c64b3a931a347628cd23e06ea4d99
tree5fba33006b9752b1f6a48478d88182b92ac8c7ac
parentb38e6ee0fa7508b81753cedb1d6b121f2dee32fe
app/test: check for mbuf allocation failure

If mbuf allocation failed for whatever reason, we would get a NULL
pointer exception in test_table_acl.c:test_pipeline_single_filter test
case.
We fix this by causing an early break out of the application loop. If we
quit the test immediately we would leak any existing allocated mbufs,
but by breaking instead, we allow the test to continue and clean up the
mbufs already in the pipeline, while still having a test failure as the
mbuf counts should not match.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
app/test/test_table_acl.c