diff options
author | Nicolas Morey-Chaisemartin <nmorey@kalray.eu> | 2015-08-26 16:06:05 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-09-16 11:01:33 +0300 |
commit | 085a865dd7ca24d5fcc0c1bb9242590ee5aec2c5 (patch) | |
tree | f24a23ea3976a9ed0fb878c41afb7a8ecda0f2a5 /test | |
parent | 4d07d2ad4db899c08eecf92153eb87145b7307d7 (diff) |
validation: synchronizers: support a single worker
no_barrier and no_lock tests are expected to fail but when
running a single worker, they do work
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/validation/synchronizers/synchronizers.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/validation/synchronizers/synchronizers.c b/test/validation/synchronizers/synchronizers.c index 0a31a40ef..6cb36990a 100644 --- a/test/validation/synchronizers/synchronizers.c +++ b/test/validation/synchronizers/synchronizers.c @@ -253,9 +253,10 @@ static void *no_barrier_functional_test(void *arg UNUSED) * Note that the following CU_ASSERT MAY appear incorrect, but for the * no_barrier test it should see barrier_errs or else there is something * wrong with the test methodology or the ODP thread implementation. - * So this test PASSES only if it sees barrier_errs! + * So this test PASSES only if it sees barrier_errs or a single + * worker was used. */ - CU_ASSERT(barrier_errs != 0); + CU_ASSERT(barrier_errs != 0 || global_mem->g_num_threads == 1); thread_finalize(per_thread_mem); return NULL; @@ -447,9 +448,10 @@ static void *no_lock_functional_test(void *arg UNUSED) /* Note that the following CU_ASSERT MAY appear incorrect, but for the * no_lock test it should see sync_failures or else there is something * wrong with the test methodology or the ODP thread implementation. - * So this test PASSES only if it sees sync_failures + * So this test PASSES only if it sees sync_failures or a single + * worker was used. */ - CU_ASSERT(sync_failures != 0); + CU_ASSERT(sync_failures != 0 || global_mem->g_num_threads == 1); thread_finalize(per_thread_mem); |