Reviewed-by: Balasubramanian Manoharan <bala.manoha...@linaro.org <mailto:bala.manoha...@linaro.org>>
> On 13-Mar-2017, at 7:32 PM, Bill Fischofer <bill.fischo...@linaro.org> wrote: > > Address bug https://bugs.linaro.org/show_bug.cgi?id=2908 by checking > the pool capability max packet length and modifying the test in > test_extend_ref() to account for implementations that do not limit > packet lengths. > > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> > --- > test/common_plat/validation/api/packet/packet.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/test/common_plat/validation/api/packet/packet.c > b/test/common_plat/validation/api/packet/packet.c > index 900c4263..5544c237 100644 > --- a/test/common_plat/validation/api/packet/packet.c > +++ b/test/common_plat/validation/api/packet/packet.c > @@ -1847,6 +1847,9 @@ void packet_test_extend_ref(void) > { > odp_packet_t max_pkt, ref; > uint32_t hr, tr, max_len; > + odp_pool_capability_t capa; > + > + CU_ASSERT_FATAL(odp_pool_capability(&capa) == 0); > > max_pkt = odp_packet_copy(segmented_test_packet, > odp_packet_pool(segmented_test_packet)); > @@ -1860,8 +1863,10 @@ void packet_test_extend_ref(void) > odp_packet_push_tail(max_pkt, tr); > > /* Max packet should not be extendable at either end */ > - CU_ASSERT(odp_packet_extend_tail(&max_pkt, 1, NULL, NULL) < 0); > - CU_ASSERT(odp_packet_extend_head(&max_pkt, 1, NULL, NULL) < 0); > + if (max_len == capa.pkt.max_len) { > + CU_ASSERT(odp_packet_extend_tail(&max_pkt, 1, NULL, NULL) < 0); > + CU_ASSERT(odp_packet_extend_head(&max_pkt, 1, NULL, NULL) < 0); > + } > > /* See if we can trunc and extend anyway */ > CU_ASSERT(odp_packet_trunc_tail(&max_pkt, hr + tr + 1, > -- > 2.12.0.rc1 >