From patchwork Sun Mar 8 22:52:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 45519 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A0D0214AE for ; Sun, 8 Mar 2015 22:53:25 +0000 (UTC) Received: by lbvn10 with SMTP id n10sf9853736lbv.1 for ; Sun, 08 Mar 2015 15:53:24 -0700 (PDT) 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=fA1UfvNX9zoRCrS9G532IXHJadMFM/3LLGYm5TdDxUA=; b=GbitzPT4zNTX/AcALkSYxiuqP4Nx0cyWpwcJpM6AplQD8KjCe8hCPTJN8nSZ104K+j 3VFQL5wIlqJsaY3A+biZ5uzQ1iO0vfbFUKLiOV6mV7u9NYZ9gqVyAC92oEe9irFZM3Hv dP7Q56LtE+GFL90gQT5g657yZxIn1Ao3tNtRnc2RA0Ttfu3tJuLuDtSPWx7Hj5q9gtUh cKdb/0jqUStffClx28X8Ex3IIuHZ7tPXpuj7nxlxflfRGQxEdpkCW1CZ9gX4kYXCEoVx pJiXCNV+dQZSoKlrSVc2mQ+d+SIIsEpqbIMA8qNFQqOD0bWno3XtAwEy01jhMpEujAE9 C20A== X-Gm-Message-State: ALoCoQmaw6FRts87hgmUX5N3PXeUNT0aaPtQjg/zDsEuToSqM4s3pVlkxtJjFr3Uxe6mvXz/b6Oy X-Received: by 10.112.40.81 with SMTP id v17mr3477907lbk.5.1425855204266; Sun, 08 Mar 2015 15:53:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.199 with SMTP id le7ls280445lab.89.gmail; Sun, 08 Mar 2015 15:53:24 -0700 (PDT) X-Received: by 10.112.155.98 with SMTP id vv2mr22988425lbb.121.1425855204094; Sun, 08 Mar 2015 15:53:24 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id z6si799311lbn.106.2015.03.08.15.53.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Mar 2015 15:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lams18 with SMTP id s18so6895695lam.2 for ; Sun, 08 Mar 2015 15:53:23 -0700 (PDT) X-Received: by 10.112.147.104 with SMTP id tj8mr23134619lbb.106.1425855203669; Sun, 08 Mar 2015 15:53:23 -0700 (PDT) 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.35.133 with SMTP id h5csp1137249lbj; Sun, 8 Mar 2015 15:53:23 -0700 (PDT) X-Received: by 10.55.24.160 with SMTP id 32mr32637150qky.23.1425855202533; Sun, 08 Mar 2015 15:53:22 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 140si16662568qhd.80.2015.03.08.15.53.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 08 Mar 2015 15:53:22 -0700 (PDT) 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 1YUk4V-0000kG-PT; Sun, 08 Mar 2015 22:53:19 +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 1YUk4I-0000ix-9B for lng-odp@lists.linaro.org; Sun, 08 Mar 2015 22:53:06 +0000 Received: by oifu20 with SMTP id u20so26252537oif.11 for ; Sun, 08 Mar 2015 15:53:01 -0700 (PDT) X-Received: by 10.202.220.9 with SMTP id t9mr18281209oig.102.1425855181028; Sun, 08 Mar 2015 15:53:01 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id ku2sm10720711obc.12.2015.03.08.15.53.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Mar 2015 15:53:00 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 8 Mar 2015 17:52:47 -0500 Message-Id: <1425855170-4191-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425855170-4191-1-git-send-email-bill.fischofer@linaro.org> References: <1425855170-4191-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 4/7] validation: packet: add unit tests for strong type display functions 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.54 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/odp_packet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/validation/odp_packet.c b/test/validation/odp_packet.c index 10a38ba..8f764bf 100644 --- a/test/validation/odp_packet.c +++ b/test/validation/odp_packet.c @@ -75,6 +75,8 @@ static void packet_alloc_free(void) CU_ASSERT(odp_packet_len(packet) == packet_len); CU_ASSERT(odp_event_type(odp_packet_to_event(packet)) == ODP_EVENT_PACKET); + CU_ASSERT(odp_packet_to_u64(packet) != + odp_packet_to_u64(ODP_PACKET_INVALID)); /* Pool should have only one packet */ CU_ASSERT_FATAL(odp_packet_alloc(pool, packet_len) @@ -387,6 +389,8 @@ static void packet_segments(void) CU_ASSERT(seg_data != NULL); CU_ASSERT(seg_buf_addr != NULL); CU_ASSERT(seg_data >= seg_buf_addr); + CU_ASSERT(odp_packet_seg_to_u64(seg) != + odp_packet_seg_to_u64(ODP_PACKET_SEG_INVALID)); buf_len += seg_buf_len; data_len += seg_data_len;