From patchwork Fri Jul 3 11:49:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50622 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3550C22916 for ; Fri, 3 Jul 2015 11:51:04 +0000 (UTC) Received: by wguu7 with SMTP id u7sf29385903wgu.0 for ; Fri, 03 Jul 2015 04:51:03 -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:delivered-to:from:to:date :message-id:in-reply-to:references:cc: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=2IbngNY8/SxMXxtkckEJljqCoFftNHC/uAo/DKc/J0I=; b=BBiRl1hL34aGiNV7mfnpbVxpC6XqkJm5jqUz0EgyPhwUu+//q53Z/mNJNFuk0Nlrpk 3t0HuVjHFgu/PQe7NJF1Z/GTvwAPCAJxXceEWjERDl3seisu/MKwIx04Gilt8vvwwHAW AE6XEtdUvtyME7yQeu2ewBzPBr17RolYeQNAHXL9/w7gsXGJFM15+RaLskKuSk5Zv+nk qqp/pU22NAWC/6VTBaRhs6/vEHM+Mhd17UVgcgnMnsC/mkiX5CKLKDotPiQJSLzpvny3 D9OAQug9RuetdDOJJHKFEKkFWUQiV0ALvF33mFkr063+faq04tzyxRvGxPLSqwpm3+78 rsaA== X-Gm-Message-State: ALoCoQmN1+/xhdOhdlOOo3zrMUMJZ9bXwt4tVK0RCqy3BHY8jZ0mNIixhmk6sxUhQ9xHJxNxDP+p X-Received: by 10.152.27.130 with SMTP id t2mr22518004lag.2.1435924263548; Fri, 03 Jul 2015 04:51:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.65 with SMTP id o1ls487085laj.108.gmail; Fri, 03 Jul 2015 04:51:03 -0700 (PDT) X-Received: by 10.112.40.99 with SMTP id w3mr23315315lbk.55.1435924263397; Fri, 03 Jul 2015 04:51:03 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id i6si7030408lai.30.2015.07.03.04.51.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2015 04:51:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lagx9 with SMTP id x9so82321430lag.1 for ; Fri, 03 Jul 2015 04:51:03 -0700 (PDT) X-Received: by 10.152.5.167 with SMTP id t7mr30119464lat.112.1435924263217; Fri, 03 Jul 2015 04:51:03 -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.108.230 with SMTP id hn6csp1131628lbb; Fri, 3 Jul 2015 04:51:02 -0700 (PDT) X-Received: by 10.140.194.72 with SMTP id p69mr53654260qha.1.1435924261746; Fri, 03 Jul 2015 04:51:01 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c93si4174446qgd.5.2015.07.03.04.50.31; Fri, 03 Jul 2015 04:51:01 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 918666204B; Fri, 3 Jul 2015 11:50:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B13F96204C; Fri, 3 Jul 2015 11:50:00 +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 0863D61DB1; Fri, 3 Jul 2015 11:49:57 +0000 (UTC) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) by lists.linaro.org (Postfix) with ESMTPS id C51D061D30 for ; Fri, 3 Jul 2015 11:49:55 +0000 (UTC) Received: by laar3 with SMTP id r3so82385452laa.0 for ; Fri, 03 Jul 2015 04:49:54 -0700 (PDT) X-Received: by 10.112.140.9 with SMTP id rc9mr35778577lbb.14.1435924194783; Fri, 03 Jul 2015 04:49:54 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id w6sm2271047lbs.37.2015.07.03.04.49.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jul 2015 04:49:53 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 3 Jul 2015 13:49:34 +0200 Message-Id: <1435924179-30967-2-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435924179-30967-1-git-send-email-christophe.milard@linaro.org> References: <1435924179-30967-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 1/6] validation: single src for odp_ver_abt_log_dbg X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@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.51 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 ODP API module odp_ver_abt_log_dbg used to contain both tests for Errno and System, and was therefore originaly split in 3 main source files (Errno, system, and a main). As Errno tests have now been separated, there is no reason for having two source files any longer. This patch just concatenate the system tests (system.c) and the main (odp_ver_abt_log_dbg.c) in the main, so that a single source file remains. Signed-off-by: Christophe Milard --- test/validation/Makefile.am | 3 +- test/validation/ver_abt_log_dbg/odp_system.c | 94 ---------------------- test/validation/ver_abt_log_dbg/odp_system.h | 9 --- .../ver_abt_log_dbg/odp_ver_abt_log_dbg.c | 87 +++++++++++++++++++- 4 files changed, 87 insertions(+), 106 deletions(-) delete mode 100644 test/validation/ver_abt_log_dbg/odp_system.c delete mode 100644 test/validation/ver_abt_log_dbg/odp_system.h diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 7add2e6..9fe977e 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -20,8 +20,7 @@ odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_timer_SOURCES = odp_timer.c odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg -dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ - ver_abt_log_dbg/odp_ver_abt_log_dbg.c +dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_ver_abt_log_dbg.c ODP_MODULES = buffer \ classification \ diff --git a/test/validation/ver_abt_log_dbg/odp_system.c b/test/validation/ver_abt_log_dbg/odp_system.c deleted file mode 100644 index 5185a71..0000000 --- a/test/validation/ver_abt_log_dbg/odp_system.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2014, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include "odp.h" -#include "odp_cunit_common.h" -#include "test_debug.h" - -static void test_odp_version_numbers(void) -{ - int char_ok; - char version_string[128]; - char *s = version_string; - - strncpy(version_string, odp_version_api_str(), - sizeof(version_string)-1); - - while (*s) { - if (isdigit((int)*s) || (strncmp(s, ".", 1) == 0)) { - char_ok = 1; - s++; - } else { - char_ok = 0; - LOG_DBG("\nBAD VERSION=%s\n", version_string); - break; - } - } - CU_ASSERT(char_ok); -} - -static void test_odp_cpu_count(void) -{ - int cpus; - - cpus = odp_cpu_count(); - CU_ASSERT(0 < cpus); -} - -static void test_odp_sys_cache_line_size(void) -{ - uint64_t cache_size; - - cache_size = odp_sys_cache_line_size(); - CU_ASSERT(0 < cache_size); - CU_ASSERT(ODP_CACHE_LINE_SIZE == cache_size); -} - -static void test_odp_sys_cpu_model_str(void) -{ - char model[128]; - - snprintf(model, 128, "%s", odp_sys_cpu_model_str()); - CU_ASSERT(strlen(model) > 0); - CU_ASSERT(strlen(model) < 127); -} - -static void test_odp_sys_page_size(void) -{ - uint64_t page; - - page = odp_sys_page_size(); - CU_ASSERT(0 < page); - CU_ASSERT(ODP_PAGE_SIZE == page); -} - -static void test_odp_sys_huge_page_size(void) -{ - uint64_t page; - - page = odp_sys_huge_page_size(); - CU_ASSERT(0 < page); -} - -static void test_odp_sys_cpu_hz(void) -{ - uint64_t hz; - - hz = odp_sys_cpu_hz(); - CU_ASSERT(0 < hz); -} - -CU_TestInfo test_odp_system[] = { - {"odp version", test_odp_version_numbers}, - {"odp_cpu_count", test_odp_cpu_count}, - {"odp_sys_cache_line_size", test_odp_sys_cache_line_size}, - {"odp_sys_cpu_model_str", test_odp_sys_cpu_model_str}, - {"odp_sys_page_size", test_odp_sys_page_size}, - {"odp_sys_huge_page_size", test_odp_sys_huge_page_size}, - {"odp_sys_cpu_hz", test_odp_sys_cpu_hz}, - CU_TEST_INFO_NULL, -}; diff --git a/test/validation/ver_abt_log_dbg/odp_system.h b/test/validation/ver_abt_log_dbg/odp_system.h deleted file mode 100644 index ce99bed..0000000 --- a/test/validation/ver_abt_log_dbg/odp_system.h +++ /dev/null @@ -1,9 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "odp_cunit_common.h" - -extern CU_TestInfo test_odp_system[]; diff --git a/test/validation/ver_abt_log_dbg/odp_ver_abt_log_dbg.c b/test/validation/ver_abt_log_dbg/odp_ver_abt_log_dbg.c index 59297a6..b462e8d 100644 --- a/test/validation/ver_abt_log_dbg/odp_ver_abt_log_dbg.c +++ b/test/validation/ver_abt_log_dbg/odp_ver_abt_log_dbg.c @@ -4,9 +4,94 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include "odp_cunit_common.h" -#include "odp_system.h" +#include "test_debug.h" + +static void test_odp_version_numbers(void) +{ + int char_ok; + char version_string[128]; + char *s = version_string; + + strncpy(version_string, odp_version_api_str(), + sizeof(version_string) - 1); + + while (*s) { + if (isdigit((int)*s) || (strncmp(s, ".", 1) == 0)) { + char_ok = 1; + s++; + } else { + char_ok = 0; + LOG_DBG("\nBAD VERSION=%s\n", version_string); + break; + } + } + CU_ASSERT(char_ok); +} + +static void test_odp_cpu_count(void) +{ + int cpus; + + cpus = odp_cpu_count(); + CU_ASSERT(0 < cpus); +} + +static void test_odp_sys_cache_line_size(void) +{ + uint64_t cache_size; + + cache_size = odp_sys_cache_line_size(); + CU_ASSERT(0 < cache_size); + CU_ASSERT(ODP_CACHE_LINE_SIZE == cache_size); +} + +static void test_odp_sys_cpu_model_str(void) +{ + char model[128]; + + snprintf(model, 128, "%s", odp_sys_cpu_model_str()); + CU_ASSERT(strlen(model) > 0); + CU_ASSERT(strlen(model) < 127); +} + +static void test_odp_sys_page_size(void) +{ + uint64_t page; + + page = odp_sys_page_size(); + CU_ASSERT(0 < page); + CU_ASSERT(ODP_PAGE_SIZE == page); +} + +static void test_odp_sys_huge_page_size(void) +{ + uint64_t page; + + page = odp_sys_huge_page_size(); + CU_ASSERT(0 < page); +} + +static void test_odp_sys_cpu_hz(void) +{ + uint64_t hz; + + hz = odp_sys_cpu_hz(); + CU_ASSERT(0 < hz); +} + +CU_TestInfo test_odp_system[] = { + {"odp version", test_odp_version_numbers}, + {"odp_cpu_count", test_odp_cpu_count}, + {"odp_sys_cache_line_size", test_odp_sys_cache_line_size}, + {"odp_sys_cpu_model_str", test_odp_sys_cpu_model_str}, + {"odp_sys_page_size", test_odp_sys_page_size}, + {"odp_sys_huge_page_size", test_odp_sys_huge_page_size}, + {"odp_sys_cpu_hz", test_odp_sys_cpu_hz}, + CU_TEST_INFO_NULL, +}; CU_SuiteInfo odp_testsuites[] = { {"System Info", NULL, NULL, NULL, NULL, test_odp_system},