Message ID | 1429804017-19918-1-git-send-email-stuart.haslam@linaro.org |
---|---|
State | Accepted |
Commit | 4963dd2d820005e48f91b78e6caaed45d91a9d63 |
Headers | show |
Merged, Maxim. On 04/27/15 12:59, Savolainen, Petri (Nokia - FI/Espoo) wrote: > Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> > > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of ext >> Stuart Haslam >> Sent: Thursday, April 23, 2015 6:47 PM >> To: lng-odp@lists.linaro.org >> Subject: [lng-odp] [PATCH] validation: pktio: don't pass invalid handles >> >> Behaviour is undefined if an API is passed an invalid handle, so don't >> test it. >> >> Fixes https://bugs.linaro.org/show_bug.cgi?id=1375 >> >> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> >> --- >> test/validation/odp_pktio.c | 18 ------------------ >> 1 file changed, 18 deletions(-) >> >> diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c >> index a078efe..67e709e 100644 >> --- a/test/validation/odp_pktio.c >> +++ b/test/validation/odp_pktio.c >> @@ -619,22 +619,6 @@ static void test_odp_pktio_inq(void) >> CU_ASSERT(odp_pktio_close(pktio) == 0); >> } >> >> -static void test_odp_pktio_outq(void) >> -{ >> - odp_queue_t testq; >> - >> - testq = odp_pktio_outq_getdef(ODP_PKTIO_INVALID); >> - CU_ASSERT(testq == ODP_QUEUE_INVALID); >> -} >> - >> -static void test_odp_pktio_close(void) >> -{ >> - int res; >> - >> - res = odp_pktio_close(ODP_PKTIO_INVALID); >> - CU_ASSERT_EQUAL(res, -1); >> -} >> - >> static int init_pktio_suite(void) >> { >> iface_name[0] = getenv("ODP_PKTIO_IF0"); >> @@ -692,9 +676,7 @@ static int term_pktio_suite(void) >> CU_TestInfo pktio_tests[] = { >> {"pktio open", test_odp_pktio_open}, >> {"pktio lookup", test_odp_pktio_lookup}, >> - {"pktio close", test_odp_pktio_close}, >> {"pktio inq", test_odp_pktio_inq}, >> - {"pktio outq", test_odp_pktio_outq}, >> {"pktio poll queues", test_odp_pktio_poll_queue}, >> {"pktio poll multi", test_odp_pktio_poll_multi}, >> {"pktio sched queues", test_odp_pktio_sched_queue}, >> -- >> 2.1.1 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index a078efe..67e709e 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -619,22 +619,6 @@ static void test_odp_pktio_inq(void) CU_ASSERT(odp_pktio_close(pktio) == 0); } -static void test_odp_pktio_outq(void) -{ - odp_queue_t testq; - - testq = odp_pktio_outq_getdef(ODP_PKTIO_INVALID); - CU_ASSERT(testq == ODP_QUEUE_INVALID); -} - -static void test_odp_pktio_close(void) -{ - int res; - - res = odp_pktio_close(ODP_PKTIO_INVALID); - CU_ASSERT_EQUAL(res, -1); -} - static int init_pktio_suite(void) { iface_name[0] = getenv("ODP_PKTIO_IF0"); @@ -692,9 +676,7 @@ static int term_pktio_suite(void) CU_TestInfo pktio_tests[] = { {"pktio open", test_odp_pktio_open}, {"pktio lookup", test_odp_pktio_lookup}, - {"pktio close", test_odp_pktio_close}, {"pktio inq", test_odp_pktio_inq}, - {"pktio outq", test_odp_pktio_outq}, {"pktio poll queues", test_odp_pktio_poll_queue}, {"pktio poll multi", test_odp_pktio_poll_multi}, {"pktio sched queues", test_odp_pktio_sched_queue},
Behaviour is undefined if an API is passed an invalid handle, so don't test it. Fixes https://bugs.linaro.org/show_bug.cgi?id=1375 Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> --- test/validation/odp_pktio.c | 18 ------------------ 1 file changed, 18 deletions(-)