From patchwork Wed Jul 8 21:20:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 50914 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C5BDE213FD for ; Wed, 8 Jul 2015 21:21:24 +0000 (UTC) Received: by wifm2 with SMTP id m2sf33654324wif.1 for ; Wed, 08 Jul 2015 14:21:24 -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: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=DKiy4v2v2rqnnYJaSdC68u8F7Zne2fq1hqLQvoCpkPM=; b=YEL8kgdA1SivC2WuN28xCxzHOST7QID4loJsmy35TWayy3R8rK7WYEUO6/EFRxitFX Shkx6xDgZOOymhHPcfijFM/qkJG84neyL+2KRirNDSkm1yEvYaXv9Sux35nSeOMcP318 Bd4t3f0fdUjjXmaWaoN6dIXQPB4x0BFdSayuiPQhhdlcbiYJVDixzaetcVIki4HZZ52s AiVLdhUxrLD7xvtXJonE6zLW3WhvPGAsRalSc9n8FQ02crGZtc1dx0t81i9GfEAIG0ZB Vay4W0ZrpdoqDIiX2Ak0ZqWMngZvYzQ8MCB2rOHZPDhGic/SFxHNonedmbKcefYnammp Jyhw== X-Gm-Message-State: ALoCoQn4h6sYHlqGwjgEPOlUFhCAlw6SVLNnYqrNhzQSQ72wd5bkQLC5fLO3Mo08Gsv/oGYsPdNm X-Received: by 10.112.91.166 with SMTP id cf6mr5929726lbb.8.1436390483659; Wed, 08 Jul 2015 14:21:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.136 with SMTP id q8ls1093699laj.91.gmail; Wed, 08 Jul 2015 14:21:23 -0700 (PDT) X-Received: by 10.112.189.1 with SMTP id ge1mr11613524lbc.10.1436390483507; Wed, 08 Jul 2015 14:21:23 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id t9si2667623laj.106.2015.07.08.14.21.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 14:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagc2 with SMTP id c2so231006933lag.3 for ; Wed, 08 Jul 2015 14:21:23 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr11473603laj.88.1436390483304; Wed, 08 Jul 2015 14:21:23 -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 hn6csp223899lbb; Wed, 8 Jul 2015 14:21:21 -0700 (PDT) X-Received: by 10.55.23.17 with SMTP id i17mr19516930qkh.39.1436390474309; Wed, 08 Jul 2015 14:21:14 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f60si4453456qgf.106.2015.07.08.14.21.13; Wed, 08 Jul 2015 14:21:14 -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 1EFDA61B45; Wed, 8 Jul 2015 21:21:13 +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_H2, 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 376BE61D15; Wed, 8 Jul 2015 21:20:45 +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 EF0306182C; Wed, 8 Jul 2015 21:20:42 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) by lists.linaro.org (Postfix) with ESMTPS id 272516182C for ; Wed, 8 Jul 2015 21:20:42 +0000 (UTC) Received: by qgeg89 with SMTP id g89so106636095qge.3 for ; Wed, 08 Jul 2015 14:20:42 -0700 (PDT) X-Received: by 10.140.104.148 with SMTP id a20mr19618993qgf.89.1436390441919; Wed, 08 Jul 2015 14:20:41 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id b66sm1908261qkh.36.2015.07.08.14.20.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 14:20:41 -0700 (PDT) From: Mike Holmes To: christophe.milard@linaro.org, lng-odp@lists.linaro.org Date: Wed, 8 Jul 2015 17:20:34 -0400 Message-Id: <1436390434-23769-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436390434-23769-1-git-send-email-mike.holmes@linaro.org> References: <1436390434-23769-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/2] validation: thread: test thrmask 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: 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.45 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 Signed-off-by: Mike Holmes --- test/validation/thread/thread.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/validation/thread/thread.c b/test/validation/thread/thread.c index d0bd75e..d5609a2 100644 --- a/test/validation/thread/thread.c +++ b/test/validation/thread/thread.c @@ -11,6 +11,37 @@ /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} +static void thread_test_odp_thred_type(void) +{ + odp_thread_type_t t_type; + + t_type = odp_thread_type(); + if ((t_type != ODP_THREAD_WORKER) && + (t_type != ODP_THREAD_CONTROL)) + CU_FAIL(); + + CU_PASS(); +} + +static void thread_test_odp_thrmask_worker(void) +{ + odp_thrmask_t t_type; + + (void)odp_thrmask_worker(&t_type); + + CU_PASS(); +} + + +static void thread_test_odp_thrmask_control(void) +{ + odp_thrmask_t t_type; + + (void)odp_thrmask_control(&t_type); + + CU_PASS(); +} + static void thread_test_odp_cpu_id(void) { (void)odp_cpu_id(); @@ -33,6 +64,9 @@ static CU_TestInfo thread_suite[] = { _CU_TEST_INFO(thread_test_odp_cpu_id), _CU_TEST_INFO(thread_test_odp_thread_id), _CU_TEST_INFO(thread_test_odp_thread_count), + _CU_TEST_INFO(thread_test_odp_thred_type), + _CU_TEST_INFO(thread_test_odp_thrmask_worker), + _CU_TEST_INFO(thread_test_odp_thrmask_control), CU_TEST_INFO_NULL, };