From patchwork Sun Nov 12 12:00:18 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: 118659 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp689813qgn; Sun, 12 Nov 2017 04:19:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMbjQqEYAaf46u71iUs/fajVjywoYdo1Jz0aLIltWXTwtY47JGehloam0K0GlU5neTU0+tPa X-Received: by 10.200.46.114 with SMTP id s47mr9446267qta.165.1510489145291; Sun, 12 Nov 2017 04:19:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510489145; cv=none; d=google.com; s=arc-20160816; b=R5iEeO8Vg3bkp+6QBGg1uLZWTbIKF5i0BPHfMCAPIRNC/t5SrwpkZ/zCR9s8XVVG50 H2jYY+9pcR4fDaKmHD6NQDBXIIXTonc3Vv8Hr28QaseurnrPlUJw3UEeE//8OOAfSaIT dzc9dW0zUk6U9AT/F/2QxcjZPwz+9tabf8HEq2w3ZQObt5HcL58sZaCwU/ZjR0bTFbrd 8JhQBuvpA3+wL9NlO8sKGGYVPnIY5xyPQZvdtSo3FV4sdXI/qGDWmmMyr85/c24MMhF+ beqTkUptDZIV5XyNC4juucdmDVFTR1iz1uOob5p7MsotFUO/oNOTrRkGFSx5VmPCUJ3X 0iqw== 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=u1n0sQ7etr2ldx7ERhFvk2swHqOniGTBN/wdKAXFtAM=; b=sbhkiq3Zd4gP6ccB0pZJhWMAlLSsjKRCJNovlHf2jFcjncHXjUG2qVnEcNyJu8N8Qm J/vDRqtUMBafXqaJCxBM3WBjUGWLrsZJkKwINCidXmkfMFur3r+9OqaGMt2IG3fls/8t Gt6PYkiek4ZmhCqelriABRfB/w7AATGG5/JpYi2Fd2FlwnCo58VmDkhtW4Q5tkBBFF6J WXITyAC1J6J0KHtTlJiYU84cpdmXoPxfjNej1fN+D6nY2o9b7jeEAGfn2e/aDA/BD/6C 48VG202rhBUuNY3Xz0tvzUCpUzxlResxsdIqchx1Ctics/lWsC6XMzE6sIrUnrQwN5C1 U7PA== 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 t1si473953qkd.359.2017.11.12.04.19.05; Sun, 12 Nov 2017 04:19:05 -0800 (PST) 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 E9D3D60BDC; Sun, 12 Nov 2017 12:19:04 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 AAB0560C51; Sun, 12 Nov 2017 12:02:45 +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 1D9BE60C10; Sun, 12 Nov 2017 12:02:15 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 4B30260AC8 for ; Sun, 12 Nov 2017 12:00:32 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward104o.mail.yandex.net (Yandex) with ESMTP id B6D55707611 for ; Sun, 12 Nov 2017 15:00:30 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9aKzDoteXw-0UrWoUX5; Sun, 12 Nov 2017 15:00:30 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3w91frotLT-0Uv0lgNq; Sun, 12 Nov 2017 15:00:30 +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: Sun, 12 Nov 2017 15:00:18 +0300 Message-Id: <1510488023-21204-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510488023-21204-1-git-send-email-odpbot@yandex.ru> References: <1510488023-21204-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v12 13/18] 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: a908a4dead95321e84d6a8a23de060051dcd8969 ** Merge commit sha: e8722a0cdda227e01e7d308573aec08112d3c5b0 **/ 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));