From patchwork Thu Feb 26 21:34:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 45204 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 00DBE2043C for ; Thu, 26 Feb 2015 21:34:37 +0000 (UTC) Received: by wesu56 with SMTP id u56sf10548106wes.1 for ; Thu, 26 Feb 2015 13:34:36 -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: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=oe07MPJFF0sFUFtMX6OqgvLPivfGtTucnRCxIiwd8K8=; b=XW0xd2AvpdqluVkS0NybyJGphAFBhxi9NY4IPjOxizd5ow8WeUE6yRR8SFnZzOVGOH uNl5z+moxyHSF9H/MGa3XceoVAuVFTScG8tMc3bzJE4W0t2lOcVkchj1rZWhB4yDKjd0 SwZHt1TnkDgtaqdog81TcMsKiEfKwXPqJzaQbix1F6OEGq15FyxsumSX2YukL6lCWeRV VqpZYs/aXuXYlnFz089paNek9lvM6rkPYmc9XFtqz31xKuyekdOxH7JP6sVDQ2JEWWST FtOweF5jffxguBmC9EFqVF1eO3m2ua5/reHok/BKXzi/jqaNaTBYwO1w761gqk4mjrwo Vwpg== X-Gm-Message-State: ALoCoQmYvWyWopeR76UYTev+xw64m7wnChLlPKX3SGwNZoGSj1V25GIH1lyMx+ZVIuWeqbvpYP26 X-Received: by 10.112.50.106 with SMTP id b10mr1587793lbo.8.1424986476270; Thu, 26 Feb 2015 13:34:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.14 with SMTP id t14ls92819laz.61.gmail; Thu, 26 Feb 2015 13:34:36 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr9964253lab.32.1424986476069; Thu, 26 Feb 2015 13:34:36 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ox2si1485830lbc.140.2015.02.26.13.34.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 13:34:36 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lams18 with SMTP id s18so13717191lam.11 for ; Thu, 26 Feb 2015 13:34:36 -0800 (PST) X-Received: by 10.112.167.36 with SMTP id zl4mr9969100lbb.32.1424986475982; Thu, 26 Feb 2015 13:34:35 -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.35.133 with SMTP id h5csp3547204lbj; Thu, 26 Feb 2015 13:34:35 -0800 (PST) X-Received: by 10.140.148.216 with SMTP id 207mr23066833qhu.62.1424986474608; Thu, 26 Feb 2015 13:34:34 -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 p20si2001830qgd.117.2015.02.26.13.34.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Feb 2015 13:34:34 -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 1YR64l-0000KO-2x; Thu, 26 Feb 2015 21:34:31 +0000 Received: from mail-qa0-f53.google.com ([209.85.216.53]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YR64e-0000K0-R4 for lng-odp@lists.linaro.org; Thu, 26 Feb 2015 21:34:24 +0000 Received: by mail-qa0-f53.google.com with SMTP id k15so9983540qaq.12 for ; Thu, 26 Feb 2015 13:34:19 -0800 (PST) X-Received: by 10.140.146.71 with SMTP id 68mr22462469qhs.97.1424986459631; Thu, 26 Feb 2015 13:34:19 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id k11sm1332573qaj.17.2015.02.26.13.34.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 13:34:18 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 26 Feb 2015 16:34:12 -0500 Message-Id: <1424986452-23324-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v3] valididation: errno: add sunnyday test 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: mike.holmes@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.41 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 Call the public APIs for errno in a sunny day configuration. Signed-off-by: Mike Holmes --- test/validation/.gitignore | 1 + test/validation/Makefile.am | 4 +++- test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 test/validation/odp_errno.c diff --git a/test/validation/.gitignore b/test/validation/.gitignore index e419f32..1a69f89 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -16,3 +16,4 @@ odp_pool odp_timer odp_time odp_synchronizers +odp_errno diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index f5bb9ac..fe43084 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -19,7 +19,8 @@ EXECUTABLES = odp_buffer \ odp_system \ odp_synchronizers \ odp_time \ - odp_timer + odp_timer \ + odp_errno COMPILE_ONLY = odp_pktio @@ -57,3 +58,4 @@ dist_odp_timer_SOURCES = odp_timer.c $(ODP_CU_COMMON) dist_odp_pktio_SOURCES = odp_pktio.c $(ODP_CU_COMMON) dist_odp_packet_SOURCES = odp_packet.c $(ODP_CU_COMMON) dist_odp_pool_SOURCES = odp_pool.c $(ODP_CU_COMMON) +dist_odp_errno_SOURCES = odp_errno.c $(ODP_CU_COMMON) diff --git a/test/validation/odp_errno.c b/test/validation/odp_errno.c new file mode 100644 index 0000000..89b99d7 --- /dev/null +++ b/test/validation/odp_errno.c @@ -0,0 +1,28 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "odp_cunit_common.h" + +static void test_odp_errno_sunny_day(void) +{ + int my_errno; + odp_errno_zero(); + my_errno = odp_errno(); + CU_ASSERT_TRUE(my_errno == 0); + odp_errno_print("odp_errno"); + CU_ASSERT_PTR_NOT_NULL(odp_errno_str(my_errno)); +} + +CU_TestInfo test_odp_errno[] = { + {"sunny day", test_odp_errno_sunny_day}, + CU_TEST_INFO_NULL, +}; + +CU_SuiteInfo odp_testsuites[] = { + {"Errno", NULL, NULL, NULL, NULL, test_odp_errno}, + CU_SUITE_INFO_NULL, +};