Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41024C433FE for ; Thu, 6 Jan 2022 10:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238151AbiAFKxr (ORCPT ); Thu, 6 Jan 2022 05:53:47 -0500 Received: from pi.codeconstruct.com.au ([203.29.241.158]:43504 "EHLO codeconstruct.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238102AbiAFKxr (ORCPT ); Thu, 6 Jan 2022 05:53:47 -0500 Received: from pecola.lan (unknown [159.196.93.152]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id A746420181; Thu, 6 Jan 2022 19:27:04 +0800 (AWST) Message-ID: Subject: Re: [PATCH net-next 1/2] mctp: test: disallow MCTP_TEST when building as a module From: Jeremy Kerr To: David Gow Cc: Brendan Higgins , Matt Johnston , "open list:KERNEL SELFTEST FRAMEWORK" Date: Thu, 06 Jan 2022 18:53:41 +0800 In-Reply-To: References: <20211002022656.1681956-1-jk@codeconstruct.com.au> <101d12fc9250b7a445ff50a9e7a25cd74d0e16eb.camel@codeconstruct.com.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Hi all, Happy new year! I'm just picking up this thread again, after having a bunch of other things come up at the end of December. I've since implemented some of the direct feedback on the patch, but wanted to clarify some overall direction too: > One idea I've had in the past is to keep such a list around of "test > suites to be run when KUnit is ready". This is partly because it's > much nicer to have all the test suites run together as part of a > single (K)TAP output, so this could be a way of implementing (at least > part of) that. I had a look at implementing this, but it doesn't seem to win us much with the current structure: since we kunit_run_all_tests() before a filesystem is available, kunit will always be "ready" (and the tests run) before we've had a chance to load modules, which may contain further tests. One option would be to defer kunit_run_all_tests() until we think we have the full set of tests, but there's no specific point at which we know that all required modules are loaded. We could defer this to an explicit user-triggered "run the tests now" interface (debugfs?), but that might break expectations of the tests automatically executing on init. Alternatively, I could properly split the TAP output, and just run tests whenever they're probed - either from the built-in set or as modules are loaded at arbitrary points in the future. However, I'm not sure of what the expectations on the consumer-side of the TAP output might be. Are there any preferences on the approach here? Cheers, Jeremy