Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbdLLMLA (ORCPT ); Tue, 12 Dec 2017 07:11:00 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:43476 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbdLLMK7 (ORCPT ); Tue, 12 Dec 2017 07:10:59 -0500 X-Google-Smtp-Source: ACJfBosxr9/jwHbP3PSQWgBIMIqOubbzF7yJctCSa567blDjcK63lm0c0nA+U4EuKeTNYP8ePMBdXQ== From: Daniel Thompson To: Jason Wessel Cc: Daniel Thompson , kgdb-bugreport@lists.sourceforge.net, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH] misc: kgdbts: Display progress of asynchronous tests Date: Tue, 12 Dec 2017 12:10:36 +0000 Message-Id: <20171212121036.26468-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 39 kgdbts includes a couple of different "thrashing" style tests that may have long runtimes (especially on simulated platforms) and which run asynchronously. This is uncomfortable for interactive use and makes setting timeouts tricky for automatic use. Fix by providing a optional means to show progress during these tests. Selecting 100 is somewhat arbitrary but it matches the step used on the synchronous tests, is large enough to keep the call to printk from invalidating the testing and is human enough to "feel about right". Signed-off-by: Daniel Thompson --- drivers/misc/kgdbts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 24108bfad889..6193270e7b3d 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -400,10 +400,14 @@ static void skip_back_repeat_test(char *arg) int go_back = simple_strtol(arg, NULL, 10); repeat_test--; - if (repeat_test <= 0) + if (repeat_test <= 0) { ts.idx++; - else + } else { + if (repeat_test % 100 == 0) + v1printk("kgdbts:RUN ... %d remaining\n", repeat_test); + ts.idx -= go_back; + } fill_get_buf(ts.tst[ts.idx].get); } -- 2.14.3