From patchwork Tue Apr 14 19:59:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 47150 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E87542121F for ; Tue, 14 Apr 2015 20:00:20 +0000 (UTC) Received: by layy10 with SMTP id y10sf5123960lay.0 for ; Tue, 14 Apr 2015 13:00:19 -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: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=+zGnJLoKafQoNyReukMSpRJonrQdm9S2t2lkd0bMURg=; b=LO2wY9La0meD5HkryhaUbclIF03pclscuQTK+E2c2VIBS8s+iQnQV8Eo/PkOMuG2zB hFRzcnm6+TCg9OjZ/DoT47TAA46BMUg4NRby2rj3A7tCHTM4wCy5uYxVHhuvbZUJfR1u 2qhmWrhOnZCHHDsAp22DU/S+HNgyVNuLuYAqJbEm3Nqsl29hof1n/HD7b6Qy/7pSuuac AsqLWvc4YxMg/c38+yuQ2aw5u6j945MHYmbsPgp96ENgI5suR3WhSjU7dOpxSjxRQN/T FWKEkLf+stCcb4QvUgVwzvSzfmgMh96eT2KArIoIxFPt6XYK7yoQTVksBZpGJt4NZpCo gJtQ== X-Gm-Message-State: ALoCoQm4AHkFI04Gw2yS4LPlreLRDbK7QpMk82FkwCpPkwz/K+kpH2y0eaRJJS9Inacepn9MO1// X-Received: by 10.152.3.70 with SMTP id a6mr3666893laa.0.1429041619778; Tue, 14 Apr 2015 13:00:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.2 with SMTP id x2ls103148lag.99.gmail; Tue, 14 Apr 2015 13:00:19 -0700 (PDT) X-Received: by 10.152.225.133 with SMTP id rk5mr20718035lac.14.1429041619633; Tue, 14 Apr 2015 13:00:19 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id si10si1958664lac.134.2015.04.14.13.00.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 13:00:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbbqq2 with SMTP id qq2so17590357lbb.3 for ; Tue, 14 Apr 2015 13:00:19 -0700 (PDT) X-Received: by 10.152.28.5 with SMTP id x5mr20183156lag.112.1429041619066; Tue, 14 Apr 2015 13:00:19 -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.67.65 with SMTP id l1csp2092812lbt; Tue, 14 Apr 2015 13:00:18 -0700 (PDT) X-Received: by 10.140.150.149 with SMTP id 143mr28062203qhw.4.1429041617698; Tue, 14 Apr 2015 13:00:17 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id bs9si2222005qcb.34.2015.04.14.13.00.16; Tue, 14 Apr 2015 13:00:17 -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 6E47461E91; Tue, 14 Apr 2015 20:00:16 +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=unavailable autolearn_force=no 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 0A67961E87; Tue, 14 Apr 2015 20:00:14 +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 7253261E8E; Tue, 14 Apr 2015 20:00:12 +0000 (UTC) Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) by lists.linaro.org (Postfix) with ESMTPS id D691361E87 for ; Tue, 14 Apr 2015 20:00:11 +0000 (UTC) Received: by qkx62 with SMTP id 62so36071246qkx.0 for ; Tue, 14 Apr 2015 13:00:11 -0700 (PDT) X-Received: by 10.55.31.218 with SMTP id n87mr43006285qkh.99.1429041588513; Tue, 14 Apr 2015 12:59:48 -0700 (PDT) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id q74sm1470962qha.4.2015.04.14.12.59.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 12:59:47 -0700 (PDT) From: Mike Holmes To: christophe.milard@linaro.org Date: Tue, 14 Apr 2015 15:59:41 -0400 Message-Id: <1429041581-2284-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH] api_test: remove odp_shm_test 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.217.173 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 The shm test is obsolte, remove it Signed-off-by: Mike Holmes --- test/api_test/Makefile.am | 6 +--- test/api_test/odp_common.c | 2 -- test/api_test/odp_shm_test.c | 67 -------------------------------------------- test/api_test/odp_shm_test.h | 24 ---------------- 4 files changed, 1 insertion(+), 98 deletions(-) delete mode 100644 test/api_test/odp_shm_test.c delete mode 100644 test/api_test/odp_shm_test.h diff --git a/test/api_test/Makefile.am b/test/api_test/Makefile.am index f231fee..ddbac53 100644 --- a/test/api_test/Makefile.am +++ b/test/api_test/Makefile.am @@ -1,17 +1,13 @@ include $(top_srcdir)/test/Makefile.inc -bin_PROGRAMS = odp_shm odp_ring +bin_PROGRAMS = odp_ring -odp_shm_CFLAGS = $(AM_CFLAGS) odp_ring_CFLAGS = $(AM_CFLAGS) -odp_shm_LDFLAGS = $(AM_LDFLAGS) -static odp_ring_LDFLAGS = $(AM_LDFLAGS) -static noinst_HEADERS = \ $(top_srcdir)/test/api_test/odp_common.h \ - $(top_srcdir)/test/api_test/odp_shm_test.h \ $(top_srcdir)/test/test_debug.h -dist_odp_shm_SOURCES = odp_shm_test.c odp_common.c dist_odp_ring_SOURCES = odp_ring_test.c odp_common.c diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c index 18b365e..0677f9b 100644 --- a/test/api_test/odp_common.c +++ b/test/api_test/odp_common.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #define MAX_WORKERS 32 /**< Max worker threads */ @@ -22,7 +21,6 @@ /* Globals */ static odph_linux_pthread_t thread_tbl[MAX_WORKERS]; /**< worker threads table*/ static int num_workers; /**< number of workers */ -__thread test_shared_data_t *test_shared_data; /**< pointer to shared data */ /** * Print system information diff --git a/test/api_test/odp_shm_test.c b/test/api_test/odp_shm_test.c deleted file mode 100644 index 13d037d..0000000 --- a/test/api_test/odp_shm_test.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2013, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP test shared memory - */ - -#include -#include -#include -#include -#include - -static void *run_thread(void *arg) -{ - pthrd_arg *parg = (pthrd_arg *)arg; - int thr; - odp_shm_t shm; - - thr = odp_thread_id(); - - printf("Thread %i starts\n", thr); - - switch (parg->testcase) { - case ODP_SHM_TEST: - shm = odp_shm_lookup("test_shared_data"); - test_shared_data = odp_shm_addr(shm); - printf(" [%i] shared data at %p\n", thr, test_shared_data); - break; - default: - LOG_ERR("Invalid test case [%d]\n", parg->testcase); - } - fflush(stdout); - - return parg; -} - -int main(int argc __attribute__((__unused__)), - char *argv[] __attribute__((__unused__))) -{ - pthrd_arg thrdarg; - odp_shm_t shm; - - if (odp_test_global_init() != 0) - return -1; - - odp_print_system_info(); - - shm = odp_shm_reserve("test_shared_data", - sizeof(test_shared_data_t), 128, 0); - test_shared_data = odp_shm_addr(shm); - memset(test_shared_data, 0, sizeof(test_shared_data_t)); - printf("test shared data at %p\n\n", test_shared_data); - - thrdarg.testcase = ODP_SHM_TEST; - thrdarg.numthrds = odp_cpu_count(); - odp_test_thread_create(run_thread, &thrdarg); - - odp_test_thread_exit(&thrdarg); - - return 0; -} diff --git a/test/api_test/odp_shm_test.h b/test/api_test/odp_shm_test.h deleted file mode 100644 index 3b3f49b..0000000 --- a/test/api_test/odp_shm_test.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2013, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP api test shared memory header - */ - -#ifndef ODP_SHM_TEST_H -#define ODP_SHM_TEST_H - -typedef struct { - int foo; - int bar; -} test_shared_data_t; - -extern __thread test_shared_data_t *test_shared_data; -extern int test_shm(void); - -#endif /* ODP_SHM_TEST_H */