From patchwork Tue Oct 31 16:00:17 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: 117653 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4100976qgn; Tue, 31 Oct 2017 09:09:53 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QuGno0ZzlesNIOTU0zPBJl+wORDgQEIVP0uG0T4KuR4JDvODthKkgCAF67Lo/2LYCTfjti X-Received: by 10.36.25.12 with SMTP id b12mr3859466itb.1.1509466193588; Tue, 31 Oct 2017 09:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509466193; cv=none; d=google.com; s=arc-20160816; b=o/ysCxNFefR5oUdPnSqWOVokwaHOXDfrd+QqbujQODiHz+sPATEuhlVEqICd04EHTK 2T9uqLCbIGBTDr8VdCKKyQMxZNt6bGWi4MMpxFZM4+13Piy5sXQSfq6vSK29w2WGWB4r /glY2n+XdbHCaGvsIZPpzApMnxz/sUMdiBa5ASEGHTrWEuCSFE3U/+20BRFLS3F8NC5Y 1VX/9ZnLvEVTt3X8Rpj8bTJbUN/+Go3/McITfuU5Af4SHUhAQQQsmg+m6kEAB2wY8YBC L+ioq+iBuY7IUm2vu6lTlTCs37ekW2mwelFe0rY44mjSupFooOV+bBsgwzwIgK7zOetS f7Gg== 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=S7NrUsjgUi9spkF9MJXy9xd6olixk8DvEwaBtCdew7E=; b=Yj3W1Dp181fA++Ky3tiBs2mqyv2epFHg6rF5O2ur6BXaq/0duLaLsQaocaDwSxM8NZ OwpbYieBEUTU1pvUL/jJ2vQ3uGUGFQkHnRyJH83EHW9lqjbMi8ltVGojKbQjcKqS3Wv2 ZMu5v9RZ+xPv+7OOYg3psHVOU1bPkCcpLaHY3I9L/1K4EP5D6lft3mBjkMLawsdRnhO5 DBKaBn8KAfU4qlTa13qDbNnjGzRdU55Pwp3tgcroInP/omHPfJiifCnOJY0dg46+PFrs qlAOzzIV6I+akkOx1WDA2hC9eV2NRA2ioYS5MudRKd3v+DY4ftNbcTf0hqC29lbls1JP DHsA== 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 k78si1853980iod.151.2017.10.31.09.09.53; Tue, 31 Oct 2017 09:09:53 -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 C9DB360C11; Tue, 31 Oct 2017 16:09:52 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 D22D561009; Tue, 31 Oct 2017 16:01:36 +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 077A460B2F; Tue, 31 Oct 2017 16:00:43 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 96C3360C16 for ; Tue, 31 Oct 2017 16:00:29 +0000 (UTC) Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 8FB2247204 for ; Tue, 31 Oct 2017 19:00:28 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KjOfxmoC5J-0SrSqXpa; Tue, 31 Oct 2017 19:00:28 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fRI2MH6OIq-0SouJsQi; Tue, 31 Oct 2017 19:00:28 +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, 31 Oct 2017 19:00:17 +0300 Message-Id: <1509465617-2530-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509465617-2530-1-git-send-email-odpbot@yandex.ru> References: <1509465617-2530-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v4 13/13] validation: check that erroneous IPsec packets have error flag set 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 Verify that odp_packet_has_error() returns true for IPsec packets with error status in result. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 243 (lumag:ipsec-packet-impl-3) ** https://github.com/Linaro/odp/pull/243 ** Patch: https://github.com/Linaro/odp/pull/243.patch ** Base sha: 825f75ed8644ef57c5648961e7982daf13cd9375 ** Merge commit sha: edc1f88ae0a1e8cae8a229f024181ded1f17de56 **/ test/validation/api/ipsec/ipsec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index 5883f23e2..045718594 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -739,6 +739,10 @@ void ipsec_check_in_one(const ipsec_test_part *part, odp_ipsec_sa_t sa) CU_ASSERT_EQUAL(0, odp_ipsec_result(&result, pkto[i])); CU_ASSERT_EQUAL(part->out[i].status.error.all, result.status.error.all); + if (result.status.error.all) + CU_ASSERT(odp_packet_has_error(pkto[i])) + else + CU_ASSERT(!odp_packet_has_error(pkto[i])); CU_ASSERT_EQUAL(suite_context.inbound_op_mode == ODP_IPSEC_OP_MODE_INLINE, result.flag.inline_mode); @@ -778,6 +782,10 @@ void ipsec_check_out_one(const ipsec_test_part *part, odp_ipsec_sa_t sa) CU_ASSERT_EQUAL(0, odp_ipsec_result(&result, pkto[i])); CU_ASSERT_EQUAL(part->out[i].status.error.all, result.status.error.all); + if (result.status.error.all) + CU_ASSERT(odp_packet_has_error(pkto[i])) + else + CU_ASSERT(!odp_packet_has_error(pkto[i])); CU_ASSERT_EQUAL(sa, result.sa); CU_ASSERT_EQUAL(IPSEC_SA_CTX, odp_ipsec_sa_context(sa));