From patchwork Mon Jul 27 17:38:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51562 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 2C9EC22918 for ; Mon, 27 Jul 2015 17:49:47 +0000 (UTC) Received: by laef2 with SMTP id f2sf30151074lae.0 for ; Mon, 27 Jul 2015 10:49:46 -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:cc: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=hX7soGfHTyFHUh57ykv4UMG9IjCFZna9Fdk8ossTQJ4=; b=ikS35zTGd20YvgmG+xBadscJluOLGjMsWJnXnasI1XogCH53VWkVWzmnxBsNgyZQVx Wr5hLVBOOMWXNGD5367f3/S+n8hId6g5ko/1o9/wfYWioWZexfjGFC/7IFhZ1seH6cav e/Lg/GscTB4y90Z8bvzdKESn13jF//tLSXff+/hiurGoY4yD5vAZn/P/SkrW2w2H1Q7P UEF+gqqJywZWbUJ2MMtKQEvd95pZ6XvcqSz0a1Q79XY8AYiDN7lXfgVtKqhTU5LqxRIo MFUpYO5JEvGhfZxOxOIiqwbtskn3Jn+dzLSMC2yAX6qYPt30+QmWnzrHOJGUPv27QpyH F7Jg== X-Gm-Message-State: ALoCoQlSj5jY6rYpeF/ni/FeS6FDMa5GPvGAe5prZO2Cm2TvMF3G6AJ8ZOYJbX/3+KQDIOGOo28A X-Received: by 10.112.173.230 with SMTP id bn6mr12571095lbc.15.1438019386174; Mon, 27 Jul 2015 10:49:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.39 with SMTP id dd7ls706333lac.60.gmail; Mon, 27 Jul 2015 10:49:45 -0700 (PDT) X-Received: by 10.112.170.167 with SMTP id an7mr28245013lbc.103.1438019385952; Mon, 27 Jul 2015 10:49:45 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id sv3si15853341lbc.111.2015.07.27.10.49.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 10:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lafd3 with SMTP id d3so43402868laf.1 for ; Mon, 27 Jul 2015 10:49:45 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr28028084lak.117.1438019385816; Mon, 27 Jul 2015 10:49:45 -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.7.198 with SMTP id l6csp1663406lba; Mon, 27 Jul 2015 10:49:44 -0700 (PDT) X-Received: by 10.140.19.203 with SMTP id 69mr42492038qgh.33.1438019383534; Mon, 27 Jul 2015 10:49:43 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 200si21750149qht.79.2015.07.27.10.49.39; Mon, 27 Jul 2015 10:49:43 -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 54F1261DF3; Mon, 27 Jul 2015 17:49:39 +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_H3, RCVD_IN_MSPIKE_WL, 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 9930E61E20; Mon, 27 Jul 2015 17:40:57 +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 BEFA561DFA; Mon, 27 Jul 2015 17:40:39 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by lists.linaro.org (Postfix) with ESMTPS id F2DBF61DBA for ; Mon, 27 Jul 2015 17:39:27 +0000 (UTC) Received: by lbbqi7 with SMTP id qi7so58392311lbb.3 for ; Mon, 27 Jul 2015 10:39:27 -0700 (PDT) X-Received: by 10.152.8.38 with SMTP id o6mr28382978laa.116.1438018766981; Mon, 27 Jul 2015 10:39:26 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id 4sm4027442lai.36.2015.07.27.10.39.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 10:39:26 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Mon, 27 Jul 2015 19:38:47 +0200 Message-Id: <1438018732-2778-16-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> References: <1438018732-2778-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv3 15/20] validation: scheduler: lib populated 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: christophe.milard@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.49 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 symbols are now exported in the module lib. Signed-off-by: Christophe Milard --- test/validation/scheduler/scheduler.c | 68 +++++++++++++++++------------------ test/validation/scheduler/scheduler.h | 45 +++++++++++++++++++++++ 2 files changed, 79 insertions(+), 34 deletions(-) diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c index d6a4a3e..1bcaee6 100644 --- a/test/validation/scheduler/scheduler.c +++ b/test/validation/scheduler/scheduler.c @@ -78,7 +78,7 @@ static int exit_schedule_loop(void) return ret; } -static void scheduler_test_wait_time(void) +void scheduler_test_wait_time(void) { uint64_t wait_time; @@ -91,7 +91,7 @@ static void scheduler_test_wait_time(void) CU_ASSERT(wait_time > 0); } -static void scheduler_test_num_prio(void) +void scheduler_test_num_prio(void) { int prio; @@ -101,7 +101,7 @@ static void scheduler_test_num_prio(void) CU_ASSERT(prio == odp_schedule_num_prio()); } -static void scheduler_test_queue_destroy(void) +void scheduler_test_queue_destroy(void) { odp_pool_t p; odp_pool_param_t params; @@ -371,25 +371,25 @@ static void parallel_execute(odp_schedule_sync_t sync, int num_queues, } /* 1 queue 1 thread ODP_SCHED_SYNC_NONE */ -static void scheduler_test_1q_1t_n(void) +void scheduler_test_1q_1t_n(void) { schedule_common(ODP_SCHED_SYNC_NONE, ONE_Q, ONE_PRIO, SCHD_ONE); } /* 1 queue 1 thread ODP_SCHED_SYNC_ATOMIC */ -static void scheduler_test_1q_1t_a(void) +void scheduler_test_1q_1t_a(void) { schedule_common(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_ONE); } /* 1 queue 1 thread ODP_SCHED_SYNC_ORDERED */ -static void scheduler_test_1q_1t_o(void) +void scheduler_test_1q_1t_o(void) { schedule_common(ODP_SCHED_SYNC_ORDERED, ONE_Q, ONE_PRIO, SCHD_ONE); } /* Many queues 1 thread ODP_SCHED_SYNC_NONE */ -static void scheduler_test_mq_1t_n(void) +void scheduler_test_mq_1t_n(void) { /* Only one priority involved in these tests, but use the same number of queues the more general case uses */ @@ -397,19 +397,19 @@ static void scheduler_test_mq_1t_n(void) } /* Many queues 1 thread ODP_SCHED_SYNC_ATOMIC */ -static void scheduler_test_mq_1t_a(void) +void scheduler_test_mq_1t_a(void) { schedule_common(ODP_SCHED_SYNC_ATOMIC, MANY_QS, ONE_PRIO, SCHD_ONE); } /* Many queues 1 thread ODP_SCHED_SYNC_ORDERED */ -static void scheduler_test_mq_1t_o(void) +void scheduler_test_mq_1t_o(void) { schedule_common(ODP_SCHED_SYNC_ORDERED, MANY_QS, ONE_PRIO, SCHD_ONE); } /* Many queues 1 thread check priority ODP_SCHED_SYNC_NONE */ -static void scheduler_test_mq_1t_prio_n(void) +void scheduler_test_mq_1t_prio_n(void) { int prio = odp_schedule_num_prio(); @@ -417,7 +417,7 @@ static void scheduler_test_mq_1t_prio_n(void) } /* Many queues 1 thread check priority ODP_SCHED_SYNC_ATOMIC */ -static void scheduler_test_mq_1t_prio_a(void) +void scheduler_test_mq_1t_prio_a(void) { int prio = odp_schedule_num_prio(); @@ -425,7 +425,7 @@ static void scheduler_test_mq_1t_prio_a(void) } /* Many queues 1 thread check priority ODP_SCHED_SYNC_ORDERED */ -static void scheduler_test_mq_1t_prio_o(void) +void scheduler_test_mq_1t_prio_o(void) { int prio = odp_schedule_num_prio(); @@ -433,7 +433,7 @@ static void scheduler_test_mq_1t_prio_o(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_NONE */ -static void scheduler_test_mq_mt_prio_n(void) +void scheduler_test_mq_mt_prio_n(void) { int prio = odp_schedule_num_prio(); @@ -442,7 +442,7 @@ static void scheduler_test_mq_mt_prio_n(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_ATOMIC */ -static void scheduler_test_mq_mt_prio_a(void) +void scheduler_test_mq_mt_prio_a(void) { int prio = odp_schedule_num_prio(); @@ -451,7 +451,7 @@ static void scheduler_test_mq_mt_prio_a(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_ORDERED */ -static void scheduler_test_mq_mt_prio_o(void) +void scheduler_test_mq_mt_prio_o(void) { int prio = odp_schedule_num_prio(); @@ -460,32 +460,32 @@ static void scheduler_test_mq_mt_prio_o(void) } /* 1 queue many threads check exclusive access on ATOMIC queues */ -static void scheduler_test_1q_mt_a_excl(void) +void scheduler_test_1q_mt_a_excl(void) { parallel_execute(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_ONE, ENABLE_EXCL_ATOMIC); } /* 1 queue 1 thread ODP_SCHED_SYNC_NONE multi */ -static void scheduler_test_multi_1q_1t_n(void) +void scheduler_test_multi_1q_1t_n(void) { schedule_common(ODP_SCHED_SYNC_NONE, ONE_Q, ONE_PRIO, SCHD_MULTI); } /* 1 queue 1 thread ODP_SCHED_SYNC_ATOMIC multi */ -static void scheduler_test_multi_1q_1t_a(void) +void scheduler_test_multi_1q_1t_a(void) { schedule_common(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_MULTI); } /* 1 queue 1 thread ODP_SCHED_SYNC_ORDERED multi */ -static void scheduler_test_multi_1q_1t_o(void) +void scheduler_test_multi_1q_1t_o(void) { schedule_common(ODP_SCHED_SYNC_ORDERED, ONE_Q, ONE_PRIO, SCHD_MULTI); } /* Many queues 1 thread ODP_SCHED_SYNC_NONE multi */ -static void scheduler_test_multi_mq_1t_n(void) +void scheduler_test_multi_mq_1t_n(void) { /* Only one priority involved in these tests, but use the same number of queues the more general case uses */ @@ -493,19 +493,19 @@ static void scheduler_test_multi_mq_1t_n(void) } /* Many queues 1 thread ODP_SCHED_SYNC_ATOMIC multi */ -static void scheduler_test_multi_mq_1t_a(void) +void scheduler_test_multi_mq_1t_a(void) { schedule_common(ODP_SCHED_SYNC_ATOMIC, MANY_QS, ONE_PRIO, SCHD_MULTI); } /* Many queues 1 thread ODP_SCHED_SYNC_ORDERED multi */ -static void scheduler_test_multi_mq_1t_o(void) +void scheduler_test_multi_mq_1t_o(void) { schedule_common(ODP_SCHED_SYNC_ORDERED, MANY_QS, ONE_PRIO, SCHD_MULTI); } /* Many queues 1 thread check priority ODP_SCHED_SYNC_NONE multi */ -static void scheduler_test_multi_mq_1t_prio_n(void) +void scheduler_test_multi_mq_1t_prio_n(void) { int prio = odp_schedule_num_prio(); @@ -513,7 +513,7 @@ static void scheduler_test_multi_mq_1t_prio_n(void) } /* Many queues 1 thread check priority ODP_SCHED_SYNC_ATOMIC multi */ -static void scheduler_test_multi_mq_1t_prio_a(void) +void scheduler_test_multi_mq_1t_prio_a(void) { int prio = odp_schedule_num_prio(); @@ -521,7 +521,7 @@ static void scheduler_test_multi_mq_1t_prio_a(void) } /* Many queues 1 thread check priority ODP_SCHED_SYNC_ORDERED multi */ -static void scheduler_test_multi_mq_1t_prio_o(void) +void scheduler_test_multi_mq_1t_prio_o(void) { int prio = odp_schedule_num_prio(); @@ -529,7 +529,7 @@ static void scheduler_test_multi_mq_1t_prio_o(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_NONE multi */ -static void scheduler_test_multi_mq_mt_prio_n(void) +void scheduler_test_multi_mq_mt_prio_n(void) { int prio = odp_schedule_num_prio(); @@ -537,7 +537,7 @@ static void scheduler_test_multi_mq_mt_prio_n(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_ATOMIC multi */ -static void scheduler_test_multi_mq_mt_prio_a(void) +void scheduler_test_multi_mq_mt_prio_a(void) { int prio = odp_schedule_num_prio(); @@ -545,7 +545,7 @@ static void scheduler_test_multi_mq_mt_prio_a(void) } /* Many queues many threads check priority ODP_SCHED_SYNC_ORDERED multi */ -static void scheduler_test_multi_mq_mt_prio_o(void) +void scheduler_test_multi_mq_mt_prio_o(void) { int prio = odp_schedule_num_prio(); @@ -553,13 +553,13 @@ static void scheduler_test_multi_mq_mt_prio_o(void) } /* 1 queue many threads check exclusive access on ATOMIC queues multi */ -static void scheduler_test_multi_1q_mt_a_excl(void) +void scheduler_test_multi_1q_mt_a_excl(void) { parallel_execute(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_MULTI, ENABLE_EXCL_ATOMIC); } -static void scheduler_test_pause_resume(void) +void scheduler_test_pause_resume(void) { odp_queue_t queue; odp_buffer_t buf; @@ -665,7 +665,7 @@ static int create_queues(void) return 0; } -static int scheduler_suite_init(void) +int scheduler_suite_init(void) { odp_cpumask_t mask; odp_shm_t shm; @@ -763,7 +763,7 @@ static int destroy_queues(void) return 0; } -static int scheduler_suite_term(void) +int scheduler_suite_term(void) { odp_pool_t pool; @@ -779,7 +779,7 @@ static int scheduler_suite_term(void) return 0; } -static struct CU_TestInfo scheduler_suite[] = { +CU_TestInfo scheduler_suite[] = { {"schedule_wait_time", scheduler_test_wait_time}, {"schedule_num_prio", scheduler_test_num_prio}, {"schedule_queue_destroy", scheduler_test_queue_destroy}, @@ -813,7 +813,7 @@ static struct CU_TestInfo scheduler_suite[] = { CU_TEST_INFO_NULL, }; -static CU_SuiteInfo scheduler_suites[] = { +CU_SuiteInfo scheduler_suites[] = { {"Scheduler", scheduler_suite_init, scheduler_suite_term, NULL, NULL, scheduler_suite }, diff --git a/test/validation/scheduler/scheduler.h b/test/validation/scheduler/scheduler.h index db0f289..31f02ca 100644 --- a/test/validation/scheduler/scheduler.h +++ b/test/validation/scheduler/scheduler.h @@ -7,6 +7,51 @@ #ifndef _ODP_TEST_SCHEDULER_H_ #define _ODP_TEST_SCHEDULER_H_ +#include + +/* test functions: */ +void scheduler_test_wait_time(void); +void scheduler_test_num_prio(void); +void scheduler_test_queue_destroy(void); +void scheduler_test_1q_1t_n(void); +void scheduler_test_1q_1t_a(void); +void scheduler_test_1q_1t_o(void); +void scheduler_test_mq_1t_n(void); +void scheduler_test_mq_1t_a(void); +void scheduler_test_mq_1t_o(void); +void scheduler_test_mq_1t_prio_n(void); +void scheduler_test_mq_1t_prio_a(void); +void scheduler_test_mq_1t_prio_o(void); +void scheduler_test_mq_mt_prio_n(void); +void scheduler_test_mq_mt_prio_a(void); +void scheduler_test_mq_mt_prio_o(void); +void scheduler_test_1q_mt_a_excl(void); +void scheduler_test_multi_1q_1t_n(void); +void scheduler_test_multi_1q_1t_a(void); +void scheduler_test_multi_1q_1t_o(void); +void scheduler_test_multi_mq_1t_n(void); +void scheduler_test_multi_mq_1t_a(void); +void scheduler_test_multi_mq_1t_o(void); +void scheduler_test_multi_mq_1t_prio_n(void); +void scheduler_test_multi_mq_1t_prio_a(void); +void scheduler_test_multi_mq_1t_prio_o(void); +void scheduler_test_multi_mq_mt_prio_n(void); +void scheduler_test_multi_mq_mt_prio_a(void); +void scheduler_test_multi_mq_mt_prio_o(void); +void scheduler_test_multi_1q_mt_a_excl(void); +void scheduler_test_pause_resume(void); + +/* test arrays: */ +extern CU_TestInfo scheduler_suite[]; + +/* test array init/term functions: */ +int scheduler_suite_init(void); +int scheduler_suite_term(void); + +/* test registry: */ +extern CU_SuiteInfo scheduler_suites[]; + +/* main test program: */ int scheduler_main(void); #endif