From patchwork Sun Nov 12 00:00:12 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: 118631 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp256844qgn; Sat, 11 Nov 2017 16:09:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMYYz+6JlkvRToahIj6f8mGIjKVbhblWvc0AXcu7Z4qnZFIMEjtAYfdjx9584b7N1JDV8Qpg X-Received: by 10.55.75.75 with SMTP id y72mr7262820qka.118.1510445386383; Sat, 11 Nov 2017 16:09:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510445386; cv=none; d=google.com; s=arc-20160816; b=pCHpcO2XSG2ladQXgz84OKXLx+iyD9nKY/9L3EUQbE3toveBlo3pp5rUKUa+CDaouu 8hMEx+Gbe99zK4+w/diNN3rqTXDZ71/wfWXY9awFtdWbfiIdluSQVU/m0SqBa97roM7Y FmwdyNy6TNZudoepEmJ67mkzdqyzlA4zlG5pqOkOxsuVksK+SzsRhYR2GURyBhK/AN/A /JUIUdpbZwzlBRhoIVYrB8x2aHfHlOHep5riuIzX+YXZ2ywfgFfnhomDIamcqkreQPTE 1fBOpNo3L07A951mm12mYJceIW2KEm5Tl3vK+zID9Th07RmRKB5k+gxx+L7CvbZ3l3qm fUog== 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=lV6zXIT9vbO98h/toDv/Rnh6rzHsMltV/LBjFOIsdwU=; b=HcG0EtD+XylgrUs4nbGMCTieSVue5Cq+qVZ0HXpSPqlTRCeXgjGO2x4wid5BFBgLI9 akuDHlZnJukYJkzM/+Eb4cJwMMZAuebEHIoONTpEW+1th25+1/WSfCT73RFTqxrCkge7 Mt9m/rHfg75nLW0/rV0t54Y8fIFUA+LtsqaQavyJKgsQAUNZQ9xsUaqqB1Q4/3LXS1ud Ewu2Qq5u0UOaCiJaKPFT867xEaStZeA0qGdGmwc9GzT0kDEBnKQyzbe3FHP0qQG0GrGP 9VmKOmTh/amyFt9SBG0IA6Y6Hkxr5L9nEPGlIypy0hOTXkXKA/yvVRqOW9mYZxj2mfAo CSmg== 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 o95si11868337qte.464.2017.11.11.16.09.46; Sat, 11 Nov 2017 16:09:46 -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 EFDF660A51; Sun, 12 Nov 2017 00:09:45 +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 29E9C60996; Sun, 12 Nov 2017 00:01:24 +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 20D2260804; Sun, 12 Nov 2017 00:01:16 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 882B960996 for ; Sun, 12 Nov 2017 00:00:25 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 0EDB451031B1 for ; Sun, 12 Nov 2017 03:00:24 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rSUqLVl7u1-0NKaCoL7; Sun, 12 Nov 2017 03:00:23 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id VxCtJulSk2-0NWGAFqP; Sun, 12 Nov 2017 03:00:23 +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 03:00:12 +0300 Message-Id: <1510444815-25058-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510444815-25058-1-git-send-email-odpbot@yandex.ru> References: <1510444815-25058-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v8 13/16] 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: 9ff682c8d0315f3f1921d5b9fe13d62897c78710 ** Merge commit sha: 38c770f1444aeb3ede5313b7304a1161277ae0b5 **/ 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));