From patchwork Mon Nov 13 02:00:14 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: 118704 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1270712qgn; Sun, 12 Nov 2017 18:08:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1yF4YXDA9J9bOVC2N30Zo2Zx0HbbXOYYuGHgKypST1DezLg/udCejj7u276hkkNGnGDia X-Received: by 10.55.129.70 with SMTP id c67mr12320615qkd.230.1510538925688; Sun, 12 Nov 2017 18:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510538925; cv=none; d=google.com; s=arc-20160816; b=bD4hymC+h2yWmEsNJqFIVJjhByUuHZmMz4rJyaub76cCAOwQi7SAWlcIxaOY/Y/HtG fDb+5+FOQoF1GGz6p9D4JhUhYShpkas/zimBvQHU1GTegjyiOSmfNiQGECBml+uz8w/Q 1ByZUKT4ePjiNAoHy/oIMHBU0ASTwOstPuev2hW0IRi2WgI2GhSDp3dyVcigH8ghTCfN e8HRIRem7CAw9AKfAj9EBhMpgKTl66KUvSqkB4t6xzNmCt/UAPqj5l5XdBc/kG5e4x1a GHO3yL8js+objnkDv1mW9BWEbiebKfHMd/2oDOoK/msNnCSYUg4AWnmvVNUJZOgVE8mT +Idg== 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=FLdb2eyeb99jcwBdo1ML9rsJdwoiZ0rqBeZTk/Mf0zU=; b=XPMrEHstUJdkW8qvPdhBaQWKAqEuqpwXojoWKpk3krAmULHcxkihqlZt4Ee6qQqUJg qpdj8ddQA6KNQPJ1XFEgFJIb9/b66jS79wbT7sI61eiXXex/SdOabB7rv9mJLk7RNVLg AguXtipdpc+r7PRBLKmjvEwSa7mTgZYAup9bHirarnRNozFYN0YidRleIlfPYfufImPq D2jH5B7249RHZNRcV1X+oVadKTalt5xvjnWqAt5Ujm7tDgm8qcACuaaiRAzuNpnT1+Kn ZYtpJi/3fiUq/xWFa3+nTU2loj8UQXljZI8BuEH2hZEdiGopNNK40mFFLz4aJJcvvtRK hk6A== 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 q42si1153741qtc.106.2017.11.12.18.08.45; Sun, 12 Nov 2017 18:08: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 68FFB60D35; Mon, 13 Nov 2017 02:08: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=-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 1D25B60C36; Mon, 13 Nov 2017 02:02: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 5F2DF60C3E; Mon, 13 Nov 2017 02:02:24 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 66EB060C2F for ; Mon, 13 Nov 2017 02:00:27 +0000 (UTC) Received: from mxback10j.mail.yandex.net (mxback10j.mail.yandex.net [IPv6:2a02:6b8:0:1619::113]) by forward105j.mail.yandex.net (Yandex) with ESMTP id CDFA918E4C5 for ; Mon, 13 Nov 2017 05:00:25 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback10j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wyP0Kybize-0PbuSt6f; Mon, 13 Nov 2017 05:00:25 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uZeq9OjDfk-0PvKeKpD; Mon, 13 Nov 2017 05:00:25 +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 05:00:14 +0300 Message-Id: <1510538419-566-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510538419-566-1-git-send-email-odpbot@yandex.ru> References: <1510538419-566-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 243 Subject: [lng-odp] [PATCH API-NEXT v15 9/14] 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: 44a6636daa5f976c8aac76116e80e0c764352072 **/ 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));