From patchwork Tue Oct 24 20:00:11 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: 116995 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp66331qgn; Tue, 24 Oct 2017 13:02:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SP8pVRkUK5VbQcv0aw7+B6282J+GYf9/hOe5KpoAFD8+hUokSdndubu7sjny5s4SV8/kHX X-Received: by 10.200.7.75 with SMTP id k11mr25224255qth.122.1508875328443; Tue, 24 Oct 2017 13:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508875328; cv=none; d=google.com; s=arc-20160816; b=wWiwIcedfKagGMYX48MjL5gtatrn0bIvvtr+QZdepZRbPa4K0QDF/qULLFQ1hOGRbi 2ljoZN5KOcbv6bZeUKl+/0gsokoNgFfbHtWeh0NYLwF+sSbT4RmXpmq6rjyFjtamJlWW hAXZ7FpVPR0lhVtf3jQBmr/HASPNZ2eVCCKNcDv1hnrA81klqXXTGAg5jTohI1WViMYF 27feBdULDEW8kfhrzKczylnuW9t4+DrBVR0FM2YkCrkWQaZx4pC7Mw6QcyLdSvQNaiXb 4vQymCAx6LcspBJ75D1oPrA15UPUBZ460Ghig//m5AI7EOhRKEWmzGWBkZerlK5OxraD zXmw== 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=tdCa4KkeAQeJccnhQJrcoSg1HHKQbLQd5uVL9BWQmh4=; b=f/2KzBKHObACFjmqRHjyw5zA0tXPoTzObZ20w1E/LborbEnBKJTmRgRQRSCDii5S6M OnJT4BdDmt+viYAs8mdbN8fnV3+UVcvqiAMl/NxvNh416ak7+N1SrM4hmQMEIJ3bx/Zq txJMsLSRMsbpeHOa+jT6CwSTk0/DK/Y43Ohm5XsBYx1Py/qLevp+eID7OwpqbOqTNylM Qzrf4X4t0J1zovtZOuHUs80BXdXTDsId9RzFLtmuZgYVk6xJtcyESr2Dw67owDu6EmCm daSNXZx/vRcM2B6syXG8yjyhCMEiEEvDNajN7i7vOA+i5xS/ZGZEwUgYP+yJkjf1hIyZ wOkw== 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 m24si906022qta.192.2017.10.24.13.02.08; Tue, 24 Oct 2017 13:02:08 -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 18AA362937; Tue, 24 Oct 2017 20:02:08 +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 8D94A62934; Tue, 24 Oct 2017 20:01:03 +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 A449262922; Tue, 24 Oct 2017 20:00:53 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id 0F02F6227A for ; Tue, 24 Oct 2017 20:00:51 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 58B565A057E7 for ; Tue, 24 Oct 2017 23:00:49 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7yoy2j5Kpd-0nheQhq9; Tue, 24 Oct 2017 23:00:49 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ISLUajEG9T-0mGGZ1jV; Tue, 24 Oct 2017 23:00:48 +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: Tue, 24 Oct 2017 23:00:11 +0300 Message-Id: <1508875212-29753-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508875212-29753-1-git-send-email-odpbot@yandex.ru> References: <1508875212-29753-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 256 Subject: [lng-odp] [PATCH API-NEXT v2 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: cc282d667b3abb92a45a0f287d68f16850481ba8 **/ 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); }