From patchwork Wed Oct 25 09:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117024 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp605871qgn; Wed, 25 Oct 2017 02:01:35 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RlnwzKKwMy/JeDflzYjLZ7XVtYEVqKcpdpHj4Ka/JQz44EfConfeuJAjXDo8aedDEMESUc X-Received: by 10.200.24.231 with SMTP id o36mr7806865qtk.91.1508922094972; Wed, 25 Oct 2017 02:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508922094; cv=none; d=google.com; s=arc-20160816; b=XQNK9GNRjB/AvtPgTxn9HP03rmOEJ/Mw9ybRXCKH/4UhNHW1HPb/FwHtpYkTgk8UIu 72EAjBj7WGzDusOJB4Vbn7xn7ADn4KcE0ij0h1+aBg93fZ7vGP8rfGrzA9d5SUnHbRYS N5qMcQTCWz2BydlHzMaD5QDC2gpGRSfVHRPKfj9uLekGdlEhLFgfxaWQnxB/LT5JPdXg VrqpMMWwcraiw5yI1OqHeIJagv610EMPlojhc2akLJ7Ed926ypwdyzHngybW4DPODgFq 6P1tx4XrVks971sMWYwQ90s0kDCur5SEEE8eT82114WxwADhsk40xuWb83ZpDW/B3lxk JIaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=BNM/BEEgdCJq8AlFBupydt+u1+rgAS4r7Qhe9y/wuDg=; b=yEBLg8g+KP/NvNolRBLbrfCagVoCWb8TuVcme8+DuQoLAmbzrxtApJqLcD02Mr38LC 0nHyEPZ6LFjtIt+5Fo/svOBeTYOAmJhpUkF6zhTrhJVMs4iClYR5yUV7cQQyHmapZJji HqkC8iBwgs7cXNd3Xl9N1p76IAcK0e6v1vtTQelcvUpfeIFwx5+IriNHReO87RtZn4yB 5i9HBUPu9YBf41lDRCEgQLHBfBIyU+kBIWtGbjD145vBpKc+XvaFhhkl6ZnDEaInEC1B i9UJVA1R8hfniUE2/QcYJXqWHTk+Rov6xxAoL7I+rga78lkAnVd5oIUFS1AD14p834WB LsHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id w18si1936840qtj.11.2017.10.25.02.01.34; Wed, 25 Oct 2017 02:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A2313615AC; Wed, 25 Oct 2017 09:01:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 32BD862875; Wed, 25 Oct 2017 09:00:46 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F260A6227A; Wed, 25 Oct 2017 09:00:37 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 7F7C961018 for ; Wed, 25 Oct 2017 09:00:35 +0000 (UTC) Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward104p.mail.yandex.net (Yandex) with ESMTP id EB607186535 for ; Wed, 25 Oct 2017 12:00:33 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id tmslmfa9f6-0WaSYbia; Wed, 25 Oct 2017 12:00:33 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id XHnwxaWkV5-0Wf0WRkc; Wed, 25 Oct 2017 12:00:32 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 25 Oct 2017 12:00:06 +0300 Message-Id: <1508922007-30582-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508922007-30582-1-git-send-email-odpbot@yandex.ru> References: <1508922007-30582-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 256 Subject: [lng-odp] [PATCH API-NEXT v4 2/3] validation: ipsec: adapt to odp_ipsec_sa_disable() change X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** 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); }