From patchwork Mon Nov 13 14:00:25 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: 118773 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1849407qgn; Mon, 13 Nov 2017 06:18:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMZicjh4I72XCArv1zVucF2SK6Ra/H1pgfjZxzsb5ygx/Rgm4fM2bnNx6ps0NKV5uRiRRdkc X-Received: by 10.55.187.199 with SMTP id l190mr13587482qkf.149.1510582725330; Mon, 13 Nov 2017 06:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510582725; cv=none; d=google.com; s=arc-20160816; b=noUkVP+HnQf2OU/khb1r9O5lWWZMDQurq5bbqvTxDPMkw/xQvycJiQwP3lhQzWRP7A L+bASd7qfrwZhiNPqiXgja9GEabH/8DMxrkv24217A66fEGxd4qypWmKfNJjbWAjNsOG A9/g3QI3Xo2pLg59jJnL1XkFyIplMLYy/6S3ue8ybNbL3BKwbymHp2EJh8VJ/X0SlYp/ YzYTuj2R3KsHiNtk/CZTxhSQREWB2wEojtYw7/80/1+NhM423Jng6QwlAZuAlQsRJ+RK AYC30lhMTmUj1BaPKf5Bj1jifObBozJpWLQnPv/3LLeOhvaUCAUQ2ChHUnNPff1pq4wr 387g== 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=yPsZ7/WwURoJDTC6RPyHmhndVQZt3ldPYD3WiVwDlNU=; b=kGeqbVzWMBzy1F4z13gCfYgawEhcjIgFWWg9/FkC5vQ8ewv7Jkcf0AQtBeMZNTA+q0 /C+fBVpOeRCNoLtk78tl2ld6zx9FZVy26zOisF3qitnS1/7CijKzwZYsaEfoYgT1Zxqo oj72GqmpHqk7eu8n3FgVXPId/wIwTCoWSlyQzwyG2I0SaidrQYNzPHZZTDFuvtLke31i P/uqi/YA9LCNPLWrYeWHchrysgKMAY3YbC7X6mIETmoLkeASN6qxOF9N/Mqt8GmKQa/2 iUxqnOSjqoRO2dUjeq3tv7N5cjkRk2Mu1zdYPnzgfC4kNueN+8HIOWyDub2M0BMcumdE l4PA== 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 l13si1344245qtf.336.2017.11.13.06.18.45; Mon, 13 Nov 2017 06:18:45 -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 041A860C64; Mon, 13 Nov 2017 14:18:44 +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 AE411610AF; Mon, 13 Nov 2017 14:02:50 +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 A440F60D73; Mon, 13 Nov 2017 14:01:44 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id C1B3160C47 for ; Mon, 13 Nov 2017 14:00:38 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 63920408197F for ; Mon, 13 Nov 2017 17:00:37 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id a5dz4M2DWH-0bgu5Ccv; Mon, 13 Nov 2017 17:00:37 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 955rfAmciQ-0akeSJgJ; Mon, 13 Nov 2017 17:00:36 +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: Mon, 13 Nov 2017 17:00:25 +0300 Message-Id: <1510581630-13993-12-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510581630-13993-1-git-send-email-odpbot@yandex.ru> References: <1510581630-13993-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v16 11/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: a908a4dead95321e84d6a8a23de060051dcd8969 ** Merge commit sha: 845914564f2d99792452ac22a524279f44496a1d **/ test/validation/api/ipsec/ipsec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index 853bd88a9..6c5623580 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -613,6 +613,8 @@ 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); + CU_ASSERT(!result.status.error.all == + !odp_packet_has_error(pkto[i])); CU_ASSERT_EQUAL(suite_context.inbound_op_mode == ODP_IPSEC_OP_MODE_INLINE, result.flag.inline_mode); @@ -652,6 +654,8 @@ 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); + CU_ASSERT(!result.status.error.all == + !odp_packet_has_error(pkto[i])); CU_ASSERT_EQUAL(sa, result.sa); CU_ASSERT_EQUAL(IPSEC_SA_CTX, odp_ipsec_sa_context(sa));