From patchwork Tue Feb 3 00:28:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44178 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9462F202A5 for ; Tue, 3 Feb 2015 00:28:44 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf18120780wgg.0 for ; Mon, 02 Feb 2015 16:28:43 -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=PWmKQXyrvKl/LsvifMZ9V1ZhccmMM6KPKOmAkUabGP8=; b=YoTuVyFZZtYctx6Ezedb+t5Iv4jg0NofOcxMHDTs5+eD5Gvi9vDnDOIvuQwIkDRFRm 1SV6mJoZ0W/LqL49Ipn8UQTHJEq0a4kHO850PJzGmEQxiIdGXMqVYZ/Kh3d+cE4AcYp2 7g0Otr6zlgNBQiS23lMXmjyEsE+PpfjDokAFv008dO7htgapz7LQtFukL+bNG4ehfOIE hOLiRG3bwK+aBHkUGTjz9odXJppfWxJ8gUGZErDqlqkeV9Y5JqJ02tdxys8bd3s6iBlL wJBxiW3po1ZAUt1c+xeVLSnj8YhMTrq9vvILCyomdYrNV+Dm1bOFYW7GopdCFdnL3T92 EF+A== X-Gm-Message-State: ALoCoQnQLGOjVkZdRUKqwFiMPuS5XVP+VKrXZdPp2iLbmPsDh4EgibOJ8jXJd82ysKhwXPMYzao4 X-Received: by 10.180.88.66 with SMTP id be2mr1570853wib.1.1422923323880; Mon, 02 Feb 2015 16:28:43 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.74 with SMTP id r10ls178084lag.17.gmail; Mon, 02 Feb 2015 16:28:43 -0800 (PST) X-Received: by 10.112.44.171 with SMTP id f11mr21823950lbm.65.1422923323717; Mon, 02 Feb 2015 16:28:43 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id m1si18106566lam.44.2015.02.02.16.28.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 16:28:43 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so46507032lab.6 for ; Mon, 02 Feb 2015 16:28:43 -0800 (PST) X-Received: by 10.112.135.196 with SMTP id pu4mr22084469lbb.41.1422923323415; Mon, 02 Feb 2015 16:28:43 -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 h5csp1619480lbj; Mon, 2 Feb 2015 16:28:42 -0800 (PST) X-Received: by 10.224.69.67 with SMTP id y3mr47496391qai.59.1422923322107; Mon, 02 Feb 2015 16:28:42 -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 v47si27041440qgd.77.2015.02.02.16.28.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 16:28:42 -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 1YIRM6-0002O0-CA; Tue, 03 Feb 2015 00:28:38 +0000 Received: from mail-qg0-f48.google.com ([209.85.192.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIRM1-0002Nv-1B for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 00:28:33 +0000 Received: by mail-qg0-f48.google.com with SMTP id z60so50136868qgd.7 for ; Mon, 02 Feb 2015 16:28:27 -0800 (PST) X-Received: by 10.224.14.84 with SMTP id f20mr47155258qaa.43.1422923307820; Mon, 02 Feb 2015 16:28:27 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id j11sm19803421qge.2.2015.02.02.16.28.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Feb 2015 16:28:27 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 2 Feb 2015 19:28:13 -0500 Message-Id: <1422923293-11014-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] validation: add version string check 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.47 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 test for https://bugs.linaro.org/show_bug.cgi?id=1194 Signed-off-by: Mike Holmes --- test/validation/odp_system.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/validation/odp_system.c b/test/validation/odp_system.c index 109bc60..ab1608e 100644 --- a/test/validation/odp_system.c +++ b/test/validation/odp_system.c @@ -4,8 +4,31 @@ * 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)); + + while (*s) { + if (isdigit(*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_sys_cpu_count(void) { @@ -59,6 +82,7 @@ static void test_odp_sys_cpu_hz(void) } CU_TestInfo test_odp_system[] = { + {"odp version", test_odp_version_numbers}, {"odp_sys_cpu_count", test_odp_sys_cpu_count}, {"odp_sys_cache_line_size", test_odp_sys_cache_line_size}, {"odp_sys_cpu_model_str", test_odp_sys_cpu_model_str},