From patchwork Fri Jul 10 00:44:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51006 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7888D22A14 for ; Fri, 10 Jul 2015 00:54:36 +0000 (UTC) Received: by wipp2 with SMTP id p2sf749846wip.2 for ; Thu, 09 Jul 2015 17:54: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: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=yyoBAA+wwFEIS2VaD6YFbHmN+BnNKZZE00DQLG4Gd1A=; b=KjuVqcZEKunS+Y+IGFk7Yz/v5RMzKOB4DvxNP8TyOnyj9lZa8wlrfRKTWB4mQVJSwS YYqELMnf47iDaGVIUEvGm+eS62H4QjpFVofXhz+Cvd1WdH12OP7tQVw/AY+nuR7jBwdj jRHcUe1oSVO9RudGljA5AutuAPAO4OtDiPb8GtQvFGdTWglWJqLlwDBzSu7ErV6w23ug 5+8JeNyTxbNMDlbtVFm19kjmaw+55uXa4LjTEGtsrtErGExYbNLPxqIOkGcE1tDtLTh8 xf7rpgJMGgeKyKucv5Hrj8L9dHfHgyOn0lhNbuWx1GDGG2R8FRVsVHqGaUy/8AD5qalo MpHA== X-Gm-Message-State: ALoCoQmGXKAtc0ISsgIasjGgW3/Fg37SVJErt0D95GUFtZ2aH11M2r1T6KSvsEtseY/ecfQd2OT4 X-Received: by 10.180.216.12 with SMTP id om12mr347013wic.1.1436489675813; Thu, 09 Jul 2015 17:54:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls1069387lab.16.gmail; Thu, 09 Jul 2015 17:54:35 -0700 (PDT) X-Received: by 10.152.170.165 with SMTP id an5mr17517748lac.100.1436489675653; Thu, 09 Jul 2015 17:54:35 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id m5si5853891laf.170.2015.07.09.17.54.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagc2 with SMTP id c2so253280095lag.3 for ; Thu, 09 Jul 2015 17:54:35 -0700 (PDT) X-Received: by 10.152.1.66 with SMTP id 2mr15820434lak.56.1436489675539; Thu, 09 Jul 2015 17:54:35 -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 hn6csp1013756lbb; Thu, 9 Jul 2015 17:54:34 -0700 (PDT) X-Received: by 10.140.202.84 with SMTP id x81mr26111794qha.50.1436489674068; Thu, 09 Jul 2015 17:54:34 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n27si5594534qkh.32.2015.07.09.17.54.33; Thu, 09 Jul 2015 17:54:34 -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 59A2F61D9E; Fri, 10 Jul 2015 00:54:33 +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 2299B620A3; Fri, 10 Jul 2015 00:47:06 +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 E48CD6207B; Fri, 10 Jul 2015 00:46:36 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 6F08762089 for ; Fri, 10 Jul 2015 00:44:54 +0000 (UTC) Received: by lagc2 with SMTP id c2so253189678lag.3 for ; Thu, 09 Jul 2015 17:44:53 -0700 (PDT) X-Received: by 10.152.37.102 with SMTP id x6mr17245441laj.69.1436489093399; Thu, 09 Jul 2015 17:44:53 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id o18sm1936473lbg.1.2015.07.09.17.44.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 17:44:52 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Fri, 10 Jul 2015 02:44:23 +0200 Message-Id: <1436489068-8929-13-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> References: <1436489068-8929-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 12/17] 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.42 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 e03af13..87e88fe 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; @@ -370,25 +370,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 */ @@ -396,19 +396,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(); @@ -416,7 +416,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(); @@ -424,7 +424,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(); @@ -432,7 +432,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(); @@ -441,7 +441,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(); @@ -450,7 +450,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(); @@ -459,32 +459,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 */ @@ -492,19 +492,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(); @@ -512,7 +512,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(); @@ -520,7 +520,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(); @@ -528,7 +528,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(); @@ -536,7 +536,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(); @@ -544,7 +544,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(); @@ -552,13 +552,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; @@ -663,7 +663,7 @@ static int create_queues(void) return 0; } -static int scheduler_suite_init(void) +int scheduler_suite_init(void) { odp_shm_t shm; odp_pool_t pool; @@ -760,7 +760,7 @@ static int destroy_queues(void) return 0; } -static int scheduler_suite_term(void) +int scheduler_suite_term(void) { odp_pool_t pool; @@ -776,7 +776,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}, @@ -810,7 +810,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 f2d5795..4ccf226 100644 --- a/test/validation/scheduler/scheduler.h +++ b/test/validation/scheduler/scheduler.h @@ -4,4 +4,49 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#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 registery: */ +extern CU_SuiteInfo scheduler_suites[]; + +/* main test program: */ int scheduler_main(void);