Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753258AbdLNPVP (ORCPT ); Thu, 14 Dec 2017 10:21:15 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55284 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752610AbdLNPVO (ORCPT ); Thu, 14 Dec 2017 10:21:14 -0500 Subject: Re: [PATCH] misc: kgdbts: Display progress of asynchronous tests To: Daniel Thompson CC: , Arnd Bergmann , Greg Kroah-Hartman , , References: <20171212121036.26468-1-daniel.thompson@linaro.org> From: Jason Wessel Message-ID: <31570645-24de-3625-7a43-eb6d41214478@windriver.com> Date: Thu, 14 Dec 2017 09:20:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171212121036.26468-1-daniel.thompson@linaro.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2002 Lines: 52 On 12/12/2017 06:10 AM, Daniel Thompson wrote: > 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. Do you know which test was specifically causing a problem? It might not be documented anywhere but I had usually started a user space process which quickly created and deleted user space processes in order to make the kgdbts tests complete quickly. I don't really see any issue with emitting a printk to indicate progress as it is debug only and test specific. As you know printk's change timing. If I had a dime for each time I had seen a problem go away when I started adding printk's I'd have at least a 50 cents. :-) Jason. PS. Added this to kgdb-next and I'll put in a request to get kgdb-next added back to the linux-next builder. > > 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 >