From patchwork Fri Dec 18 12:01:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 58648 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp979789lbb; Fri, 18 Dec 2015 04:05:47 -0800 (PST) X-Received: by 10.55.73.133 with SMTP id w127mr4309983qka.53.1450440347486; Fri, 18 Dec 2015 04:05:47 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e75si15944000qkh.24.2015.12.18.04.05.47; Fri, 18 Dec 2015 04:05:47 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0B82961615; Fri, 18 Dec 2015 12:05:47 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=DDI3oHMp; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 630EF61662; Fri, 18 Dec 2015 12:03:38 +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 CB94A6161C; Fri, 18 Dec 2015 12:03:32 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by lists.linaro.org (Postfix) with ESMTPS id BE1F46161C for ; Fri, 18 Dec 2015 12:02:11 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id cs9so61861152lbb.1 for ; Fri, 18 Dec 2015 04:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TYxaUoFaHvbiMXMfKXjh6evayYVFtKzY2rKEU2Bp60A=; b=DDI3oHMp3QpKkLW5Ht2L9G+AndnodnlTWTM+4zypWJceR3Fv0AS73y40NcSTRPiyo0 zaySmWbqQnHpbdFPM29k+PAL8M49htdf+spQd9FuQBjGmxGUOq5SE84FTWOXncyYBSnJ NbRdhP6iCt1I9PqCqgUt2fkFTe+3L7VzWEZbk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TYxaUoFaHvbiMXMfKXjh6evayYVFtKzY2rKEU2Bp60A=; b=Jch7Gx17rog6cEK83qITExAF+dJr6R22ViDVyxKDQd5tnbBwlzGi+iq8nT7JgphDgz nAkzwcOviqc0lS0mnWF4eSkx3rEJ9xFwt6ExDbxEvRd57oXXxFhb+5yOFn3+SSzUFND3 9i2zlcv0XrFa+CHRDsUSvMnRuYyJx5mzM32cu9dKaWVrpLkae/oWZife0O2mhYlt5Plp 7yBYGlyrltxyK4KaeN5lh8j3P4PcnDaiR5nJA5FmMIrKcskSGxLLrH5vG0L9t1LcvSou w9Aq6PQ7P+wc1uyJ6TeF9Ty9ytesDH2SiChGQguEyYHzchWzV23WffEb42X3hz6KH5kq bTSw== X-Gm-Message-State: ALoCoQks/F33KWBCeLik08j/UurOOKPZi46TkuOw9EU1UlRC34Ynx81TtrZlLHFBLEBvkdXmzRUpNknLVudHBBOd2zBAAai/ug== X-Received: by 10.112.200.138 with SMTP id js10mr966834lbc.48.1450440130647; Fri, 18 Dec 2015 04:02:10 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id e63sm2731250lfe.5.2015.12.18.04.02.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 04:02:09 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Fri, 18 Dec 2015 14:01:54 +0200 Message-Id: <1450440117-5588-4-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450440117-5588-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1450440117-5588-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [API-NEXT PATCH v5 3/6] validation: time: test time constants in ns X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Signed-off-by: Ivan Khoronzhuk --- test/validation/time/time.c | 10 ++++++++++ test/validation/time/time.h | 1 + 2 files changed, 11 insertions(+) diff --git a/test/validation/time/time.c b/test/validation/time/time.c index 50d9bdc..4040b9f 100644 --- a/test/validation/time/time.c +++ b/test/validation/time/time.c @@ -12,6 +12,15 @@ #define BUSY_LOOP_CNT 30000000 /* used for t > min resolution */ #define BUSY_LOOP_CNT_LONG 12000000000 /* used for t > 4 sec */ +void time_test_odp_constants(void) +{ + uint64_t ns; + + ns = ODP_TIME_SEC_IN_NS / 1000; + CU_ASSERT(ns == ODP_TIME_MSEC_IN_NS); + ns /= 1000; + CU_ASSERT(ns == ODP_TIME_USEC_IN_NS); +} /* check that related conversions come back to the same value */ void time_test_odp_conversion(void) @@ -242,6 +251,7 @@ void time_test_odp_to_u64(void) } odp_testinfo_t time_suite_time[] = { + ODP_TEST_INFO(time_test_odp_constants), ODP_TEST_INFO(time_test_odp_conversion), ODP_TEST_INFO(time_test_monotony), ODP_TEST_INFO(time_test_odp_cmp), diff --git a/test/validation/time/time.h b/test/validation/time/time.h index b0c67b7..3407138 100644 --- a/test/validation/time/time.h +++ b/test/validation/time/time.h @@ -10,6 +10,7 @@ #include /* test functions: */ +void time_test_odp_constants(void); void time_test_odp_conversion(void); void time_test_monotony(void); void time_test_odp_cmp(void);