From patchwork Fri Jul 24 11:27:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 51428 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 9FCED20323 for ; Fri, 24 Jul 2015 11:39:04 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf6557624lbc.1 for ; Fri, 24 Jul 2015 04:39:03 -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=nTD0ujoqlc19JFOuw3ZIuJkkjnoStXBknBdSAYY1IE0=; b=QcWpl+/uXbnJ0UNtPtkrHxVYeu2K8Qcx+F2ZdIv8LONkPomI36Z5ByR7AESc20p+y7 EOFgGcHlXVs+Gb2ISSWS5+MXkRk4SBg6PVG7VdvQIwJ7ObfyVLtcHps5t9frPsNFswZ5 8Z37f6LIjLZj3YMamDf0oSy6k1Zfvv9gXkHLQlLIIMSaIser9NcnpeOI9cgLKlpRjbtN 48j5F0qM7jfJktvW2t0nE3SbdFPu7K1gQPaarUX0Dtf9VcdxUKV4pCR4U9J5aH3+/9qs 1ip/sYOvcQyc/pi6/UeesrO+96XpkgmVw19w7LLF71X1AeVzfBSIVKviX1IB4kJTat0O AR+w== X-Gm-Message-State: ALoCoQkkS6nZQCSMQnnK6PkD6mgfLkgJgRG2JZZTXKjasYltzVQXde25GGnVElTV1p8wyR/xdELm X-Received: by 10.194.5.229 with SMTP id v5mr6035794wjv.0.1437737943581; Fri, 24 Jul 2015 04:39:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.116 with SMTP id v20ls372531lal.22.gmail; Fri, 24 Jul 2015 04:39:03 -0700 (PDT) X-Received: by 10.152.224.162 with SMTP id rd2mr13144698lac.43.1437737943342; Fri, 24 Jul 2015 04:39:03 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id mq6si7291778lbc.79.2015.07.24.04.39.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 04:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbbzr7 with SMTP id zr7so13401954lbb.1 for ; Fri, 24 Jul 2015 04:39:03 -0700 (PDT) X-Received: by 10.152.1.66 with SMTP id 2mr13478347lak.56.1437737943195; Fri, 24 Jul 2015 04:39:03 -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 l6csp1119406lba; Fri, 24 Jul 2015 04:39:02 -0700 (PDT) X-Received: by 10.140.93.78 with SMTP id c72mr19483836qge.105.1437737941715; Fri, 24 Jul 2015 04:39:01 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o103si9682242qko.32.2015.07.24.04.38.59; Fri, 24 Jul 2015 04:39:01 -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 B047061B1D; Fri, 24 Jul 2015 11:38:59 +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 B5BCF61D8B; Fri, 24 Jul 2015 11:30:15 +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 58B7461D7D; Fri, 24 Jul 2015 11:30:10 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by lists.linaro.org (Postfix) with ESMTPS id 90B7961C8F for ; Fri, 24 Jul 2015 11:28:21 +0000 (UTC) Received: by lagw2 with SMTP id w2so12260998lag.3 for ; Fri, 24 Jul 2015 04:28:20 -0700 (PDT) X-Received: by 10.152.36.196 with SMTP id s4mr13254586laj.10.1437737300509; Fri, 24 Jul 2015 04:28:20 -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 y1sm1582274lal.39.2015.07.24.04.28.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 04:28:20 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org Date: Fri, 24 Jul 2015 13:27:34 +0200 Message-Id: <1437737259-16953-16-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> References: <1437737259-16953-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 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.217.177 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 48522bb..53e5fdd 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; @@ -373,25 +373,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 */ @@ -399,19 +399,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(); @@ -419,7 +419,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(); @@ -427,7 +427,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(); @@ -435,7 +435,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(); @@ -444,7 +444,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(); @@ -453,7 +453,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(); @@ -462,32 +462,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 */ @@ -495,19 +495,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(); @@ -515,7 +515,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(); @@ -523,7 +523,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(); @@ -531,7 +531,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(); @@ -539,7 +539,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(); @@ -547,7 +547,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(); @@ -555,13 +555,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; @@ -667,7 +667,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; @@ -764,7 +764,7 @@ static int destroy_queues(void) return 0; } -static int scheduler_suite_term(void) +int scheduler_suite_term(void) { odp_pool_t pool; @@ -780,7 +780,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}, @@ -814,7 +814,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..84db112 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 registery: */ +extern CU_SuiteInfo scheduler_suites[]; + +/* main test program: */ int scheduler_main(void); #endif