Ack On 24 March 2016 at 18:06, Bill Fischofer <bill.fischo...@linaro.org> wrote:
> These tests were modeled after some of the other tests for CPU APIs which > basically just confirm that an implementation for them exists. Since ODP > doesn't stipulate what these must return I'm not sure what more we can do. > I suppose an identify test for odp_cpu_socket_id() == > odp_cpu_socket_id_cpu(odp_cpu_id()) would make sense, but I can't think of > much beyond that. Note that since linux-generic doesn't itself do anything > with NUMA these routines are going to return ODP_SOCKET_ID_ANY. > > On Thu, Mar 24, 2016 at 1:36 PM, Mike Holmes <mike.hol...@linaro.org> > wrote: > >> >> >> On 23 March 2016 at 18:19, Bill Fischofer <bill.fischo...@linaro.org> >> wrote: >> >>> Add basic touch tests for odp_cpu_socket_id() and odp_cpu_socket_id_cpu() >>> >> >> Do we gain anything except loosing the reminder from LCOV that this needs >> testing if we apply this patch, it does not look like it makes many >> assertions on the behaviour it expects. >> >> >>> >>> Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> >>> --- >>> test/validation/thread/thread.c | 14 ++++++++++++++ >>> test/validation/thread/thread.h | 2 ++ >>> 2 files changed, 16 insertions(+) >>> >>> diff --git a/test/validation/thread/thread.c >>> b/test/validation/thread/thread.c >>> index 5cbec83..b70bc63 100644 >>> --- a/test/validation/thread/thread.c >>> +++ b/test/validation/thread/thread.c >>> @@ -20,6 +20,18 @@ void thread_test_odp_cpu_id(void) >>> CU_PASS(); >>> } >>> >>> +void thread_test_odp_cpu_socket_id(void) >>> +{ >>> + (void)odp_cpu_socket_id(); >>> + CU_PASS(); >>> +} >>> + >>> +void thread_test_odp_cpu_socket_id_cpu(void) >>> +{ >>> + (void)odp_cpu_socket_id_cpu(odp_cpu_id()); >>> + CU_PASS(); >>> +} >>> + >>> void thread_test_odp_thread_id(void) >>> { >>> (void)odp_thread_id(); >>> @@ -97,6 +109,8 @@ void thread_test_odp_thrmask_control(void) >>> >>> odp_testinfo_t thread_suite[] = { >>> ODP_TEST_INFO(thread_test_odp_cpu_id), >>> + ODP_TEST_INFO(thread_test_odp_cpu_socket_id), >>> + ODP_TEST_INFO(thread_test_odp_cpu_socket_id_cpu), >>> ODP_TEST_INFO(thread_test_odp_thread_id), >>> ODP_TEST_INFO(thread_test_odp_thread_count), >>> ODP_TEST_INFO(thread_test_odp_thrmask_to_from_str), >>> diff --git a/test/validation/thread/thread.h >>> b/test/validation/thread/thread.h >>> index f8ea710..8d24479 100644 >>> --- a/test/validation/thread/thread.h >>> +++ b/test/validation/thread/thread.h >>> @@ -16,6 +16,8 @@ >>> #endif >>> #include "mask_common.h" >>> void thread_test_odp_cpu_id(void); >>> +void thread_test_odp_cpu_socket_id(void); >>> +void thread_test_odp_cpu_socket_id_cpu(void); >>> void thread_test_odp_thread_id(void); >>> void thread_test_odp_thread_count(void); >>> void thread_test_odp_thrmask_control(void); >>> -- >>> 2.5.0 >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> https://lists.linaro.org/mailman/listinfo/lng-odp >>> >> >> >> >> -- >> Mike Holmes >> Technical Manager - Linaro Networking Group >> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs >> "Work should be fun and collaborative, the rest follows" >> >> >> > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp