From patchwork Mon Dec 14 18:58:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 58361 Delivered-To: patch@linaro.org Received: by 10.112.73.68 with SMTP id j4csp1666990lbv; Mon, 14 Dec 2015 11:00:34 -0800 (PST) X-Received: by 10.55.71.76 with SMTP id u73mr45817697qka.6.1450119634128; Mon, 14 Dec 2015 11:00:34 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z81si36132496qka.2.2015.12.14.11.00.33; Mon, 14 Dec 2015 11:00:34 -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 456E5610A8; Mon, 14 Dec 2015 19:00:33 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=i4pf+oEs; 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 ECCFE61D27; Mon, 14 Dec 2015 18:59: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 287F261CF5; Mon, 14 Dec 2015 18:58:56 +0000 (UTC) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by lists.linaro.org (Postfix) with ESMTPS id 2FDE061C9E for ; Mon, 14 Dec 2015 18:58:28 +0000 (UTC) Received: by lbpu9 with SMTP id u9so105918426lbp.2 for ; Mon, 14 Dec 2015 10:58:27 -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=i4pf+oEsOpdDtL61FFDm8NPm5B/WPrgW7BBdFLDvcCULLGwWt9EAq/or6gtC2FlYYp B9GLOSZ8snpVtXZuWdgrmc4Fe+uTaP70ox1aXMDiEo7rc7S/5FC2u5YAYpNEay9ekBcB ICVYSCmk6YpiPo4XyzL3Rd0eSq37/9lfLWVZQ= 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=CGTFgAR2UdWbz0okcF1Q4BX4BkgCfwmCFc6eyBNm1UYeTpRz/R003kNIY5yYRSjWK0 kgoUOjbfN9XtnefZ+iPJzoqsYD11Y8ZKdynRqMGgVvqI4qYUnEnA4FiyxQvvNtjRVpVo JLma8WZItHghj3mBRb+6qZXf00Pi9maHWgQ/KmVmsJvN8R2vq25rFi6cMIQI0Jfyhjd0 cV35NZnhyOmScy1ORHMCD03ec8ntvTg5wqK2RLU6+VfRoCL9j2RfFAwofom3Byvxtpjl s5prBabOURj1SwgFgiCQxzNupF/zbrapGq7bZ6vOZyH3/udJQ+33LauyjU8CcbQ+6J/+ I+xg== X-Gm-Message-State: ALoCoQlaU37Y0yjjRDXAkKJNW9vpLIFpQdK//xOxEjTHB6E8waoqEHE0nOaTo6hykX0U/dKoS5omcuN2ZMNv3la5pYIvH4NEpA== X-Received: by 10.112.159.227 with SMTP id xf3mr4049454lbb.59.1450119506943; Mon, 14 Dec 2015 10:58:26 -0800 (PST) Received: from localhost.localdomain ([212.90.60.8]) by smtp.gmail.com with ESMTPSA id o5sm5609246lbw.16.2015.12.14.10.58.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 10:58:25 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Mon, 14 Dec 2015 20:58:13 +0200 Message-Id: <1450119496-21604-4-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450119496-21604-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1450119496-21604-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 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);