Assuming that entire api_test directory will be removed next.

Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com>


> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of ext
> Mike Holmes
> Sent: Tuesday, April 14, 2015 11:00 PM
> To: christophe.mil...@linaro.org
> Cc: lng-odp@lists.linaro.org
> Subject: [lng-odp] [PATCH] api_test: remove odp_shm_test
> 
> The shm test is obsolte, remove it
> 
> Signed-off-by: Mike Holmes <mike.hol...@linaro.org>
> ---
>  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 <odp.h>
>  #include <odp/helper/linux.h>
>  #include <odp_common.h>
> -#include <odp_shm_test.h>
>  #include <test_debug.h>
> 
>  #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 <string.h>
> -#include <odp.h>
> -#include <odp_common.h>
> -#include <odp_shm_test.h>
> -#include <test_debug.h>
> -
> -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 */
> --
> 2.1.0
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to