From: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>
---
/** Email created from pull request 256 (lumag:ipsec_sa_disable_v2)
 ** https://github.com/Linaro/odp/pull/256
 ** Patch: https://github.com/Linaro/odp/pull/256.patch
 ** Base sha: 825f75ed8644ef57c5648961e7982daf13cd9375
 ** Merge commit sha: ba520d0a3f4c46777c7aedca029e9979a89c69e7
 **/
 test/validation/api/ipsec/ipsec.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/test/validation/api/ipsec/ipsec.c 
b/test/validation/api/ipsec/ipsec.c
index a8fdf2b14..ea385d2ae 100644
--- a/test/validation/api/ipsec/ipsec.c
+++ b/test/validation/api/ipsec/ipsec.c
@@ -315,7 +315,9 @@ void ipsec_sa_param_fill(odp_ipsec_sa_param_t *param,
 void ipsec_sa_destroy(odp_ipsec_sa_t sa)
 {
        odp_event_t event;
-       odp_ipsec_status_t status;
+       odp_packet_t packet;
+       odp_ipsec_packet_result_t result;
+       odp_event_subtype_t subtype;
 
        CU_ASSERT_EQUAL(ODP_IPSEC_OK, odp_ipsec_sa_disable(sa));
 
@@ -324,14 +326,18 @@ void ipsec_sa_destroy(odp_ipsec_sa_t sa)
                        event = odp_queue_deq(suite_context.queue);
                } while (event == ODP_EVENT_INVALID);
 
-               CU_ASSERT_EQUAL(ODP_EVENT_IPSEC_STATUS, odp_event_type(event));
+               CU_ASSERT_EQUAL(ODP_EVENT_PACKET,
+                               odp_event_types(event, &subtype));
+               CU_ASSERT_EQUAL(ODP_EVENT_PACKET_IPSEC,
+                               subtype);
 
-               CU_ASSERT_EQUAL(ODP_IPSEC_OK, odp_ipsec_status(&status, event));
+               packet  = odp_ipsec_packet_from_event(event);
 
-               CU_ASSERT_EQUAL(ODP_IPSEC_STATUS_SA_DISABLE, status.id);
-               CU_ASSERT_EQUAL(sa, status.sa);
-               CU_ASSERT_EQUAL(0, status.result);
-               CU_ASSERT_EQUAL(0, status.warn.all);
+               CU_ASSERT_EQUAL(0, odp_ipsec_result(&result, packet));
+
+               CU_ASSERT_EQUAL(sa, result.sa);
+               CU_ASSERT_EQUAL(1, result.status.error.sa_disabled);
+               CU_ASSERT_EQUAL(0, result.status.warn.all);
 
                odp_event_free(event);
        }

Reply via email to