From b85071174aa55464e6a56c99eb66c0d4f6798e24 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 25 Apr 2019 15:00:45 +0200 Subject: [PATCH] base: wait a bit at the end of the smp test Fix #3306 --- repos/base/src/test/smp/main.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/repos/base/src/test/smp/main.cc b/repos/base/src/test/smp/main.cc index b04e48f412..749e7bfa9d 100644 --- a/repos/base/src/test/smp/main.cc +++ b/repos/base/src/test/smp/main.cc @@ -304,7 +304,17 @@ namespace Tlb_shootdown_test { log("TLB: all threads are up and running..."); destroy(heap, ram_ds); - log("TLB: ram dataspace destroyed, all will fault..."); + log("TLB: ram dataspace destroyed, all have to fail..."); + + /** + * The more cores are existing the more threads have to fail. + * The bottleneck is core's page-fault messages all printed + * over a lazy serial line from core 0. + * We have to wait here, for some time so that all fault + * messages are received before the test finishes. + */ + for (volatile unsigned i = 0; i < (0x2000000 * cpus.total()); i++) ; + for (unsigned i = 1; i < cpus.total(); i++) destroy(heap, threads[i]); destroy(heap, threads);