Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp2291620qtg; Mon, 3 Apr 2023 14:35:07 -0700 (PDT) X-Google-Smtp-Source: AKy350aFAunNOVeLyyWsHYTfycWCOVODapnzZ9VplxMOdIXktFPm5DjSWfEXHd0TnMOc3xh+kYKa X-Received: by 2002:a17:902:d4c7:b0:1a1:e112:4607 with SMTP id o7-20020a170902d4c700b001a1e1124607mr433366plg.50.1680557707081; Mon, 03 Apr 2023 14:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680557707; cv=none; d=google.com; s=arc-20160816; b=Nl2BDV7QjBYJA9QYoJv2xDDRvNcYxI7TXTZHV3C7CYdxd4Le1OrSouNWcxkvtvsKlA /vlVH8RbXVhwmIMGbKZV7diWYg9O2V/iQmh6023Ry7bgbTwSsB79lu1FU8W0wn/d4pcO MspaZpAcYbhLTjMEjCi/qc6H1DVst2VENUB+AbFgvn7SzKXyexEV6NrDdko7VizEuxBT lySHZfetsvQhzGKggC9dOcgX3JmBWqk+784tWmiT+0TxGyCyPtWJkb1kGzsmn5WC6rMO bI6ZEM4JxVtFT5v75P84ocTlQyVMtQoeyTYrnOj+KnsNwwYSAwC+78BTcFecGmAt3DCn Zv1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/0UhEJOalzOd4UjOCHgFhKyFYLGz2fWxLcXZCjxUFWA=; b=zImziteGye0D8b7fpiKvgfPNXw0wYg3z7tq2NkWjeXxN85HSBwjFCWbOQ6GqW2cAM9 P6J1O0waqeCqM1bQXFGhoGdDLA1iKAPxjx0VG3BgaB3PuN2TdAFX/XKHoX3+PZx70KhQ 5C3z66RPaXqOuJmRrSYRMvE/fy3ofViVui0tmlpa83/RPBNJh3mG+xHe8Di7M4CHqgVw sBgYDSbBuyar0rYG1mS+KjH/g+cfdNOQgYLmBsEYu5mR6m+ND3C/8B+/Vi16vaFc2Z8c 4rCWlMF2Cs16n+bP1gD0d4hPVkxKqARuFPZpbWpqHFwqaL+wJ3aAgm+NEmK0CbFQuwj3 T2NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QYfo0Hac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y129-20020a633287000000b00513f17a1b32si2786627pgy.606.2023.04.03.14.34.54; Mon, 03 Apr 2023 14:35:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QYfo0Hac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232745AbjDCVaL (ORCPT + 99 others); Mon, 3 Apr 2023 17:30:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbjDCVaK (ORCPT ); Mon, 3 Apr 2023 17:30:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5DB173F; Mon, 3 Apr 2023 14:30:09 -0700 (PDT) Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2E804660036F; Mon, 3 Apr 2023 22:30:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680557407; bh=89fICjanYXC+xkrZxmZS2SkgJF0T/OuXjRoo3D52r70=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QYfo0HacUNTAtvjNKvvgPFM4llq9UPVLoC540U+x2JV+MUhDD8RfP/E1XGMiercQZ xY5/E99mJPx55y1H98dCJxXIAUlGWn6mE/yRmzE+BGCYtcGz1O46MCOAz0aRBSp2O4 REx73GOg533mbBeARwDIvdroan/RC5cUiZ1qK/4k1RuJEZiNc4yBhSU3Kkt/0QK/0n 636hTgTrMzL6olfi8tKkX/sPaxohFxeoeucI6EhibeiEpdLDNHvJxKeI7IJGGGazgC d0KOWznFvkTaO8b2V4uY4Pevxko+oNUUwfa6i5GN76MKkHLPlzOPtkWlyDoS1S49U6 WQtWTcx8o4CgA== Date: Mon, 3 Apr 2023 17:30:02 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Mark Brown Cc: Shuah Khan , kernel@collabora.com, Jaroslav Kysela , Shuah Khan , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2] kselftest/alsa: Increase kselftest timeout Message-ID: <5302e70d-cb58-4e70-b44f-ff81b138a2e1@notapiano> References: <20221214130353.1989075-1-nfraprado@collabora.com> <808f35bf-2800-c34b-cae9-4d8eaa11294d@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 14, 2022 at 06:15:22PM +0000, Mark Brown wrote: > On Wed, Dec 14, 2022 at 09:40:02AM -0700, Shuah Khan wrote: > > On 12/14/22 06:03, N?colas F. R. A. Prado wrote: > > > > The default timeout for kselftests is 45 seconds, but that isn't enough > > > time to run pcm-test when there are many PCMs on the device, nor for > > > mixer-test when slower control buses and fancier CODECs are present. > > > > > > As data points, running pcm-test on mt8192-asurada-spherion takes about > > > 1m15s, and mixer-test on rk3399-gru-kevin takes about 2m. > > > > > > Set the timeout to 4 minutes to allow both pcm-test and mixer-test to > > > run to completion with some slack. > > > What I have in mind is that the default run can be limited scope. > > Run it on a few controllers and in the report mention that a full > > test can be run as needed. > > > There are a couple of examples of default vs. full test runs - cpu > > and memory hot-lug tests. > > For pcm-test it's probably more sensible to refactor things to run > multiple PCMs (or at least cards, though that's less relevant in an > embedded context) in parallel rather than cut down the test coverage, > it's already very limited coverage as things stand. There is some risk > there could be false positives from cross talk between the PCMs but it's > probably worth it. > > With mixer-test if it's actually taking a long time to run generally > this is just identifying that the driver could use some work, > implementing runtime power management and a register cache will probably > resolve most issues. Hi Shuah and Mark, sorry for the delay, but I'd still like to move forward with this. Shuah, I've checked the tests you mentioned that have limited scope by default, and we could do the same for the alsa kselftest, but I'm not sure I understand how this solves the problem here. The fact is that the current timeout is too short for a full run of the alsa kselftest on some machines, so we need to increase the timeout in any case regardless of there being a limited scope run by default or not. Mark implemented the parallelization he mentioned in the meantime, but it doesn't help every hardware. The only other option I see is reducing the time the PCM is tested for (currently 4 seconds). But I assume that number was chosen for a reason. I'd also like to better understand why we have an arbitrary (45 seconds) default timeout. If there are users who want to limit the test duration to an arbitrary time even if that means not getting full test coverage, shouldn't such arbitrary time be supplied by the users themselves? And is there any guidance on what are the acceptable exceptions to having a longer timeout? Because there seem to be many kselftests which override the default timeout with a longer one, even ones that disable it altogether. I can see the value of having a timeout as the worst case scenario of how long the test takes to run, to avoid hanging indefinitely, which is what the tests with overriden timeout setting do. For the alsa kselftests that's hardware-dependent (number of kcontrols for mixer-test; and number of PCMs and working configurations for pcm-test), so we'd either need to guess a high enough value for the timeout that all known hardware fits, or allow the timeout to be set dynamically during runtime. Thanks, N?colas