From patchwork Thu Jul 2 10:45:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hongbo.zhang@freescale.com X-Patchwork-Id: 50567 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 80CF0214B3 for ; Thu, 2 Jul 2015 10:48:36 +0000 (UTC) Received: by lbbpo10 with SMTP id po10sf12332662lbb.1 for ; Thu, 02 Jul 2015 03:48:35 -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:mime-version:subject:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=z6g0A8kyv2xybHdJBDHkRwdRdt2CGRHZVfC4RbfhRuk=; b=mc0qqt8zRImOB2ruP/RjutJvpOkKMHuwIsl2A9E1gbrQUnPQhWA1WrUGJ5Xwe/Z6Uh Boc5mW/ISYpS5HxVJBKhjkLJLhglWflQKuYKtocduvQjL7/l+WZFc/ouTYivtNbIiJuj YPqD4m9wqOm1QRWsOwhNA9VMCT0Ubs55ZIY4lrSvysm6xoNxiEMLj6hcQb3qWHO8oRyj CME06WVAfV9DRN+v/L4/J95+sU8XYZE2aG8XKHNupH4ICquUq3ZWLcoDccBQi7qS+ljP kXR1uATes3Y4ym5xM1kOSaiuNZpeQxA8XX1htg6yqvO17cVlho/EvxQG2NSz+HSrMDlJ LJJw== X-Gm-Message-State: ALoCoQn2rFy5Y62xl2U6Ly8wRQrH8eG+tKwSM1ujU44bdIaBOUVkDGDPT3XdCyQ1XqTqJa0XwKBL X-Received: by 10.194.175.36 with SMTP id bx4mr19675575wjc.1.1435834115471; Thu, 02 Jul 2015 03:48:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.206 with SMTP id q14ls270960lal.58.gmail; Thu, 02 Jul 2015 03:48:35 -0700 (PDT) X-Received: by 10.152.27.74 with SMTP id r10mr30276169lag.31.1435834115208; Thu, 02 Jul 2015 03:48:35 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id ws3si4138876lbb.70.2015.07.02.03.48.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 03:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbpo10 with SMTP id po10so29430536lbb.3 for ; Thu, 02 Jul 2015 03:48:34 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr29757996lbp.88.1435834114781; Thu, 02 Jul 2015 03:48:34 -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 hn6csp386514lbb; Thu, 2 Jul 2015 03:48:33 -0700 (PDT) X-Received: by 10.55.15.144 with SMTP id 16mr61622831qkp.98.1435834113468; Thu, 02 Jul 2015 03:48:33 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i106si5890094qgi.6.2015.07.02.03.48.32; Thu, 02 Jul 2015 03:48:33 -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 9B01361E50; Thu, 2 Jul 2015 10:48:32 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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 391ED61F6A; Thu, 2 Jul 2015 10:45:54 +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 8361961E50; Thu, 2 Jul 2015 10:45:38 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0139.outbound.protection.outlook.com [157.56.110.139]) by lists.linaro.org (Postfix) with ESMTPS id B13DB615AF for ; Thu, 2 Jul 2015 10:45:36 +0000 (UTC) Received: from DM2PR03CA0032.namprd03.prod.outlook.com (10.141.96.31) by BY2PR03MB288.namprd03.prod.outlook.com (10.242.37.27) with Microsoft SMTP Server (TLS) id 15.1.207.12; Thu, 2 Jul 2015 10:45:35 +0000 Received: from BY2FFO11FD046.protection.gbl (2a01:111:f400:7c0c::110) by DM2PR03CA0032.outlook.office365.com (2a01:111:e400:2428::31) with Microsoft SMTP Server (TLS) id 15.1.201.16 via Frontend Transport; Thu, 2 Jul 2015 10:45:34 +0000 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD046.mail.protection.outlook.com (10.1.15.170) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Thu, 2 Jul 2015 10:45:34 +0000 Received: from hongbo.ap.freescale.net (hongbo.ap.freescale.net [10.193.20.1]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t62AjPm4012040; Thu, 2 Jul 2015 03:45:33 -0700 From: To: Date: Thu, 2 Jul 2015 18:45:23 +0800 Message-ID: <1435833923-28361-6-git-send-email-hongbo.zhang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435833923-28361-1-git-send-email-hongbo.zhang@freescale.com> References: <1435833923-28361-1-git-send-email-hongbo.zhang@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD046; 1:ipgyX77PcnCWE8C8P1WUbU0u0G05bRMHqi27lMwhI3QwuH/ni08uUK1hONb9jCKRX52T7CiNWBAGnBysEh+z80/qLMoX3lK1ccGBZAcaF0kqKip6fl2qLOn0a6IzUCz28TnIW3Dglg989L47gmm8TNhU9F6HMei71HCtHiFAl3SWeiVt4bgJ5oGB5bbdTHNYli4aWjIp11xTkEY8aKjLHhDWrf0ZmhoD2OgP9UdcVW69Cx/EcaK/QivdhUy8TlQ1MsSed/Uv1g1RownEK89GVlPLLSwTHv15ZwTRCRbPqD2r2iACiCDIgtH7GrUCG0PQ X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(76176999)(106466001)(92566002)(2351001)(50986999)(229853001)(104016003)(50466002)(5001960100002)(77096005)(110136002)(77156002)(36756003)(2950100001)(46102003)(62966003)(86152002)(19580405001)(85426001)(87936001)(19580395003)(33646002)(6806004)(48376002)(105606002)(86362001)(47776003)(189998001)(50226001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB288; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 2:UmbO2+7GP2uLteA4IeG2nvlMXMn/8t/IED0YbXC9f3+RSRIrspgaq6h+anVsVmei; 3:1UhT7/RE+yXkEHK1QQnRoxT77GGv810dralKFnk2phawHUCnlCdBVatwFrE0iirGDebrk/Qr8ai1X32+WZA6WD7geC+b4EKJk7byanVutGzt7wS7Rfg88/o6aG0lAExZ/+HIkFGgv5wSKpK7WVGEJ4owlqKmHhcs1DDRo/ILWcEHJPieysqzE7yQA4SrbnuvXFjGAhxKIHfc33qTeyDRBaOGbDAGPf3ij3mMWIcK/Us=; 25:7mHYx2wLYHBKsNHPKdIhyfOofd5m6RoGO2yZRwqgyJOgUAkO2dVDog7nuSP1tIwG+dT+n0zr5IAjOpVKwgvsj2H1KF2dkaXVlyARQxVhoP1aln1KddIgSROKjNCtMSJdTi2idi0nk/gHmXLA4yAheKenpSsBf6tJzvwHCovP44JdGdIuC1qreiDAcXRXmtsdJuwe4ltTknfBGpX4YchZr86lawLFkrxYVIEBNor1JqxE4rMfagnGVradRmddmGN6NtnirYtCCGuhnRPkKj+Wbg==; 20:HmsAyNHPQUooW8OrRuH01b7n3XNFFY/HTgWwCbKpTLYRkko0j3fkRnPZT2oag/s6xHKo8s9PxgdpXBzsdZyipHUxRW028Q0Lan+4jO3pePWVOgBaKXdrTxbcc5reUYCMRZ1qoUCS/86CXO80+pn4iOy1aG5WwdB1adZAiX1OJ8HggrZHe+GzxuRlI9dytdr+/eTnycD77Tb5sq7GEJyVx6nkip+I4c0005493NeFK+/PyRYkJ57icgIIg8PnVaNR3IbWUI/h9fqIaOJJGdeQsOPPGBtUDKYa0/LvA78bv5160FjqAIvq1iunhuh/3HskBBKrWtUfll0QEolg2eg6Qn6+YnfAOJ0uZtIgcy9PErw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB288; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY2PR03MB288; BCL:0; PCL:0; RULEID:; SRVR:BY2PR03MB288; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 4:038rw+wIl+7N7Y/rgHpNg8pfg51tAvsf8ld4rvCaBMM9Jq0gCJ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xghZ8DZhFB6XTyUFh+wvhVDbVI/VEGXLYmkBDEIxUGEdmvCbx5J7DnNND5DE8oApcQEknidelwNKaFkOLD9XHzi2WbaELZaf4NzROlA3uwEM+v0quRMGCRwBjp2oOMwSLOgqnwa6wfbEC+34z/CbpdUlRPPFDp9A3mRLAUw= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 5:xr43k+YpuwobizGRHYKq57Nvr770dNikwg7NGlsQkQdxW9zcIwC4HJSNA/uwfLU68s26QogeXd9J7DdbS09iSre2Q/Y6UqC6TnCbuJAwtHktILDlZ6CmakZR7O8Jr8Ti7a5oirrFtYWWYxgCLYshBQ==; 24:L557QJS6hRz1VVxLRR194nhwzbbyG+NVbCXunrjJS9LNpopJoVqsjqt3IbG0b2I+7H0zfrhC+33ztPqM8zEAYk+I6XDLMhNK4zX9DcFRVtY=; 20:9NRpf5BKAGlQMwdWg9P0JlQ3YN2EY9Z8W4effQfxIiZ6RALk5qubE1knH3+IHwKWo2ngEqauVfgzT3aISbaHGQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2015 10:45:34.5249 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB288 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v2 5/5] validation: add test for new per_CPU system APIs 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@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.217.169 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 From: Hongbo Zhang This patch adds test for the newly introduced per-CPU system APIs: odp_sys_cpu_model_str_amp() odp_sys_cpu_hz_amp() odp_sys_cpu_hz_current() Signed-off-by: Hongbo Zhang --- test/validation/ver_abt_log_dbg/odp_system.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/validation/ver_abt_log_dbg/odp_system.c b/test/validation/ver_abt_log_dbg/odp_system.c index 5185a71..1e5205c 100644 --- a/test/validation/ver_abt_log_dbg/odp_system.c +++ b/test/validation/ver_abt_log_dbg/odp_system.c @@ -57,6 +57,15 @@ static void test_odp_sys_cpu_model_str(void) CU_ASSERT(strlen(model) < 127); } +static void test_odp_sys_cpu_model_str_amp(void) +{ + char model[128]; + + snprintf(model, 128, "%s", odp_sys_cpu_model_str_amp(0)); + CU_ASSERT(strlen(model) > 0); + CU_ASSERT(strlen(model) < 127); +} + static void test_odp_sys_page_size(void) { uint64_t page; @@ -82,13 +91,32 @@ static void test_odp_sys_cpu_hz(void) CU_ASSERT(0 < hz); } +static void test_odp_sys_cpu_hz_amp(void) +{ + uint64_t hz; + + hz = odp_sys_cpu_hz_amp(0); + CU_ASSERT(0 < hz); +} + +static void test_odp_sys_cpu_hz_current(void) +{ + uint64_t hz; + + hz = odp_sys_cpu_hz_current(); + 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_cpu_model_str_amp", test_odp_sys_cpu_model_str_amp}, {"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}, + {"odp_sys_cpu_hz_amp", test_odp_sys_cpu_hz_amp}, + {"odp_sys_cpu_hz_current", test_odp_sys_cpu_hz_current}, CU_TEST_INFO_NULL, };