From patchwork Tue Feb 24 19:49:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B498C2029F for ; Tue, 24 Feb 2015 19:49:55 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf18824530lbi.0 for ; Tue, 24 Feb 2015 11:49:54 -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=aCLethWOhsoVNzpajtc+/bnjZKiqJkoDU5ewLDE8h88=; b=B17XcAvTT3OzmqXxxkJMXzsofh5rqccoM0gc3qEzE3QCYGD7liuzgf+pwQqUgT6MNW yMfCyzm/Pbi4RMH95n+Vw/EUdHK/PdAZR7wn0Pb4oHCQ6S9fltOiyNwdVrpjZ3cRzjJl wCPQVgchav991dioMHk1ig+kIRdM6TGY4E742NmaSOVIxNKWpXnb8DtXlWxIRmpRmxz9 TDgIexwWxqrBYOeHoaSgdfW69wjS2NBCXNilsycMCyKBzPDHbB9/75KU7mq0kmjU4lTG VboQdlKesxEZ4/h6A3iwy70M9up/hLLL/hmL/9PiKpSi1inHiHx1IHk4NrxRGj4gFu7u QFsA== X-Gm-Message-State: ALoCoQljzGiTU0P4H5gA00mT1B5fwleoGZrOPtF97z3xv8S9L4H5g3aZAky5dkR+y5xpSqIrGJZo X-Received: by 10.180.81.34 with SMTP id w2mr2359863wix.2.1424807394401; Tue, 24 Feb 2015 11:49:54 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.104 with SMTP id ln8ls663592lac.94.gmail; Tue, 24 Feb 2015 11:49:54 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr12219046lab.32.1424807394200; Tue, 24 Feb 2015 11:49:54 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id u17si12947406laz.82.2015.02.24.11.49.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 11:49:54 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lams18 with SMTP id s18so28183462lam.11 for ; Tue, 24 Feb 2015 11:49:54 -0800 (PST) X-Received: by 10.152.203.194 with SMTP id ks2mr8276986lac.88.1424807394059; Tue, 24 Feb 2015 11:49:54 -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 h5csp2137258lbj; Tue, 24 Feb 2015 11:49:53 -0800 (PST) X-Received: by 10.229.4.4 with SMTP id 4mr40043074qcp.8.1424807392438; Tue, 24 Feb 2015 11:49:52 -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 18si26372666qhd.85.2015.02.24.11.49.50 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 11:49:52 -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 1YQLUJ-0005d4-UC; Tue, 24 Feb 2015 19:49:47 +0000 Received: from mail-qg0-f47.google.com ([209.85.192.47]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQLUE-0005b8-OW for lng-odp@lists.linaro.org; Tue, 24 Feb 2015 19:49:42 +0000 Received: by mail-qg0-f47.google.com with SMTP id q107so32018188qgd.6 for ; Tue, 24 Feb 2015 11:49:37 -0800 (PST) X-Received: by 10.140.20.23 with SMTP id 23mr37618143qgi.40.1424807377481; Tue, 24 Feb 2015 11:49:37 -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 g51sm21733537qgg.23.2015.02.24.11.49.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Feb 2015 11:49:36 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 24 Feb 2015 14:49:30 -0500 Message-Id: <1424807370-6257-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v2 2/2] 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.43 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 --- v2 Just check for null string pointer test/validation/.gitignore | 1 + test/validation/Makefile.am | 5 +++-- test/validation/odp_errno.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 test/validation/odp_errno.c diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 197b094..9c2ff37 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -14,3 +14,4 @@ odp_buffer odp_timer odp_time odp_synchronizers +odp_errno diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index f9d7d7a..f808aba 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -6,17 +6,18 @@ AM_LDFLAGS += -static TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} if test_vald -TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification +TESTS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno endif dist_bin_SCRIPTS = $(srcdir)/odp_pktio_run -bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification +bin_PROGRAMS = odp_init odp_init_abort odp_init_log odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers odp_classification odp_errno odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer odp_classification_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/classification dist_odp_init_SOURCES = odp_init.c +dist_odp_errno_SOURCES = odp_errno.c common/odp_cunit_common.c dist_odp_init_abort_SOURCES = odp_init_abort.c dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c dist_odp_queue_SOURCES = odp_queue.c common/odp_cunit_common.c 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, +};