From patchwork Fri Jan 23 13:41:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 43638 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4889D218DB for ; Fri, 23 Jan 2015 13:42:05 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id s18sf630127lam.2 for ; Fri, 23 Jan 2015 05:42:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=3LmnL6fk2uA046D1BhbVLMcs1axGYCULZ3C3WzzK9Mo=; b=WEXG4ZFGc+Aa+VXS4avXWg6THWlggdkX4BbDFQ4NzIN1rKbtrlNs0wa7IcFtSGAdHB 3nIWuAMywxL+FbzW3ZAS4xGJWSF/zerWi54lpoDnqyBiLFppTqNhz8/oygSJphl2NAi1 x8NOZWLbGI2tt6KnTFS8RlTkv8440flrElI8hf4JRzvumNoGWCqsdS6d+TFqT6Q4o62g sxMLWXaDmtEmNrd4AyMI709mxDbqsEzacbPsuNI6ieGCKmJ1LACMs5brwLzzj8L7Rx8m NU2TAslKaCOXYLYkXd4YeNWXA4Y3BCpJg/bPQey9s8L1Z1suzvqy69LQke0XZitPzy+Q gXWg== X-Gm-Message-State: ALoCoQlwfkP/XSw+p0072/BjsdK3/4GsGGFnPX4H8QVY855Pq2kQV1rvjaMchNSlzfPyrs4kj1Br X-Received: by 10.113.5.170 with SMTP id cn10mr11888lbd.21.1422020523359; Fri, 23 Jan 2015 05:42:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls289459lac.50.gmail; Fri, 23 Jan 2015 05:42:03 -0800 (PST) X-Received: by 10.152.204.67 with SMTP id kw3mr7406018lac.92.1422020523218; Fri, 23 Jan 2015 05:42:03 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id l8si1447194lag.2.2015.01.23.05.42.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 05:42:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id pv20so7306047lab.7 for ; Fri, 23 Jan 2015 05:42:03 -0800 (PST) X-Received: by 10.112.173.202 with SMTP id bm10mr7410950lbc.24.1422020523095; Fri, 23 Jan 2015 05:42:03 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp257005lbb; Fri, 23 Jan 2015 05:42:02 -0800 (PST) X-Received: by 10.140.28.200 with SMTP id 66mr13393803qgz.16.1422020521768; Fri, 23 Jan 2015 05:42:01 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id y12si2063083qaw.1.2015.01.23.05.42.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 23 Jan 2015 05:42:01 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEeUo-00012Y-FH; Fri, 23 Jan 2015 13:41:58 +0000 Received: from mail-oi0-f49.google.com ([209.85.218.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEeUh-000128-Sz for lng-odp@lists.linaro.org; Fri, 23 Jan 2015 13:41:51 +0000 Received: by mail-oi0-f49.google.com with SMTP id a3so6494782oib.8 for ; Fri, 23 Jan 2015 05:41:46 -0800 (PST) X-Received: by 10.202.227.212 with SMTP id a203mr4209800oih.126.1422020506682; Fri, 23 Jan 2015 05:41:46 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id l3sm726340obx.14.2015.01.23.05.41.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jan 2015 05:41:46 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 23 Jan 2015 07:41:36 -0600 Message-Id: <1422020496-4484-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422020496-4484-1-git-send-email-bill.fischofer@linaro.org> References: <1422020496-4484-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] validation: packets: verify offsets can be set to invalid X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer --- test/validation/buffer/odp_packet_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/validation/buffer/odp_packet_test.c b/test/validation/buffer/odp_packet_test.c index d073b49..ceb4ea9 100644 --- a/test/validation/buffer/odp_packet_test.c +++ b/test/validation/buffer/odp_packet_test.c @@ -203,6 +203,14 @@ static void packet_layer_offsets(void) CU_ASSERT(l2_addr != l3_addr); CU_ASSERT(l2_addr != l4_addr); CU_ASSERT(l3_addr != l4_addr); + + /* Set offsets back to invalid */ + odp_packet_l2_offset_set(pkt, ODP_PACKET_OFFSET_INVALID); + CU_ASSERT(odp_packet_l2_offset(pkt) == ODP_PACKET_OFFSET_INVALID); + odp_packet_l3_offset_set(pkt, ODP_PACKET_OFFSET_INVALID); + CU_ASSERT(odp_packet_l3_offset(pkt) == ODP_PACKET_OFFSET_INVALID); + odp_packet_l4_offset_set(pkt, ODP_PACKET_OFFSET_INVALID); + CU_ASSERT(odp_packet_l4_offset(pkt) == ODP_PACKET_OFFSET_INVALID); } static void _verify_headroom_shift(odp_packet_t packet,