From patchwork Fri Nov 3 12:00:13 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: 117895 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3237692edm; Fri, 3 Nov 2017 05:12:41 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SLGPNByt8dn/tc+CyFcTQHwq70ookYXJhlLVwk+Yiqh80zRiLQ28WZhC1S1rcKQ69UnsHi X-Received: by 10.55.20.205 with SMTP id 74mr9075092qku.66.1509711161221; Fri, 03 Nov 2017 05:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509711161; cv=none; d=google.com; s=arc-20160816; b=UkKJgg5zDqjY/J1lK3Htc35dz3gwKNEXixJY1IwO3NPqR5qkccFtKGAIiPJjW0BK1x tnjGGDlVGuVWhcPsSGJ+9UHSdD+WRzbiaSsLXMdo8+sA0UvDXdw8Mde6qrhkuTMkhdYR 0T71nGmwxJ+S4YdM+uPWpK62cyPFQUxht0+YHjaCmXOr3/CD+3CiqSx3zOcghVdYeP8J jSuEcp2v6SUlAnweDS3KjZJGKasJO44UVsqwNFpelN1XYshLv2nK4GxHGQ0XCRkr3ug4 TK6Cr9NOKLnnMLJCrgwrocQT6jNZIygwCm1mum2aeD3lrSjVxaW3bYU/Jtbsq4clVj2W eYOg== 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=BSCS+qBjSLeBNF2AAnxxVNnzOTRhlsmdqUq2tkxz9ZM=; b=whT7W+D6OZRzlhSVjVy2ThEOIFJyUdQSJyIzzpdRUF5kJc3LIEDZ3fzCAsfLNAQZlx eGmJfeV0blCZ1TJjGTszxGSaTySqUdGJAsRBPcT0i/wvc5r4sZrmFw9BRDU5dSGvSwa7 CbDajoqCRBqw2BGyxWbmbET7O0/HfsMe1J9PkZcQZE6nGKXMVI6jrYUwlQLXN6E9HI3D 9sMF33xoyIQqrTUE2Fl71fJmit4cby5tazAF7KAzixexUxepY/z6MA42+DptE6X1aj+z rhgRVlfiw7nPEyElTvr9W86kwzPaJOkyp17z/MpPWxTmguOVpHIQMz5mtYMBMvcSMjds HoZg== 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 t28si335365qth.85.2017.11.03.05.12.40; Fri, 03 Nov 2017 05:12:41 -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 DE68B61009; Fri, 3 Nov 2017 12:12:40 +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,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 1308C610E9; Fri, 3 Nov 2017 12:03:01 +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 B251C6104A; Fri, 3 Nov 2017 12:02:49 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 8816C61018 for ; Fri, 3 Nov 2017 12:00:33 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 6235C5D82C11 for ; Fri, 3 Nov 2017 15:00:32 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wjUeONl9lR-0WVaqECS; Fri, 03 Nov 2017 15:00:32 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 26Ifsfv15U-0VDOdjUG; Fri, 03 Nov 2017 15:00:31 +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: Fri, 3 Nov 2017 15:00:13 +0300 Message-Id: <1509710415-8980-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509710415-8980-1-git-send-email-odpbot@yandex.ru> References: <1509710415-8980-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v6 13/15] 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: d22c949cc466bf28de559855a1cb525740578137 ** Merge commit sha: c7cf7a3e9184b27986b3ddb459d86081b1fca033 **/ 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));