This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 8705e548f330d23173283fcca62f4afb835a6380 (commit) from eafd83ed1d036a404a18874d80c11d454d2580d3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 8705e548f330d23173283fcca62f4afb835a6380 Author: Matias Elo matias.elo@nokia.com Date: Fri Aug 18 10:08:17 2017 +0300
helper: test: fix running process/thread tests on single core systems
This patch enables running process and thread validation tests on single core systems.
Fixes bug: https://bugs.linaro.org/show_bug.cgi?id=2812
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/helper/test/linux/process.c b/helper/test/linux/process.c index e08ef868..e1ab8c83 100644 --- a/helper/test/linux/process.c +++ b/helper/test/linux/process.c @@ -56,9 +56,10 @@ int main(int argc ODPH_UNUSED, char *argv[] ODPH_UNUSED) cpu = odp_cpumask_first(&cpu_mask); printf("the first CPU: %i\n", cpu);
- /* reserve cpu 0 for the control plane so remove it from - * the default mask */ - odp_cpumask_clr(&cpu_mask, 0); + /* If possible, remove CPU 0 from the default mask to reserve it for the + * control plane. */ + if (num_workers > 1) + odp_cpumask_clr(&cpu_mask, 0); num_workers = odp_cpumask_count(&cpu_mask); (void)odp_cpumask_to_str(&cpu_mask, cpumaskstr, sizeof(cpumaskstr)); printf("new cpu mask: %s\n", cpumaskstr); diff --git a/helper/test/linux/pthread.c b/helper/test/linux/pthread.c index 2bec0d17..3422751f 100644 --- a/helper/test/linux/pthread.c +++ b/helper/test/linux/pthread.c @@ -56,9 +56,10 @@ int main(int argc ODPH_UNUSED, char *argv[] ODPH_UNUSED) cpu = odp_cpumask_first(&cpu_mask); printf("the first CPU: %i\n", cpu);
- /* reserve cpu 0 for the control plane so remove it from - * the default mask */ - odp_cpumask_clr(&cpu_mask, 0); + /* If possible, remove CPU 0 from the default mask to reserve it for the + * control plane. */ + if (num_workers > 1) + odp_cpumask_clr(&cpu_mask, 0); num_workers = odp_cpumask_count(&cpu_mask); (void)odp_cpumask_to_str(&cpu_mask, cpumaskstr, sizeof(cpumaskstr)); printf("new cpu mask: %s\n", cpumaskstr); diff --git a/helper/test/odpthreads.c b/helper/test/odpthreads.c index 219e1b65..ab890cb3 100644 --- a/helper/test/odpthreads.c +++ b/helper/test/odpthreads.c @@ -126,9 +126,10 @@ int main(int argc, char *argv[]) cpu = odp_cpumask_first(&cpu_mask); printf("the first CPU: %i\n", cpu);
- /* reserve cpu 0 for the control plane so remove it from - * the default mask */ - odp_cpumask_clr(&cpu_mask, 0); + /* If possible, remove CPU 0 from the default mask to reserve it for the + * control plane. */ + if (num_workers > 1) + odp_cpumask_clr(&cpu_mask, 0); num_workers = odp_cpumask_count(&cpu_mask); (void)odp_cpumask_to_str(&cpu_mask, cpumaskstr, sizeof(cpumaskstr)); printf("new cpu mask: %s\n", cpumaskstr);
-----------------------------------------------------------------------
Summary of changes: helper/test/linux/process.c | 7 ++++--- helper/test/linux/pthread.c | 7 ++++--- helper/test/odpthreads.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-)
hooks/post-receive